gopgutil

package module
v10.0.0-...-dd87156 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2021 License: MIT Imports: 5 Imported by: 14

README

gopgutil

A package with utility functions for go-pg that I use in my projects.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRelationNotFound = errors.New("relation not found")

Functions

func AddAliasToColumnName

func AddAliasToColumnName(column, alias string) pg.Ident

func BuildAliasFromRelationName

func BuildAliasFromRelationName(model interface{}, relationName string) (string, error)

func BuildConditionArray

func BuildConditionArray(column string) string

func BuildConditionEquals

func BuildConditionEquals(column string) string

func BuildConditionGT

func BuildConditionGT(column string) string

func BuildConditionGTE

func BuildConditionGTE(column string) string

func BuildConditionIEQ

func BuildConditionIEQ(column string) string

func BuildConditionIn

func BuildConditionIn(column string) string

func BuildConditionLT

func BuildConditionLT(column string) string

func BuildConditionLTE

func BuildConditionLTE(column string) string

func BuildConditionMatch

func BuildConditionMatch(column string) string

func BuildConditionNEQ

func BuildConditionNEQ(column string) string

func BuildConditionNotInArray

func BuildConditionNotInArray(column string) string

func BuildCountColumnExpr

func BuildCountColumnExpr(column, alias string) string

Types

type OrderAppender

type OrderAppender struct {
	Orders   []string
	MaxDepth int
}

func (OrderAppender) Apply

func (o OrderAppender) Apply(q *orm.Query) (*orm.Query, error)

Jump to

Keyboard shortcuts

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