postgres

package
v0.0.0-...-0f28e9b Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CondSql

func CondSql(first bool) string

func NewPostgres

func NewPostgres(conf *Config) *sqlx.DB

func ReadTables

func ReadTables(uri string) ([]string, error)

func SqlIntegerArray

func SqlIntegerArray(ids ...int) string

func SqlIntegerIn

func SqlIntegerIn(ids ...int) string

func SqlStringArray

func SqlStringArray(ids ...string) string

func SqlStringIn

func SqlStringIn(ids ...string) string

func SqlWithIn

func SqlWithIn(lng, lat float64, radius int) string

func ValuePlaceHolderAndGeometry

func ValuePlaceHolderAndGeometry(start int, count int, geometryPos ...int) string

func ValuesPlaceHolder

func ValuesPlaceHolder(start int, count int) string

Types

type Config

type Config struct {
	Uri     string `yaml:"uri"`
	MaxIdle int    `yaml:"maxIdle" default:"10"`
	MaxOpen int    `yaml:"maxOpen" default:"100"`
}

func NewConfig

func NewConfig(uri string) *Config

Jump to

Keyboard shortcuts

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