Versions in this module Expand all Collapse all v0 v0.12.0 Jun 11, 2026 v0.11.0 Jun 11, 2026 Changes in this version + type Cache interface + Delete func(ctx context.Context, key string) + Get func(ctx context.Context, key string) (any, bool) + Invalidate func(ctx context.Context, pattern string) + Set func(ctx context.Context, key string, value any, ttl time.Duration) + type CreateUserParams struct + Name string + Name2 string + type DBTX interface + ExecContext func(ctx context.Context, query string, args ...any) (sql.Result, error) + QueryContext func(ctx context.Context, query string, args ...any) (*sql.Rows, error) + QueryRowContext func(ctx context.Context, query string, args ...any) *sql.Row + type GetPopularPostsRow struct + Content sql.NullString + CreatedAt int64 + Id int64 + Likes int64 + Title string + UserId int64 + type GetUserByEmailRow struct + Active bool + CreatedAt int64 + Email string + Id int64 + Name string + type GetUserPostsRow struct + Content sql.NullString + CreatedAt int64 + Id int64 + Likes int64 + Title string + UserId int64 + type GetUserRow struct + Active bool + CreatedAt int64 + Email string + Id int64 + Name string + type ListActiveUsersRow struct + Active bool + CreatedAt int64 + Email string + Id int64 + Name string + type Posts struct + Content sql.NullString + CreatedAt int64 + Id int64 + Likes int64 + Title string + UserId int64 + type Querier interface + CreateUser func(ctx context.Context, arg CreateUserParams) error + GetPopularPosts func(ctx context.Context, limit any) ([]GetPopularPostsRow, error) + GetUser func(ctx context.Context, id int64) (GetUserRow, error) + GetUserByEmail func(ctx context.Context, email string) (GetUserByEmailRow, error) + GetUserPosts func(ctx context.Context, userId int64) ([]GetUserPostsRow, error) + ListActiveUsers func(ctx context.Context) ([]ListActiveUsersRow, error) + UpdateUser func(ctx context.Context, arg UpdateUserParams) error + WithTx func(tx DBTX) *Queries + type Queries struct + func New(db DBTX) *Queries + func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) error + func (q *Queries) GetPopularPosts(ctx context.Context, limit any) ([]GetPopularPostsRow, error) + func (q *Queries) GetUser(ctx context.Context, id int64) (GetUserRow, error) + func (q *Queries) GetUserByEmail(ctx context.Context, email string) (GetUserByEmailRow, error) + func (q *Queries) GetUserPosts(ctx context.Context, userId int64) ([]GetUserPostsRow, error) + func (q *Queries) ListActiveUsers(ctx context.Context) ([]ListActiveUsersRow, error) + func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) error + func (q *Queries) WithTx(tx DBTX) *Queries + type QueryResult struct + LastInsertID int64 + RowsAffected int64 + type UpdateUserParams struct + Email string + Id int64 + Name string + type Users struct + Active bool + CreatedAt int64 + Email string + Id int64 + Name string