common.go 503 B

1234567891011121314151617
  1. package repositories
  2. import (
  3. "context"
  4. "database/sql"
  5. sq "github.com/Masterminds/squirrel"
  6. )
  7. var placeholder = sq.Question
  8. type DB interface {
  9. SelectContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error
  10. GetContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error
  11. ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
  12. QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row
  13. }