sqlutil

package
v0.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateStreamTableSchema

func CreateStreamTableSchema(ctx context.Context, tableName string, entity *types.Entity, backend types.BackendType) (string, 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 OnlineBatchTableName

func OnlineBatchTableName(revisionID int) string

func OnlineStreamTableName

func OnlineStreamTableName(groupID int) string

func Purge

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

func SqlxPrapareStreamTable

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

Types

type PushCondition

type PushCondition struct {
	Inserts            string
	InsertPlaceholders string
	InsertValues       []interface{}
	UpdateValues       []interface{}
	UpdatePlaceholders string
}

func BuildPushCondition

func BuildPushCondition(opt online.PushOpt, backend types.BackendType) *PushCondition

Jump to

Keyboard shortcuts

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