Versions in this module Expand all Collapse all v1 v1.1.7 Jun 19, 2026 v1.1.6 Jun 19, 2026 Changes in this version + type OptionPagination func(*pagination[T]) + func WithMaxPageSize[T any](max int) OptionPagination[T] + func WithMaxPage[T any](max int) OptionPagination[T] + func WithMinPageSize[T any](min int) OptionPagination[T] + func WithMinPage[T any](min int) OptionPagination[T] type Pagination + GetKvLimit func(pageSize int) []any + GetKvOffset func(page, pageSize int) []any v1.1.5 Apr 22, 2026 Changes in this version + type CursorToken map[string]any + type Pagination interface + Cursor func(ctx context.Context, req *RequestPaginationCursor) (*ResponsePaginationCursor[T], error) + Debug func() Pagination[T] + Offset func(ctx context.Context, req *RequestPaginationOffset) (*ResponsePaginationOffset[T], error) + func NewPagination[T any](repo Postgres) Pagination[T] + type RequestGetCursorTokenFromEncoded struct + IsCustomCTE bool + Keys []string + Kv []any + Query string + Sorts []SortField + Token string + type RequestPaginationCursor struct + IsCustomCTE bool + Kv []any + Query string + QueryCount string + Size int + Sorts []SortField + Token string + type RequestPaginationOffset struct + Kv []any + Page int64 + Query string + QueryCount string + Size int64 + func (r *RequestPaginationOffset) GetTotalPages(total int64) int64 + type ResponseGetCursorTokenFromEncoded struct + CursorToken map[string]any + IsPrev bool + Keys []string + Kv []any + Query string + ReverseResult bool + type ResponsePaginationCursor struct + Items []T + NextToken *string + PreviousToken *string + TotalItems int64 + type ResponsePaginationOffset struct + Items []T + Page int64 + TotalItems int64 + TotalPages int64 + type SortField struct + Column string + IsDesc bool + Key string v1.1.4 Apr 18, 2026 v1.1.3 Apr 18, 2026 v1.1.2 Sep 28, 2025 v1.1.1 Sep 28, 2025 Changes in this version type Exec + Select func(query string, destination any, keyValuePairs ...any) Exec v1.1.0 Aug 12, 2025 v1.0.0 Aug 11, 2025 Changes in this version + func Filter(sl []string, m map[string]string) (result []string) + func NewPipeline() *pipeline + func Pairs(kv []any) (map[string]any, error) + func PairsHook(kv []any, ids map[string]any, hook string) (map[string]any, error) + type Exec interface + Debug func() Exec + Delete func(query string, kv ...any) Exec + Exec func(ctx context.Context) (any, error) + ExecInTx func(ctx context.Context) (res *ExecResult, err error) + FromResult func(from string) string + Insert func(query string, kv ...any) Exec + Update func(query string, kv ...any) Exec + Wrap func(exec Exec) Exec + type ExecResult struct + func (e *ExecResult) TxResult(query string) any + type Option func(*config) + func WithConnMax(maxOpenConns int) Option + func WithConnMaxIdleTime(maxConnIdleTime time.Duration) Option + func WithConnMaxLifetime(maxConnLifetime time.Duration) Option + func WithDBName(dbName string) Option + func WithDriverName(driverName string) Option + func WithDsn(dsn string) Option + func WithHost(host string) Option + func WithMaxIdleConns(maxIdleConns int) Option + func WithMaxOpenConns(maxOpenConns int) Option + func WithPassword(password string) Option + func WithPort(port int) Option + func WithSSLMode(sslMode string) Option + func WithUser(user string) Option + type Postgres interface + Delete func(query string, kv ...any) Exec + FromResult func(from string) string + Insert func(query string, kv ...any) Exec + Select func(query string, dest any, kv ...any) Select + Update func(query string, kv ...any) Exec + func New(opts ...Option) (Postgres, error) + type Select interface + Debug func() Select + Many func(ctx context.Context) (found bool, err error) + One func(ctx context.Context) (found bool, err error) + type StringSlice []string + func (s *StringSlice) Scan(src any) error + func (s StringSlice) Value() (driver.Value, error)