Documentation ¶
Index ¶
- Variables
- type BeforeDump
- type CacheQuerierConn
- type CacheWGConn
- type CreateUserParams
- type ListUserNamesParams
- type ListUserNamesRow
- type ListUsersParams
- type Queries
- func (q *Queries) AsReadOnly() *ReadOnlyQueries
- func (q *Queries) Complicated(ctx context.Context, n int32) (*int32, error)
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams, getUserByID *int32, ...) (*User, error)
- func (q *Queries) DeleteBadUsers(ctx context.Context, name string, getUserByID *int32) (pgconn.CommandTag, error)
- func (q *Queries) DeleteUser(ctx context.Context, id int32, getUserByID *int32, getUserByName *string) error
- func (q *Queries) Dump(ctx context.Context, beforeDump ...BeforeDump) ([]byte, error)
- func (q *Queries) GetCache() *dcache.DCache
- func (q *Queries) GetConn() wpgx.WGConn
- func (q *Queries) GetUserByID(ctx context.Context, id int32) (*User, error)
- func (q *Queries) GetUserByName(ctx context.Context, name string) (*User, error)
- func (q *Queries) IncorrectQuery(ctx context.Context, namePointer *string) (*User, error)
- func (q *Queries) ListUserNames(ctx context.Context, arg ListUserNamesParams) ([]ListUserNamesRow, error)
- func (q *Queries) ListUsers(ctx context.Context, arg ListUsersParams) ([]User, error)
- func (q *Queries) Load(ctx context.Context, data []byte) error
- func (q *Queries) UpdateMetaByID(ctx context.Context, arg UpdateMetaByIDParams) (int64, error)
- func (q *Queries) UpdateNameByID(ctx context.Context, arg UpdateNameByIDParams) (*int32, error)
- func (q *Queries) UpdateUserGrade(ctx context.Context, arg UpdateUserGradeParams, getUserByID *int32) (int64, error)
- func (q *Queries) UpsertUsers(ctx context.Context, arg UpsertUsersParams) error
- func (q *Queries) UseReplica(replicaQuerier wpgx.WQuerier) *ReadOnlyQueries
- func (q *Queries) WithCache(cache *dcache.DCache) *Queries
- func (q *Queries) WithTx(tx *wpgx.WTx) *Queries
- type ReadOnlyQueries
- func (q *ReadOnlyQueries) Complicated(ctx context.Context, n int32) (*int32, error)
- func (q *ReadOnlyQueries) GetCache() *dcache.DCache
- func (q *ReadOnlyQueries) GetConn() wpgx.WQuerier
- func (q *ReadOnlyQueries) GetUserByID(ctx context.Context, id int32) (*User, error)
- func (q *ReadOnlyQueries) GetUserByName(ctx context.Context, name string) (*User, error)
- func (q *ReadOnlyQueries) IncorrectQuery(ctx context.Context, namePointer *string) (*User, error)
- func (q *ReadOnlyQueries) ListUserNames(ctx context.Context, arg ListUserNamesParams) ([]ListUserNamesRow, error)
- func (q *ReadOnlyQueries) ListUsers(ctx context.Context, arg ListUsersParams) ([]User, error)
- func (q *ReadOnlyQueries) WithCache(cache *dcache.DCache) *ReadOnlyQueries
- type UpdateMetaByIDParams
- type UpdateNameByIDParams
- type UpdateUserGradeParams
- type UpsertUsersParams
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var Schema = `` /* 467-byte string literal not displayed */
Functions ¶
This section is empty.
Types ¶
type CacheQuerierConn ¶
type CreateUserParams ¶
type ListUserNamesParams ¶
type ListUserNamesRow ¶
type ListUsersParams ¶
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AsReadOnly ¶
func (q *Queries) AsReadOnly() *ReadOnlyQueries
func (*Queries) Complicated ¶
-- cache : 1m example of sqlc cannot handle recursive query. -- timeout : 1s
func (*Queries) CreateUser ¶
func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams, getUserByID *int32, getUserByName *string) (*User, error)
-- invalidate : [GetUserByID, GetUserByName] -- timeout : 1s
func (*Queries) DeleteBadUsers ¶
func (q *Queries) DeleteBadUsers(ctx context.Context, name string, getUserByID *int32) (pgconn.CommandTag, error)
-- invalidate : [GetUserByID] -- timeout : 1s
func (*Queries) DeleteUser ¶
func (q *Queries) DeleteUser(ctx context.Context, id int32, getUserByID *int32, getUserByName *string) error
-- invalidate : [GetUserByID, GetUserByName] -- timeout : 1s
func (*Queries) GetUserByID ¶
-- cache : 30s -- timeout : 1s
func (*Queries) GetUserByName ¶
-- timeout : 1s -- cache : 5m
func (*Queries) IncorrectQuery ¶
-- cache : 5m -- timeout : 1s
func (*Queries) ListUserNames ¶
func (q *Queries) ListUserNames(ctx context.Context, arg ListUserNamesParams) ([]ListUserNamesRow, error)
-- timeout : 1s
func (*Queries) UpdateMetaByID ¶
-- timeout : 1s
func (*Queries) UpdateNameByID ¶
-- timeout : 1s
func (*Queries) UpdateUserGrade ¶
func (q *Queries) UpdateUserGrade(ctx context.Context, arg UpdateUserGradeParams, getUserByID *int32) (int64, error)
-- invalidate : [GetUserByID] -- timeout : 1s
func (*Queries) UpsertUsers ¶
func (q *Queries) UpsertUsers(ctx context.Context, arg UpsertUsersParams) error
-- timeout : 1s
func (*Queries) UseReplica ¶
func (q *Queries) UseReplica(replicaQuerier wpgx.WQuerier) *ReadOnlyQueries
type ReadOnlyQueries ¶
type ReadOnlyQueries struct {
// contains filtered or unexported fields
}
func (*ReadOnlyQueries) Complicated ¶
func (*ReadOnlyQueries) GetCache ¶
func (q *ReadOnlyQueries) GetCache() *dcache.DCache
func (*ReadOnlyQueries) GetConn ¶
func (q *ReadOnlyQueries) GetConn() wpgx.WQuerier
func (*ReadOnlyQueries) GetUserByID ¶
func (*ReadOnlyQueries) GetUserByName ¶
func (*ReadOnlyQueries) IncorrectQuery ¶
func (*ReadOnlyQueries) ListUserNames ¶
func (q *ReadOnlyQueries) ListUserNames(ctx context.Context, arg ListUserNamesParams) ([]ListUserNamesRow, error)
func (*ReadOnlyQueries) ListUsers ¶
func (q *ReadOnlyQueries) ListUsers(ctx context.Context, arg ListUsersParams) ([]User, error)
func (*ReadOnlyQueries) WithCache ¶
func (q *ReadOnlyQueries) WithCache(cache *dcache.DCache) *ReadOnlyQueries
type UpdateMetaByIDParams ¶
type UpdateNameByIDParams ¶
type UpdateUserGradeParams ¶
type UpsertUsersParams ¶
Click to show internal directories.
Click to hide internal directories.