sqlmodel

package
v0.0.0-...-bf83fb3 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AlgoliaSyncTableName = "algolia_sync"
	AlgoliaDefaultSortBy = "algolia_sync_id"

	ECode050301 = e.Code0503 + "01"
	ECode050302 = e.Code0503 + "02"
	ECode050303 = e.Code0503 + "03"
	ECode050304 = e.Code0503 + "04"
	ECode050305 = e.Code0503 + "05"
	ECode050306 = e.Code0503 + "06"
	ECode050307 = e.Code0503 + "07"
	ECode050308 = e.Code0503 + "08"
	ECode050309 = e.Code0503 + "09"
	ECode05030A = e.Code0503 + "0A"
	ECode05030B = e.Code0503 + "0B"
	ECode05030C = e.Code0503 + "0C"
)

Variables

This section is empty.

Functions

func AlgoliaSyncForDeleteUpdate

func AlgoliaSyncForDeleteUpdate(db *sql.Connection, id int, delete bool) (err error)

AlgoliaSyncForDeleteUpdate updates the delete flag

func AlgoliaSyncGet

func AlgoliaSyncGet(db *sql.Connection,
	p *AlgoliaSyncGetParam) (asList []*model.AlgoliaSync, count int, err error)

AlgoliaSyncGet performs select

func AlgoliaSyncGetByItemIDAndType

func AlgoliaSyncGetByItemIDAndType(db *sql.Connection, itemID int,
	itemType string) (as *model.AlgoliaSync, err error)

AlgoliaSyncGetByItemID searches by the item id

func AlgoliaSyncGetByStatus

func AlgoliaSyncGetByStatus(db *sql.Connection, status []string, limit *uint64) (asList []*model.AlgoliaSync,
	count int, err error)

AlgoliaSyncGetByStatus returns the items with the specified status

func AlgoliaSyncGetItemIDs

func AlgoliaSyncGetItemIDs(db *sql.Connection, limit, offset int, status []string) (idList []int, count int, err error)

AlgoliaSyncGetItemIDs Get list of all items IDs

func AlgoliaSyncSetStatus

func AlgoliaSyncSetStatus(db *sql.Connection, id int, status string,
	hash *string, jsonBytes []byte) (err error)

AlgoliaSyncSetStatus updates the status. If hash or jsonBytes are set, then it will update those as well

func AlgoliaSyncUpsert

func AlgoliaSyncUpsert(db *sql.Connection, input *model.AlgoliaSync) (id int, err error)

AlgoliaSyncUpsert performs the DB operation to upsert a record in the algolia_sync table

Types

type AlgoliaSyncGetParam

type AlgoliaSyncGetParam struct {
	Limit                  *uint64
	Offset                 *uint64
	ID                     *int
	AlgoliaObjectID        *string
	ItemID                 *int
	ItemType               *string
	Status                 *[]string
	AlgoliaIndex           *string
	ForDelete              *bool
	FlagCount              bool
	FlagForUpdate          bool
	OrderByID              string
	OrderByAlgoliaObjectID string
	DataHandler            func(*model.AlgoliaSync) error
}

AlgoliaSyncGetParam model

Jump to

Keyboard shortcuts

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