Documentation ¶
Index ¶
- Constants
- Variables
- func EscapeString(s string) string
- func EstimatedPrint(start time.Time, name string, ctx ...*fiber.Ctx)
- func IsNoRows(err error, stx *PGTx) bool
- func IsRollback(err error, stx *PGTx) bool
- func IsRollbackThrow(err error, stx *PGTx) bool
- type PGClient
- func (pg *PGClient) Begin(level ...sql.IsolationLevel) (*PGTx, error)
- func (pg *PGClient) Close() error
- func (pg *PGClient) Connect(c *context.Context, appTitle string)
- func (pg *PGClient) CreateChannel(appTitle string) (*PGNotify, error)
- func (pg *PGClient) FetchRow(rows *sql.Rows) (PGRow, error)
- func (pg *PGClient) Query(query string, args ...any) (*sql.Rows, error)
- func (pg *PGClient) QueryOne(query string, args ...any) (PGRow, error)
- type PGNotify
- type PGRecord
- type PGRow
- type PGTx
- func (stx *PGTx) Commit() error
- func (stx *PGTx) Execute(query string, args ...any) error
- func (stx *PGTx) ExecutePrint(query string, args ...any) error
- func (stx *PGTx) FetchAll(rows *sql.Rows) (PGRecord, error)
- func (stx *PGTx) FetchOneColumn(rows *sql.Rows, columnName string) (SubSet, error)
- func (stx *PGTx) FetchRow(rows *sql.Rows) (PGRow, error)
- func (stx *PGTx) Query(query string, args ...any) (*sql.Rows, error)
- func (stx *PGTx) QueryOne(query string, args ...any) (PGRow, error)
- func (stx *PGTx) QueryOnePrint(query string, args ...any) (PGRow, error)
- func (stx *PGTx) QueryPrint(query string, args ...any) (*sql.Rows, error)
- func (stx *PGTx) Rollback() error
- type Storage
- func (s *Storage) Close() error
- func (s *Storage) Delete(key string) error
- func (s *Storage) Get(key string) (string, error)
- func (s *Storage) GetBool(key string) (bool, error)
- func (s *Storage) GetObject(key string) ([]byte, error)
- func (s *Storage) Set(key string, val any, exp time.Duration) error
- type SubSet
Constants ¶
View Source
const ( ENV = "ENV" DEBUG = "DEBUG" SENTRY_ENV = "SENTRY_ENV" SENTRY_DSN = "SENTRY_DSN" )
View Source
const ( DB_POSTGRES = "DB_POSTGRES" PGHOST = "PG_HOST" PGPORT = "PG_PORT" PGUSER = "PG_USER" PGPASSWORD = "PG_PASS" PGDATABASE = "PG_DBNAME" PGCACHE = "PG_DBCACHE" PGSSLMODE = "PG_SSLMODE" PGLIFETIME = "PG_LIFETIME" PGMAXIDLE = "PG_MAXIDLE" PGMAXCONN = "PG_MAXCONN" )
View Source
const ( LevelDefault sql.IsolationLevel = iota LevelReadUncommitted LevelReadCommitted LevelWriteCommitted LevelRepeatableRead LevelSnapshot LevelSerializable LevelLinearizable )
Variables ¶
View Source
var ( UPSTASH_REDIS = "UPSTASH_REDIS" DB_REDIS = "DB_REDIS" )
View Source
var ErrNoRows error = sql.ErrNoRows
Functions ¶
func EstimatedPrint ¶
func IsRollback ¶
func IsRollbackThrow ¶
Types ¶
type PGClient ¶
func (*PGClient) CreateChannel ¶
type PGNotify ¶
type PGNotify struct {
// contains filtered or unexported fields
}
type PGTx ¶
type PGTx struct { Closed bool // contains filtered or unexported fields }
func (*PGTx) FetchOneColumn ¶
func (*PGTx) QueryOnePrint ¶
Click to show internal directories.
Click to hide internal directories.