File tree Expand file tree Collapse file tree 1 file changed +1
-26
lines changed
src/main/java/com/google/cloud/spanner/jdbc Expand file tree Collapse file tree 1 file changed +1
-26
lines changed Original file line number Diff line number Diff line change 3636
3737/** Enum for mapping Cloud Spanner data types to Java classes and JDBC SQL {@link Types}. */
3838enum JdbcDataType {
39- INTEGER {
40- public int getSqlType () {
41- return Types .INTEGER ;
42- }
43-
44- @ Override
45- public Class <Integer > getJavaClass () {
46- return Integer .class ;
47- }
48-
49- @ Override
50- public Code getCode () {
51- return Code .INT64 ;
52- }
53-
54- @ Override
55- public List <Integer > getArrayElements (ResultSet rs , int columnIndex ) {
56- return rs .getLongList (columnIndex ).stream ().map (Long ::intValue ).collect (Collectors .toList ());
57- }
58-
59- @ Override
60- public Type getSpannerType () {
61- return Type .int64 ();
62- }
63- },
6439 BOOL {
6540 @ Override
6641 public int getSqlType () {
@@ -261,7 +236,7 @@ public Type getSpannerType() {
261236
262237 @ Override
263238 public List <String > getAliases () {
264- return Collections . singletonList ("bigint" );
239+ return Arrays . asList ("bigint" , "integer " );
265240 }
266241 },
267242 NUMERIC {
You can’t perform that action at this time.
0 commit comments