output

package
v0.0.0-...-c5fa70c Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgresOutput

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

func NewPostgresOutput

func NewPostgresOutput(config *models.DatabaseConfig) (*PostgresOutput, error)

func (*PostgresOutput) BatchInsertDeliveryPartners

func (p *PostgresOutput) BatchInsertDeliveryPartners(partners []*models.DeliveryPartner) error

func (*PostgresOutput) BatchInsertMenuItems

func (p *PostgresOutput) BatchInsertMenuItems(menuItems []*models.MenuItem) error

func (*PostgresOutput) BatchInsertOrdersTx

func (p *PostgresOutput) BatchInsertOrdersTx(tx *sql.Tx, orders []*models.Order) error

func (*PostgresOutput) BatchInsertRestaurants

func (p *PostgresOutput) BatchInsertRestaurants(restaurants []*models.Restaurant) error

func (*PostgresOutput) BatchInsertUsers

func (p *PostgresOutput) BatchInsertUsers(users []*models.User) error

func (*PostgresOutput) BatchUpdateDeliveryPartnerLocations

func (p *PostgresOutput) BatchUpdateDeliveryPartnerLocations(updates []models.PartnerLocationUpdate) error

func (*PostgresOutput) BatchUpdateMenuItemPrices

func (p *PostgresOutput) BatchUpdateMenuItemPrices(updates map[string]float64) error

func (*PostgresOutput) BeginTx

func (p *PostgresOutput) BeginTx() (*sql.Tx, error)

func (*PostgresOutput) BeginTxContext

func (p *PostgresOutput) BeginTxContext(ctx context.Context) (*sql.Tx, error)

func (*PostgresOutput) Close

func (p *PostgresOutput) Close() error

func (*PostgresOutput) ExecTx

func (p *PostgresOutput) ExecTx(fn func(*sql.Tx) error) error

func (*PostgresOutput) ExecTxContext

func (p *PostgresOutput) ExecTxContext(ctx context.Context, fn func(*sql.Tx) error) error

func (*PostgresOutput) ExecTxWithRetry

func (p *PostgresOutput) ExecTxWithRetry(fn func(*sql.Tx) error, maxRetries int) error

func (*PostgresOutput) GetMenuItemsByRestaurant

func (p *PostgresOutput) GetMenuItemsByRestaurant(restaurantID string) ([]*models.MenuItem, error)

func (*PostgresOutput) GetNearbyDeliveryPartners

func (p *PostgresOutput) GetNearbyDeliveryPartners(loc models.Location, radius float64) ([]*models.DeliveryPartner, error)

func (*PostgresOutput) GetPopularMenuItems

func (p *PostgresOutput) GetPopularMenuItems(limit int) ([]*models.MenuItem, error)

func (*PostgresOutput) UpdateRestaurantOrderCountsTx

func (p *PostgresOutput) UpdateRestaurantOrderCountsTx(tx *sql.Tx, orders []*models.Order) error

func (*PostgresOutput) UpdateUserOrderCountsTx

func (p *PostgresOutput) UpdateUserOrderCountsTx(tx *sql.Tx, orders []*models.Order) error

func (*PostgresOutput) WriteMessage

func (p *PostgresOutput) WriteMessage(topic string, msg []byte) error

Jump to

Keyboard shortcuts

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