Documentation ¶
Index ¶
- func CreateDatabase(url string) error
- func DropDatabase(url string) error
- func GetDBNameFromURL(url string) string
- func ReplaceDBNameInURL(url string, dbname string) string
- type Database
- func (db *Database) Begin() error
- func (db *Database) Commit() error
- func (db *Database) Exec(query string, args ...interface{}) (sql.Result, error)
- func (db *Database) Get(dest interface{}, query string, args ...interface{}) error
- func (db *Database) Handle() Handle
- func (db *Database) InTransaction() bool
- func (db *Database) Query(query string, args ...interface{}) (*sql.Rows, error)
- func (db *Database) QueryRowx(query string, args ...interface{}) *sqlx.Row
- func (db *Database) Queryx(query string, args ...interface{}) (*sqlx.Rows, error)
- func (db *Database) Rollback() error
- func (db *Database) Select(dest interface{}, query string, args ...interface{}) error
- func (db *Database) Truncate() error
- func (db *Database) UnWrap() *sqlx.DB
- type Execer
- type Handle
- type Queryer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDatabase ¶
CreateDatabase ... Creates the database on the SQL server (if not exists)
func GetDBNameFromURL ¶
GetDBNameFromURL Get the database name from the open string
func ReplaceDBNameInURL ¶
ReplaceDBNameInURL Replace the database name in the open string
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func (*Database) InTransaction ¶
Click to show internal directories.
Click to hide internal directories.