database

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const COUNT_DEFAULT_EXPRESSION = "count(*)"

Variables

View Source
var ITEM_TO_ITEMSTOCK_JOIN_EXPRESSION = "LEFT JOIN xd.itemstock istock ON istock.ItemKeyId = i.KeyId"
View Source
var PRICED_PRODUCT_CONDITION = []string{
	"i.RetailPrice2 > 0",
}

Functions

func GetPagesNeeded added in v1.2.0

func GetPagesNeeded(recordsNumber, pageSize int) int

Types

type DatabaseClient

type DatabaseClient struct {
	// contains filtered or unexported fields
}

func CreateClient

func CreateClient(input *DatabaseClientCreationInput) (*DatabaseClient, error)

func (DatabaseClient) GetPaginatedPricedProducts

func (s DatabaseClient) GetPaginatedPricedProducts(updatedAfter *time.Time, limit int, offset int) (*xd_rsync.XdProducts, error)

func (DatabaseClient) GetPricedProducts

func (s DatabaseClient) GetPricedProducts() (*xd_rsync.XdProducts, error)

func (DatabaseClient) GetPricedProductsCount

func (s DatabaseClient) GetPricedProductsCount(updatedAfter *time.Time) (int, error)

func (DatabaseClient) GetPricedProductsSinceTimestamp

func (s DatabaseClient) GetPricedProductsSinceTimestamp(ts *time.Time) (*xd_rsync.XdProducts, error)

func (DatabaseClient) GetProductByReferece

func (s DatabaseClient) GetProductByReferece(id string) (*xd_rsync.XdProduct, error)

func (DatabaseClient) GetProductsByReferece

func (s DatabaseClient) GetProductsByReferece(ids []string) (*xd_rsync.XdProducts, error)

type DatabaseClientCreationInput

type DatabaseClientCreationInput struct {
	DSN    string
	Logger *logger.Logger
}

Jump to

Keyboard shortcuts

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