Documentation
¶
Index ¶
- type DBTX
- type DeleteDeviceParams
- type DeleteHostByUserParams
- type Device
- type GetHostByUserParams
- type Host
- type InsertHostIfAbsentParams
- type Querier
- type Queries
- func (q *Queries) DeleteDevice(ctx context.Context, arg DeleteDeviceParams) error
- func (q *Queries) DeleteDeviceByPushToken(ctx context.Context, pushToken string) error
- func (q *Queries) DeleteHostByID(ctx context.Context, id string) error
- func (q *Queries) DeleteHostByUser(ctx context.Context, arg DeleteHostByUserParams) error
- func (q *Queries) GetHostByID(ctx context.Context, id string) (Host, error)
- func (q *Queries) GetHostByNotifierToken(ctx context.Context, notifierToken string) (Host, error)
- func (q *Queries) GetHostByUser(ctx context.Context, arg GetHostByUserParams) (Host, error)
- func (q *Queries) InsertHostIfAbsent(ctx context.Context, arg InsertHostIfAbsentParams) (int64, error)
- func (q *Queries) ListDevicesByUser(ctx context.Context, userID string) ([]Device, error)
- func (q *Queries) UpsertDevice(ctx context.Context, arg UpsertDeviceParams) error
- func (q *Queries) UpsertHost(ctx context.Context, arg UpsertHostParams) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type UpsertDeviceParams
- type UpsertHostParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeleteDeviceParams ¶
type DeleteHostByUserParams ¶
type GetHostByUserParams ¶
type Querier ¶
type Querier interface {
DeleteDevice(ctx context.Context, arg DeleteDeviceParams) error
// Used by the dispatcher when Expo returns DeviceNotRegistered for a
// token; the user_id is irrelevant, the token itself is dead.
DeleteDeviceByPushToken(ctx context.Context, pushToken string) error
DeleteHostByID(ctx context.Context, id string) error
DeleteHostByUser(ctx context.Context, arg DeleteHostByUserParams) error
GetHostByID(ctx context.Context, id string) (Host, error)
GetHostByNotifierToken(ctx context.Context, notifierToken string) (Host, error)
GetHostByUser(ctx context.Context, arg GetHostByUserParams) (Host, error)
// The cross-instance claim: exactly one concurrent caller inserts;
// everyone else reads the winner's row back. provider_meta is left to
// its default (CASProviderMeta is its only writer). ASCII only here:
// sqlc slices query text by byte offset but counts chars, so a
// multi-byte character in a comment corrupts every later query.
InsertHostIfAbsent(ctx context.Context, arg InsertHostIfAbsentParams) (int64, error)
ListDevicesByUser(ctx context.Context, userID string) ([]Device, error)
UpsertDevice(ctx context.Context, arg UpsertDeviceParams) error
UpsertHost(ctx context.Context, arg UpsertHostParams) error
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) DeleteDevice ¶
func (q *Queries) DeleteDevice(ctx context.Context, arg DeleteDeviceParams) error
func (*Queries) DeleteDeviceByPushToken ¶
Used by the dispatcher when Expo returns DeviceNotRegistered for a token; the user_id is irrelevant, the token itself is dead.
func (*Queries) DeleteHostByID ¶
func (*Queries) DeleteHostByUser ¶
func (q *Queries) DeleteHostByUser(ctx context.Context, arg DeleteHostByUserParams) error
func (*Queries) GetHostByID ¶
func (*Queries) GetHostByNotifierToken ¶
func (*Queries) GetHostByUser ¶
func (*Queries) InsertHostIfAbsent ¶
func (q *Queries) InsertHostIfAbsent(ctx context.Context, arg InsertHostIfAbsentParams) (int64, error)
The cross-instance claim: exactly one concurrent caller inserts; everyone else reads the winner's row back. provider_meta is left to its default (CASProviderMeta is its only writer). ASCII only here: sqlc slices query text by byte offset but counts chars, so a multi-byte character in a comment corrupts every later query.
func (*Queries) ListDevicesByUser ¶
func (*Queries) UpsertDevice ¶
func (q *Queries) UpsertDevice(ctx context.Context, arg UpsertDeviceParams) error
func (*Queries) UpsertHost ¶
func (q *Queries) UpsertHost(ctx context.Context, arg UpsertHostParams) error
type UpsertDeviceParams ¶
Click to show internal directories.
Click to hide internal directories.