Class SQLiteParameters
java.lang.Object
dev.rafex.ether.database.sqlite.sql.SQLiteParameters
SQLite-specific parameter helpers.
SQLite has a dynamic type system with five storage classes:
- NULL
- INTEGER (signed 64-bit)
- REAL (64-bit floating point)
- TEXT (UTF-8, UTF-16BE or UTF-16LE)
- BLOB (binary data)
-
Method Summary
Modifier and TypeMethodDescriptionstatic dev.rafex.ether.database.core.sql.SqlParameterblob(byte[] data) Creates a BLOB parameter for binary data.static dev.rafex.ether.database.core.sql.SqlParameterCreates an INTEGER parameter.static dev.rafex.ether.database.core.sql.SqlParameterCreates a JSON parameter.static dev.rafex.ether.database.core.sql.SqlParameterCreates a REAL (floating-point) parameter.static dev.rafex.ether.database.core.sql.SqlParameterCreates a TEXT parameter.
-
Method Details
-
blob
public static dev.rafex.ether.database.core.sql.SqlParameter blob(byte[] data) Creates a BLOB parameter for binary data.- Parameters:
data- the binary data, may benull- Returns:
- a
SqlParameterwith typeTypes.BLOB
-
json
Creates a JSON parameter.Note: Requires the JSON1 extension to be available at runtime. If the extension is not loaded, this will be treated as ordinary TEXT.
- Parameters:
json- the JSON string, may benull- Returns:
- a
SqlParameterwith typeTypes.OTHER
-
integer
Creates an INTEGER parameter.- Parameters:
value- the integer value, may benull- Returns:
- a
SqlParameterwith typeTypes.BIGINT
-
real
Creates a REAL (floating-point) parameter.- Parameters:
value- the floating-point value, may benull- Returns:
- a
SqlParameterwith typeTypes.DOUBLE
-
text
Creates a TEXT parameter.- Parameters:
text- the text value, may benull- Returns:
- a
SqlParameterwith typeTypes.VARCHAR
-