Documentation
¶
Overview ¶
Package local creates a database per test on the servers the examples for ClickHouse, SQL Server and Spanner run against, named by environment variable, and skips the test when none is named. The helpers for PostgreSQL, MySQL and SQLite live in the main module's internal/sqltest, which the rest of sqlc's tests share; these live with the examples so the drivers they need are dependencies of the examples module alone.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClickHouse ¶
ClickHouse creates a database on the server CLICKHOUSE_SERVER_URI names, such as clickhouse://default:mysecretpassword@127.0.0.1:9000, runs the migrations in it and returns a URI that connects to it. The test is skipped when no server is named.
func MSSQL ¶
MSSQL creates a database on the server MSSQL_SERVER_URI names, such as sqlserver://sa:Mysecretpassword1!@127.0.0.1:1433?encrypt=disable, runs the migrations in it and returns a URI that connects to it. The test is skipped when no server is named.
func Spanner ¶
Spanner creates a database on the Spanner Omni server SPANNER_SERVER_URI names by its gRPC endpoint, such as localhost:15000, runs the migrations as its DDL and returns a data source name for the go-sql-spanner driver that connects to it without TLS or credentials, as Omni is reached. The test is skipped when no server is named.
Types ¶
This section is empty.