sqlutils

package
v1.2.51 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmptyStringToNullString added in v1.1.4

func EmptyStringToNullString(value string) sql.NullString

func ExecInsertSql

func ExecInsertSql(session sqlx.Session, pre func() (string, []interface{}, error), done func(lastInsertId int64) error, errLabel string) error

func ExecSql

func ExecSql(session sqlx.Session, pre func() (string, []interface{}, error), done func(result sql.Result) error, errLabel string) error

func ExecSqlCtx

func ExecSqlCtx(ctx context.Context, session sqlx.Session, pre func() (string, []interface{}, error), done func(result sql.Result) error, errLabel string) error

func QueryRow

func QueryRow(session sqlx.Session, pre func() (string, []interface{}, error), data interface{}, errLabel string) error

func QueryRowCtx

func QueryRowCtx(ctx context.Context, session sqlx.Session, pre func() (string, []interface{}, error), data interface{}, errLabel string) error

func QueryRowCtxMust

func QueryRowCtxMust(ctx context.Context, session sqlx.Session, pre func() (string, []interface{}, error), data interface{}, errLabel string) error

func QueryRowMust

func QueryRowMust(session sqlx.Session, pre func() (string, []interface{}, error), data interface{}, errLabel string) error

func QueryRows

func QueryRows(session sqlx.Session, pre func() (string, []interface{}, error), data interface{}, errLabel string) error

func QueryRowsCtx

func QueryRowsCtx(ctx context.Context, session sqlx.Session, pre func() (string, []interface{}, error), data interface{}, errLabel string) error

func ToNullBool added in v1.1.3

func ToNullBool(value *bool) sql.NullBool

func ToNullInt64 added in v1.1.3

func ToNullInt64[I ~int | ~int64 | ~int8 | ~int32 | ~int16](value *I) sql.NullInt64

func ToNullString added in v1.1.3

func ToNullString(value *string) sql.NullString

Types

This section is empty.

Jump to

Keyboard shortcuts

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