Documentation
¶
Index ¶
- func ConvertToTemporalError(operation string, err error, details ...string) error
- func EnsureOneRowCursor(ctx context.Context, res result.Result) error
- func IsPreconditionFailedAndContains(err error, substr string) bool
- func NewRootCauseError(new func(message string) error, message string) error
- func OnlineReadOnlyTxControl(opts ...table.TxOnlineReadOnlyOption) *table.TransactionControl
- func SnapshotReadOnlyTxControl(opts ...table.TxOnlineReadOnlyOption) *table.TransactionControl
- func WrapErrorAsRootCause(err error) error
- type Client
- func (client *Client) AddQueryPrefix(query string) string
- func (client *Client) Close(ctx context.Context) error
- func (client *Client) Do(ctx context.Context, query string, tx *table.TransactionControl, ...) (res result.Result, err error)
- func (client *Client) Do2(ctx context.Context, query string, tx *table.TransactionControl, ...) (res result.Result, err error)
- func (client *Client) DoSchema(ctx context.Context, query string, params ...options.ExecuteSchemeQueryOption) (err error)
- func (client *Client) GetPrefix() string
- func (client *Client) Write(ctx context.Context, query string, params *table.QueryParameters, ...) error
- func (client *Client) Write2(ctx context.Context, query string, ...) error
- type Config
- type Executor
- type QueryConstructor
- type RootCauseError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToTemporalError ¶
func NewRootCauseError ¶
func OnlineReadOnlyTxControl ¶
func OnlineReadOnlyTxControl(opts ...table.TxOnlineReadOnlyOption) *table.TransactionControl
func SnapshotReadOnlyTxControl ¶
func SnapshotReadOnlyTxControl(opts ...table.TxOnlineReadOnlyOption) *table.TransactionControl
func WrapErrorAsRootCause ¶
Types ¶
type Client ¶
type Client struct { DB *ydb.Driver Database string Folder string // contains filtered or unexported fields }
func (*Client) AddQueryPrefix ¶
type Config ¶
type Executor ¶
type Executor interface { Execute( ctx context.Context, query string, params *table.QueryParameters, ) (result.Result, error) // Write is a special case of Execute that immediately closes its result. Write( ctx context.Context, query string, params *table.QueryParameters, ) error }
Executor is a very primitive wrapper that provides the same interface for executing queries in either session or transaction.
Allows having helper functions that could be used in both cases.
func NewExecutorFromSession ¶
func NewExecutorFromSession(s table.Session, tx *table.TransactionControl) Executor
func NewExecutorFromTransactionActor ¶
func NewExecutorFromTransactionActor(a table.TransactionActor) Executor
type QueryConstructor ¶
func NewQuery ¶
func NewQuery() *QueryConstructor
func (*QueryConstructor) AddQuery ¶
func (b *QueryConstructor) AddQuery(query string)
type RootCauseError ¶
type RootCauseError struct {
// contains filtered or unexported fields
}
func (*RootCauseError) Error ¶
func (e *RootCauseError) Error() string
Click to show internal directories.
Click to hide internal directories.