Package org.apache.ignite.sql
Interface Statement.StatementBuilder
- Enclosing interface:
- Statement
public static interface Statement.StatementBuilder
Statement builder provides methods for building a statement object, which represents a query and holds query-specific
settings that overrides the query execution context defaults.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates an SQL statement abject.defaultSchema
(String schema) Sets a default schema for the statement.pageSize
(int pageSize) Sets a page size - the maximum number of result rows that can be fetched at a time.Sets an SQL statement string.queryTimeout
(long timeout, TimeUnit timeUnit) Sets a query timeout.timeZoneId
(ZoneId timeZoneId) Sets a time zone for this statement.
-
Method Details
-
query
Sets an SQL statement string.- Parameters:
query
- SQL query.- Returns:
this
for chaining.
-
queryTimeout
Sets a query timeout.- Parameters:
timeout
- Query timeout value. Must be positive.timeUnit
- Timeunit.- Returns:
this
for chaining.
-
defaultSchema
Sets a default schema for the statement.- Parameters:
schema
- Default schema.- Returns:
this
for chaining.
-
pageSize
Sets a page size - the maximum number of result rows that can be fetched at a time.- Parameters:
pageSize
- Maximum number of rows per page. Must be positive.- Returns:
this
for chaining.
-
timeZoneId
Sets a time zone for this statement.This time zone is used in the following cases:
- When using SQL functions to obtain the current time (for example
SELECT CURRENT_TIME
) - When converting a string literal to/from a TIMESTAMP WITH LOCAL TIME ZONE column
(for example
SELECT TIMESTAMP WITH LOCAL TIME ZONE '1992-01-18 02:30:00.123'
If the time zone has not been set explicitly, the current JVM default time zone will be used.
- Parameters:
timeZoneId
- Time-zone ID.- Returns:
this
for chaining.
- When using SQL functions to obtain the current time (for example
-
build
Statement build()Creates an SQL statement abject.- Returns:
- Statement.
-