helper

package
v0.0.0-...-7e6cfdd Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Difference

func Difference(a, b []int32) []int32

func GenerateOTP

func GenerateOTP(length int) (string, error)

func GenerateOrderNomer

func GenerateOrderNomer() (string, error)

func IfElse

func IfElse(condition bool, a interface{}, b interface{}) interface{}

IfElse evaluates a condition, if true returns the first parameter otherwise the second

func InsertMultiple

func InsertMultiple(queryInsert string, id int32, vals []int32) (string, []interface{})

func NewNullBool

func NewNullBool(s bool) sql.NullBool

func NewNullString

func NewNullString(s string) sql.NullString

func ReplaceQueryParams

func ReplaceQueryParams(namedQuery string, params map[string]interface{}) (string, []interface{})

replace Query example LIMIT $1 -> LIMIT :limit

func ReplaceSQL

func ReplaceSQL(old, searchPattern string) string

func ValMultipleQuery

func ValMultipleQuery(query string, vals []int32) (string, []interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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