sql

package
v3.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 12 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]

	// Deprecated: use Select
	Find(id string) (*data_structures.Alert, error)

	// Deprecated: use Insert
	Create(alert *data_structures.Alert) error

	// Deprecated: use SelectAlertsByCode
	FindAlertsByCode(codes []string) ([]data_structures.Alert, error)

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

	DeleteExpiredAlerts(id string) error

	Exists(id string) (bool, error)
}

type IConvectiveOutlookTable

type IConvectiveOutlookTable interface {
	// Deprecated: use the weather-db-migrator docker images for setup
	Init() error

	// Deprecated: use Insert
	Create(outlook *data_structures.ConvectiveOutlook) error

	Insert(outlook data_structures.ConvectiveOutlook) error

	// Deprecated: use Select
	Find(publishedTime time.Time, outlookType golang.ConvectiveOutlookType) (*data_structures.ConvectiveOutlook, error)

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

	// Deprecated: use SelectLatest
	FindLatest(outlookType golang.ConvectiveOutlookType) (*data_structures.ConvectiveOutlook, error)

	SelectLatest(outlookType golang.ConvectiveOutlookType) (*data_structures.ConvectiveOutlook, 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]

	// Deprecated: use Insert
	Create(userNotification data_structures.UserNotification) error

	// Deprecated: use Select
	Get(notificationId string) (*data_structures.UserNotification, error)

	// Deprecated: use SelectAll
	GetAll() ([]data_structures.UserNotification, error)

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

	// Deprecated: use SelectByUserId
	GetByUserId(userId string) ([]data_structures.UserNotification, error)

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

	// Deprecated: use SelectByCodes
	GetByCodes(codes []string) ([]data_structures.UserNotification, error)

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

	// Deprecated: use SelectNotificationsWithConvectiveOutlook
	GetNotificationsWithConvectiveOutlookOptions() ([]data_structures.UserNotification, error)

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

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

type PostgresAlertTable

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

func NewPostgresAlertTable

func NewPostgresAlertTable(db *sql.DB) PostgresAlertTable

func (*PostgresAlertTable) Create deprecated

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

Deprecated: use Insert

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) Find deprecated

Deprecated: use Select

func (*PostgresAlertTable) FindAlertsByCode deprecated

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

Deprecated: use SelectAlertsByCode

func (*PostgresAlertTable) Init deprecated

func (p *PostgresAlertTable) Init() error

Deprecated: use the weather-db-migrator docker images for setup

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) Create deprecated

Deprecated: use Insert

func (*PostgresConvectiveOutlookTable) Find deprecated

Deprecated: use Select

func (*PostgresConvectiveOutlookTable) FindLatest deprecated

Deprecated: use SelectLatest

func (*PostgresConvectiveOutlookTable) Init deprecated

Deprecated: use the weather-db-migrator docker images for setup

func (*PostgresConvectiveOutlookTable) Insert

func (*PostgresConvectiveOutlookTable) Select

func (*PostgresConvectiveOutlookTable) SelectLatest

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) Create deprecated

Deprecated: use Insert

func (*PostgresUserNotificationTable) Delete

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

func (*PostgresUserNotificationTable) Get deprecated

Deprecated: use Select

func (*PostgresUserNotificationTable) GetAll deprecated

Deprecated: use SelectAll

func (*PostgresUserNotificationTable) GetByCodes deprecated

Deprecated: use SelectByCodes

func (*PostgresUserNotificationTable) GetByUserId deprecated

Deprecated: use SelectByUserId

func (*PostgresUserNotificationTable) GetNotificationsWithConvectiveOutlookOptions deprecated

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

Deprecated: use SelectNotificationsWithConvectiveOutlook

func (*PostgresUserNotificationTable) Init deprecated

Deprecated: use the weather-db-migrator docker images for setup

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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