From b73ab94e58f9851865c25a1637471e44479ecaaf Mon Sep 17 00:00:00 2001 From: josh-wong Date: Wed, 12 Feb 2025 06:59:16 +0000 Subject: [PATCH] AUTO: Sync ScalarDB docs in English to docs site repo --- .../version-3.13/scalardb-sql/jdbc-guide.mdx | 56 +++++++++---------- .../scalardb-sql/sql-api-guide.mdx | 16 +++--- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/versioned_docs/version-3.13/scalardb-sql/jdbc-guide.mdx b/versioned_docs/version-3.13/scalardb-sql/jdbc-guide.mdx index 7dca1a5a..8ad8e901 100644 --- a/versioned_docs/version-3.13/scalardb-sql/jdbc-guide.mdx +++ b/versioned_docs/version-3.13/scalardb-sql/jdbc-guide.mdx @@ -84,13 +84,13 @@ The data type mapping between ScalarDB and JDBC is as follows: | ScalarDB Type | JDBC (Java) Type | |---------------|--------------------| -| Boolean | boolean or Boolean | -| Int | int or Integer | -| BigInt | long or Long | -| Float | float or Float | -| Double | double or Double | -| Text | String | -| Blob | byte[] | +| BOOLEAN | boolean or Boolean | +| INT | int or Integer | +| BIGINT | long or Long | +| FLOAT | float or Float | +| DOUBLE | double or Double | +| TEXT | String | +| BLOB | byte[] | How to get the data from a `java.sql.ResultSet` object for each data type is as follows: @@ -98,25 +98,25 @@ How to get the data from a `java.sql.ResultSet` object for each data type is as try (ResultSet resultSet = ...) { resultSet.next(); - // Get a Boolean value of a column + // Get a BOOLEAN value of a column boolean booleanValue = resultSet.getBoolean(""); - // Get an Int value of a column + // Get an INT value of a column int intValue = resultSet.getInt(""); - // Get a BigInt value of a column + // Get a BIGINT value of a column long bigIntValue = resultSet.getLong(""); - // Get a Float value of a column + // Get a FLOAT value of a column float floatValue = resultSet.getFloat(""); - // Get a Double value of a column + // Get a DOUBLE value of a column double doubleValue = resultSet.getDouble(""); - // Get a Text value of a column + // Get a TEXT value of a column String textValue = resultSet.getString(""); - // Get a Blob value of a column + // Get a BLOB value of a column byte[] blobValue = resultSet.getBytes(""); } ``` @@ -125,26 +125,26 @@ How to set the data as a parameter for each data type for a `java.sql.PreparedSt ```java try (PreparedStatement preparedStatement = ...) { - // Set a Boolean value as parameter - preparedStatement.setBoolean(1, ); + // Set a BOOLEAN value as parameter + preparedStatement.setBoolean(1, ); - // Set an Int value as parameter - preparedStatement.setInt(2, ); + // Set an INT value as parameter + preparedStatement.setInt(2, ); - // Set a BigInt value as parameter - preparedStatement.setLong(3, ); + // Set a BIGINT value as parameter + preparedStatement.setLong(3, ); - // Set a Float value as parameter - preparedStatement.setFloat(4, ); + // Set a FLOAT value as parameter + preparedStatement.setFloat(4, ); - // Set a Double value as parameter - preparedStatement.setDouble(5, ); + // Set a DOUBLE value as parameter + preparedStatement.setDouble(5, ); - // Set a Text value as parameter - preparedStatement.setString(7, ""); + // Set a TEXT value as parameter + preparedStatement.setString(7, ""); - // Set a Blob value as parameter - preparedStatement.setBytes(8, ); + // Set a BLOB value as parameter + preparedStatement.setBytes(8, ); preparedStatement.execute(); } diff --git a/versioned_docs/version-3.13/scalardb-sql/sql-api-guide.mdx b/versioned_docs/version-3.13/scalardb-sql/sql-api-guide.mdx index 0c3558be..16a75bdc 100644 --- a/versioned_docs/version-3.13/scalardb-sql/sql-api-guide.mdx +++ b/versioned_docs/version-3.13/scalardb-sql/sql-api-guide.mdx @@ -151,35 +151,35 @@ As mentioned, a `ResultSet` object returns `Record` objects that represent recor You can get a column value of a result with `getXXX("")` or `getXXX()` methods (XXX is a type name) as follows: ```java -// Get a Boolean value of a column +// Get a BOOLEAN value of a column boolean booleanValueGottenByName = record.getBoolean(""); boolean booleanValueGottenByIndex = record.getBoolean(); -// Get an Int value of a column +// Get an INT value of a column int intValueGottenByName = record.getInt(""); int intValueGottenByIndex = record.getInt(); -// Get a BigInt value of a column +// Get a BIGINT value of a column long bigIntValueGottenByName = record.getBigInt(""); long bigIntValueGottenByIndex = record.getBigInt(); -// Get a Float value of a column +// Get a FLOAT value of a column float floatValueGottenByName = record.getFloat(""); float floatValueGottenByIndex = record.getFloat(); -// Get a Double value of a column +// Get a DOUBLE value of a column double doubleValueGottenByName = record.getDouble(""); double doubleValueGottenByIndex = record.getDouble(); -// Get a Text value of a column +// Get a TEXT value of a column String textValueGottenByName = record.getText(""); String textValueGottenByIndex = record.getText(); -// Get a Blob value of a column (as a ByteBuffer) +// Get a BLOB value of a column (as a ByteBuffer) ByteBuffer blobValueGottenByName = record.getBlob(""); ByteBuffer blobValueGottenByIndex = record.getBlob(); -// Get a Blob value of a column as a byte array +// Get a BLOB value of a column as a byte array byte[] blobValueAsBytesGottenByName = record.getBlobAsBytes(""); byte[] blobValueAsBytesGottenByIndex = record.getBlobAsBytes(); ```