Documentation
¶
Index ¶
- func NewResultSetMetaData(columns []ColumnDef) api.ResultSetMetaData
- type ColumnDef
- type RecordLayerResultSet
- func (rs *RecordLayerResultSet) Boolean(columnIndex int) (bool, error)
- func (rs *RecordLayerResultSet) BooleanByName(name string) (bool, error)
- func (rs *RecordLayerResultSet) Bytes(columnIndex int) ([]byte, error)
- func (rs *RecordLayerResultSet) BytesByName(name string) ([]byte, error)
- func (rs *RecordLayerResultSet) Close() error
- func (rs *RecordLayerResultSet) ColumnType(columnIndex int) values.Type
- func (rs *RecordLayerResultSet) Continuation() (api.Continuation, error)
- func (rs *RecordLayerResultSet) Double(columnIndex int) (float64, error)
- func (rs *RecordLayerResultSet) Err() error
- func (rs *RecordLayerResultSet) Float(columnIndex int) (float32, error)
- func (rs *RecordLayerResultSet) GetContinuation() recordlayer.RecordCursorContinuation
- func (rs *RecordLayerResultSet) GetNoNextReason() recordlayer.NoNextReason
- func (rs *RecordLayerResultSet) Long(columnIndex int) (int64, error)
- func (rs *RecordLayerResultSet) LongByName(name string) (int64, error)
- func (rs *RecordLayerResultSet) MetaData() api.ResultSetMetaData
- func (rs *RecordLayerResultSet) Next() bool
- func (rs *RecordLayerResultSet) Object(columnIndex int) (any, error)
- func (rs *RecordLayerResultSet) ObjectByName(name string) (any, error)
- func (rs *RecordLayerResultSet) String(columnIndex int) (string, error)
- func (rs *RecordLayerResultSet) StringByName(name string) (string, error)
- func (rs *RecordLayerResultSet) WasNull() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewResultSetMetaData ¶
func NewResultSetMetaData(columns []ColumnDef) api.ResultSetMetaData
NewResultSetMetaData is the metadata of a result set with these columns.
Types ¶
type ColumnDef ¶
type ColumnDef struct {
Name string // output column name (positional slot / by-name lookup key)
Label string // display name (alias); empty means use Name
TypeName string // JDBC type name: BIGINT, STRING, DOUBLE, etc.
Nullable int // api.ColumnNoNulls / ColumnNullable / ColumnNullableUnknown
// DataType is the column's full type: a struct's declared name and fields,
// an array's element type (Java's RelationalStructMetaData over the plan's
// result type). nil when the planned type has no public form; the type is
// then derived from TypeName.
DataType api.DataType
}
ColumnDef describes one column in the result set.
type RecordLayerResultSet ¶
type RecordLayerResultSet struct {
// contains filtered or unexported fields
}
RecordLayerResultSet wraps a RecordCursor[executor.QueryResult] and implements api.ResultSet. Mirrors Java's RecordLayerResultSet: Next() advances the cursor, typed accessors read from the current row's positional slots.
Column metadata is provided at construction time (derived from the plan's result type or the schema catalog). Column accessors are 1-indexed per JDBC convention.
func NewRecordLayerResultSet ¶
func NewRecordLayerResultSet( ctx context.Context, cursor recordlayer.RecordCursor[executor.QueryResult], columns []ColumnDef, ) *RecordLayerResultSet
NewRecordLayerResultSet constructs a ResultSet from an executor cursor and column definitions.
func (*RecordLayerResultSet) Boolean ¶
func (rs *RecordLayerResultSet) Boolean(columnIndex int) (bool, error)
func (*RecordLayerResultSet) BooleanByName ¶
func (rs *RecordLayerResultSet) BooleanByName(name string) (bool, error)
func (*RecordLayerResultSet) Bytes ¶
func (rs *RecordLayerResultSet) Bytes(columnIndex int) ([]byte, error)
func (*RecordLayerResultSet) BytesByName ¶
func (rs *RecordLayerResultSet) BytesByName(name string) ([]byte, error)
func (*RecordLayerResultSet) Close ¶
func (rs *RecordLayerResultSet) Close() error
func (*RecordLayerResultSet) ColumnType ¶
func (rs *RecordLayerResultSet) ColumnType(columnIndex int) values.Type
ColumnType is the exact type of the current row's column (1-based), as its positional output row carries it, or nil when the row carries none. It is what tells a caller that an int64 is an enum's declared number (the carrier an enum-typed value holds) rather than a BIGINT.
func (*RecordLayerResultSet) Continuation ¶
func (rs *RecordLayerResultSet) Continuation() (api.Continuation, error)
func (*RecordLayerResultSet) Double ¶
func (rs *RecordLayerResultSet) Double(columnIndex int) (float64, error)
func (*RecordLayerResultSet) Err ¶
func (rs *RecordLayerResultSet) Err() error
func (*RecordLayerResultSet) Float ¶
func (rs *RecordLayerResultSet) Float(columnIndex int) (float32, error)
func (*RecordLayerResultSet) GetContinuation ¶
func (rs *RecordLayerResultSet) GetContinuation() recordlayer.RecordCursorContinuation
GetContinuation returns the raw cursor continuation from the last Next() call. Used by the paginating execution loop to resume across FDB transactions.
func (*RecordLayerResultSet) GetNoNextReason ¶
func (rs *RecordLayerResultSet) GetNoNextReason() recordlayer.NoNextReason
GetNoNextReason returns the NoNextReason from the last Next() call. This is the AUTHORITATIVE exhaustion signal (SourceExhausted ⇔ end-of-results), and distinguishes a non-terminal out-of-band stop (scan/time/byte limit) from a clean ReturnLimitReached/exhaustion when the continuation has nil bytes — see RFC-127 (Java carries noNextReason as a first-class field for exactly this; its nil-byte START continuation is otherwise ambiguous with end).
func (*RecordLayerResultSet) Long ¶
func (rs *RecordLayerResultSet) Long(columnIndex int) (int64, error)
func (*RecordLayerResultSet) LongByName ¶
func (rs *RecordLayerResultSet) LongByName(name string) (int64, error)
func (*RecordLayerResultSet) MetaData ¶
func (rs *RecordLayerResultSet) MetaData() api.ResultSetMetaData
func (*RecordLayerResultSet) Next ¶
func (rs *RecordLayerResultSet) Next() bool
func (*RecordLayerResultSet) Object ¶
func (rs *RecordLayerResultSet) Object(columnIndex int) (any, error)
func (*RecordLayerResultSet) ObjectByName ¶
func (rs *RecordLayerResultSet) ObjectByName(name string) (any, error)
func (*RecordLayerResultSet) String ¶
func (rs *RecordLayerResultSet) String(columnIndex int) (string, error)
func (*RecordLayerResultSet) StringByName ¶
func (rs *RecordLayerResultSet) StringByName(name string) (string, error)
func (*RecordLayerResultSet) WasNull ¶
func (rs *RecordLayerResultSet) WasNull() bool