package table
import "github.com/ydb-platform/ydb-go-sdk/v3/table"
Index ¶
- type Client
- type DataQuery
- type DataQueryExplanation
- type ParameterOption
- type QueryParameters
- func NewQueryParameters(opts ...ParameterOption) *QueryParameters
- func (q *QueryParameters) Add(opts ...ParameterOption)
- func (q *QueryParameters) Each(it func(name string, v types.Value))
- func (q *QueryParameters) Params() queryParams
- func (q *QueryParameters) String() string
- type RetryOperation
- type Session
- type SessionInfo
- type Statement
- type Transaction
- type TransactionControl
- func TxControl(opts ...TxControlOption) *TransactionControl
- func (t *TransactionControl) Desc() *Ydb_Table.TransactionControl
- type TransactionSettings
- func TxSettings(opts ...TxOption) *TransactionSettings
- func (t *TransactionSettings) Settings() *Ydb_Table.TransactionSettings
- type TxControlOption
- func BeginTx(opts ...TxOption) TxControlOption
- func CommitTx() TxControlOption
- func WithTx(t Transaction) TxControlOption
- type TxOnlineReadOnlyOption
- type TxOption
Types ¶
type Client ¶
type Client interface { Close(ctx context.Context) error // RetryIdempotent retries the retry operation as a idempotent // operation (i.e. the operation can't change the state of the database) // while the operation returns an error // // This is an experimental API that can be changed without changing // the major version. RetryIdempotent(ctx context.Context, op RetryOperation) (err error) // RetryNonIdempotent retries the retry operation as a non-idempotent // operation (i.e. the operation can change the state of the database) // while the operation returns an error // // This is an experimental API that can be changed without changing // the major version. RetryNonIdempotent(ctx context.Context, op RetryOperation) (err error) }
type DataQuery ¶
DataQuery only for tracers
type DataQueryExplanation ¶
DataQueryExplanation is a result of ExplainDataQuery call.
type ParameterOption ¶
type ParameterOption func(queryParams)
func ValueParam ¶
func ValueParam(name string, v types.Value) ParameterOption
type QueryParameters ¶
type QueryParameters struct {
// contains filtered or unexported fields
}
func NewQueryParameters ¶
func NewQueryParameters(opts ...ParameterOption) *QueryParameters
func (*QueryParameters) Add ¶
func (q *QueryParameters) Add(opts ...ParameterOption)
func (*QueryParameters) Each ¶
func (q *QueryParameters) Each(it func(name string, v types.Value))
func (*QueryParameters) Params ¶
func (q *QueryParameters) Params() queryParams
func (*QueryParameters) String ¶
func (q *QueryParameters) String() string
type RetryOperation ¶
RetryOperation is the interface that holds an operation for retry.
type Session ¶
type Session interface { SessionInfo CreateTable(ctx context.Context, path string, opts ...options.CreateTableOption) (err error) DescribeTable(ctx context.Context, path string, opts ...options.DescribeTableOption) (desc options.Description, err error) DropTable(ctx context.Context, path string, opts ...options.DropTableOption) (err error) AlterTable(ctx context.Context, path string, opts ...options.AlterTableOption) (err error) CopyTable(ctx context.Context, dst, src string, opts ...options.CopyTableOption) (err error) Explain(ctx context.Context, query string) (exp DataQueryExplanation, err error) Prepare(ctx context.Context, query string) (stmt Statement, err error) Execute(ctx context.Context, tx *TransactionControl, query string, params *QueryParameters, opts ...options.ExecuteDataQueryOption) (txr Transaction, r resultset.Result, err error) ExecuteSchemeQuery(ctx context.Context, query string, opts ...options.ExecuteSchemeQueryOption) (err error) DescribeTableOptions(ctx context.Context) (desc options.TableOptionsDescription, err error) StreamReadTable(ctx context.Context, path string, opts ...options.ReadTableOption) (r resultset.Result, err error) StreamExecuteScanQuery(ctx context.Context, query string, params *QueryParameters, opts ...options.ExecuteScanQueryOption) (_ resultset.Result, err error) BulkUpsert(ctx context.Context, table string, rows types.Value) (err error) BeginTransaction(ctx context.Context, tx *TransactionSettings) (x Transaction, err error) }
type SessionInfo ¶
type Statement ¶
type Statement interface { Execute(ctx context.Context, tx *TransactionControl, params *QueryParameters, opts ...options.ExecuteDataQueryOption) (txr Transaction, r resultset.Result, err error) NumInput() int Text() string }
type Transaction ¶
type Transaction interface { ID() string Execute(ctx context.Context, query string, params *QueryParameters, opts ...options.ExecuteDataQueryOption) (resultset.Result, error) ExecuteStatement(ctx context.Context, stmt Statement, params *QueryParameters, opts ...options.ExecuteDataQueryOption) (resultset.Result, error) CommitTx(ctx context.Context, opts ...options.CommitTransactionOption) (r resultset.Result, err error) Rollback(ctx context.Context) (err error) }
type TransactionControl ¶
type TransactionControl struct {
// contains filtered or unexported fields
}
func TxControl ¶
func TxControl(opts ...TxControlOption) *TransactionControl
func (*TransactionControl) Desc ¶
func (t *TransactionControl) Desc() *Ydb_Table.TransactionControl
type TransactionSettings ¶
type TransactionSettings struct {
// contains filtered or unexported fields
}
func TxSettings ¶
func TxSettings(opts ...TxOption) *TransactionSettings
func (*TransactionSettings) Settings ¶
func (t *TransactionSettings) Settings() *Ydb_Table.TransactionSettings
type TxControlOption ¶
type TxControlOption func(*txControlDesc)
func BeginTx ¶
func BeginTx(opts ...TxOption) TxControlOption
func CommitTx ¶
func CommitTx() TxControlOption
func WithTx ¶
func WithTx(t Transaction) TxControlOption
type TxOnlineReadOnlyOption ¶
type TxOnlineReadOnlyOption func(*txOnlineReadOnly)
func WithInconsistentReads ¶
func WithInconsistentReads() TxOnlineReadOnlyOption
type TxOption ¶
type TxOption func(*txDesc)
Transaction control options
func WithOnlineReadOnly ¶
func WithOnlineReadOnly(opts ...TxOnlineReadOnlyOption) TxOption
func WithSerializableReadWrite ¶
func WithSerializableReadWrite() TxOption
func WithStaleReadOnly ¶
func WithStaleReadOnly() TxOption
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
table/config | |
table/options | |
table/resultset | |
table/stats | |
table/types |
- Version
- v3.0.0
- Published
- Oct 22, 2021
- Platform
- windows/amd64
- Imports
- 8 packages
- Last checked
- 49 seconds ago –
Tools for package owners.