dbUtils

package
v0.0.0-...-070a3ad 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: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(table string, entry map[string]interface{}) error

func AddBulk

func AddBulk(table string, entries []map[string]interface{}) error

func AsList

func AsList(query string) ([]map[string]interface{}, error)

func Close

func Close()

func Connect

func Connect(driver string, db_uri string)

func Delete

func Delete(table string, id interface{}) error

func Do

func Do(query string) error

func Get

func Get(table string, filter map[string]interface{}, rest ...string) ([]map[string]interface{}, error)

func GetAll

func GetAll(table string, rest ...string) ([]map[string]interface{}, error)

func GetByID

func GetByID(table string, id interface{}, rest ...string) (map[string]interface{}, error)

func GetID

func GetID(table string, filter map[string]interface{}, rest ...string) (interface{}, error)

func GetSingle

func GetSingle(table string, filter map[string]interface{}, rest ...string) (map[string]interface{}, error)

func Update

func Update(table string, values map[string]interface{}, conditions map[string]interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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