sqlutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildPushQuery added in v0.1.0

func BuildPushQuery(params PushQueryParams, queryTemplate string) (string, error)

func CreateTable added in v0.1.0

func CreateTable(ctx context.Context, dbOpt dbutil.DBOpt, opt online.CreateTableOpt) error

func Get

func Get(ctx context.Context, db *sqlx.DB, opt online.GetOpt, backend types.BackendType) (dbutil.RowMap, error)

func Import

func Import(ctx context.Context, db *sqlx.DB, opt online.ImportOpt, backend types.BackendType) error

func MultiGet

func MultiGet(ctx context.Context, db *sqlx.DB, opt online.MultiGetOpt, backend types.BackendType) (map[string]dbutil.RowMap, error)

response: map[entity_key]map[feature_name]feature_value

func Purge

func Purge(ctx context.Context, db *sqlx.DB, revisionID int, backend types.BackendType) error

func PurgeTx added in v0.1.0

func PurgeTx(ctx context.Context, tx *sqlx.Tx, tableName string, backend types.BackendType) error

Types

type PushQueryParams added in v0.1.0

type PushQueryParams struct {
	TableName          string
	EntityName         string
	Fields             string
	InsertPlaceholders string
	UpdatePlaceholders string
	InsertValues       []interface{}
	UpdateValues       []interface{}
	Backend            types.BackendType
}

func BuildPushQueryParams added in v0.1.0

func BuildPushQueryParams(opt online.PushOpt, backend types.BackendType) PushQueryParams

Jump to

Keyboard shortcuts

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