sql

package
v4.7.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertNotification added in v4.3.0

type AlertNotification struct {
	Device       data_structures.Device
	LocationName string
}

type ConvectiveOutlookNotification added in v4.3.0

type ConvectiveOutlookNotification struct {
	Device                 data_structures.Device
	LocationName           string
	ConvectiveOutlookLabel string
}

type IAlertTable deprecated

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)
}

Deprecated: use IAlertTableV2

type IAlertV2Table added in v4.3.0

type IAlertV2Table interface {
	common_tables.IIdTable[data_structures.AlertV2]

	SelectByLocation(codes []string, point geojson_v2.Point) ([]data_structures.AlertV2, error)

	Exists(id string) (bool, error)
}

type IConvectiveOutlookTable deprecated

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)
}

Deprecated: use IConvectiveOutlookTableV2

type IConvectiveOutlookTableV2 added in v4.3.0

type IConvectiveOutlookTableV2 interface {
	Insert(outlooks []data_structures.ConvectiveOutlookV2) error

	Select(publishedTime time.Time, outlookType golang.ConvectiveOutlookType) ([]data_structures.ConvectiveOutlookV2, error)

	SelectById(id string) ([]data_structures.ConvectiveOutlookV2, error)

	SelectLatest(outlookType golang.ConvectiveOutlookType) ([]data_structures.ConvectiveOutlookV2, error)

	SelectAllLatest() (map[golang.ConvectiveOutlookType][]data_structures.ConvectiveOutlookV2, error)

	SelectAllLatestByLocation(point geojson_v2.Point) ([]data_structures.ConvectiveOutlookV2, 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 IMesoscaleDiscussionV2Table added in v4.3.0

type IMesoscaleDiscussionV2Table interface {
	Insert(md data_structures.MesoscaleDiscussionV2) error

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

	SelectById(id string) (*data_structures.MesoscaleDiscussionV2, error)

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

	SelectLatestByLocation(point geojson_v2.Point) ([]data_structures.MesoscaleDiscussionV2, error)

	SelectLatest() ([]data_structures.MesoscaleDiscussionV2, error)

	Delete(year, mdNumber int) error
}

type INotificationQueries added in v4.3.0

type INotificationQueries interface {
	GetDevicesForAlertId(alertId string) ([]AlertNotification, error)

	GetDevicesForConvectiveOutlookId(convectiveOutlookId string) ([]ConvectiveOutlookNotification, error)

	GetDevicesForMesoscaleDiscussion(mesoscaleDiscussionId string) ([]MesoscaleDiscussionNotification, error)
}

type IPostgresMesoscaleDiscussionTable deprecated

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)
}

Deprecated: use IPostgresMesoscaleDiscussionTableV2

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 MesoscaleDiscussionNotification added in v4.3.0

type MesoscaleDiscussionNotification struct {
	Device       data_structures.Device
	LocationName string
}

type PostgresAlertTable deprecated

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

Deprecated: use PostgresAlertTableV2

func NewPostgresAlertTable deprecated

func NewPostgresAlertTable(db *sql.DB) PostgresAlertTable

Deprecated: use NewPostgresAlertTableV2

func (*PostgresAlertTable) Delete deprecated

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

Deprecated:

func (*PostgresAlertTable) DeleteExpiredAlerts deprecated

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

Deprecated:

func (*PostgresAlertTable) Exists deprecated

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

Deprecated:

func (*PostgresAlertTable) Insert deprecated

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

Deprecated:

func (*PostgresAlertTable) Select deprecated

Deprecated:

func (*PostgresAlertTable) SelectAlertsByCode deprecated

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

Deprecated:

type PostgresAlertV2Table added in v4.3.0

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

func NewPostgresAlertV2Table added in v4.3.0

func NewPostgresAlertV2Table(db *sql.DB) PostgresAlertV2Table

func (*PostgresAlertV2Table) Delete added in v4.3.0

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

func (*PostgresAlertV2Table) Exists added in v4.3.0

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

func (*PostgresAlertV2Table) Insert added in v4.3.0

func (*PostgresAlertV2Table) Select added in v4.3.0

func (*PostgresAlertV2Table) SelectByLocation added in v4.3.0

