Skip to content

Commit

Permalink
Merge pull request #44 from JuliaDatabases/as/numeric-double
Browse files Browse the repository at this point in the history
 Retrieve values as doubles, not floats
  • Loading branch information
aviks committed May 16, 2019
2 parents 3e1c456 + 949ad34 commit 3d540d2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
21 changes: 21 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -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"]
7 changes: 5 additions & 2 deletions src/JDBC.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 3d540d2

Please sign in to comment.