package query
import "github.com/ydb-platform/ydb-go-sdk/v3/internal/query"
Index ¶
- Variables
- func NewMaterializedResultSet( index int, columnNames []string, columnTypes []types.Type, rows []query.Row, ) *materializedResultSet
- func NewRow(ctx context.Context, columns []*Ydb.Column, v *Ydb.Value, t *trace.Query) (*row, error)
- type Client
- func New(ctx context.Context, balancer grpc.ClientConnInterface, cfg *config.Config) *Client
- func (c *Client) Close(ctx context.Context) error
- func (c *Client) Do(ctx context.Context, op query.Operation, opts ...options.DoOption) (finalErr error)
- func (c *Client) DoTx(ctx context.Context, op query.TxOperation, opts ...options.DoTxOption) (finalErr error)
- func (c *Client) Execute(ctx context.Context, q string, opts ...options.ExecuteOption) (_ query.Result, err error)
- func (c *Client) ReadResultSet( ctx context.Context, q string, opts ...options.ExecuteOption, ) (rs query.ResultSet, err error)
- func (c *Client) ReadRow(ctx context.Context, q string, opts ...options.ExecuteOption) (row query.Row, err error)
- func (c *Client) Stats() *pool.Stats
- type Session
- func (s *Session) Begin( ctx context.Context, txSettings query.TransactionSettings, ) ( _ query.Transaction, err error, )
- func (s *Session) Close(ctx context.Context) (err error)
- func (s *Session) Execute( ctx context.Context, q string, opts ...options.ExecuteOption, ) (_ query.Transaction, _ query.Result, err error)
- func (s *Session) ID() string
- func (s *Session) IsAlive() bool
- func (s *Session) NodeID() uint32
- func (s *Session) ReadResultSet(ctx context.Context, q string, opts ...options.ExecuteOption) ( rs query.ResultSet, _ error, )
- func (s *Session) ReadRow(ctx context.Context, q string, opts ...options.ExecuteOption) (row query.Row, _ error)
- func (s *Session) Status() string
- type Transaction
- func (tx *Transaction) CommitTx(ctx context.Context) (err error)
- func (tx *Transaction) Execute(ctx context.Context, q string, opts ...options.TxExecuteOption) ( r query.Result, finalErr error, )
- func (tx *Transaction) OnCompleted(f tx.OnTransactionCompletedFunc)
- func (tx *Transaction) ReadResultSet( ctx context.Context, q string, opts ...options.TxExecuteOption, ) ( rs query.ResultSet, _ error, )
- func (tx *Transaction) ReadRow( ctx context.Context, q string, opts ...options.TxExecuteOption, ) (row query.Row, _ error)
- func (tx *Transaction) Rollback(ctx context.Context) error
- func (tx *Transaction) SessionID() string
Variables ¶
var ( ErrTransactionRollingBack = xerrors.Wrap(errors.New("ydb: the transaction is rolling back")) ErrNotImplemented = errors.New("not implemented yet") )
Functions ¶
func NewMaterializedResultSet ¶
func NewMaterializedResultSet( index int, columnNames []string, columnTypes []types.Type, rows []query.Row, ) *materializedResultSet
func NewRow ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func (*Client) Close ¶
func (*Client) Do ¶
func (c *Client) Do(ctx context.Context, op query.Operation, opts ...options.DoOption) (finalErr error)
func (*Client) DoTx ¶
func (c *Client) DoTx(ctx context.Context, op query.TxOperation, opts ...options.DoTxOption) (finalErr error)
func (*Client) Execute ¶
func (c *Client) Execute(ctx context.Context, q string, opts ...options.ExecuteOption) (_ query.Result, err error)
func (*Client) ReadResultSet ¶
func (c *Client) ReadResultSet( ctx context.Context, q string, opts ...options.ExecuteOption, ) (rs query.ResultSet, err error)
ReadResultSet is a helper which read all rows from first result set in result
func (*Client) ReadRow ¶
func (c *Client) ReadRow(ctx context.Context, q string, opts ...options.ExecuteOption) (row query.Row, err error)
ReadRow is a helper which read only one row from first result set in result
func (*Client) Stats ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) Begin ¶
func (s *Session) Begin( ctx context.Context, txSettings query.TransactionSettings, ) ( _ query.Transaction, err error, )
func (*Session) Close ¶
func (*Session) Execute ¶
func (s *Session) Execute( ctx context.Context, q string, opts ...options.ExecuteOption, ) (_ query.Transaction, _ query.Result, err error)
func (*Session) ID ¶
func (*Session) IsAlive ¶
func (*Session) NodeID ¶
func (*Session) ReadResultSet ¶
func (s *Session) ReadResultSet(ctx context.Context, q string, opts ...options.ExecuteOption) ( rs query.ResultSet, _ error, )
func (*Session) ReadRow ¶
func (s *Session) ReadRow(ctx context.Context, q string, opts ...options.ExecuteOption) (row query.Row, _ error)
func (*Session) Status ¶
type Transaction ¶
type Transaction struct { tx.Identifier // contains filtered or unexported fields }
func (*Transaction) CommitTx ¶
func (tx *Transaction) CommitTx(ctx context.Context) (err error)
func (*Transaction) Execute ¶
func (tx *Transaction) Execute(ctx context.Context, q string, opts ...options.TxExecuteOption) ( r query.Result, finalErr error, )
func (*Transaction) OnCompleted ¶
func (tx *Transaction) OnCompleted(f tx.OnTransactionCompletedFunc)
func (*Transaction) ReadResultSet ¶
func (tx *Transaction) ReadResultSet( ctx context.Context, q string, opts ...options.TxExecuteOption, ) ( rs query.ResultSet, _ error, )
func (*Transaction) ReadRow ¶
func (tx *Transaction) ReadRow( ctx context.Context, q string, opts ...options.TxExecuteOption, ) (row query.Row, _ error)
func (*Transaction) Rollback ¶
func (tx *Transaction) Rollback(ctx context.Context) error
func (*Transaction) SessionID ¶
func (tx *Transaction) SessionID() string
Source Files ¶
client.go errors.go execute_query.go range_experiment.go result.go result_set.go row.go session.go session_status.go transaction.go
Directories ¶
Path | Synopsis |
---|---|
internal/query/config | |
internal/query/options | |
internal/query/scanner | |
internal/query/tx |
- Version
- v3.76.5
- Published
- Aug 14, 2024
- Platform
- js/wasm
- Imports
- 31 packages
- Last checked
- 3 minutes ago –
Tools for package owners.