Skip to content

Instantly share code, notes, and snippets.

@brfrn169
Created July 20, 2022 03:44
Show Gist options
  • Save brfrn169/4d4584cd7ba3b3c3ddc0714b3aa12964 to your computer and use it in GitHub Desktop.
Save brfrn169/4d4584cd7ba3b3c3ddc0714b3aa12964 to your computer and use it in GitHub Desktop.
Examples of how to get column values in Result (Japanese)
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