Documentation
¶
Overview ¶
Package drivertest provides utilities for driver testing.
Index ¶
- Constants
- func ConnectionID(db *sql.DB) (int, error)
- func CreateSchema(db *sql.DB, schema string) error
- func DSN() string
- func DefaultAttrs() map[string]interface{}
- func DropSchema(db *sql.DB, schema string) error
- func DropTable(db *sql.DB, schema, table string) error
- func DummySelect(db *sql.DB) error
- func NumProcsInSchema(db *sql.DB, schema string) (int, error)
- func NumTablesInSchema(db *sql.DB, schema string) (int, error)
- func PingInterval() int
- func QuerySchemasPrefix(db *sql.DB, prefix string) ([]string, error)
- func QueryTablesPrefix(db *sql.DB, prefix string) ([]string, error)
- func Schema() string
- func SessionVariable(k string, db *sql.DB) (string, error)
- func SessionVariables(db *sql.DB) (map[string]string, error)
- func Setup(db *sql.DB)
- func Teardown(db *sql.DB, drop bool)
Constants ¶
const ( CondNone = iota CondEQ // equal CondLT // less than CondGE // greater equal )
test run condition constants
Variables ¶
This section is empty.
Functions ¶
func ConnectionID ¶
ConnectionID returns the hdb connection id.
func CreateSchema ¶
CreateSchema creates a schema on the database.
func DefaultAttrs ¶
func DefaultAttrs() map[string]interface{}
DefaultAttrs returns the key value map of connector default testing attributes.
func DropSchema ¶
DropSchema drops a schema from the database.
func NumProcsInSchema ¶
NumProcsInSchema returns the number of stored procedures in a database schema.
func NumTablesInSchema ¶
NumTablesInSchema returns the number of tables in a database schema.
func QuerySchemasPrefix ¶
QuerySchemasPrefix returns all schemas of a database starting with prefix in name.
func QueryTablesPrefix ¶
QueryTablesPrefix returns all tables of a database starting with prefix in name.
func SessionVariable ¶
SessionVariable returns the value of a session variable.
func SessionVariables ¶
SessionVariables returns a map of current session variables.
Types ¶
This section is empty.