db

package
v0.0.0-...-1fde670 Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddData

func AddData(data interface{}) error

func CheckValid

func CheckValid(v interface{}) bool

func DeleteDate

func DeleteDate(data interface{}) error

func EscapeReserveWord

func EscapeReserveWord(column string) string

func Init

func Init()

Init postgresql db

func ListData

func ListData(data interface{}, filter *Filter, params ...interface{}) ([]interface{}, error)

func UpdateDate

func UpdateDate(data interface{}) error

Types

type Filter

type Filter struct {
	Page   null.Int    `json:"page"`
	Limit  null.Int    `json:"limit"`
	Offset null.Int    `json:"offset"`
	Order  null.String `json:"order"`
	Search null.String `json:"search"`
	Desc   bool        `json:"desc"`
	Valid  bool
}

func (*Filter) PreUse

func (filter *Filter) PreUse()

Jump to

Keyboard shortcuts

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