func (p *PostgresAlertV2Table) SelectByLocation(codes []string, point geojson_v2.Point) ([]data_structures.AlertV2, error)

type PostgresConvectiveOutlookTable deprecated

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

Deprecated: use PostgresConvectiveOutlookTableV2

func NewPostgresConvectiveOutlookTable deprecated

func NewPostgresConvectiveOutlookTable(db *sql.DB) PostgresConvectiveOutlookTable

Deprecated: use NewPostgresConvectiveOutlookTableV2

func (*PostgresConvectiveOutlookTable) Insert deprecated

func (*PostgresConvectiveOutlookTable) Select deprecated

Deprecated:

func (*PostgresConvectiveOutlookTable) SelectLatest deprecated

type PostgresConvectiveOutlookTableV2 added in v4.3.0

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

func NewPostgresConvectiveOutlookTableV2 added in v4.3.0

func NewPostgresConvectiveOutlookTableV2(db *sql.DB) PostgresConvectiveOutlookTableV2

func (*PostgresConvectiveOutlookTableV2) Insert added in v4.3.0

func (*PostgresConvectiveOutlookTableV2) Select added in v4.3.0

func (*PostgresConvectiveOutlookTableV2) SelectAllLatest added in v4.6.0

func (*PostgresConvectiveOutlookTableV2) SelectAllLatestByLocation added in v4.6.0

func (*PostgresConvectiveOutlookTableV2) SelectById added in v4.3.0

func (*PostgresConvectiveOutlookTableV2) SelectLatest added in v4.3.0

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 deprecated

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

Deprecated: use PostgresMesoscaleDiscussionTableV2

func NewPostgresMesoscaleDicussionTable deprecated

func NewPostgresMesoscaleDicussionTable(db *sql.DB) PostgresMesoscaleDiscussionTable

Deprecated: use NewPostgresMesoscaleDicussionTableV2

func (*PostgresMesoscaleDiscussionTable) Delete deprecated

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

Deprecated:

func (*PostgresMesoscaleDiscussionTable) Insert deprecated

func (*PostgresMesoscaleDiscussionTable) Select deprecated

Deprecated:

func (*PostgresMesoscaleDiscussionTable) SelectMDNotInTable deprecated

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

Deprecated:

type PostgresMesoscaleDiscussionV2Table added in v4.3.0

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

func NewPostgresMesoscaleDiscussionV2Table added in v4.3.0

func NewPostgresMesoscaleDiscussionV2Table(db *sql.DB) PostgresMesoscaleDiscussionV2Table

func (*PostgresMesoscaleDiscussionV2Table) Delete added in v4.3.0

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

func (*PostgresMesoscaleDiscussionV2Table) Insert added in v4.3.0

func (*PostgresMesoscaleDiscussionV2Table) Select added in v4.3.0

func (*PostgresMesoscaleDiscussionV2Table) SelectById added in v4.3.0

func (*PostgresMesoscaleDiscussionV2Table) SelectLatest added in v4.6.0

func (*PostgresMesoscaleDiscussionV2Table) SelectLatestByLocation added in v4.6.0

func (*PostgresMesoscaleDiscussionV2Table) SelectMDNotInTable added in v4.3.0

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

type PostgresNotificationQueries added in v4.3.0

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

func NewNotificationQueries added in v4.3.0

func NewNotificationQueries(db *sql.DB) PostgresNotificationQueries

func (*PostgresNotificationQueries) GetDevicesForAlertId added in v4.3.0

func (n *PostgresNotificationQueries) GetDevicesForAlertId(alertId string) ([]AlertNotification, error)

func (*PostgresNotificationQueries) GetDevicesForConvectiveOutlookId added in v4.3.0

func (n *PostgresNotificationQueries) GetDevicesForConvectiveOutlookId(convectiveOutlookId string) ([]ConvectiveOutlookNotification, error)

func (*PostgresNotificationQueries) GetDevicesForMesoscaleDiscussion added in v4.3.0

func (n *PostgresNotificationQueries) GetDevicesForMesoscaleDiscussion(mesoscaleDiscussionId string) ([]MesoscaleDiscussionNotification, 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