Documentation ¶
Overview ¶
Package utils contains helper types and functions that can be used by any relational data source.
Index ¶
- func MakeDescribeTableQuery(logger log.Logger, formatter SQLFormatter, ...) (string, []any)
- func MakeReadSplitQuery(logger log.Logger, formatter SQLFormatter, request *api_service_protos.TSelect) (string, []any, error)
- type Connection
- type ConnectionManager
- type ConnectionManagerBase
- type ConnectionManagerMock
- type ConnectionMock
- type RowTransformerMock
- type Rows
- type RowsMock
- type SQLFormatter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeDescribeTableQuery ¶
func MakeDescribeTableQuery(logger log.Logger, formatter SQLFormatter, request *api_service_protos.TDescribeTableRequest) (string, []any)
func MakeReadSplitQuery ¶
func MakeReadSplitQuery(logger log.Logger, formatter SQLFormatter, request *api_service_protos.TSelect) (string, []any, error)
Types ¶
type Connection ¶
type ConnectionManager ¶
type ConnectionManager interface { Make(ctx context.Context, logger log.Logger, dataSourceInstance *api_common.TDataSourceInstance) (Connection, error) Release(logger log.Logger, connection Connection) }
type ConnectionManagerBase ¶
type ConnectionManagerBase struct {
QueryLoggerFactory utils.QueryLoggerFactory
}
type ConnectionManagerMock ¶
func (*ConnectionManagerMock) Make ¶
func (m *ConnectionManagerMock) Make( ctx context.Context, logger log.Logger, dataSourceInstance *api_common.TDataSourceInstance) (Connection, error)
func (*ConnectionManagerMock) Release ¶
func (m *ConnectionManagerMock) Release(logger log.Logger, conn Connection)
type ConnectionMock ¶
func (*ConnectionMock) Close ¶
func (m *ConnectionMock) Close() error
type RowTransformerMock ¶
func (*RowTransformerMock) AppendToArrowBuilders ¶
func (t *RowTransformerMock) AppendToArrowBuilders(builder []array.Builder) error
func (*RowTransformerMock) GetAcceptors ¶
func (t *RowTransformerMock) GetAcceptors() []any
func (*RowTransformerMock) SetAcceptors ¶
func (t *RowTransformerMock) SetAcceptors([]any)
type RowsMock ¶
func (*RowsMock) MakeTransformer ¶
type SQLFormatter ¶
type SQLFormatter interface { GetDescribeTableQuery(request *api_service_protos.TDescribeTableRequest) (string, []any) // Get placeholder for n'th argument (starting from 0) for prepared statement GetPlaceholder(n int) string // Sanitize names of databases, tables, columns, views, schemas SanitiseIdentifier(ident string) string // Support for high level expression (without subexpressions, they are checked separately) SupportsPushdownExpression(expression *api_service_protos.TExpression) bool }
Click to show internal directories.
Click to hide internal directories.