Documentation ¶
Index ¶
- type Connection
- type PgConnectionManager
- type Query
- func (q *Query) Close() error
- func (q *Query) Exec(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
- func (q *Query) Get(ctx context.Context, dest interface{}, query string, args ...interface{}) error
- func (q *Query) Prepare(ctx context.Context, query string) (*sqlx.Stmt, error)
- func (q *Query) Query(ctx context.Context, query string, args ...interface{}) (*sqlx.Rows, error)
- func (q *Query) QueryRow(ctx context.Context, query string, args ...interface{}) *sqlx.Row
- func (q *Query) Select(ctx context.Context, dest interface{}, query string, args ...interface{}) error
- type TX
- type Transaction
- func (t *Transaction) Begin(ctx context.Context) error
- func (t *Transaction) Close() error
- func (t *Transaction) Commit(ctx context.Context) error
- func (t *Transaction) Exec(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
- func (t *Transaction) Get(ctx context.Context, dest interface{}, query string, args ...interface{}) error
- func (t *Transaction) Prepare(ctx context.Context, query string) (*sqlx.Stmt, error)
- func (t *Transaction) Query(ctx context.Context, query string, args ...interface{}) (*sqlx.Rows, error)
- func (t *Transaction) QueryRow(ctx context.Context, query string, args ...interface{}) *sqlx.Row
- func (t *Transaction) Rollback(ctx context.Context) error
- func (t *Transaction) Select(ctx context.Context, dest interface{}, query string, args ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection interface { Query(ctx context.Context, query string, args ...interface{}) (*sqlx.Rows, error) QueryRow(ctx context.Context, query string, args ...interface{}) *sqlx.Row Exec(ctx context.Context, query string, args ...interface{}) (sql.Result, error) Prepare(ctx context.Context, query string) (*sqlx.Stmt, error) Select(ctx context.Context, dest interface{}, query string, args ...interface{}) error Get(ctx context.Context, dest interface{}, query string, args ...interface{}) error }
type PgConnectionManager ¶
type PgConnectionManager struct {
// contains filtered or unexported fields
}
func NewPgConnectionManager ¶
func NewPgConnectionManager(connectionString string) (*PgConnectionManager, error)
func (*PgConnectionManager) CheckDatabaseHealth ¶
func (cm *PgConnectionManager) CheckDatabaseHealth() error
func (*PgConnectionManager) Close ¶
func (cm *PgConnectionManager) Close() error
func (*PgConnectionManager) Query ¶
func (cm *PgConnectionManager) Query() *Query
func (*PgConnectionManager) Transaction ¶
func (cm *PgConnectionManager) Transaction() *Transaction
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func NewTransaction ¶
func NewTransaction(db *sqlx.DB) *Transaction
func (*Transaction) Close ¶
func (t *Transaction) Close() error
func (*Transaction) Get ¶
func (t *Transaction) Get(ctx context.Context, dest interface{}, query string, args ...interface{}) error
Click to show internal directories.
Click to hide internal directories.