Documentation ¶
Overview ¶
Package validation is a driver-agnostic test suite intended to aid in driver development for ADBC drivers. It provides a series of utilities and defined tests that can be used to validate a driver follows the correct and expected behavior.
Index ¶
- type ConnectionTests
- func (c *ConnectionTests) SetupTest()
- func (c *ConnectionTests) TearDownTest()
- func (c *ConnectionTests) TestAutocommitDefault()
- func (c *ConnectionTests) TestAutocommitToggle()
- func (c *ConnectionTests) TestCloseConnTwice()
- func (c *ConnectionTests) TestConcurrent()
- func (c *ConnectionTests) TestMetadataGetInfo()
- func (c *ConnectionTests) TestMetadataGetTableSchema()
- func (c *ConnectionTests) TestMetadataGetTableTypes()
- func (c *ConnectionTests) TestNewConn()
- type DatabaseTests
- type DriverQuirks
- type StatementTests
- func (s *StatementTests) SetupTest()
- func (s *StatementTests) TearDownTest()
- func (s *StatementTests) TestNewStatement()
- func (s *StatementTests) TestSQLPrepareGetParameterSchema()
- func (s *StatementTests) TestSQLPrepareSelectNoParams()
- func (s *StatementTests) TestSQLPrepareSelectParams()
- func (s *StatementTests) TestSqlPartitionedInts()
- func (s *StatementTests) TestSqlPrepareErrorParamCountMismatch()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionTests ¶
func (*ConnectionTests) SetupTest ¶
func (c *ConnectionTests) SetupTest()
func (*ConnectionTests) TearDownTest ¶
func (c *ConnectionTests) TearDownTest()
func (*ConnectionTests) TestAutocommitDefault ¶
func (c *ConnectionTests) TestAutocommitDefault()
func (*ConnectionTests) TestAutocommitToggle ¶
func (c *ConnectionTests) TestAutocommitToggle()
func (*ConnectionTests) TestCloseConnTwice ¶
func (c *ConnectionTests) TestCloseConnTwice()
func (*ConnectionTests) TestConcurrent ¶
func (c *ConnectionTests) TestConcurrent()
func (*ConnectionTests) TestMetadataGetInfo ¶
func (c *ConnectionTests) TestMetadataGetInfo()
func (*ConnectionTests) TestMetadataGetTableSchema ¶
func (c *ConnectionTests) TestMetadataGetTableSchema()
func (*ConnectionTests) TestMetadataGetTableTypes ¶
func (c *ConnectionTests) TestMetadataGetTableTypes()
func (*ConnectionTests) TestNewConn ¶
func (c *ConnectionTests) TestNewConn()
type DatabaseTests ¶
type DatabaseTests struct { suite.Suite Driver adbc.Driver Quirks DriverQuirks }
func (*DatabaseTests) SetupTest ¶
func (d *DatabaseTests) SetupTest()
func (*DatabaseTests) TearDownTest ¶
func (d *DatabaseTests) TearDownTest()
func (*DatabaseTests) TestNewDatabase ¶
func (d *DatabaseTests) TestNewDatabase()
type DriverQuirks ¶
type DriverQuirks interface { // Called in SetupTest to initialize anything needed for testing SetupDriver(*testing.T) adbc.Driver // Called in TearDownTest to clean up anything necessary in between tests TearDownDriver(*testing.T, adbc.Driver) // Return the list of key/value pairs of options to pass when // calling NewDatabase DatabaseOptions() map[string]string // Return the SQL to reference the bind parameter for a given index BindParameter(index int) string // Whether two statements can be used at the same time on a single connection SupportsConcurrentStatements() bool // Whether AdbcStatementExecutePartitions should work SupportsPartitionedData() bool // Whether transactions are supported (Commit/Rollback on connection) SupportsTransactions() bool // Whether retrieving the schema of prepared statement params is supported SupportsGetParameterSchema() bool // Whether it supports dynamic parameter binding in queries SupportsDynamicParameterBinding() bool // Expected Metadata responses GetMetadata(adbc.InfoCode) interface{} // Create a sample table from an arrow record CreateSampleTable(tableName string, r arrow.Record) error Alloc() memory.Allocator }
type StatementTests ¶
type StatementTests struct { suite.Suite Driver adbc.Driver Quirks DriverQuirks DB adbc.Database Cnxn adbc.Connection // contains filtered or unexported fields }
func (*StatementTests) SetupTest ¶
func (s *StatementTests) SetupTest()
func (*StatementTests) TearDownTest ¶
func (s *StatementTests) TearDownTest()
func (*StatementTests) TestNewStatement ¶
func (s *StatementTests) TestNewStatement()
func (*StatementTests) TestSQLPrepareGetParameterSchema ¶
func (s *StatementTests) TestSQLPrepareGetParameterSchema()
func (*StatementTests) TestSQLPrepareSelectNoParams ¶
func (s *StatementTests) TestSQLPrepareSelectNoParams()
func (*StatementTests) TestSQLPrepareSelectParams ¶
func (s *StatementTests) TestSQLPrepareSelectParams()
func (*StatementTests) TestSqlPartitionedInts ¶
func (s *StatementTests) TestSqlPartitionedInts()
func (*StatementTests) TestSqlPrepareErrorParamCountMismatch ¶
func (s *StatementTests) TestSqlPrepareErrorParamCountMismatch()
Click to show internal directories.
Click to hide internal directories.