Documentation ¶
Index ¶
- type ConnectOption
- func WithAccessTokenCredentials(accessToken string) ConnectOption
- func WithAnonymousCredentials() ConnectOption
- func WithCredentials(credentials ydb.Credentials) ConnectOption
- func WithDriverConfig(config *ydb.DriverConfig) ConnectOption
- func WithMetadataCredentials(ctx context.Context) ConnectOption
- func WithServiceAccountKeyFileCredentials(serviceAccountKeyFile string) ConnectOption
- func WithSessionPoolBusyCheckInterval(busyCheckInterval time.Duration) ConnectOption
- func WithSessionPoolCreateSessionTimeout(createSessionTimeout time.Duration) ConnectOption
- func WithSessionPoolDeleteTimeout(deleteTimeout time.Duration) ConnectOption
- func WithSessionPoolIdleThreshold(idleThreshold time.Duration) ConnectOption
- func WithSessionPoolKeepAliveBatchSize(keepAliveBatchSize int) ConnectOption
- func WithSessionPoolKeepAliveMinSize(keepAliveMinSize int) ConnectOption
- func WithSessionPoolKeepAliveTimeout(keepAliveTimeout time.Duration) ConnectOption
- func WithSessionPoolSizeLimit(sizeLimit int) ConnectOption
- type ConnectParams
- type Connection
- func (c *Connection) CleanupDatabase(ctx context.Context, prefix string, names ...string) error
- func (c *Connection) Close()
- func (c *Connection) Driver() ydb.Driver
- func (c *Connection) EnsurePathExists(ctx context.Context, path string) error
- func (c *Connection) Scheme() *scheme.Client
- func (c *Connection) Table() *tableWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectOption ¶
type ConnectOption func(client *Connection) error
func WithAccessTokenCredentials ¶ added in v2.3.0
func WithAccessTokenCredentials(accessToken string) ConnectOption
func WithAnonymousCredentials ¶ added in v2.3.0
func WithAnonymousCredentials() ConnectOption
func WithCredentials ¶
func WithCredentials(credentials ydb.Credentials) ConnectOption
func WithDriverConfig ¶
func WithDriverConfig(config *ydb.DriverConfig) ConnectOption
func WithMetadataCredentials ¶ added in v2.3.0
func WithMetadataCredentials(ctx context.Context) ConnectOption
func WithServiceAccountKeyFileCredentials ¶ added in v2.3.0
func WithServiceAccountKeyFileCredentials(serviceAccountKeyFile string) ConnectOption
func WithSessionPoolBusyCheckInterval ¶
func WithSessionPoolBusyCheckInterval(busyCheckInterval time.Duration) ConnectOption
func WithSessionPoolCreateSessionTimeout ¶
func WithSessionPoolCreateSessionTimeout(createSessionTimeout time.Duration) ConnectOption
func WithSessionPoolDeleteTimeout ¶
func WithSessionPoolDeleteTimeout(deleteTimeout time.Duration) ConnectOption
func WithSessionPoolIdleThreshold ¶
func WithSessionPoolIdleThreshold(idleThreshold time.Duration) ConnectOption
func WithSessionPoolKeepAliveBatchSize ¶
func WithSessionPoolKeepAliveBatchSize(keepAliveBatchSize int) ConnectOption
func WithSessionPoolKeepAliveMinSize ¶
func WithSessionPoolKeepAliveMinSize(keepAliveMinSize int) ConnectOption
func WithSessionPoolKeepAliveTimeout ¶
func WithSessionPoolKeepAliveTimeout(keepAliveTimeout time.Duration) ConnectOption
func WithSessionPoolSizeLimit ¶
func WithSessionPoolSizeLimit(sizeLimit int) ConnectOption
type ConnectParams ¶
func ConnectionString ¶
func ConnectionString(uri string) (ConnectParams, error)
func EndpointDatabase ¶
func EndpointDatabase(endpoint string, database string, tls bool) ConnectParams
func MustConnectionString ¶
func MustConnectionString(uri string) ConnectParams
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func New ¶
func New(ctx context.Context, params ConnectParams, opts ...ConnectOption) (c *Connection, err error)
New connects to database and return database connection
func (*Connection) CleanupDatabase ¶
func (*Connection) Close ¶
func (c *Connection) Close()
func (*Connection) Driver ¶
func (c *Connection) Driver() ydb.Driver
func (*Connection) EnsurePathExists ¶
func (c *Connection) EnsurePathExists(ctx context.Context, path string) error
func (*Connection) Scheme ¶
func (c *Connection) Scheme() *scheme.Client
func (*Connection) Table ¶
func (c *Connection) Table() *tableWrapper
Click to show internal directories.
Click to hide internal directories.