diff --git a/Project.toml b/Project.toml new file mode 100644 index 0000000..37c75f6 --- /dev/null +++ b/Project.toml @@ -0,0 +1,21 @@ +name = "JDBC" +uuid = "6042db11-3c3d-5e84-8dba-9cbf74c9ba48" + +[deps] +DataStreams = "9a8bc11e-79be-5b39-94d7-1ccc349a1a85" +Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" +JavaCall = "494afd89-becb-516b-aafa-70d2670c0337" + +[compat] +DataFrames = "< 0.18.0" +JavaCall = "≥ 0.7.0" +julia = "≥ 0.7.0" + +[extras] +DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" +Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[targets] +test = ["Dates", "Pkg", "Test", "DataFrames"] diff --git a/src/JDBC.jl b/src/JDBC.jl index 979d6ae..4fe19b9 100644 --- a/src/JDBC.jl +++ b/src/JDBC.jl @@ -486,6 +486,9 @@ The column name """ getColumnName(rsmd::JResultSetMetaData, col::Integer) = jcall(rsmd, "getColumnName", JString, (jint,), col) +getColumnPrecision(rsmd::JResultSetMetaData, col::Integer) = jcall(rsmd, "getColumnPrecision", jint, (jint,), col) +getColumnScale(rsmd::JResultSetMetaData, col::Integer) = jcall(rsmd, "getColumnScale", jint, (jint,), col) + isNullable(rsmd::JResultSetMetaData, col::Integer) = jcall(rsmd, "isNullable", jint, (jint,), col) @@ -557,12 +560,12 @@ global const get_method_dict = Dict( JDBC_COLTYPE_NCHAR => getNString, # JDBC_COLTYPE_NCLOB => 2011, # JDBC_COLTYPE_NULL => 0, - JDBC_COLTYPE_NUMERIC => getFloat, + JDBC_COLTYPE_NUMERIC => getDouble, JDBC_COLTYPE_NVARCHAR => getNString, # JDBC_COLTYPE_OTHER => 1111, JDBC_COLTYPE_REAL => getFloat, # JDBC_COLTYPE_REF => 2006, - JDBC_COLTYPE_ROWID => getInt, + JDBC_COLTYPE_ROWID => getLong, JDBC_COLTYPE_SMALLINT => getShort, # JDBC_COLTYPE_SQLXML => 2009, # JDBC_COLTYPE_STRUCT => 2002,