forked from mirror/gorm
20 lines
396 B
Go
20 lines
396 B
Go
package gorm
|
|
|
|
import "database/sql"
|
|
|
|
type sqlCommon interface {
|
|
Exec(query string, args ...interface{}) (sql.Result, error)
|
|
Prepare(query string) (*sql.Stmt, error)
|
|
Query(query string, args ...interface{}) (*sql.Rows, error)
|
|
QueryRow(query string, args ...interface{}) *sql.Row
|
|
}
|
|
|
|
type sqlDb interface {
|
|
Begin() (*sql.Tx, error)
|
|
}
|
|
|
|
type sqlTx interface {
|
|
Commit() error
|
|
Rollback() error
|
|
}
|