db

package
v0.0.0-...-11dc556 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDBPool

func NewDBPool(ctx context.Context, config DBConfig) (*pgxpool.Pool, error)

Types

type DBConfig

type DBConfig struct {
	Host     string
	Port     int
	User     string
	Password string
	DBName   string
	Schema   string
	SSLMode  string
}

type QueryBuilder

type QueryBuilder struct {
	// contains filtered or unexported fields
}

func NewQueryBuilder

func NewQueryBuilder(selectPart string, criteria *model.SearchRequest) *QueryBuilder

func (*QueryBuilder) Build

func (qb *QueryBuilder) Build() (string, []interface{})

func (*QueryBuilder) WithGroupBy

func (qb *QueryBuilder) WithGroupBy(fieldName string) *QueryBuilder

func (*QueryBuilder) WithLimit

func (qb *QueryBuilder) WithLimit(limit int32) *QueryBuilder

func (*QueryBuilder) WithOffset

func (qb *QueryBuilder) WithOffset(offset int32) *QueryBuilder

func (*QueryBuilder) WithOrderBy

func (qb *QueryBuilder) WithOrderBy(fieldName string) *QueryBuilder

func (*QueryBuilder) WithWhereClause

func (qb *QueryBuilder) WithWhereClause(whereClause string) *QueryBuilder

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL