Documentation
¶
Index ¶
- type BaseConnection
- func (b *BaseConnection) Begin() error
- func (b *BaseConnection) Commit() error
- func (b *BaseConnection) Exec(query string) error
- func (b *BaseConnection) ID() uint64
- func (b *BaseConnection) Receive() (pgproto.BackendMessage, error)
- func (b *BaseConnection) Rollback() error
- func (b *BaseConnection) Send(msg pgproto.FrontendMessage) error
- type BasePool
- type Connection
- type Pool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseConnection ¶
type BaseConnection struct {
// contains filtered or unexported fields
}
func (*BaseConnection) Begin ¶
func (b *BaseConnection) Begin() error
func (*BaseConnection) Commit ¶
func (b *BaseConnection) Commit() error
func (*BaseConnection) Exec ¶
func (b *BaseConnection) Exec(query string) error
func (*BaseConnection) ID ¶
func (b *BaseConnection) ID() uint64
func (*BaseConnection) Receive ¶
func (b *BaseConnection) Receive() (pgproto.BackendMessage, error)
func (*BaseConnection) Rollback ¶
func (b *BaseConnection) Rollback() error
func (*BaseConnection) Send ¶
func (b *BaseConnection) Send(msg pgproto.FrontendMessage) error
type BasePool ¶
type BasePool struct {
// contains filtered or unexported fields
}
BasePool implements the Pool interface.
func (*BasePool) GetConnection ¶
func (p *BasePool) GetConnection(dataNodeShardId uint64, txn bool) (Connection, error)
GetConnection returns a connection that is allocated to this executor's connection pool.
type Connection ¶
type Connection interface { Begin() error Send(pgproto.FrontendMessage) error Receive() (pgproto.BackendMessage, error) ID() uint64 }
Connection represents a tunnel to and from a data node. It is a wrapper around the core.PoolConnection interface but when this connection is released it is returned to the executor's connection pool instead.
func NewConnection ¶
func NewConnection(conn core.PoolConnection, pool *BasePool) Connection
Click to show internal directories.
Click to hide internal directories.