ydbx

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	DriverConfig *ydb.DriverConfig
	Driver       ydb.Driver
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context, params ConnectParams, opts ...ClientOption) (c *Client, err error)

NewClient creates a Client to a database

func (*Client) Close

func (c *Client) Close()

func (*Client) Table

func (c *Client) Table() *tableWrapper

type ClientOption

type ClientOption func(client *Client) error

func WithCredentials

func WithCredentials(credentials ydb.Credentials) ClientOption

func WithDriver

func WithDriver(driver ydb.Driver) ClientOption

func WithDriverConfig

func WithDriverConfig(config *ydb.DriverConfig) ClientOption

type ConnectParams

type ConnectParams interface {
	Endpoint() string
	Database() string
	UseTLS() bool
}

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

Jump to

Keyboard shortcuts

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