sql_tools

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindCommonParamsToSelectBuilder

func BindCommonParamsToSelectBuilder(builder squirrel.SelectBuilder, params defines.CommonParamsForFetch) squirrel.SelectBuilder

func GetColumnsAndValuesFromStruct

func GetColumnsAndValuesFromStruct(ctx context.Context, st interface{}, callOpts ...CallOptionMapValues) ([]string, []interface{})

func GetMapValuesFromStruct

func GetMapValuesFromStruct(ctx context.Context, st interface{}, callOpts ...CallOptionMapValues) map[string]interface{}

GetMapValuesFromStruct For INSERT or UPDATE queries

func ParseColumnsForSelect

func ParseColumnsForSelect(cols []string) []string

func ParseColumnsForSelectWithAlias

func ParseColumnsForSelectWithAlias(cols []string, alias string) []string

Types

type CallOptionMapValues

type CallOptionMapValues struct {
	// contains filtered or unexported fields
}

func WithMapValuesAutoDateTimeFields

func WithMapValuesAutoDateTimeFields(fields []string) CallOptionMapValues

func WithMapValuesIgnoreFields

func WithMapValuesIgnoreFields(fields []string) CallOptionMapValues

func WithMapValuesSelectFields

func WithMapValuesSelectFields(fields []string) CallOptionMapValues

Jump to

Keyboard shortcuts

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