sqlutil

package
v0.0.0-...-5346f80 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Int32SliceToInt64Slice

func Int32SliceToInt64Slice(a []int32) []int64

Int32SliceToInt64Slice converts int32 array to int64 array

func Int64SliceToAbstractSlice

func Int64SliceToAbstractSlice(a []int64) []interface{}

Int64SliceToAbstractSlice converts int64 array to []interface{}

Types

type DB

type DB struct {
	*sql.DB
}

DB is database with util

func New

func New(db *sql.DB) *DB

New creates new db

func (*DB) Watch

func (d *DB) Watch(ctx context.Context, f func(ctx context.Context, tx *sql.Tx) error) (err error)

Watch calls f with transaction

type QueryMods

type QueryMods []qm.QueryMod

func (QueryMods) Apply

func (m QueryMods) Apply(q *queries.Query)

Jump to

Keyboard shortcuts

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