db

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MysqlType  = "mysql"
	SqliteType = "sqlite"

	MongoType = "mongo"
)
View Source
const (
	Desc = "desc"
	Asc  = "asc"
)

Variables

This section is empty.

Functions

func FixJsonData

func FixJsonData(data map[string]interface{}) (map[string]interface{}, error)

Types

type MysqlQueryParams

type MysqlQueryParams struct {
	Page      int                    `json:"page"`
	Size      int                    `json:"size"`
	OrderKey  string                 `json:"order_key"`
	OrderType OrderType              `json:"order_type"`
	WhereSql  map[string]interface{} // key: name = ?  \  value: data
}

func (*MysqlQueryParams) GetLimit

func (m *MysqlQueryParams) GetLimit() uint64

func (*MysqlQueryParams) GetOffset

func (m *MysqlQueryParams) GetOffset() uint64

func (*MysqlQueryParams) GetOrderBy

func (m *MysqlQueryParams) GetOrderBy() string

func (*MysqlQueryParams) GetWhereSql

func (m *MysqlQueryParams) GetWhereSql() (string, []interface{})

type OrderType

type OrderType uint

Jump to

Keyboard shortcuts

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