Documentation ¶
Index ¶
- Constants
- func OpenDB(ctx context.Context, cfg *mysql.Config, opts Options) (*blockysql.DB, error)
- type DB
- func (d *DB) DB() *sql.DB
- func (d *DB) Dialect() string
- func (d *DB) DriverName() string
- func (d *DB) ErrorCode(err error) bserr.Code
- func (d *DB) ErrorColumn(err error) string
- func (d *DB) ErrorConstraint(err error) string
- func (d *DB) ErrorTable(err error) string
- func (d *DB) HasErrorDetails() bool
- type Options
- type URLOpener
Constants ¶
View Source
const SchemaName = "mysql"
SchemaName is the name of the driver.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB is the driver for the PostgreSQL database.
func (*DB) ErrorColumn ¶
ErrorColumn returns the column name of the given error if the driver doesn't support it, it should return an empty string.
func (*DB) ErrorConstraint ¶
ErrorConstraint returns the constraint name of the given error if the driver doesn't support it, it should return an empty string.
func (*DB) ErrorTable ¶
ErrorTable returns the table name of the given error if the driver doesn't support it, it should return an empty string.
func (*DB) HasErrorDetails ¶
HasErrorDetails returns true if the driver supports error details, such as column, table and constraint name.
type Options ¶
type Options struct { // TraceOpts contains options for OpenCensus. TraceOpts []ocsql.TraceOption }
type URLOpener ¶
type URLOpener struct { // TraceOpts contains options for OpenCensus. TraceOpts []ocsql.TraceOption }
URLOpener is a mysql driver url opener.
Click to show internal directories.
Click to hide internal directories.