Documentation ¶
Index ¶
- Constants
- func Module() (string, tengo.Importable)
- func RegisterDB(name, driverName string, db *sql.DB) error
- func RegisterDBX(name string, dbx *sqlx.DB) error
- func ReplaceDB(name, driverName string, db *sql.DB) (*sqlx.DB, error)
- func ReplaceDBX(name string, dbx *sqlx.DB) (*sqlx.DB, error)
- type Config
Constants ¶
View Source
const (
Name = "sqldb"
)
Name for this module
Variables ¶
This section is empty.
Functions ¶
func Module ¶
func Module() (string, tengo.Importable)
Module stores information for this module name
func RegisterDB ¶
RegisterDB register existing sql.DB instance. Supported driver names:
- With $ params: "postgres", "pgx", "pq-timeouts", "cloudsqlpostgres", "ql", "nrpostgres", "cockroach",
- With ? params: "mysql", "sqlite3", "nrmysql", "nrsqlite3",
- with :name params: "oci8", "ora", "goracle", "godror",
- with @ params: "sqlserver",
func RegisterDBX ¶
RegisterDBX register sqlx.DB instance
Types ¶
Click to show internal directories.
Click to hide internal directories.