query

package
v0.0.0-...-cff5d44 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(conds []Conds) (string, []interface{})
conds, vals := query.Build([]query.Conds{
	{
		Key:    "sender_id = ? OR receiver_id = ?",
		Values: query.V{accountId, accountId},
		Skip:   false,
	},
})

Build([]Conds) will return a query string and a slice of values that can be used in the QueryContext method.

func ReplacePlaceholder

func ReplacePlaceholder(q string) string

Types

type Conds

type Conds struct {
	Key    string
	Values V
	Skip   bool
}

type V

type V []interface{}

Jump to

Keyboard shortcuts

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