query

package
v3.77.0-rc0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTransactionRollingBack = xerrors.Wrap(errors.New("ydb: the transaction is rolling back"))
	ErrNotImplemented         = errors.New("not implemented yet")
)

Functions

func MaterializedResultSet added in v3.77.0

func MaterializedResultSet(
	index int,
	columnNames []string,
	columnTypes []types.Type,
	rows []query.Row,
) *materializedResultSet

func NewRow added in v3.69.0

func NewRow(columns []*Ydb.Column, v *Ydb.Value) *row

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, balancer grpc.ClientConnInterface, cfg *config.Config) *Client

func (*Client) Close

func (c *Client) Close(ctx context.Context) error

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) Exec added in v3.77.0

func (c *Client) Exec(ctx context.Context, q string, opts ...options.Execute) (finalErr error)

func (*Client) ExecuteScript added in v3.77.0

func (c *Client) ExecuteScript(
	ctx context.Context, q string, ttl time.Duration, opts ...options.Execute,
) (
	op *options.ExecuteScriptOperation, err error,
)

func (*Client) FetchScriptResults added in v3.77.0

func (c *Client) FetchScriptResults(ctx context.Context,
	opID string, opts ...options.FetchScriptOption,
) (*options.FetchScriptResult, error)

func (*Client) Query added in v3.77.0

func (c *Client) Query(ctx context.Context, q string, opts ...options.Execute) (r query.Result, err error)

func (*Client) QueryResultSet added in v3.77.0

func (c *Client) QueryResultSet(
	ctx context.Context, q string, opts ...options.Execute,
) (rs query.ResultSet, finalErr error)

QueryResultSet is a helper which read all rows from first result set in result

func (*Client) QueryRow added in v3.77.0

func (c *Client) QueryRow(ctx context.Context, q string, opts ...options.Execute) (_ query.Row, finalErr error)

QueryRow is a helper which read only one row from first result set in result

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 (s *Session) Close(ctx context.Context) (err error)

func (*Session) Exec added in v3.77.0

func (s *Session) Exec(
	ctx context.Context, q string, opts ...options.Execute,
) (finalErr error)

func (*Session) ID

func (s *Session) ID() string

func (*Session) IsAlive added in v3.58.0

func (s *Session) IsAlive() bool

func (*Session) NodeID

func (s *Session) NodeID() uint32

func (*Session) Query added in v3.77.0

func (s *Session) Query(
	ctx context.Context, q string, opts ...options.Execute,
) (_ query.Result, finalErr error)

func (*Session) QueryResultSet added in v3.77.0

func (s *Session) QueryResultSet(
	ctx context.Context, q string, opts ...options.Execute,
) (rs query.ResultSet, finalErr error)

func (*Session) QueryRow added in v3.77.0

func (s *Session) QueryRow(ctx context.Context, q string, opts ...options.Execute) (_ query.Row, finalErr error)

func (*Session) Status

func (s *Session) Status() string

type Transaction added in v3.76.2

type Transaction struct {
	baseTx.Identifier
	// contains filtered or unexported fields
}

func (*Transaction) CommitTx added in v3.76.2

func (tx *Transaction) CommitTx(ctx context.Context) (err error)

func (*Transaction) Exec added in v3.77.0

func (tx *Transaction) Exec(ctx context.Context, q string, opts ...options.Execute) (
	finalErr error,
)

func (*Transaction) ID added in v3.77.0

func (tx *Transaction) ID() string

func (*Transaction) OnCompleted added in v3.76.4

func (tx *Transaction) OnCompleted(f baseTx.OnTransactionCompletedFunc)

func (*Transaction) Query added in v3.77.0

func (tx *Transaction) Query(ctx context.Context, q string, opts ...options.Execute) (
	_ query.Result, finalErr error,
)

func (*Transaction) QueryResultSet added in v3.77.0

func (tx *Transaction) QueryResultSet(
	ctx context.Context, q string, opts ...options.Execute,
) (rs query.ResultSet, finalErr error)

func (*Transaction) QueryRow added in v3.77.0

func (tx *Transaction) QueryRow(
	ctx context.Context, q string, opts ...options.Execute,
) (row query.Row, finalErr error)

func (*Transaction) Rollback added in v3.76.2

func (tx *Transaction) Rollback(ctx context.Context) error

func (*Transaction) SessionID added in v3.76.4

func (tx *Transaction) SessionID() string

func (*Transaction) UnLazy added in v3.77.0

func (tx *Transaction) UnLazy(ctx context.Context) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL