12345678910111213141516171819 |
- package util
- import (
- "context"
- "database/sql"
- )
- type DB interface {
- Ping() error
- Close() error
- ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
- Exec(query string, args ...any) (sql.Result, error)
- QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
- Query(query string, args ...any) (*sql.Rows, error)
- QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row
- QueryRow(query string, args ...any) *sql.Row
- BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error)
- Begin() (*sql.Tx, error)
- }
|