postgres

package
v0.0.0-...-bddae19 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2023 License: Unlicense Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	POSTGRES_CONNECTED     string = "Connected to Postgres"
	POSTGRES_NOT_CONNECTED string = "Unable to connect to Postgres"
	POSTGRES_CONFIG_ERR    string = "Error in Postgres config"
)
View Source
const DriverName = "postgres"

Variables

This section is empty.

Functions

func Contains

func Contains(key string, value interface{}) string

func Equals

func Equals(key string, value interface{}) string

func GenerateWhereClause

func GenerateWhereClause(query string, where map[string]interface{}) string

GenerateWhereClause : helper function to Generate where Clause

func GreaterThan

func GreaterThan(key string, value interface{}) string

func GreaterThanEqualTo

func GreaterThanEqualTo(key string, value interface{}) string

func In

func In(key string, value interface{}) string

func Init

func Init(dbConfig *DBConfig) (*sqlx.DB, error)

func LessThan

func LessThan(key string, value interface{}) string

func LessThanEqualTo

func LessThanEqualTo(key string, value interface{}) string

func Lower

func Lower(key string, value interface{}) string

func NewMock

func NewMock() (*sqlx.DB, sqlmock.Sqlmock)

func NotEqualsTo

func NotEqualsTo(key string, value interface{}) string

func NotIn

func NotIn(key string, value interface{}) string

func Null

func Null(key string, value interface{}) string

func UpperRune

func UpperRune(key string) string

Types

type DBConfig

type DBConfig struct {
	Host     string
	Port     string
	Username string
	Password string
	Name     string
	Schema   string
	MinLevel sqldblogger.Level
}

Jump to

Keyboard shortcuts

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