Documentation
¶
Index ¶
- Constants
- func GetDatabase(opts ...ClientOption) string
- type Agent
- type ApplyToCredentialser
- type BaseOption
- type Block
- type Client
- type ClientOption
- type ClientPacket
- type ClientPool
- type Column
- type Credentials
- type CredentialsOption
- type Exception
- type Pinger
- type ProfileInfo
- type Progress
- type Query
- type QueryMeta
- type Server
- type ServerConn
- type ServerPacket
- type Ver
Constants ¶
View Source
const ( DBMS_MIN_REVISION_WITH_SERVER_TIMEZONE = 54058 DBMS_MIN_REVISION_WITH_QUOTA_KEY_IN_CLIENT_INFO = 54060 )
Variables ¶
This section is empty.
Functions ¶
func GetDatabase ¶
func GetDatabase(opts ...ClientOption) string
Types ¶
type ApplyToCredentialser ¶
type ApplyToCredentialser interface {
ApplyToCredentials(*Credentials) error
}
type BaseOption ¶
type BaseOption string
func OptFunc ¶
func OptFunc(d int) BaseOption
func (BaseOption) String ¶
func (o BaseOption) String() string
type Client ¶
type Client interface {
NextPacket(context.Context) (ServerPacket, error)
SendQuery(context.Context, *Query) (QueryMeta, error)
CancelQuery(context.Context) error
SendBlock(ctx context.Context, b *Block, compr bool) error
RecvBlock(ctx context.Context, compr bool) (b *Block, err error)
RecvException(context.Context) error
RecvProgress(context.Context) (Progress, error)
RecvProfileInfo(context.Context) (ProfileInfo, error)
}
type ClientOption ¶
func WithCredentials ¶
func WithCredentials(c Credentials) ClientOption
func WithDatabase ¶
func WithDatabase(db string) ClientOption
type ClientPacket ¶
type ClientPacket int
const ( ClientHello ClientPacket = iota ClientQuery ClientData ClientCancel ClientPing )
type ClientPool ¶
type Credentials ¶
type CredentialsOption ¶
type CredentialsOption struct {
BaseOption
F func(*Credentials) error
}
func (CredentialsOption) ApplyToCredentials ¶
func (o CredentialsOption) ApplyToCredentials(c *Credentials) (err error)
type ProfileInfo ¶
type ServerConn ¶
type ServerConn interface {
NextPacket(context.Context) (ClientPacket, error)
RecvQuery(context.Context) (*Query, error)
SendQueryMeta(ctx context.Context, m QueryMeta, compr bool) error
SendBlock(ctx context.Context, b *Block, compr bool) error
RecvBlock(ctx context.Context, compr bool) (b *Block, err error)
SendEndOfStream(context.Context) error
SendException(context.Context, error) error
SendProgress(context.Context, Progress) error
SendProfileInfo(context.Context, ProfileInfo) error
}
type ServerPacket ¶
type ServerPacket int
const ( ServerHello ServerPacket = iota ServerData ServerException ServerProgress ServerPong ServerEndOfStream ServerProfileInfo ServerTotals ServerExtremes )
Click to show internal directories.
Click to hide internal directories.