Ether Framework
Unified API docs for Ether modules
Loading...
Searching...
No Matches
dev.rafex.ether.database.sqlite.sql.SQLiteParameters Class Reference

SQLite-specific parameter helpers. More...

Collaboration diagram for dev.rafex.ether.database.sqlite.sql.SQLiteParameters:

Static Public Member Functions

static SqlParameter blob (final byte[] data)
 Creates a BLOB parameter for binary data.
static SqlParameter integer (final Long value)
 Creates an INTEGER parameter.
static SqlParameter json (final String json)
 Creates a JSON parameter.
static SqlParameter real (final Double value)
 Creates a REAL (floating-point) parameter.
static SqlParameter text (final String text)
 Creates a TEXT parameter.

Detailed Description

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)

JSON support is available via the optional JSON1 extension.

Definition at line 46 of file SQLiteParameters.java.

Member Function Documentation

◆ blob()

SqlParameter dev.rafex.ether.database.sqlite.sql.SQLiteParameters.blob ( final byte[] data)
static

Creates a BLOB parameter for binary data.

Parameters
datathe binary data, may be null
Returns
a SqlParameter with type Types#BLOB

Definition at line 57 of file SQLiteParameters.java.

◆ integer()

SqlParameter dev.rafex.ether.database.sqlite.sql.SQLiteParameters.integer ( final Long value)
static

Creates an INTEGER parameter.

Parameters
valuethe integer value, may be null
Returns
a SqlParameter with type Types#BIGINT

Definition at line 80 of file SQLiteParameters.java.

◆ json()

SqlParameter dev.rafex.ether.database.sqlite.sql.SQLiteParameters.json ( final String json)
static

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
jsonthe JSON string, may be null
Returns
a SqlParameter with type Types#OTHER

Definition at line 70 of file SQLiteParameters.java.

References json().

Referenced by json().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ real()

SqlParameter dev.rafex.ether.database.sqlite.sql.SQLiteParameters.real ( final Double value)
static

Creates a REAL (floating-point) parameter.

Parameters
valuethe floating-point value, may be null
Returns
a SqlParameter with type Types#DOUBLE

Definition at line 90 of file SQLiteParameters.java.

◆ text()

SqlParameter dev.rafex.ether.database.sqlite.sql.SQLiteParameters.text ( final String text)
static

Creates a TEXT parameter.

Parameters
textthe text value, may be null
Returns
a SqlParameter with type Types#VARCHAR

Definition at line 100 of file SQLiteParameters.java.

References text().

Referenced by text().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file:
  • ether-database-sqlite/ether-database-sqlite/src/main/java/dev/rafex/ether/database/sqlite/sql/SQLiteParameters.java