Documentation
¶
Index ¶
Constants ¶
const Mask = "***"
Mask is the placeholder substituted for any sensitive value.
Variables ¶
This section is empty.
Functions ¶
func ConvertArg ¶
ConvertArg lowers a single cty value into a database/sql parameter value. Null values map to Go nil so drivers bind a SQL NULL.
func ConvertArgs ¶
ConvertArgs lowers a list of cty values into Go values usable as database/sql parameters. Scalars only: cty lists and objects are rejected in V1 because the standard driver protocol can not bind composite values without provider-specific helpers.
func ConvertRowValue ¶
ConvertRowValue normalizes a value returned by database/sql.Rows.Scan into a cty.Value the rest of Tales can match against.
Types ¶
type ConnectionConfig ¶
type ConnectionConfig struct {
Name string
Driver string // alias supplied by the user (postgres / pgx / mysql)
DSN string
}
ConnectionConfig is the resolved configuration for one SQL connection.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider executes step "sql" via database/sql. It owns a per-process cache of *sql.DB instances, opened lazily on first use and closed when the runner finishes the suite.
func New ¶
func New() *Provider
New creates an empty SQL provider. Drivers are registered by the package imports.go file (pgx + mysql) at startup.
func (*Provider) Close ¶
Close releases every cached *sql.DB. The runner calls it once at the end of a suite via the io.Closer type assertion path.