Interface Statement


public interface Statement
Object represents an SQL statement.

The statement object is thread-safe.

Statement parameters and query plan can be cached on the server side. The server-side resources are managed automatically. If the server-side state does not exist due to any reason - the very first run, current client node reconnect, cache invalidation, etc. - this state is restored automatically. This may cause the user to experience a slightly increased latency.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    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 Type
    Method
    Description
    Returns a statement's default schema.
    int
    Returns a page size - the maximum number of result rows that can be fetched at a time.
    Returns a string representation of an SQL statement.
    long
    Returns a query timeout.
    Returns time zone used for this statement.
    Creates a statement builder from the current statement.
  • Method Details

    • query

      String query()
      Returns a string representation of an SQL statement.
      Returns:
      SQL statement string.
    • queryTimeout

      long queryTimeout(TimeUnit timeUnit)
      Returns a query timeout.
      Parameters:
      timeUnit - Timeunit to convert timeout to.
      Returns:
      Query timeout in the given timeunit.
    • defaultSchema

      String defaultSchema()
      Returns a statement's default schema.
      Returns:
      Default schema for the statement.
    • pageSize

      int pageSize()
      Returns a page size - the maximum number of result rows that can be fetched at a time.
      Returns:
      Maximum number of rows per page.
    • timeZoneId

      ZoneId timeZoneId()
      Returns time zone used for this statement.
      Returns:
      Time zone used for this statement.
      See Also:
    • toBuilder

      Creates a statement builder from the current statement.
      Returns:
      Statement builder based on the current statement.