Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultConnHost = "localhost" DefaultConnPort = "4100" DefaultConnTransport = "tcp" // TDSRxQueueSize is a buffer length for TDS packages receiver. // // To prevent deadlocks, it should be enough to contain one TDS packet // parsed into response packages. // // OMNIbus server returns max 8192-bytes packets, // min response is RowResult with at least 2 bytes (int8 token and 1+ bytes for data). // The worst case is: 8192 / 2 = 4096, 4100 should be enough:) TDSRxQueueSize = 4100 )
Variables ¶
View Source
var ( // ErrConnectionInUse returned if caller tries to use Connection concurrently, // that is not possible with TDS protocol 'one-query-at-a-time' limitation: // OMNIbus server does not support multiplexing ErrConnectionInUse = errors.New("connection in use") // ErrQueryFailed means that 'transaction error' message has been received from the server ErrQueryFailed = errors.New("query failed") ErrTranNotCompleted = errors.New("transaction completed message did not found") ErrTranFailed = errors.New("transaction failed") )
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func (*Connection) Close ¶
func (c *Connection) Close() error
type TDSConnector ¶
func (*TDSConnector) Connect ¶
func (c *TDSConnector) Connect( ctx context.Context, addr db.Addr, credentials qc.Credentials, ) (conn db.ExecutorCloser, err error)
Click to show internal directories.
Click to hide internal directories.