Created
July 20, 2022 03:44
-
-
Save brfrn169/4d4584cd7ba3b3c3ddc0714b3aa12964 to your computer and use it in GitHub Desktop.
Examples of how to get column values in Result (Japanese)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Result result = …; | |
// Boolean型の値を取得 | |
boolean booleanValue = result.getBoolean("<column name>"); | |
// Int型の値を取得 | |
int intValue = result.getInt("<column name>"); | |
// BigInt型の値を取得 | |
long bigIntValue = result.getBigInt("<column name>"); | |
// Float型の値を取得 | |
float floatValue = result.getFloat("<column name>"); | |
// Double型の値を取得 | |
double doubleValue = result.getDouble("<column name>"); | |
// Text型の値を取得 | |
String textValue = result.getText("<column name>"); | |
// Blob型の値を取得 (ByteBuffer) | |
ByteBuffer blobValue = result.getBlob("<column name>"); | |
// Blob型の値を取得 (byte配列) | |
byte[] blobValueAsBytes = result.getBlobAsBytes("<column name>"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment