sql

package
v4.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 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 IAlertTable

type IAlertTable interface {
	common_tables.IIdTable[data_structures.Alert]

	SelectAlertsByCode(codes []string) ([]data_structures.Alert, error)

	DeleteExpiredAlerts(id string) error

	Exists(id string) (bool, error)
}

type IConvectiveOutlookTable

type IConvectiveOutlookTable interface {
	Insert(outlook data_structures.ConvectiveOutlook) error

	Select(publishedTime time.Time, outlookType golang.ConvectiveOutlookType) (*data_structures.ConvectiveOutlook, error)

	SelectLatest(outlookType golang.ConvectiveOutlookType) (*data_structures.ConvectiveOutlook, error)
}

type IDeviceTable added in v4.2.0

type IDeviceTable interface {
	common_tables.IIdTable[data_structures.Device]

	SelectByUser(userId string) ([]data_structures.Device, error)

	UpdateApnsToken(id, apnsToken string) error
}

type IPostgresMesoscaleDiscussionTable

type IPostgresMesoscaleDiscussionTable interface {
	Insert(md data_structures.MesoscaleDiscussion) error

	Select(mdNumber int, year int) (*data_structures.MesoscaleDiscussion, error)

	SelectMDNotInTable(year int, mdsToCheck map[int]bool) ([]int, error)
}

type IUserNotificationTable

type IUserNotificationTable interface {
	common_tables.IIdTable[data_structures.UserNotification]

	SelectAll() ([]data_structures.UserNotification, error)

	SelectByUserId(userId string) ([]data_structures.UserNotification, error)

	SelectByCodes(codes []string) ([]data_structures.UserNotification, error)

	SelectNotificationsWithMDNotifications() ([]data_structures.UserNotification, error)

	SelectNotificationsWithConvectiveOutlook() ([]data_structures.UserNotification, error)

	Update(id string, userNotification data_structures.UserNotification) error
}

type PostgresAlertTable

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

func NewPostgresAlertTable

func NewPostgresAlertTable(db *sql.DB) PostgresAlertTable

func (*PostgresAlertTable) Delete

func (p *PostgresAlertTable) Delete(id string) error

func (*PostgresAlertTable) DeleteExpiredAlerts

func (p *PostgresAlertTable) DeleteExpiredAlerts(id string) error

func (*PostgresAlertTable) Exists

func (p *PostgresAlertTable) Exists(id string) (bool, error)

func (*PostgresAlertTable) Insert

func (p *PostgresAlertTable) Insert(alert data_structures.Alert) error

func (*PostgresAlertTable) Select

func (*PostgresAlertTable) SelectAlertsByCode

func (p *PostgresAlertTable) SelectAlertsByCode(codes []string) ([]data_structures.Alert, error)

type PostgresConvectiveOutlookTable

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

func NewPostgresConvectiveOutlookTable

func NewPostgresConvectiveOutlookTable(db *sql.DB) PostgresConvectiveOutlookTable

func (*PostgresConvectiveOutlookTable) Insert

func (*PostgresConvectiveOutlookTable) Select

func (*PostgresConvectiveOutlookTable) SelectLatest

type PostgresDeviceTable added in v4.2.0

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

func NewPostgresDeviceTable added in v4.2.0

func NewPostgresDeviceTable(db *sql.DB) PostgresDeviceTable

func (PostgresDeviceTable) Delete added in v4.2.0

func (p PostgresDeviceTable) Delete(id string) error

func (PostgresDeviceTable) Insert added in v4.2.0

func (PostgresDeviceTable) Select added in v4.2.0

func (PostgresDeviceTable) SelectByUser added in v4.2.0

func (p PostgresDeviceTable) SelectByUser(userId string) ([]data_structures.Device, error)

func (PostgresDeviceTable) UpdateApnsToken added in v4.2.0

func (p PostgresDeviceTable) UpdateApnsToken(id, apnsToken string) error

type PostgresMesoscaleDiscussionTable

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

func NewPostgresMesoscaleDicussionTable

func NewPostgresMesoscaleDicussionTable(db *sql.DB) PostgresMesoscaleDiscussionTable

func (*PostgresMesoscaleDiscussionTable) Delete

func (p *PostgresMesoscaleDiscussionTable) Delete(year, mdNumber int) error

func (*PostgresMesoscaleDiscussionTable) Insert

func (*PostgresMesoscaleDiscussionTable) Select

func (*PostgresMesoscaleDiscussionTable) SelectMDNotInTable

func (p *PostgresMesoscaleDiscussionTable) SelectMDNotInTable(year int, mdsToCheck map[int]bool) ([]int, error)

type PostgresUserNotificationTable

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

func NewPostgresUserNotificationTable

func NewPostgresUserNotificationTable(db *sql.DB) PostgresUserNotificationTable

func (*PostgresUserNotificationTable) Delete

func (p *PostgresUserNotificationTable) Delete(notificationId string) error

func (*PostgresUserNotificationTable) Insert

func (*PostgresUserNotificationTable) Select

func (*PostgresUserNotificationTable) SelectAll

func (*PostgresUserNotificationTable) SelectByCodes

func (*PostgresUserNotificationTable) SelectByUserId

func (*PostgresUserNotificationTable) SelectNotificationsWithConvectiveOutlook

func (p *PostgresUserNotificationTable) SelectNotificationsWithConvectiveOutlook() ([]data_structures.UserNotification, error)

func (*PostgresUserNotificationTable) SelectNotificationsWithMDNotifications

func (p *PostgresUserNotificationTable) SelectNotificationsWithMDNotifications() ([]data_structures.UserNotification, error)

SelectNotificationsWithMDNotifications Selects all of the notifications that want mesoscale discussion notifications. Note this does not fill out AlertOptions or SPCOptions in the returned UserNotifications struct

func (*PostgresUserNotificationTable) Update

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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