@@ -83,39 +83,39 @@ The data type mapping between ScalarDB and JDBC is as follows:
8383
8484| ScalarDB Type | JDBC (Java) Type |
8585| ---------------| --------------------|
86- | Boolean | boolean or Boolean |
87- | Int | int or Integer |
88- | BigInt | long or Long |
89- | Float | float or Float |
90- | Double | double or Double |
91- | Text | String |
92- | Blob | byte[ ] |
86+ | BOOLEAN | boolean or Boolean |
87+ | INT | int or Integer |
88+ | BIGINT | long or Long |
89+ | FLOAT | float or Float |
90+ | DOUBLE | double or Double |
91+ | TEXT | String |
92+ | BLOB | byte[ ] |
9393
9494How to get the data from a ` java.sql.ResultSet ` object for each data type is as follows:
9595
9696``` java
9797try (ResultSet resultSet = ... ) {
9898 resultSet. next();
9999
100- // Get a Boolean value of a column
100+ // Get a BOOLEAN value of a column
101101 boolean booleanValue = resultSet. getBoolean(" <column name>" );
102102
103- // Get an Int value of a column
103+ // Get an INT value of a column
104104 int intValue = resultSet. getInt(" <column name>" );
105105
106- // Get a BigInt value of a column
106+ // Get a BIGINT value of a column
107107 long bigIntValue = resultSet. getLong(" <column name>" );
108108
109- // Get a Float value of a column
109+ // Get a FLOAT value of a column
110110 float floatValue = resultSet. getFloat(" <column name>" );
111111
112- // Get a Double value of a column
112+ // Get a DOUBLE value of a column
113113 double doubleValue = resultSet. getDouble(" <column name>" );
114114
115- // Get a Text value of a column
115+ // Get a TEXT value of a column
116116 String textValue = resultSet. getString(" <column name>" );
117117
118- // Get a Blob value of a column
118+ // Get a BLOB value of a column
119119 byte [] blobValue = resultSet. getBytes(" <column name>" );
120120}
121121```
@@ -124,26 +124,26 @@ How to set the data as a parameter for each data type for a `java.sql.PreparedSt
124124
125125``` java
126126try (PreparedStatement preparedStatement = ... ) {
127- // Set a Boolean value as parameter
128- preparedStatement. setBoolean(1 , < Boolean value> );
127+ // Set a BOOLEAN value as parameter
128+ preparedStatement. setBoolean(1 , < BOOLEAN value> );
129129
130- // Set an Int value as parameter
131- preparedStatement. setInt(2 , < Int value> );
130+ // Set an INT value as parameter
131+ preparedStatement. setInt(2 , < INT value> );
132132
133- // Set a BigInt value as parameter
134- preparedStatement. setLong(3 , < BigInt value> );
133+ // Set a BIGINT value as parameter
134+ preparedStatement. setLong(3 , < BIGINT value> );
135135
136- // Set a Float value as parameter
137- preparedStatement. setFloat(4 , < Float value> );
136+ // Set a FLOAT value as parameter
137+ preparedStatement. setFloat(4 , < FLOAT value> );
138138
139- // Set a Double value as parameter
140- preparedStatement. setDouble(5 , < Double value> );
139+ // Set a DOUBLE value as parameter
140+ preparedStatement. setDouble(5 , < DOUBLE value> );
141141
142- // Set a Text value as parameter
143- preparedStatement. setString(7 , " <Text value>" );
142+ // Set a TEXT value as parameter
143+ preparedStatement. setString(7 , " <TEXT value>" );
144144
145- // Set a Blob value as parameter
146- preparedStatement. setBytes(8 , < Blob value> );
145+ // Set a BLOB value as parameter
146+ preparedStatement. setBytes(8 , < BLOB value> );
147147
148148 preparedStatement. execute();
149149}
0 commit comments