Table of Contents

Class SqlStatement

Namespace
Apache.Ignite.Sql
Assembly
Apache.Ignite.dll

SQL statement.

public sealed record SqlStatement : IEquatable<SqlStatement>
Inheritance
SqlStatement
Implements
Inherited Members

Constructors

SqlStatement(string, TimeSpan?, string?, int?, IReadOnlyDictionary<string, object?>?, string?)

Initializes a new instance of the SqlStatement class.

public SqlStatement(string query, TimeSpan? timeout = null, string? schema = null, int? pageSize = null, IReadOnlyDictionary<string, object?>? properties = null, string? timeZoneId = null)

Parameters

query string

Query text.

timeout TimeSpan?

Timeout.

schema string

Schema.

pageSize int?

Page size.

properties IReadOnlyDictionary<string, object>

Properties.

timeZoneId string

Time zone id in TZDB format. Examples: "America/New_York", "UTC+3".

Affects time-related SQL functions (e.g. CURRENT_TIME) and string literal conversions (e.g. TIMESTAMP WITH LOCAL TIME ZONE '1992-01-18 02:30:00.123').

Defaults to system time zone: Tzdb.GetSystemDefault().Id.

Can be obtained using NodaTime with Id from Tzdb provider.

Note that Id from the standard library is OS-dependent and is not compatible with TZDB on Windows.

For more information, see https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html#of(java.lang.String).

Fields

DefaultPageSize

Default number of rows per data page.

public const int DefaultPageSize = 1024

Field Value

int

DefaultSchema

Default SQL schema name.

public const string DefaultSchema = "PUBLIC"

Field Value

string

DefaultTimeout

Default query timeout (zero means no timeout).

public static readonly TimeSpan DefaultTimeout

Field Value

TimeSpan

Properties

PageSize

Gets the number of rows per data page.

public int PageSize { get; init; }

Property Value

int

Properties

Gets the property bag.

public IReadOnlyDictionary<string, object?> Properties { get; init; }

Property Value

IReadOnlyDictionary<string, object>

Query

Gets the query text.

public string Query { get; init; }

Property Value

string

Schema

Gets the SQL schema name.

public string Schema { get; init; }

Property Value

string

TimeZoneId

Gets the time zone id in TZDB format. Examples: "America/New_York", "UTC+3".

Affects time-related SQL functions (e.g. CURRENT_TIME) and string literal conversions (e.g. TIMESTAMP WITH LOCAL TIME ZONE '1992-01-18 02:30:00.123').

Defaults to system time zone: Tzdb.GetSystemDefault().Id.

Can be obtained using NodaTime with Id from Tzdb provider.

Note that Id from the standard library is OS-dependent and is not compatible with TZDB on Windows.

For more information, see https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html#of(java.lang.String).
public string TimeZoneId { get; init; }

Property Value

string

Timeout

Gets the query timeout (zero means no timeout).

public TimeSpan Timeout { get; init; }

Property Value

TimeSpan

Methods

ToSqlStatement(string)

Converts a query string to an instance of SqlStatement.

public static SqlStatement ToSqlStatement(string query)

Parameters

query string

Query string.

Returns

SqlStatement

Statement.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

implicit operator SqlStatement(string)

Converts a query string to an instance of SqlStatement.

public static implicit operator SqlStatement(string query)

Parameters

query string

Query string.

Returns

SqlStatement

Statement.