mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
This commit introduces the `sqlcmig6` package, which at the time of this commit contains the same queries and models as `sqlc` package. Importantly though, once the kvdb to sql migration is made available in production, the `sqlcmig6` package will not change, as it is intended to represent the sql db as it was at the time of the migration. The sqlcmig6 package is therefore intended to be used in the kvdb to sql migration code, as it is will always be compatible with the sql database when all sql migrations prior to the kvdb to sql migration are applied. When additional sql migrations are added in the future, they may effect the `sqlc` package in such a way that the standard `sqlc` queries and models aren't compatible with kvdb to sql migration code any longer. By preserving the `sqlcmig6` package, we ensure that the kvdb to sql migration code can always use the same queries and models that were available at the time of the migration, even if the `sqlc` package changes in the future. Note that the `sqlcmig6` package have not been generated by `sqlc` (the queries and models are copied from the `sqlc` package), as it is not intended to be changed in the future.
79 lines
5.4 KiB
Go
79 lines
5.4 KiB
Go
package sqlcmig6
|
|
|
|
import (
|
|
"context"
|
|
"database/sql"
|
|
)
|
|
|
|
type Querier interface {
|
|
AddAccountInvoice(ctx context.Context, arg AddAccountInvoiceParams) error
|
|
DeleteAccount(ctx context.Context, id int64) error
|
|
DeleteAccountPayment(ctx context.Context, arg DeleteAccountPaymentParams) error
|
|
DeleteAllTempKVStores(ctx context.Context) error
|
|
DeleteFeatureKVStoreRecord(ctx context.Context, arg DeleteFeatureKVStoreRecordParams) error
|
|
DeleteGlobalKVStoreRecord(ctx context.Context, arg DeleteGlobalKVStoreRecordParams) error
|
|
DeleteGroupKVStoreRecord(ctx context.Context, arg DeleteGroupKVStoreRecordParams) error
|
|
DeleteSession(ctx context.Context, id int64) error
|
|
DeleteSessionsWithState(ctx context.Context, state int16) error
|
|
GetAccount(ctx context.Context, id int64) (Account, error)
|
|
GetAccountByLabel(ctx context.Context, label sql.NullString) (Account, error)
|
|
GetAccountIDByAlias(ctx context.Context, alias int64) (int64, error)
|
|
GetAccountIndex(ctx context.Context, name string) (int64, error)
|
|
GetAccountInvoice(ctx context.Context, arg GetAccountInvoiceParams) (AccountInvoice, error)
|
|
GetAccountPayment(ctx context.Context, arg GetAccountPaymentParams) (AccountPayment, error)
|
|
GetAction(ctx context.Context, id int64) (Action, error)
|
|
GetAliasBySessionID(ctx context.Context, id int64) ([]byte, error)
|
|
GetAllPrivacyPairs(ctx context.Context, groupID int64) ([]GetAllPrivacyPairsRow, error)
|
|
GetFeatureID(ctx context.Context, name string) (int64, error)
|
|
GetFeatureKVStoreRecord(ctx context.Context, arg GetFeatureKVStoreRecordParams) ([]byte, error)
|
|
GetGlobalKVStoreRecord(ctx context.Context, arg GetGlobalKVStoreRecordParams) ([]byte, error)
|
|
GetGroupKVStoreRecord(ctx context.Context, arg GetGroupKVStoreRecordParams) ([]byte, error)
|
|
GetOrInsertFeatureID(ctx context.Context, name string) (int64, error)
|
|
GetOrInsertRuleID(ctx context.Context, name string) (int64, error)
|
|
GetPseudoForReal(ctx context.Context, arg GetPseudoForRealParams) (string, error)
|
|
GetRealForPseudo(ctx context.Context, arg GetRealForPseudoParams) (string, error)
|
|
GetRuleID(ctx context.Context, name string) (int64, error)
|
|
GetSessionAliasesInGroup(ctx context.Context, groupID sql.NullInt64) ([][]byte, error)
|
|
GetSessionByAlias(ctx context.Context, alias []byte) (Session, error)
|
|
GetSessionByID(ctx context.Context, id int64) (Session, error)
|
|
GetSessionByLocalPublicKey(ctx context.Context, localPublicKey []byte) (Session, error)
|
|
GetSessionFeatureConfigs(ctx context.Context, sessionID int64) ([]SessionFeatureConfig, error)
|
|
GetSessionIDByAlias(ctx context.Context, alias []byte) (int64, error)
|
|
GetSessionMacaroonCaveats(ctx context.Context, sessionID int64) ([]SessionMacaroonCaveat, error)
|
|
GetSessionMacaroonPermissions(ctx context.Context, sessionID int64) ([]SessionMacaroonPermission, error)
|
|
GetSessionPrivacyFlags(ctx context.Context, sessionID int64) ([]SessionPrivacyFlag, error)
|
|
GetSessionsInGroup(ctx context.Context, groupID sql.NullInt64) ([]Session, error)
|
|
InsertAccount(ctx context.Context, arg InsertAccountParams) (int64, error)
|
|
InsertAction(ctx context.Context, arg InsertActionParams) (int64, error)
|
|
InsertKVStoreRecord(ctx context.Context, arg InsertKVStoreRecordParams) error
|
|
InsertPrivacyPair(ctx context.Context, arg InsertPrivacyPairParams) error
|
|
InsertSession(ctx context.Context, arg InsertSessionParams) (int64, error)
|
|
InsertSessionFeatureConfig(ctx context.Context, arg InsertSessionFeatureConfigParams) error
|
|
InsertSessionMacaroonCaveat(ctx context.Context, arg InsertSessionMacaroonCaveatParams) error
|
|
InsertSessionMacaroonPermission(ctx context.Context, arg InsertSessionMacaroonPermissionParams) error
|
|
InsertSessionPrivacyFlag(ctx context.Context, arg InsertSessionPrivacyFlagParams) error
|
|
ListAccountInvoices(ctx context.Context, accountID int64) ([]AccountInvoice, error)
|
|
ListAccountPayments(ctx context.Context, accountID int64) ([]AccountPayment, error)
|
|
ListAllAccounts(ctx context.Context) ([]Account, error)
|
|
ListAllKVStoresRecords(ctx context.Context) ([]Kvstore, error)
|
|
ListSessions(ctx context.Context) ([]Session, error)
|
|
ListSessionsByState(ctx context.Context, state int16) ([]Session, error)
|
|
ListSessionsByType(ctx context.Context, type_ int16) ([]Session, error)
|
|
SetAccountIndex(ctx context.Context, arg SetAccountIndexParams) error
|
|
SetActionState(ctx context.Context, arg SetActionStateParams) error
|
|
SetSessionGroupID(ctx context.Context, arg SetSessionGroupIDParams) error
|
|
SetSessionRemotePublicKey(ctx context.Context, arg SetSessionRemotePublicKeyParams) error
|
|
SetSessionRevokedAt(ctx context.Context, arg SetSessionRevokedAtParams) error
|
|
// NOTE: This query is only intended for testing purposes.
|
|
UpdateAccountAliasForTests(ctx context.Context, arg UpdateAccountAliasForTestsParams) (int64, error)
|
|
UpdateAccountBalance(ctx context.Context, arg UpdateAccountBalanceParams) (int64, error)
|
|
UpdateAccountExpiry(ctx context.Context, arg UpdateAccountExpiryParams) (int64, error)
|
|
UpdateAccountLastUpdate(ctx context.Context, arg UpdateAccountLastUpdateParams) (int64, error)
|
|
UpdateFeatureKVStoreRecord(ctx context.Context, arg UpdateFeatureKVStoreRecordParams) error
|
|
UpdateGlobalKVStoreRecord(ctx context.Context, arg UpdateGlobalKVStoreRecordParams) error
|
|
UpdateGroupKVStoreRecord(ctx context.Context, arg UpdateGroupKVStoreRecordParams) error
|
|
UpdateSessionState(ctx context.Context, arg UpdateSessionStateParams) error
|
|
UpsertAccountPayment(ctx context.Context, arg UpsertAccountPaymentParams) error
|
|
}
|
|
|
|
var _ Querier = (*Queries)(nil)
|