Permalink
Browse files

add one more parameter `typeName` to `jdbcTypeToScala`

  • Loading branch information...
tminglei committed Aug 2, 2015
1 parent 6b783d1 commit 99c2737c93f18b07646689dddfde04f47c52519c
@@ -97,9 +97,8 @@ class JdbcModelBuilder(mTables: Seq[MTable], ignoreInvalidDefaults: Boolean)(imp
class Builders(val tablesByQName: Map[MQName, TableBuilder])
/** Converts from java.sql.Types to the corresponding Java class name (with fully qualified path). */
/** Converts from java.sql.Types to the corresponding Java class name (with fully qualified path). */
def jdbcTypeToScala(jdbcType: Int): ClassTag[_] = {
/** Converts from java.sql.Types w/ type name to the corresponding Java class name (with fully qualified path). */
def jdbcTypeToScala(jdbcType: Int, typeName: String = ""): ClassTag[_] = {
import java.sql.Types._
import scala.reflect.classTag
// see TABLE B-1 of JSR-000221 JBDCTM API Specification 4.1 Maintenance Release
@@ -73,7 +73,7 @@ object ActionBasedSQLInterpolation {
case null => Vector()
case resultMeta => Vector.tabulate(resultMeta.getColumnCount) { i =>
val modelBuilder = dc.driver.createModelBuilder(Nil, true)(scala.concurrent.ExecutionContext.global)
modelBuilder.jdbcTypeToScala(resultMeta.getColumnType(i + 1))
modelBuilder.jdbcTypeToScala(resultMeta.getColumnType(i + 1), resultMeta.getColumnTypeName(i + 1))
}
}
}

0 comments on commit 99c2737

Please sign in to comment.