Created
January 18, 2018 17:45
-
-
Save wttw/20b8800eab5c11ef01e175faf2feae7b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Databaser is implemented by pgx.ConnPool, pgx.Conn and pgx.Tx | |
// model.XODB is a subset of global.Database | |
type Databaser interface { | |
Exec(string, ...interface{}) (pgx.CommandTag, error) | |
Query(sql string, args ...interface{}) (*pgx.Rows, error) | |
QueryRow(sql string, args ...interface{}) *pgx.Row | |
Prepare(name, sql string) (*pgx.PreparedStatement, error) | |
} | |
// Txer is implemented by pgx.ConnPool and pgx.Conn | |
type Txer interface { | |
Databaser | |
Begin() (*pgx.Tx, error) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment