db

package
v0.0.0-...-a4c7aa5 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const MySQL = "mysql"
View Source
const Postgres = "postgres"

Variables

This section is empty.

Functions

func MysqlGetWhere

func MysqlGetWhere(connection Connection, model reflect.Type, whereClause string, sort string, limit int) ([]map[string]interface{}, error)

func PostgresGetWhere

func PostgresGetWhere(connection Connection, model reflect.Type, whereClause string, sort string, limit int) ([]map[string]interface{}, error)

Types

type Connection

type Connection struct {
	Table      string
	PrimaryKey string
	UuidKey    string
	IpAddress  string
	Port       string
	Database   string
	UserName   string
	Password   string
	DbType     string
}

func (*Connection) GetMain

func (connection *Connection) GetMain(tableName string, userKey string, uuidKey string) Connection

func (*Connection) GetNotification

func (connection *Connection) GetNotification(tableName string, userKey string, uuidKey string) Connection

func (*Connection) GetTraffic

func (connection *Connection) GetTraffic(tableName string, userKey string, uuidKey string) Connection

Jump to

Keyboard shortcuts

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