Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSQLName ¶
func GenerateSQLName() string
GenerateSQLName generates a unique safe name that can be used for a database or table name
Types ¶
type SQLDB ¶
type SQLDB interface {
// Query executes the given query as implemented by database/sql.Query.
Query(string, ...interface{}) (*sql.Rows, error)
// QueryContext executes a query that returns rows, typically a SELECT.
QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
// QueryRow executes a query that is expected to return at most one row. QueryRow always returns a
// non-nil value.
QueryRow(string, ...interface{}) *sql.Row
// QueryRowContext executes a query that is expected to return at most one row. QueryRow always
// returns a non-nil value.
QueryRowContext(context.Context, string, ...interface{}) *sql.Row
// Exec executes a query without returning any rows.
Exec(string, ...interface{}) (sql.Result, error)
// ExecContext executes a query without returning any rows.
ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
}
SQLDB is the standard SQL database interface which the standard library should have but it does not
type TraceableDB ¶
TraceableDB is the SQL database wrapped with open tracing
func WrapWithTracing ¶
func WrapWithTracing(db SQLDB) TraceableDB
WrapWithTracing Wraps a SQL database with open tracing and logging
Click to show internal directories.
Click to hide internal directories.