stillbox/pkg/database/querier.go

73 lines
4.6 KiB
Go
Raw Normal View History

2024-07-28 19:51:23 -04:00
// Code generated by sqlc. DO NOT EDIT.
// versions:
2024-11-15 11:34:54 -05:00
// sqlc v1.27.0
2024-07-28 19:51:23 -04:00
package database
import (
"context"
"github.com/google/uuid"
"github.com/jackc/pgx/v5/pgtype"
)
type Querier interface {
2024-11-01 09:15:39 -04:00
AddAlert(ctx context.Context, arg AddAlertParams) error
AddCall(ctx context.Context, arg AddCallParams) error
2024-11-20 22:13:23 -05:00
AddLearnedTalkgroup(ctx context.Context, arg AddLearnedTalkgroupParams) (Talkgroup, error)
2024-12-28 18:32:13 -05:00
AddToIncident(ctx context.Context, incidentID uuid.UUID, callIds []uuid.UUID, notes [][]byte) error
// This is used to sweep calls that are part of an incident prior to pruning a partition.
CleanupSweptCalls(ctx context.Context, rangeStart pgtype.Timestamptz, rangeEnd pgtype.Timestamptz) (int64, error)
2024-07-28 19:51:23 -04:00
CreateAPIKey(ctx context.Context, owner int, expires pgtype.Timestamp, disabled *bool) (ApiKey, error)
2024-12-28 18:32:13 -05:00
CreateIncident(ctx context.Context, arg CreateIncidentParams) (Incident, error)
CreateSystem(ctx context.Context, iD int, name string) error
2024-07-28 19:51:23 -04:00
CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
2024-08-03 00:05:02 -04:00
DeleteAPIKey(ctx context.Context, apiKey string) error
2024-12-28 18:32:13 -05:00
DeleteIncident(ctx context.Context, id uuid.UUID) error
DeleteSystem(ctx context.Context, id int) error
DeleteTalkgroup(ctx context.Context, systemID int32, tGID int32) error
2024-07-28 19:51:23 -04:00
DeleteUser(ctx context.Context, username string) error
2024-08-03 00:05:02 -04:00
GetAPIKey(ctx context.Context, apiKey string) (ApiKey, error)
GetAllTalkgroupTags(ctx context.Context) ([]string, error)
GetAppPrefs(ctx context.Context, appName string, uid int) ([]byte, error)
GetCallAudioByID(ctx context.Context, id uuid.UUID) (GetCallAudioByIDRow, error)
2024-10-20 13:04:42 -04:00
GetDatabaseSize(ctx context.Context) (string, error)
2024-12-28 18:32:13 -05:00
GetIncident(ctx context.Context, id uuid.UUID) (Incident, error)
2024-10-31 00:10:53 -04:00
GetSystemName(ctx context.Context, systemID int) (string, error)
2024-11-17 21:46:10 -05:00
GetTalkgroup(ctx context.Context, systemID int32, tGID int32) (GetTalkgroupRow, error)
2024-11-15 11:34:54 -05:00
GetTalkgroupIDsByTags(ctx context.Context, anyTags []string, allTags []string, notTags []string) ([]GetTalkgroupIDsByTagsRow, error)
2024-11-17 21:46:10 -05:00
GetTalkgroupTags(ctx context.Context, systemID int32, tGID int32) ([]string, error)
2024-11-15 11:34:54 -05:00
GetTalkgroupWithLearned(ctx context.Context, systemID int32, tGID int32) (GetTalkgroupWithLearnedRow, error)
2024-11-03 08:44:34 -05:00
GetTalkgroupsWithAllTags(ctx context.Context, tags []string) ([]GetTalkgroupsWithAllTagsRow, error)
GetTalkgroupsWithAnyTags(ctx context.Context, tags []string) ([]GetTalkgroupsWithAnyTagsRow, error)
2024-11-04 23:41:52 -05:00
GetTalkgroupsWithLearned(ctx context.Context) ([]GetTalkgroupsWithLearnedRow, error)
GetTalkgroupsWithLearnedBySystem(ctx context.Context, system int32) ([]GetTalkgroupsWithLearnedBySystemRow, error)
GetTalkgroupsWithLearnedBySystemCount(ctx context.Context, system int32, filter *string) (int64, error)
GetTalkgroupsWithLearnedBySystemP(ctx context.Context, arg GetTalkgroupsWithLearnedBySystemPParams) ([]GetTalkgroupsWithLearnedBySystemPRow, error)
GetTalkgroupsWithLearnedCount(ctx context.Context, filter *string) (int64, error)
GetTalkgroupsWithLearnedP(ctx context.Context, arg GetTalkgroupsWithLearnedPParams) ([]GetTalkgroupsWithLearnedPRow, error)
2024-11-19 09:10:55 -05:00
GetUserByID(ctx context.Context, id int) (User, error)
GetUserByUID(ctx context.Context, id int) (User, error)
2024-07-28 19:51:23 -04:00
GetUserByUsername(ctx context.Context, username string) (User, error)
GetUsers(ctx context.Context) ([]User, error)
2024-12-28 18:32:13 -05:00
// INCOMPLETE
IncidentCalls(ctx context.Context) ([]IncidentCallsRow, error)
ListCallsCount(ctx context.Context, arg ListCallsCountParams) (int64, error)
ListCallsP(ctx context.Context, arg ListCallsPParams) ([]ListCallsPRow, error)
2024-12-28 18:32:13 -05:00
ListIncidentsCount(ctx context.Context, start pgtype.Timestamptz, end pgtype.Timestamptz) (int64, error)
ListIncidentsP(ctx context.Context, arg ListIncidentsPParams) ([]Incident, error)
2024-11-21 07:44:08 -05:00
RestoreTalkgroupVersion(ctx context.Context, versionIds int) (Talkgroup, error)
SetAppPrefs(ctx context.Context, appName string, prefs []byte, uid int) error
2024-07-28 19:51:23 -04:00
SetCallTranscript(ctx context.Context, iD uuid.UUID, transcript *string) error
2024-11-17 21:46:10 -05:00
SetTalkgroupTags(ctx context.Context, tags []string, systemID int32, tGID int32) error
StoreDeletedTGVersion(ctx context.Context, systemID *int32, tGID *int32, submitter *int32) error
2024-11-20 19:15:26 -05:00
StoreTGVersion(ctx context.Context, arg []StoreTGVersionParams) *StoreTGVersionBatchResults
SweepCalls(ctx context.Context, rangeStart pgtype.Timestamptz, rangeEnd pgtype.Timestamptz) (int64, error)
2024-12-28 18:32:13 -05:00
UpdateIncident(ctx context.Context, arg UpdateIncidentParams) (Incident, error)
2024-07-28 19:51:23 -04:00
UpdatePassword(ctx context.Context, username string, password string) error
2024-11-10 10:13:38 -05:00
UpdateTalkgroup(ctx context.Context, arg UpdateTalkgroupParams) (Talkgroup, error)
UpsertTalkgroup(ctx context.Context, arg []UpsertTalkgroupParams) *UpsertTalkgroupBatchResults
2024-07-28 19:51:23 -04:00
}
var _ Querier = (*Queries)(nil)