queries

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFilter

func AddFilter(params *Params, column string, value interface{})

func BuildDeleteQuery

func BuildDeleteQuery(table string, params *Params) (string, []interface{}, error)

func BuildGetQuery

func BuildGetQuery(table string, params *Params) (string, []interface{})

func BuildInsertQuery

func BuildInsertQuery(table string, data *map[string]interface{}) (string, []interface{}, error)

func BuildUpdateQuery

func BuildUpdateQuery(table string, id int, params *Params, data *map[string]interface{}) (string, []interface{}, error)

Types

type Params

type Params struct {
	Filter  string
	Sort    string
	Fields  string
	Page    int
	PerPage int
}

func ExtractQueryParams

func ExtractQueryParams(r *http.Request) (*Params, error)

Jump to

Keyboard shortcuts

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