@@ -84,39 +84,39 @@ The data type mapping between ScalarDB and JDBC is as follows:
8484
8585| ScalarDB Type | JDBC (Java) Type |
8686| ---------------| --------------------|
87- | Boolean | boolean or Boolean |
88- | Int | int or Integer |
89- | BigInt | long or Long |
90- | Float | float or Float |
91- | Double | double or Double |
92- | Text | String |
93- | Blob | byte[ ] |
87+ | BOOLEAN | boolean or Boolean |
88+ | INT | int or Integer |
89+ | BIGINT | long or Long |
90+ | FLOAT | float or Float |
91+ | DOUBLE | double or Double |
92+ | TEXT | String |
93+ | BLOB | byte[ ] |
9494
9595How to get the data from a ` java.sql.ResultSet ` object for each data type is as follows:
9696
9797``` java
9898try (ResultSet resultSet = ... ) {
9999 resultSet. next();
100100
101- // Get a Boolean value of a column
101+ // Get a BOOLEAN value of a column
102102 boolean booleanValue = resultSet. getBoolean(" <column name>" );
103103
104- // Get an Int value of a column
104+ // Get an INT value of a column
105105 int intValue = resultSet. getInt(" <column name>" );
106106
107- // Get a BigInt value of a column
107+ // Get a BIGINT value of a column
108108 long bigIntValue = resultSet. getLong(" <column name>" );
109109
110- // Get a Float value of a column
110+ // Get a FLOAT value of a column
111111 float floatValue = resultSet. getFloat(" <column name>" );
112112
113- // Get a Double value of a column
113+ // Get a DOUBLE value of a column
114114 double doubleValue = resultSet. getDouble(" <column name>" );
115115
116- // Get a Text value of a column
116+ // Get a TEXT value of a column
117117 String textValue = resultSet. getString(" <column name>" );
118118
119- // Get a Blob value of a column
119+ // Get a BLOB value of a column
120120 byte [] blobValue = resultSet. getBytes(" <column name>" );
121121}
122122```
@@ -125,26 +125,26 @@ How to set the data as a parameter for each data type for a `java.sql.PreparedSt
125125
126126``` java
127127try (PreparedStatement preparedStatement = ... ) {
128- // Set a Boolean value as parameter
129- preparedStatement. setBoolean(1 , < Boolean value> );
128+ // Set a BOOLEAN value as parameter
129+ preparedStatement. setBoolean(1 , < BOOLEAN value> );
130130
131- // Set an Int value as parameter
132- preparedStatement. setInt(2 , < Int value> );
131+ // Set an INT value as parameter
132+ preparedStatement. setInt(2 , < INT value> );
133133
134- // Set a BigInt value as parameter
135- preparedStatement. setLong(3 , < BigInt value> );
134+ // Set a BIGINT value as parameter
135+ preparedStatement. setLong(3 , < BIGINT value> );
136136
137- // Set a Float value as parameter
138- preparedStatement. setFloat(4 , < Float value> );
137+ // Set a FLOAT value as parameter
138+ preparedStatement. setFloat(4 , < FLOAT value> );
139139
140- // Set a Double value as parameter
141- preparedStatement. setDouble(5 , < Double value> );
140+ // Set a DOUBLE value as parameter
141+ preparedStatement. setDouble(5 , < DOUBLE value> );
142142
143- // Set a Text value as parameter
144- preparedStatement. setString(7 , " <Text value>" );
143+ // Set a TEXT value as parameter
144+ preparedStatement. setString(7 , " <TEXT value>" );
145145
146- // Set a Blob value as parameter
147- preparedStatement. setBytes(8 , < Blob value> );
146+ // Set a BLOB value as parameter
147+ preparedStatement. setBytes(8 , < BLOB value> );
148148
149149 preparedStatement. execute();
150150}
0 commit comments