Documentation ¶
Index ¶
- Variables
- func DeferCloseRows(rows *sql.Rows)
- func DeferRollback(tx *sql.Tx)
- func SetDataSourceNameDatabase(driverName, dsn, dbName string) (string, error)
- type ColumnInfo
- type DB
- func (db *DB) ColumnInfo(table, column string) (*ColumnInfo, error)
- func (db *DB) HaveConstraint(table string, constraint string) (bool, error)
- func (db *DB) HaveIndex(table string, index string) (bool, error)
- func (db *DB) HaveTable(table string) (bool, error)
- func (db *DB) HaveTrigger(table string, trigger string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDriverUnsupported = errors.New("(xsql) driver not supported")
Functions ¶
func DeferCloseRows ¶
DeferCloseRows closes rows. This is used with the `defer` statement. The error is conveniently ignored.
func DeferRollback ¶
DeferRollback rolls back tx. This is used with the `defer` statement. The error is conveniently ignored.
Types ¶
type ColumnInfo ¶
type DB ¶
DB is a wrapper around xsql.DB offering a pool of connections.
func Open ¶
Open opens a database specified by its database driver name and a driver-specific data source name. Arguments are checked, and the database is pinged.
Panics when driver is not supported.
func (*DB) ColumnInfo ¶
func (db *DB) ColumnInfo(table, column string) (*ColumnInfo, error)
func (*DB) HaveConstraint ¶
HaveConstraint checks whether constraint is available for table.
Click to show internal directories.
Click to hide internal directories.