Documentation
¶
Index ¶
- Constants
- Variables
- func AddCategoryHook(point sqlgen.HookPoint, fn CategoryHook)
- func AddCommentHook(point sqlgen.HookPoint, fn CommentHook)
- func AddPostHook(point sqlgen.HookPoint, fn PostHook)
- func AddPostTagHook(point sqlgen.HookPoint, fn PostTagHook)
- func AddProfileHook(point sqlgen.HookPoint, fn ProfileHook)
- func AddTagHook(point sqlgen.HookPoint, fn TagHook)
- func AddUserHook(point sqlgen.HookPoint, fn UserHook)
- func Categories(mods ...sqlgen.QueryMod) *sqlgen.Query
- func CategoryCursor(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (*sqlgen.Cursor[*Category], error)
- func CategoryExists(ctx context.Context, exec sqlgen.Executor, id int32) (bool, error)
- func CommentCursor(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (*sqlgen.Cursor[*Comment], error)
- func CommentExists(ctx context.Context, exec sqlgen.Executor, id string) (bool, error)
- func Comments(mods ...sqlgen.QueryMod) *sqlgen.Query
- func CountCategories(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
- func CountComments(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
- func CountPostTags(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
- func CountPosts(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
- func CountProfiles(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
- func CountTags(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
- func CountUsers(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
- func DeleteAllCategories(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
- func DeleteAllComments(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
- func DeleteAllPostTags(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
- func DeleteAllPosts(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
- func DeleteAllProfiles(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
- func DeleteAllTags(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
- func DeleteAllUsers(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
- func EachCategory(ctx context.Context, exec sqlgen.Executor, fn func(*Category) error, ...) error
- func EachComment(ctx context.Context, exec sqlgen.Executor, fn func(*Comment) error, ...) error
- func EachPost(ctx context.Context, exec sqlgen.Executor, fn func(*Post) error, ...) error
- func EachPostTag(ctx context.Context, exec sqlgen.Executor, fn func(*PostTag) error, ...) error
- func EachProfile(ctx context.Context, exec sqlgen.Executor, fn func(*Profile) error, ...) error
- func EachTag(ctx context.Context, exec sqlgen.Executor, fn func(*Tag) error, ...) error
- func EachUser(ctx context.Context, exec sqlgen.Executor, fn func(*User) error, ...) error
- func PostCursor(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (*sqlgen.Cursor[*Post], error)
- func PostExists(ctx context.Context, exec sqlgen.Executor, id string) (bool, error)
- func PostTagCursor(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (*sqlgen.Cursor[*PostTag], error)
- func PostTagExists(ctx context.Context, exec sqlgen.Executor, postID string, tagID int32) (bool, error)
- func PostTags(mods ...sqlgen.QueryMod) *sqlgen.Query
- func Posts(mods ...sqlgen.QueryMod) *sqlgen.Query
- func ProfileCursor(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (*sqlgen.Cursor[*Profile], error)
- func ProfileExists(ctx context.Context, exec sqlgen.Executor, id string) (bool, error)
- func Profiles(mods ...sqlgen.QueryMod) *sqlgen.Query
- func TagCursor(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (*sqlgen.Cursor[*Tag], error)
- func TagExists(ctx context.Context, exec sqlgen.Executor, id int32) (bool, error)
- func Tags(mods ...sqlgen.QueryMod) *sqlgen.Query
- func UpdateAllCategories(ctx context.Context, exec sqlgen.Executor, set map[string]any, ...) (int64, error)
- func UpdateAllComments(ctx context.Context, exec sqlgen.Executor, set map[string]any, ...) (int64, error)
- func UpdateAllPostTags(ctx context.Context, exec sqlgen.Executor, set map[string]any, ...) (int64, error)
- func UpdateAllPosts(ctx context.Context, exec sqlgen.Executor, set map[string]any, ...) (int64, error)
- func UpdateAllProfiles(ctx context.Context, exec sqlgen.Executor, set map[string]any, ...) (int64, error)
- func UpdateAllTags(ctx context.Context, exec sqlgen.Executor, set map[string]any, ...) (int64, error)
- func UpdateAllUsers(ctx context.Context, exec sqlgen.Executor, set map[string]any, ...) (int64, error)
- func UserCursor(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (*sqlgen.Cursor[*User], error)
- func UserExists(ctx context.Context, exec sqlgen.Executor, id string) (bool, error)
- func Users(mods ...sqlgen.QueryMod) *sqlgen.Query
- type Category
- func (o *Category) AddParentsInverse(ctx context.Context, exec sqlgen.Executor, related ...*Category) error
- func (o *Category) AddPosts(ctx context.Context, exec sqlgen.Executor, related ...*Post) error
- func (o *Category) Delete(ctx context.Context, exec sqlgen.Executor) error
- func (o *Category) Insert(ctx context.Context, exec sqlgen.Executor, cols ...sqlgen.Columns) error
- func (o *Category) Reload(ctx context.Context, exec sqlgen.Executor) error
- func (o *Category) RemoveParent(ctx context.Context, exec sqlgen.Executor) error
- func (o *Category) RemoveParentsInverse(ctx context.Context, exec sqlgen.Executor, related ...*Category) error
- func (o *Category) RemovePosts(ctx context.Context, exec sqlgen.Executor, related ...*Post) error
- func (o *Category) ScanRow(rows interface{ ... }) error
- func (o *Category) SetParent(ctx context.Context, exec sqlgen.Executor, related *Category) error
- func (o *Category) Update(ctx context.Context, exec sqlgen.Executor, cols ...sqlgen.Columns) error
- func (o *Category) Upsert(ctx context.Context, exec sqlgen.Executor, cols ...sqlgen.Columns) error
- type CategoryHook
- type CategoryIDFilter
- func (f CategoryIDFilter) EQ(val int32) sqlgen.QueryMod
- func (f CategoryIDFilter) GT(val int32) sqlgen.QueryMod
- func (f CategoryIDFilter) GTE(val int32) sqlgen.QueryMod
- func (f CategoryIDFilter) IN(vals ...int32) sqlgen.QueryMod
- func (f CategoryIDFilter) LT(val int32) sqlgen.QueryMod
- func (f CategoryIDFilter) LTE(val int32) sqlgen.QueryMod
- func (f CategoryIDFilter) NEQ(val int32) sqlgen.QueryMod
- type CategoryMod
- type CategoryNameFilter
- func (f CategoryNameFilter) EQ(val string) sqlgen.QueryMod
- func (f CategoryNameFilter) GT(val string) sqlgen.QueryMod
- func (f CategoryNameFilter) GTE(val string) sqlgen.QueryMod
- func (f CategoryNameFilter) IN(vals ...string) sqlgen.QueryMod
- func (f CategoryNameFilter) LT(val string) sqlgen.QueryMod
- func (f CategoryNameFilter) LTE(val string) sqlgen.QueryMod
- func (f CategoryNameFilter) NEQ(val string) sqlgen.QueryMod
- type CategoryParentIDFilter
- func (f CategoryParentIDFilter) EQ(val sqlgen.Null[int32]) sqlgen.QueryMod
- func (f CategoryParentIDFilter) GT(val sqlgen.Null[int32]) sqlgen.QueryMod
- func (f CategoryParentIDFilter) GTE(val sqlgen.Null[int32]) sqlgen.QueryMod
- func (f CategoryParentIDFilter) IN(vals ...sqlgen.Null[int32]) sqlgen.QueryMod
- func (f CategoryParentIDFilter) IsNotNull() sqlgen.QueryMod
- func (f CategoryParentIDFilter) IsNull() sqlgen.QueryMod
- func (f CategoryParentIDFilter) LT(val sqlgen.Null[int32]) sqlgen.QueryMod
- func (f CategoryParentIDFilter) LTE(val sqlgen.Null[int32]) sqlgen.QueryMod
- func (f CategoryParentIDFilter) NEQ(val sqlgen.Null[int32]) sqlgen.QueryMod
- type CategoryRels
- type CategorySlice
- func (s CategorySlice) DeleteAll(ctx context.Context, exec sqlgen.Executor) (int64, error)
- func (s CategorySlice) InsertAll(ctx context.Context, exec sqlgen.Executor) error
- func (s CategorySlice) LoadCountRelations(ctx context.Context, exec sqlgen.Executor, names ...string) error
- func (s CategorySlice) LoadRelations(ctx context.Context, exec sqlgen.Executor, loads ...*sqlgen.EagerLoadRequest) error
- func (s CategorySlice) UpdateAll(ctx context.Context, exec sqlgen.Executor, set map[string]any) (int64, error)
- type Comment
- func (o *Comment) Delete(ctx context.Context, exec sqlgen.Executor) error
- func (o *Comment) Insert(ctx context.Context, exec sqlgen.Executor, cols ...sqlgen.Columns) error
- func (o *Comment) Reload(ctx context.Context, exec sqlgen.Executor) error
- func (o *Comment) ScanRow(rows interface{ ... }) error
- func (o *Comment) SetUser(ctx context.Context, exec sqlgen.Executor, related *User) error
- func (o *Comment) Update(ctx context.Context, exec sqlgen.Executor, cols ...sqlgen.Columns) error
- func (o *Comment) Upsert(ctx context.Context, exec sqlgen.Executor, cols ...sqlgen.Columns) error
- type CommentAuthorIDFilter
- func (f CommentAuthorIDFilter) EQ(val string) sqlgen.QueryMod
- func (f CommentAuthorIDFilter) GT(val string) sqlgen.QueryMod
- func (f CommentAuthorIDFilter) GTE(val string) sqlgen.QueryMod
- func (f CommentAuthorIDFilter) IN(vals ...string) sqlgen.QueryMod
- func (f CommentAuthorIDFilter) LT(val string) sqlgen.QueryMod
- func (f CommentAuthorIDFilter) LTE(val string) sqlgen.QueryMod
- func (f CommentAuthorIDFilter) NEQ(val string) sqlgen.QueryMod
- type CommentBodyFilter
- func (f CommentBodyFilter) EQ(val string) sqlgen.QueryMod
- func (f CommentBodyFilter) GT(val string) sqlgen.QueryMod
- func (f CommentBodyFilter) GTE(val string) sqlgen.QueryMod
- func (f CommentBodyFilter) IN(vals ...string) sqlgen.QueryMod
- func (f CommentBodyFilter) LT(val string) sqlgen.QueryMod
- func (f CommentBodyFilter) LTE(val string) sqlgen.QueryMod
- func (f CommentBodyFilter) NEQ(val string) sqlgen.QueryMod
- type CommentCommentableIDFilter
- func (f CommentCommentableIDFilter) EQ(val string) sqlgen.QueryMod
- func (f CommentCommentableIDFilter) GT(val string) sqlgen.QueryMod
- func (f CommentCommentableIDFilter) GTE(val string) sqlgen.QueryMod
- func (f CommentCommentableIDFilter) IN(vals ...string) sqlgen.QueryMod
- func (f CommentCommentableIDFilter) LT(val string) sqlgen.QueryMod
- func (f CommentCommentableIDFilter) LTE(val string) sqlgen.QueryMod
- func (f CommentCommentableIDFilter) NEQ(val string) sqlgen.QueryMod
- type CommentCommentableTypeFilter
- func (f CommentCommentableTypeFilter) EQ(val string) sqlgen.QueryMod
- func (f CommentCommentableTypeFilter) GT(val string) sqlgen.QueryMod
- func (f CommentCommentableTypeFilter) GTE(val string) sqlgen.QueryMod
- func (f CommentCommentableTypeFilter) IN(vals ...string) sqlgen.QueryMod
- func (f CommentCommentableTypeFilter) LT(val string) sqlgen.QueryMod
- func (f CommentCommentableTypeFilter) LTE(val string) sqlgen.QueryMod
- func (f CommentCommentableTypeFilter) NEQ(val string) sqlgen.QueryMod
- type CommentCreatedAtFilter
- func (f CommentCreatedAtFilter) EQ(val time.Time) sqlgen.QueryMod
- func (f CommentCreatedAtFilter) GT(val time.Time) sqlgen.QueryMod
- func (f CommentCreatedAtFilter) GTE(val time.Time) sqlgen.QueryMod
- func (f CommentCreatedAtFilter) IN(vals ...time.Time) sqlgen.QueryMod
- func (f CommentCreatedAtFilter) LT(val time.Time) sqlgen.QueryMod
- func (f CommentCreatedAtFilter) LTE(val time.Time) sqlgen.QueryMod
- func (f CommentCreatedAtFilter) NEQ(val time.Time) sqlgen.QueryMod
- type CommentHook
- type CommentIDFilter
- func (f CommentIDFilter) EQ(val string) sqlgen.QueryMod
- func (f CommentIDFilter) GT(val string) sqlgen.QueryMod
- func (f CommentIDFilter) GTE(val string) sqlgen.QueryMod
- func (f CommentIDFilter) IN(vals ...string) sqlgen.QueryMod
- func (f CommentIDFilter) LT(val string) sqlgen.QueryMod
- func (f CommentIDFilter) LTE(val string) sqlgen.QueryMod
- func (f CommentIDFilter) NEQ(val string) sqlgen.QueryMod
- type CommentKind
- type CommentKindFilter
- func (f CommentKindFilter) EQ(val CommentKind) sqlgen.QueryMod
- func (f CommentKindFilter) GT(val CommentKind) sqlgen.QueryMod
- func (f CommentKindFilter) GTE(val CommentKind) sqlgen.QueryMod
- func (f CommentKindFilter) IN(vals ...CommentKind) sqlgen.QueryMod
- func (f CommentKindFilter) LT(val CommentKind) sqlgen.QueryMod
- func (f CommentKindFilter) LTE(val CommentKind) sqlgen.QueryMod
- func (f CommentKindFilter) NEQ(val CommentKind) sqlgen.QueryMod
- type CommentMod
- type CommentRels
- type CommentSlice
- func (s CommentSlice) DeleteAll(ctx context.Context, exec sqlgen.Executor) (int64, error)
- func (s CommentSlice) InsertAll(ctx context.Context, exec sqlgen.Executor) error
- func (s CommentSlice) LoadRelations(ctx context.Context, exec sqlgen.Executor, loads ...*sqlgen.EagerLoadRequest) error
- func (s CommentSlice) UpdateAll(ctx context.Context, exec sqlgen.Executor, set map[string]any) (int64, error)
- type Post
- func (o *Post) AddTags(ctx context.Context, exec sqlgen.Executor, related ...*Tag) error
- func (o *Post) Delete(ctx context.Context, exec sqlgen.Executor) error
- func (o *Post) Insert(ctx context.Context, exec sqlgen.Executor, cols ...sqlgen.Columns) error
- func (o *Post) Reload(ctx context.Context, exec sqlgen.Executor) error
- func (o *Post) RemoveCategory(ctx context.Context, exec sqlgen.Executor) error
- func (o *Post) RemoveTags(ctx context.Context, exec sqlgen.Executor, related ...*Tag) error
- func (o *Post) ScanRow(rows interface{ ... }) error
- func (o *Post) SetCategory(ctx context.Context, exec sqlgen.Executor, related *Category) error
- func (o *Post) SetTags(ctx context.Context, exec sqlgen.Executor, related ...*Tag) error
- func (o *Post) SetUser(ctx context.Context, exec sqlgen.Executor, related *User) error
- func (o *Post) Update(ctx context.Context, exec sqlgen.Executor, cols ...sqlgen.Columns) error
- func (o *Post) Upsert(ctx context.Context, exec sqlgen.Executor, cols ...sqlgen.Columns) error
- type PostAuthorIDFilter
- func (f PostAuthorIDFilter) EQ(val string) sqlgen.QueryMod
- func (f PostAuthorIDFilter) GT(val string) sqlgen.QueryMod
- func (f PostAuthorIDFilter) GTE(val string) sqlgen.QueryMod
- func (f PostAuthorIDFilter) IN(vals ...string) sqlgen.QueryMod
- func (f PostAuthorIDFilter) LT(val string) sqlgen.QueryMod
- func (f PostAuthorIDFilter) LTE(val string) sqlgen.QueryMod
- func (f PostAuthorIDFilter) NEQ(val string) sqlgen.QueryMod
- type PostBodyFilter
- func (f PostBodyFilter) EQ(val string) sqlgen.QueryMod
- func (f PostBodyFilter) GT(val string) sqlgen.QueryMod
- func (f PostBodyFilter) GTE(val string) sqlgen.QueryMod
- func (f PostBodyFilter) IN(vals ...string) sqlgen.QueryMod
- func (f PostBodyFilter) LT(val string) sqlgen.QueryMod
- func (f PostBodyFilter) LTE(val string) sqlgen.QueryMod
- func (f PostBodyFilter) NEQ(val string) sqlgen.QueryMod
- type PostCategoryIDFilter
- func (f PostCategoryIDFilter) EQ(val sqlgen.Null[int32]) sqlgen.QueryMod
- func (f PostCategoryIDFilter) GT(val sqlgen.Null[int32]) sqlgen.QueryMod
- func (f PostCategoryIDFilter) GTE(val sqlgen.Null[int32]) sqlgen.QueryMod
- func (f PostCategoryIDFilter) IN(vals ...sqlgen.Null[int32]) sqlgen.QueryMod
- func (f PostCategoryIDFilter) IsNotNull() sqlgen.QueryMod
- func (f PostCategoryIDFilter) IsNull() sqlgen.QueryMod
- func (f PostCategoryIDFilter) LT(val sqlgen.Null[int32]) sqlgen.QueryMod
- func (f PostCategoryIDFilter) LTE(val sqlgen.Null[int32]) sqlgen.QueryMod
- func (f PostCategoryIDFilter) NEQ(val sqlgen.Null[int32]) sqlgen.QueryMod
- type PostCreatedAtFilter
- func (f PostCreatedAtFilter) EQ(val time.Time) sqlgen.QueryMod
- func (f PostCreatedAtFilter) GT(val time.Time) sqlgen.QueryMod
- func (f PostCreatedAtFilter) GTE(val time.Time) sqlgen.QueryMod
- func (f PostCreatedAtFilter) IN(vals ...time.Time) sqlgen.QueryMod
- func (f PostCreatedAtFilter) LT(val time.Time) sqlgen.QueryMod
- func (f PostCreatedAtFilter) LTE(val time.Time) sqlgen.QueryMod
- func (f PostCreatedAtFilter) NEQ(val time.Time) sqlgen.QueryMod
- type PostHook
- type PostIDFilter
- func (f PostIDFilter) EQ(val string) sqlgen.QueryMod
- func (f PostIDFilter) GT(val string) sqlgen.QueryMod
- func (f PostIDFilter) GTE(val string) sqlgen.QueryMod
- func (f PostIDFilter) IN(vals ...string) sqlgen.QueryMod
- func (f PostIDFilter) LT(val string) sqlgen.QueryMod
- func (f PostIDFilter) LTE(val string) sqlgen.QueryMod
- func (f PostIDFilter) NEQ(val string) sqlgen.QueryMod
- type PostMod
- type PostPublishedAtFilter
- func (f PostPublishedAtFilter) EQ(val sqlgen.Null[time.Time]) sqlgen.QueryMod
- func (f PostPublishedAtFilter) GT(val sqlgen.Null[time.Time]) sqlgen.QueryMod
- func (f PostPublishedAtFilter) GTE(val sqlgen.Null[time.Time]) sqlgen.QueryMod
- func (f PostPublishedAtFilter) IN(vals ...sqlgen.Null[time.Time]) sqlgen.QueryMod
- func (f PostPublishedAtFilter) IsNotNull() sqlgen.QueryMod
- func (f PostPublishedAtFilter) IsNull() sqlgen.QueryMod
- func (f PostPublishedAtFilter) LT(val sqlgen.Null[time.Time]) sqlgen.QueryMod
- func (f PostPublishedAtFilter) LTE(val sqlgen.Null[time.Time]) sqlgen.QueryMod
- func (f PostPublishedAtFilter) NEQ(val sqlgen.Null[time.Time]) sqlgen.QueryMod
- type PostRels
- type PostSlice
- func (s PostSlice) DeleteAll(ctx context.Context, exec sqlgen.Executor) (int64, error)
- func (s PostSlice) InsertAll(ctx context.Context, exec sqlgen.Executor) error
- func (s PostSlice) LoadCountRelations(ctx context.Context, exec sqlgen.Executor, names ...string) error
- func (s PostSlice) LoadRelations(ctx context.Context, exec sqlgen.Executor, loads ...*sqlgen.EagerLoadRequest) error
- func (s PostSlice) UpdateAll(ctx context.Context, exec sqlgen.Executor, set map[string]any) (int64, error)
- type PostStatus
- type PostStatusFilter
- func (f PostStatusFilter) EQ(val PostStatus) sqlgen.QueryMod
- func (f PostStatusFilter) GT(val PostStatus) sqlgen.QueryMod
- func (f PostStatusFilter) GTE(val PostStatus) sqlgen.QueryMod
- func (f PostStatusFilter) IN(vals ...PostStatus) sqlgen.QueryMod
- func (f PostStatusFilter) LT(val PostStatus) sqlgen.QueryMod
- func (f PostStatusFilter) LTE(val PostStatus) sqlgen.QueryMod
- func (f PostStatusFilter) NEQ(val PostStatus) sqlgen.QueryMod
- type PostTag
- func (o *PostTag) Delete(ctx context.Context, exec sqlgen.Executor) error
- func (o *PostTag) Insert(ctx context.Context, exec sqlgen.Executor, cols ...sqlgen.Columns) error
- func (o *PostTag) Reload(ctx context.Context, exec sqlgen.Executor) error
- func (o *PostTag) ScanRow(rows interface{ ... }) error
- func (o *PostTag) Update(ctx context.Context, exec sqlgen.Executor, cols ...sqlgen.Columns) error
- func (o *PostTag) Upsert(ctx context.Context, exec sqlgen.Executor, cols ...sqlgen.Columns) error
- type PostTagHook
- type PostTagMod
- type PostTagPostIDFilter
- func (f PostTagPostIDFilter) EQ(val string) sqlgen.QueryMod
- func (f PostTagPostIDFilter) GT(val string) sqlgen.QueryMod
- func (f PostTagPostIDFilter) GTE(val string) sqlgen.QueryMod
- func (f PostTagPostIDFilter) IN(vals ...string) sqlgen.QueryMod
- func (f PostTagPostIDFilter) LT(val string) sqlgen.QueryMod
- func (f PostTagPostIDFilter) LTE(val string) sqlgen.QueryMod
- func (f PostTagPostIDFilter) NEQ(val string) sqlgen.QueryMod
- type PostTagRels
- type PostTagSlice
- type PostTagTagIDFilter
- func (f PostTagTagIDFilter) EQ(val int32) sqlgen.QueryMod
- func (f PostTagTagIDFilter) GT(val int32) sqlgen.QueryMod
- func (f PostTagTagIDFilter) GTE(val int32) sqlgen.QueryMod
- func (f PostTagTagIDFilter) IN(vals ...int32) sqlgen.QueryMod
- func (f PostTagTagIDFilter) LT(val int32) sqlgen.QueryMod
- func (f PostTagTagIDFilter) LTE(val int32) sqlgen.QueryMod
- func (f PostTagTagIDFilter) NEQ(val int32) sqlgen.QueryMod
- type PostTitleFilter
- func (f PostTitleFilter) EQ(val string) sqlgen.QueryMod
- func (f PostTitleFilter) GT(val string) sqlgen.QueryMod
- func (f PostTitleFilter) GTE(val string) sqlgen.QueryMod
- func (f PostTitleFilter) IN(vals ...string) sqlgen.QueryMod
- func (f PostTitleFilter) LT(val string) sqlgen.QueryMod
- func (f PostTitleFilter) LTE(val string) sqlgen.QueryMod
- func (f PostTitleFilter) NEQ(val string) sqlgen.QueryMod
- type Profile
- func (o *Profile) Delete(ctx context.Context, exec sqlgen.Executor) error
- func (o *Profile) Insert(ctx context.Context, exec sqlgen.Executor, cols ...sqlgen.Columns) error
- func (o *Profile) Reload(ctx context.Context, exec sqlgen.Executor) error
- func (o *Profile) ScanRow(rows interface{ ... }) error
- func (o *Profile) SetUser(ctx context.Context, exec sqlgen.Executor, related *User) error
- func (o *Profile) Update(ctx context.Context, exec sqlgen.Executor, cols ...sqlgen.Columns) error
- func (o *Profile) Upsert(ctx context.Context, exec sqlgen.Executor, cols ...sqlgen.Columns) error
- type ProfileAvatarURLFilter
- func (f ProfileAvatarURLFilter) EQ(val sqlgen.Null[string]) sqlgen.QueryMod
- func (f ProfileAvatarURLFilter) GT(val sqlgen.Null[string]) sqlgen.QueryMod
- func (f ProfileAvatarURLFilter) GTE(val sqlgen.Null[string]) sqlgen.QueryMod
- func (f ProfileAvatarURLFilter) IN(vals ...sqlgen.Null[string]) sqlgen.QueryMod
- func (f ProfileAvatarURLFilter) IsNotNull() sqlgen.QueryMod
- func (f ProfileAvatarURLFilter) IsNull() sqlgen.QueryMod
- func (f ProfileAvatarURLFilter) LT(val sqlgen.Null[string]) sqlgen.QueryMod
- func (f ProfileAvatarURLFilter) LTE(val sqlgen.Null[string]) sqlgen.QueryMod
- func (f ProfileAvatarURLFilter) NEQ(val sqlgen.Null[string]) sqlgen.QueryMod
- type ProfileHook
- type ProfileIDFilter
- func (f ProfileIDFilter) EQ(val string) sqlgen.QueryMod
- func (f ProfileIDFilter) GT(val string) sqlgen.QueryMod
- func (f ProfileIDFilter) GTE(val string) sqlgen.QueryMod
- func (f ProfileIDFilter) IN(vals ...string) sqlgen.QueryMod
- func (f ProfileIDFilter) LT(val string) sqlgen.QueryMod
- func (f ProfileIDFilter) LTE(val string) sqlgen.QueryMod
- func (f ProfileIDFilter) NEQ(val string) sqlgen.QueryMod
- type ProfileMod
- type ProfileRels
- type ProfileSlice
- func (s ProfileSlice) DeleteAll(ctx context.Context, exec sqlgen.Executor) (int64, error)
- func (s ProfileSlice) InsertAll(ctx context.Context, exec sqlgen.Executor) error
- func (s ProfileSlice) LoadRelations(ctx context.Context, exec sqlgen.Executor, loads ...*sqlgen.EagerLoadRequest) error
- func (s ProfileSlice) UpdateAll(ctx context.Context, exec sqlgen.Executor, set map[string]any) (int64, error)
- type ProfileUserIDFilter
- func (f ProfileUserIDFilter) EQ(val string) sqlgen.QueryMod
- func (f ProfileUserIDFilter) GT(val string) sqlgen.QueryMod
- func (f ProfileUserIDFilter) GTE(val string) sqlgen.QueryMod
- func (f ProfileUserIDFilter) IN(vals ...string) sqlgen.QueryMod
- func (f ProfileUserIDFilter) LT(val string) sqlgen.QueryMod
- func (f ProfileUserIDFilter) LTE(val string) sqlgen.QueryMod
- func (f ProfileUserIDFilter) NEQ(val string) sqlgen.QueryMod
- type ProfileWebsiteFilter
- func (f ProfileWebsiteFilter) EQ(val sqlgen.Null[string]) sqlgen.QueryMod
- func (f ProfileWebsiteFilter) GT(val sqlgen.Null[string]) sqlgen.QueryMod
- func (f ProfileWebsiteFilter) GTE(val sqlgen.Null[string]) sqlgen.QueryMod
- func (f ProfileWebsiteFilter) IN(vals ...sqlgen.Null[string]) sqlgen.QueryMod
- func (f ProfileWebsiteFilter) IsNotNull() sqlgen.QueryMod
- func (f ProfileWebsiteFilter) IsNull() sqlgen.QueryMod
- func (f ProfileWebsiteFilter) LT(val sqlgen.Null[string]) sqlgen.QueryMod
- func (f ProfileWebsiteFilter) LTE(val sqlgen.Null[string]) sqlgen.QueryMod
- func (f ProfileWebsiteFilter) NEQ(val sqlgen.Null[string]) sqlgen.QueryMod
- type Tag
- func (o *Tag) AddPosts(ctx context.Context, exec sqlgen.Executor, related ...*Post) error
- func (o *Tag) Delete(ctx context.Context, exec sqlgen.Executor) error
- func (o *Tag) Insert(ctx context.Context, exec sqlgen.Executor, cols ...sqlgen.Columns) error
- func (o *Tag) Reload(ctx context.Context, exec sqlgen.Executor) error
- func (o *Tag) RemovePosts(ctx context.Context, exec sqlgen.Executor, related ...*Post) error
- func (o *Tag) ScanRow(rows interface{ ... }) error
- func (o *Tag) SetPosts(ctx context.Context, exec sqlgen.Executor, related ...*Post) error
- func (o *Tag) Update(ctx context.Context, exec sqlgen.Executor, cols ...sqlgen.Columns) error
- func (o *Tag) Upsert(ctx context.Context, exec sqlgen.Executor, cols ...sqlgen.Columns) error
- type TagHook
- type TagIDFilter
- func (f TagIDFilter) EQ(val int32) sqlgen.QueryMod
- func (f TagIDFilter) GT(val int32) sqlgen.QueryMod
- func (f TagIDFilter) GTE(val int32) sqlgen.QueryMod
- func (f TagIDFilter) IN(vals ...int32) sqlgen.QueryMod
- func (f TagIDFilter) LT(val int32) sqlgen.QueryMod
- func (f TagIDFilter) LTE(val int32) sqlgen.QueryMod
- func (f TagIDFilter) NEQ(val int32) sqlgen.QueryMod
- type TagMod
- type TagNameFilter
- func (f TagNameFilter) EQ(val string) sqlgen.QueryMod
- func (f TagNameFilter) GT(val string) sqlgen.QueryMod
- func (f TagNameFilter) GTE(val string) sqlgen.QueryMod
- func (f TagNameFilter) IN(vals ...string) sqlgen.QueryMod
- func (f TagNameFilter) LT(val string) sqlgen.QueryMod
- func (f TagNameFilter) LTE(val string) sqlgen.QueryMod
- func (f TagNameFilter) NEQ(val string) sqlgen.QueryMod
- type TagRels
- type TagSlice
- func (s TagSlice) DeleteAll(ctx context.Context, exec sqlgen.Executor) (int64, error)
- func (s TagSlice) InsertAll(ctx context.Context, exec sqlgen.Executor) error
- func (s TagSlice) LoadCountRelations(ctx context.Context, exec sqlgen.Executor, names ...string) error
- func (s TagSlice) LoadRelations(ctx context.Context, exec sqlgen.Executor, loads ...*sqlgen.EagerLoadRequest) error
- func (s TagSlice) UpdateAll(ctx context.Context, exec sqlgen.Executor, set map[string]any) (int64, error)
- type User
- func (o *User) AddComments(ctx context.Context, exec sqlgen.Executor, related ...*Comment) error
- func (o *User) AddPosts(ctx context.Context, exec sqlgen.Executor, related ...*Post) error
- func (o *User) Delete(ctx context.Context, exec sqlgen.Executor) error
- func (o *User) Insert(ctx context.Context, exec sqlgen.Executor, cols ...sqlgen.Columns) error
- func (o *User) Reload(ctx context.Context, exec sqlgen.Executor) error
- func (o *User) ScanRow(rows interface{ ... }) error
- func (o *User) SetProfile(ctx context.Context, exec sqlgen.Executor, related *Profile) error
- func (o *User) Update(ctx context.Context, exec sqlgen.Executor, cols ...sqlgen.Columns) error
- func (o *User) Upsert(ctx context.Context, exec sqlgen.Executor, cols ...sqlgen.Columns) error
- type UserAgeFilter
- func (f UserAgeFilter) EQ(val sqlgen.Null[int32]) sqlgen.QueryMod
- func (f UserAgeFilter) GT(val sqlgen.Null[int32]) sqlgen.QueryMod
- func (f UserAgeFilter) GTE(val sqlgen.Null[int32]) sqlgen.QueryMod
- func (f UserAgeFilter) IN(vals ...sqlgen.Null[int32]) sqlgen.QueryMod
- func (f UserAgeFilter) IsNotNull() sqlgen.QueryMod
- func (f UserAgeFilter) IsNull() sqlgen.QueryMod
- func (f UserAgeFilter) LT(val sqlgen.Null[int32]) sqlgen.QueryMod
- func (f UserAgeFilter) LTE(val sqlgen.Null[int32]) sqlgen.QueryMod
- func (f UserAgeFilter) NEQ(val sqlgen.Null[int32]) sqlgen.QueryMod
- type UserBioFilter
- func (f UserBioFilter) EQ(val sqlgen.Null[string]) sqlgen.QueryMod
- func (f UserBioFilter) GT(val sqlgen.Null[string]) sqlgen.QueryMod
- func (f UserBioFilter) GTE(val sqlgen.Null[string]) sqlgen.QueryMod
- func (f UserBioFilter) IN(vals ...sqlgen.Null[string]) sqlgen.QueryMod
- func (f UserBioFilter) IsNotNull() sqlgen.QueryMod
- func (f UserBioFilter) IsNull() sqlgen.QueryMod
- func (f UserBioFilter) LT(val sqlgen.Null[string]) sqlgen.QueryMod
- func (f UserBioFilter) LTE(val sqlgen.Null[string]) sqlgen.QueryMod
- func (f UserBioFilter) NEQ(val sqlgen.Null[string]) sqlgen.QueryMod
- type UserCreatedAtFilter
- func (f UserCreatedAtFilter) EQ(val time.Time) sqlgen.QueryMod
- func (f UserCreatedAtFilter) GT(val time.Time) sqlgen.QueryMod
- func (f UserCreatedAtFilter) GTE(val time.Time) sqlgen.QueryMod
- func (f UserCreatedAtFilter) IN(vals ...time.Time) sqlgen.QueryMod
- func (f UserCreatedAtFilter) LT(val time.Time) sqlgen.QueryMod
- func (f UserCreatedAtFilter) LTE(val time.Time) sqlgen.QueryMod
- func (f UserCreatedAtFilter) NEQ(val time.Time) sqlgen.QueryMod
- type UserEmailFilter
- func (f UserEmailFilter) EQ(val string) sqlgen.QueryMod
- func (f UserEmailFilter) GT(val string) sqlgen.QueryMod
- func (f UserEmailFilter) GTE(val string) sqlgen.QueryMod
- func (f UserEmailFilter) IN(vals ...string) sqlgen.QueryMod
- func (f UserEmailFilter) LT(val string) sqlgen.QueryMod
- func (f UserEmailFilter) LTE(val string) sqlgen.QueryMod
- func (f UserEmailFilter) NEQ(val string) sqlgen.QueryMod
- type UserHook
- type UserIDFilter
- func (f UserIDFilter) EQ(val string) sqlgen.QueryMod
- func (f UserIDFilter) GT(val string) sqlgen.QueryMod
- func (f UserIDFilter) GTE(val string) sqlgen.QueryMod
- func (f UserIDFilter) IN(vals ...string) sqlgen.QueryMod
- func (f UserIDFilter) LT(val string) sqlgen.QueryMod
- func (f UserIDFilter) LTE(val string) sqlgen.QueryMod
- func (f UserIDFilter) NEQ(val string) sqlgen.QueryMod
- type UserIsAdminFilter
- func (f UserIsAdminFilter) EQ(val bool) sqlgen.QueryMod
- func (f UserIsAdminFilter) GT(val bool) sqlgen.QueryMod
- func (f UserIsAdminFilter) GTE(val bool) sqlgen.QueryMod
- func (f UserIsAdminFilter) IN(vals ...bool) sqlgen.QueryMod
- func (f UserIsAdminFilter) LT(val bool) sqlgen.QueryMod
- func (f UserIsAdminFilter) LTE(val bool) sqlgen.QueryMod
- func (f UserIsAdminFilter) NEQ(val bool) sqlgen.QueryMod
- type UserMetadataFilter
- func (f UserMetadataFilter) EQ(val sqlgen.Null[json.RawMessage]) sqlgen.QueryMod
- func (f UserMetadataFilter) GT(val sqlgen.Null[json.RawMessage]) sqlgen.QueryMod
- func (f UserMetadataFilter) GTE(val sqlgen.Null[json.RawMessage]) sqlgen.QueryMod
- func (f UserMetadataFilter) IN(vals ...sqlgen.Null[json.RawMessage]) sqlgen.QueryMod
- func (f UserMetadataFilter) IsNotNull() sqlgen.QueryMod
- func (f UserMetadataFilter) IsNull() sqlgen.QueryMod
- func (f UserMetadataFilter) LT(val sqlgen.Null[json.RawMessage]) sqlgen.QueryMod
- func (f UserMetadataFilter) LTE(val sqlgen.Null[json.RawMessage]) sqlgen.QueryMod
- func (f UserMetadataFilter) NEQ(val sqlgen.Null[json.RawMessage]) sqlgen.QueryMod
- type UserMod
- type UserNameFilter
- func (f UserNameFilter) EQ(val string) sqlgen.QueryMod
- func (f UserNameFilter) GT(val string) sqlgen.QueryMod
- func (f UserNameFilter) GTE(val string) sqlgen.QueryMod
- func (f UserNameFilter) IN(vals ...string) sqlgen.QueryMod
- func (f UserNameFilter) LT(val string) sqlgen.QueryMod
- func (f UserNameFilter) LTE(val string) sqlgen.QueryMod
- func (f UserNameFilter) NEQ(val string) sqlgen.QueryMod
- type UserRels
- type UserScoreFilter
- func (f UserScoreFilter) EQ(val sqlgen.Null[string]) sqlgen.QueryMod
- func (f UserScoreFilter) GT(val sqlgen.Null[string]) sqlgen.QueryMod
- func (f UserScoreFilter) GTE(val sqlgen.Null[string]) sqlgen.QueryMod
- func (f UserScoreFilter) IN(vals ...sqlgen.Null[string]) sqlgen.QueryMod
- func (f UserScoreFilter) IsNotNull() sqlgen.QueryMod
- func (f UserScoreFilter) IsNull() sqlgen.QueryMod
- func (f UserScoreFilter) LT(val sqlgen.Null[string]) sqlgen.QueryMod
- func (f UserScoreFilter) LTE(val sqlgen.Null[string]) sqlgen.QueryMod
- func (f UserScoreFilter) NEQ(val sqlgen.Null[string]) sqlgen.QueryMod
- type UserSlice
- func (s UserSlice) DeleteAll(ctx context.Context, exec sqlgen.Executor) (int64, error)
- func (s UserSlice) InsertAll(ctx context.Context, exec sqlgen.Executor) error
- func (s UserSlice) LoadCountRelations(ctx context.Context, exec sqlgen.Executor, names ...string) error
- func (s UserSlice) LoadRelations(ctx context.Context, exec sqlgen.Executor, loads ...*sqlgen.EagerLoadRequest) error
- func (s UserSlice) UpdateAll(ctx context.Context, exec sqlgen.Executor, set map[string]any) (int64, error)
Constants ¶
const CategoryTableName = "categories"
CategoryTableName is the database table name.
const CommentTableName = "comments"
CommentTableName is the database table name.
const PostTableName = "posts"
PostTableName is the database table name.
const PostTagTableName = "post_tags"
PostTagTableName is the database table name.
const ProfileTableName = "profiles"
ProfileTableName is the database table name.
const TagTableName = "tags"
TagTableName is the database table name.
const UserTableName = "users"
UserTableName is the database table name.
Variables ¶
var CategoryColumns = struct { ID string Name string ParentID string }{ ID: "id", Name: "name", ParentID: "parent_id", }
CategoryColumns contains all column names for the categories table.
var CategoryPreloadParent = sqlgen.PreloadDef{ Name: "Parent", Table: CategoryTableName, JoinCond: "\"categories\".\"id\" = \"categories\".\"parent_id\"", Columns: []string{ "\"categories\".\"id\"", "\"categories\".\"name\"", "\"categories\".\"parent_id\"", }, }
CategoryPreloadParent is the PreloadDef for the Parent relationship.
var CategoryWhere = struct { ID CategoryIDFilter Name CategoryNameFilter ParentID CategoryParentIDFilter }{ ID: CategoryIDFilter{/* contains filtered or unexported fields */}, Name: CategoryNameFilter{/* contains filtered or unexported fields */}, ParentID: CategoryParentIDFilter{/* contains filtered or unexported fields */}, }
CategoryWhere provides type-safe where clause builders for each column.
var CommentColumns = struct { ID string AuthorID string CommentableType string CommentableID string Kind string Body string CreatedAt string }{ ID: "id", AuthorID: "author_id", CommentableType: "commentable_type", CommentableID: "commentable_id", Kind: "kind", Body: "body", CreatedAt: "created_at", }
CommentColumns contains all column names for the comments table.
var CommentPreloadUser = sqlgen.PreloadDef{ Name: "User", Table: UserTableName, JoinCond: "\"users\".\"id\" = \"comments\".\"author_id\"", Columns: []string{ "\"users\".\"id\"", "\"users\".\"email\"", "\"users\".\"name\"", "\"users\".\"bio\"", "\"users\".\"age\"", "\"users\".\"score\"", "\"users\".\"is_admin\"", "\"users\".\"metadata\"", "\"users\".\"created_at\"", }, }
CommentPreloadUser is the PreloadDef for the User relationship.
var CommentWhere = struct { ID CommentIDFilter AuthorID CommentAuthorIDFilter CommentableType CommentCommentableTypeFilter CommentableID CommentCommentableIDFilter Kind CommentKindFilter Body CommentBodyFilter CreatedAt CommentCreatedAtFilter }{ ID: CommentIDFilter{/* contains filtered or unexported fields */}, AuthorID: CommentAuthorIDFilter{/* contains filtered or unexported fields */}, CommentableType: CommentCommentableTypeFilter{/* contains filtered or unexported fields */}, CommentableID: CommentCommentableIDFilter{/* contains filtered or unexported fields */}, Kind: CommentKindFilter{/* contains filtered or unexported fields */}, Body: CommentBodyFilter{/* contains filtered or unexported fields */}, CreatedAt: CommentCreatedAtFilter{/* contains filtered or unexported fields */}, }
CommentWhere provides type-safe where clause builders for each column.
var PostColumns = struct { ID string AuthorID string CategoryID string Title string Body string Status string CreatedAt string PublishedAt string }{ ID: "id", AuthorID: "author_id", CategoryID: "category_id", Title: "title", Body: "body", Status: "status", CreatedAt: "created_at", PublishedAt: "published_at", }
PostColumns contains all column names for the posts table.
var PostPreloadCategory = sqlgen.PreloadDef{ Name: "Category", Table: CategoryTableName, JoinCond: "\"categories\".\"id\" = \"posts\".\"category_id\"", Columns: []string{ "\"categories\".\"id\"", "\"categories\".\"name\"", "\"categories\".\"parent_id\"", }, }
PostPreloadCategory is the PreloadDef for the Category relationship.
var PostPreloadUser = sqlgen.PreloadDef{ Name: "User", Table: UserTableName, JoinCond: "\"users\".\"id\" = \"posts\".\"author_id\"", Columns: []string{ "\"users\".\"id\"", "\"users\".\"email\"", "\"users\".\"name\"", "\"users\".\"bio\"", "\"users\".\"age\"", "\"users\".\"score\"", "\"users\".\"is_admin\"", "\"users\".\"metadata\"", "\"users\".\"created_at\"", }, }
PostPreloadUser is the PreloadDef for the User relationship.
var PostTagColumns = struct { PostID string TagID string }{ PostID: "post_id", TagID: "tag_id", }
PostTagColumns contains all column names for the post_tags table.
var PostTagWhere = struct { PostID PostTagPostIDFilter TagID PostTagTagIDFilter }{ PostID: PostTagPostIDFilter{/* contains filtered or unexported fields */}, TagID: PostTagTagIDFilter{/* contains filtered or unexported fields */}, }
PostTagWhere provides type-safe where clause builders for each column.
var PostWhere = struct { ID PostIDFilter AuthorID PostAuthorIDFilter CategoryID PostCategoryIDFilter Title PostTitleFilter Body PostBodyFilter Status PostStatusFilter CreatedAt PostCreatedAtFilter PublishedAt PostPublishedAtFilter }{ ID: PostIDFilter{/* contains filtered or unexported fields */}, AuthorID: PostAuthorIDFilter{/* contains filtered or unexported fields */}, CategoryID: PostCategoryIDFilter{/* contains filtered or unexported fields */}, Title: PostTitleFilter{/* contains filtered or unexported fields */}, Body: PostBodyFilter{/* contains filtered or unexported fields */}, Status: PostStatusFilter{/* contains filtered or unexported fields */}, CreatedAt: PostCreatedAtFilter{/* contains filtered or unexported fields */}, PublishedAt: PostPublishedAtFilter{/* contains filtered or unexported fields */}, }
PostWhere provides type-safe where clause builders for each column.
var ProfileColumns = struct { ID string UserID string AvatarURL string Website string }{ ID: "id", UserID: "user_id", AvatarURL: "avatar_url", Website: "website", }
ProfileColumns contains all column names for the profiles table.
var ProfilePreloadUser = sqlgen.PreloadDef{ Name: "User", Table: UserTableName, JoinCond: "\"users\".\"id\" = \"profiles\".\"user_id\"", Columns: []string{ "\"users\".\"id\"", "\"users\".\"email\"", "\"users\".\"name\"", "\"users\".\"bio\"", "\"users\".\"age\"", "\"users\".\"score\"", "\"users\".\"is_admin\"", "\"users\".\"metadata\"", "\"users\".\"created_at\"", }, }
ProfilePreloadUser is the PreloadDef for the User relationship.
var ProfileWhere = struct { ID ProfileIDFilter UserID ProfileUserIDFilter AvatarURL ProfileAvatarURLFilter Website ProfileWebsiteFilter }{ ID: ProfileIDFilter{/* contains filtered or unexported fields */}, UserID: ProfileUserIDFilter{/* contains filtered or unexported fields */}, AvatarURL: ProfileAvatarURLFilter{/* contains filtered or unexported fields */}, Website: ProfileWebsiteFilter{/* contains filtered or unexported fields */}, }
ProfileWhere provides type-safe where clause builders for each column.
var TagColumns = struct { ID string Name string }{ ID: "id", Name: "name", }
TagColumns contains all column names for the tags table.
var TagWhere = struct { ID TagIDFilter Name TagNameFilter }{ ID: TagIDFilter{/* contains filtered or unexported fields */}, Name: TagNameFilter{/* contains filtered or unexported fields */}, }
TagWhere provides type-safe where clause builders for each column.
var UserColumns = struct { ID string Email string Name string Bio string Age string Score string IsAdmin string Metadata string CreatedAt string }{ ID: "id", Email: "email", Name: "name", Bio: "bio", Age: "age", Score: "score", IsAdmin: "is_admin", Metadata: "metadata", CreatedAt: "created_at", }
UserColumns contains all column names for the users table.
var UserPreloadProfile = sqlgen.PreloadDef{ Name: "Profile", Table: ProfileTableName, JoinCond: "\"profiles\".\"user_id\" = \"users\".\"id\"", Columns: []string{ "\"profiles\".\"id\"", "\"profiles\".\"user_id\"", "\"profiles\".\"avatar_url\"", "\"profiles\".\"website\"", }, }
UserPreloadProfile is the PreloadDef for the Profile relationship.
var UserWhere = struct { ID UserIDFilter Email UserEmailFilter Name UserNameFilter Bio UserBioFilter Age UserAgeFilter Score UserScoreFilter IsAdmin UserIsAdminFilter Metadata UserMetadataFilter CreatedAt UserCreatedAtFilter }{ ID: UserIDFilter{/* contains filtered or unexported fields */}, Email: UserEmailFilter{/* contains filtered or unexported fields */}, Name: UserNameFilter{/* contains filtered or unexported fields */}, Bio: UserBioFilter{/* contains filtered or unexported fields */}, Age: UserAgeFilter{/* contains filtered or unexported fields */}, Score: UserScoreFilter{/* contains filtered or unexported fields */}, IsAdmin: UserIsAdminFilter{/* contains filtered or unexported fields */}, Metadata: UserMetadataFilter{/* contains filtered or unexported fields */}, CreatedAt: UserCreatedAtFilter{/* contains filtered or unexported fields */}, }
UserWhere provides type-safe where clause builders for each column.
Functions ¶
func AddCategoryHook ¶
func AddCategoryHook(point sqlgen.HookPoint, fn CategoryHook)
AddCategoryHook registers a typed hook for the given hook point. The hook receives the model pointer and can inspect or modify it.
func AddCommentHook ¶
func AddCommentHook(point sqlgen.HookPoint, fn CommentHook)
AddCommentHook registers a typed hook for the given hook point. The hook receives the model pointer and can inspect or modify it.
func AddPostHook ¶
AddPostHook registers a typed hook for the given hook point. The hook receives the model pointer and can inspect or modify it.
func AddPostTagHook ¶
func AddPostTagHook(point sqlgen.HookPoint, fn PostTagHook)
AddPostTagHook registers a typed hook for the given hook point. The hook receives the model pointer and can inspect or modify it.
func AddProfileHook ¶
func AddProfileHook(point sqlgen.HookPoint, fn ProfileHook)
AddProfileHook registers a typed hook for the given hook point. The hook receives the model pointer and can inspect or modify it.
func AddTagHook ¶
AddTagHook registers a typed hook for the given hook point. The hook receives the model pointer and can inspect or modify it.
func AddUserHook ¶
AddUserHook registers a typed hook for the given hook point. The hook receives the model pointer and can inspect or modify it.
func Categories ¶
Categories returns a query builder for the categories table.
func CategoryCursor ¶
func CategoryCursor(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (*sqlgen.Cursor[*Category], error)
CategoryCursor returns a cursor for iterating over categories rows one at a time.
func CategoryExists ¶
Exists checks if a row with the given primary key exists.
func CommentCursor ¶
func CommentCursor(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (*sqlgen.Cursor[*Comment], error)
CommentCursor returns a cursor for iterating over comments rows one at a time.
func CommentExists ¶
Exists checks if a row with the given primary key exists.
func CountCategories ¶
func CountCategories(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
CountCategories returns the count of rows matching the query mods.
func CountComments ¶
func CountComments(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
CountComments returns the count of rows matching the query mods.
func CountPostTags ¶
func CountPostTags(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
CountPostTags returns the count of rows matching the query mods.
func CountPosts ¶
CountPosts returns the count of rows matching the query mods.
func CountProfiles ¶
func CountProfiles(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
CountProfiles returns the count of rows matching the query mods.
func CountUsers ¶
CountUsers returns the count of rows matching the query mods.
func DeleteAllCategories ¶
func DeleteAllCategories(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
DeleteAllCategories deletes all rows matching the given mods.
func DeleteAllComments ¶
func DeleteAllComments(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
DeleteAllComments deletes all rows matching the given mods.
func DeleteAllPostTags ¶
func DeleteAllPostTags(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
DeleteAllPostTags deletes all rows matching the given mods.
func DeleteAllPosts ¶
func DeleteAllPosts(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
DeleteAllPosts deletes all rows matching the given mods.
func DeleteAllProfiles ¶
func DeleteAllProfiles(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
DeleteAllProfiles deletes all rows matching the given mods.
func DeleteAllTags ¶
func DeleteAllTags(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
DeleteAllTags deletes all rows matching the given mods.
func DeleteAllUsers ¶
func DeleteAllUsers(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (int64, error)
DeleteAllUsers deletes all rows matching the given mods.
func EachCategory ¶
func EachCategory(ctx context.Context, exec sqlgen.Executor, fn func(*Category) error, mods ...sqlgen.QueryMod) error
EachCategory executes a query and calls fn for each row. Iteration stops early if fn returns an error. Rows are not accumulated in memory.
func EachComment ¶
func EachComment(ctx context.Context, exec sqlgen.Executor, fn func(*Comment) error, mods ...sqlgen.QueryMod) error
EachComment executes a query and calls fn for each row. Iteration stops early if fn returns an error. Rows are not accumulated in memory.
func EachPost ¶
func EachPost(ctx context.Context, exec sqlgen.Executor, fn func(*Post) error, mods ...sqlgen.QueryMod) error
EachPost executes a query and calls fn for each row. Iteration stops early if fn returns an error. Rows are not accumulated in memory.
func EachPostTag ¶
func EachPostTag(ctx context.Context, exec sqlgen.Executor, fn func(*PostTag) error, mods ...sqlgen.QueryMod) error
EachPostTag executes a query and calls fn for each row. Iteration stops early if fn returns an error. Rows are not accumulated in memory.
func EachProfile ¶
func EachProfile(ctx context.Context, exec sqlgen.Executor, fn func(*Profile) error, mods ...sqlgen.QueryMod) error
EachProfile executes a query and calls fn for each row. Iteration stops early if fn returns an error. Rows are not accumulated in memory.
func EachTag ¶
func EachTag(ctx context.Context, exec sqlgen.Executor, fn func(*Tag) error, mods ...sqlgen.QueryMod) error
EachTag executes a query and calls fn for each row. Iteration stops early if fn returns an error. Rows are not accumulated in memory.
func EachUser ¶
func EachUser(ctx context.Context, exec sqlgen.Executor, fn func(*User) error, mods ...sqlgen.QueryMod) error
EachUser executes a query and calls fn for each row. Iteration stops early if fn returns an error. Rows are not accumulated in memory.
func PostCursor ¶
func PostCursor(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (*sqlgen.Cursor[*Post], error)
PostCursor returns a cursor for iterating over posts rows one at a time.
func PostExists ¶
Exists checks if a row with the given primary key exists.
func PostTagCursor ¶
func PostTagCursor(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (*sqlgen.Cursor[*PostTag], error)
PostTagCursor returns a cursor for iterating over post_tags rows one at a time.
func PostTagExists ¶
func PostTagExists(ctx context.Context, exec sqlgen.Executor, postID string, tagID int32) (bool, error)
Exists checks if a row with the given primary key exists.
func ProfileCursor ¶
func ProfileCursor(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (*sqlgen.Cursor[*Profile], error)
ProfileCursor returns a cursor for iterating over profiles rows one at a time.
func ProfileExists ¶
Exists checks if a row with the given primary key exists.
func TagCursor ¶
func TagCursor(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (*sqlgen.Cursor[*Tag], error)
TagCursor returns a cursor for iterating over tags rows one at a time.
func UpdateAllCategories ¶
func UpdateAllCategories(ctx context.Context, exec sqlgen.Executor, set map[string]any, mods ...sqlgen.QueryMod) (int64, error)
UpdateAllCategories updates all rows matching the given mods. set is a map of column name -> new value.
func UpdateAllComments ¶
func UpdateAllComments(ctx context.Context, exec sqlgen.Executor, set map[string]any, mods ...sqlgen.QueryMod) (int64, error)
UpdateAllComments updates all rows matching the given mods. set is a map of column name -> new value.
func UpdateAllPostTags ¶
func UpdateAllPostTags(ctx context.Context, exec sqlgen.Executor, set map[string]any, mods ...sqlgen.QueryMod) (int64, error)
UpdateAllPostTags updates all rows matching the given mods. set is a map of column name -> new value.
func UpdateAllPosts ¶
func UpdateAllPosts(ctx context.Context, exec sqlgen.Executor, set map[string]any, mods ...sqlgen.QueryMod) (int64, error)
UpdateAllPosts updates all rows matching the given mods. set is a map of column name -> new value.
func UpdateAllProfiles ¶
func UpdateAllProfiles(ctx context.Context, exec sqlgen.Executor, set map[string]any, mods ...sqlgen.QueryMod) (int64, error)
UpdateAllProfiles updates all rows matching the given mods. set is a map of column name -> new value.
func UpdateAllTags ¶
func UpdateAllTags(ctx context.Context, exec sqlgen.Executor, set map[string]any, mods ...sqlgen.QueryMod) (int64, error)
UpdateAllTags updates all rows matching the given mods. set is a map of column name -> new value.
func UpdateAllUsers ¶
func UpdateAllUsers(ctx context.Context, exec sqlgen.Executor, set map[string]any, mods ...sqlgen.QueryMod) (int64, error)
UpdateAllUsers updates all rows matching the given mods. set is a map of column name -> new value.
func UserCursor ¶
func UserCursor(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (*sqlgen.Cursor[*User], error)
UserCursor returns a cursor for iterating over users rows one at a time.
func UserExists ¶
Exists checks if a row with the given primary key exists.
Types ¶
type Category ¶
type Category struct {
ID int32 `db:"id" json:"id"`
Name string `db:"name" json:"name"`
ParentID sqlgen.Null[int32] `db:"parent_id" json:"parent_id"`
R *CategoryRels `db:"-" json:"-"`
}
Category represents a row from the 'categories' table.
func FindCategoryByPK ¶
FindCategoryByPK finds a Category by primary key.
func InsertCategory ¶
func InsertCategory(ctx context.Context, exec sqlgen.Executor, mods ...CategoryMod) (*Category, error)
InsertCategory creates a Category with random values, applies mods, and inserts it.
func NewCategory ¶
func NewCategory(mods ...CategoryMod) *Category
NewCategory creates a Category with random values for all non-auto-increment fields. Pass modifier functions to override specific fields.
func (*Category) AddParentsInverse ¶
func (o *Category) AddParentsInverse(ctx context.Context, exec sqlgen.Executor, related ...*Category) error
AddParentsInverse adds models to the ParentsInverse relationship by setting their FK.
func (*Category) Insert ¶
Insert inserts the Category into the database. Optional Columns parameter controls which columns are included (Whitelist/Blacklist).
func (*Category) RemoveParent ¶
RemoveParent clears the Parent relationship by setting the FK to NULL.
func (*Category) RemoveParentsInverse ¶
func (o *Category) RemoveParentsInverse(ctx context.Context, exec sqlgen.Executor, related ...*Category) error
RemoveParentsInverse removes models from the ParentsInverse relationship by setting their FK to NULL.
func (*Category) RemovePosts ¶
RemovePosts removes models from the Posts relationship by setting their FK to NULL.
type CategoryHook ¶
type CategoryHook func(ctx context.Context, exec sqlgen.Executor, model *Category) (context.Context, error)
CategoryHook is a typed hook function for Category lifecycle events.
type CategoryIDFilter ¶
type CategoryIDFilter struct {
// contains filtered or unexported fields
}
CategoryIDFilter provides where clauses for the id column.
type CategoryMod ¶
type CategoryMod func(*Category)
CategoryMod is a function that customizes a Category before use.
type CategoryNameFilter ¶
type CategoryNameFilter struct {
// contains filtered or unexported fields
}
CategoryNameFilter provides where clauses for the name column.
type CategoryParentIDFilter ¶
type CategoryParentIDFilter struct {
// contains filtered or unexported fields
}
CategoryParentIDFilter provides where clauses for the parent_id column.
func (CategoryParentIDFilter) IsNotNull ¶
func (f CategoryParentIDFilter) IsNotNull() sqlgen.QueryMod
func (CategoryParentIDFilter) IsNull ¶
func (f CategoryParentIDFilter) IsNull() sqlgen.QueryMod
type CategoryRels ¶
type CategoryRels struct {
Parent *Category
ParentsInverse []*Category
ParentsInverseCount *int64
Posts []*Post
PostsCount *int64
}
CategoryRels holds eagerly loaded relationships.
type CategorySlice ¶
type CategorySlice []*Category
CategorySlice is a slice of Category pointers.
func AllCategories ¶
func AllCategories(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (CategorySlice, error)
AllCategories retrieves all rows from the categories table with the given query mods. Supports Preload() for LEFT JOIN eager loading of to-one relationships.
func (CategorySlice) InsertAll ¶
InsertAll batch-inserts all models in the slice. Each model's columns are scanned back via RETURNING, picking up defaults and generated values. Hooks are not fired (consistent with UpdateAll/DeleteAll).
func (CategorySlice) LoadCountRelations ¶
func (s CategorySlice) LoadCountRelations(ctx context.Context, exec sqlgen.Executor, names ...string) error
LoadCountRelations loads counts for the specified relationships. Pass relationship names (e.g., "Posts", "Tags") to load their counts.
func (CategorySlice) LoadRelations ¶
func (s CategorySlice) LoadRelations(ctx context.Context, exec sqlgen.Executor, loads ...*sqlgen.EagerLoadRequest) error
LoadRelations eagerly loads the specified relationships for a slice of Category.
type Comment ¶
type Comment struct {
ID string `db:"id" json:"id"`
AuthorID string `db:"author_id" json:"author_id"`
CommentableType string `db:"commentable_type" json:"commentable_type"`
CommentableID string `db:"commentable_id" json:"commentable_id"`
Kind CommentKind `db:"kind" json:"kind"`
Body string `db:"body" json:"body"`
CreatedAt time.Time `db:"created_at" json:"created_at"`
R *CommentRels `db:"-" json:"-"`
}
Comment represents a row from the 'comments' table.
func FindCommentByPK ¶
FindCommentByPK finds a Comment by primary key.
func InsertComment ¶
InsertComment creates a Comment with random values, applies mods, and inserts it.
func NewComment ¶
func NewComment(mods ...CommentMod) *Comment
NewComment creates a Comment with random values for all non-auto-increment fields. Pass modifier functions to override specific fields.
func (*Comment) Insert ¶
Insert inserts the Comment into the database. Optional Columns parameter controls which columns are included (Whitelist/Blacklist).
type CommentAuthorIDFilter ¶
type CommentAuthorIDFilter struct {
// contains filtered or unexported fields
}
CommentAuthorIDFilter provides where clauses for the author_id column.
type CommentBodyFilter ¶
type CommentBodyFilter struct {
// contains filtered or unexported fields
}
CommentBodyFilter provides where clauses for the body column.
type CommentCommentableIDFilter ¶
type CommentCommentableIDFilter struct {
// contains filtered or unexported fields
}
CommentCommentableIDFilter provides where clauses for the commentable_id column.
func (CommentCommentableIDFilter) EQ ¶
func (f CommentCommentableIDFilter) EQ(val string) sqlgen.QueryMod
func (CommentCommentableIDFilter) GT ¶
func (f CommentCommentableIDFilter) GT(val string) sqlgen.QueryMod
func (CommentCommentableIDFilter) GTE ¶
func (f CommentCommentableIDFilter) GTE(val string) sqlgen.QueryMod
func (CommentCommentableIDFilter) IN ¶
func (f CommentCommentableIDFilter) IN(vals ...string) sqlgen.QueryMod
func (CommentCommentableIDFilter) LT ¶
func (f CommentCommentableIDFilter) LT(val string) sqlgen.QueryMod
type CommentCommentableTypeFilter ¶
type CommentCommentableTypeFilter struct {
// contains filtered or unexported fields
}
CommentCommentableTypeFilter provides where clauses for the commentable_type column.
func (CommentCommentableTypeFilter) EQ ¶
func (f CommentCommentableTypeFilter) EQ(val string) sqlgen.QueryMod
func (CommentCommentableTypeFilter) GT ¶
func (f CommentCommentableTypeFilter) GT(val string) sqlgen.QueryMod
func (CommentCommentableTypeFilter) GTE ¶
func (f CommentCommentableTypeFilter) GTE(val string) sqlgen.QueryMod
func (CommentCommentableTypeFilter) IN ¶
func (f CommentCommentableTypeFilter) IN(vals ...string) sqlgen.QueryMod
func (CommentCommentableTypeFilter) LT ¶
func (f CommentCommentableTypeFilter) LT(val string) sqlgen.QueryMod
type CommentCreatedAtFilter ¶
type CommentCreatedAtFilter struct {
// contains filtered or unexported fields
}
CommentCreatedAtFilter provides where clauses for the created_at column.
func (CommentCreatedAtFilter) EQ ¶
func (f CommentCreatedAtFilter) EQ(val time.Time) sqlgen.QueryMod
func (CommentCreatedAtFilter) GT ¶
func (f CommentCreatedAtFilter) GT(val time.Time) sqlgen.QueryMod
func (CommentCreatedAtFilter) GTE ¶
func (f CommentCreatedAtFilter) GTE(val time.Time) sqlgen.QueryMod
func (CommentCreatedAtFilter) IN ¶
func (f CommentCreatedAtFilter) IN(vals ...time.Time) sqlgen.QueryMod
func (CommentCreatedAtFilter) LT ¶
func (f CommentCreatedAtFilter) LT(val time.Time) sqlgen.QueryMod
type CommentHook ¶
type CommentHook func(ctx context.Context, exec sqlgen.Executor, model *Comment) (context.Context, error)
CommentHook is a typed hook function for Comment lifecycle events.
type CommentIDFilter ¶
type CommentIDFilter struct {
// contains filtered or unexported fields
}
CommentIDFilter provides where clauses for the id column.
type CommentKind ¶
type CommentKind string
CommentKind is the 'comment_kind' enum type.
const ( CommentKindReview CommentKind = "review" CommentKindReply CommentKind = "reply" CommentKindNote CommentKind = "note" )
func AllCommentKindValues ¶
func AllCommentKindValues() []CommentKind
AllCommentKindValues returns all valid values for this enum.
func (CommentKind) IsValid ¶
func (e CommentKind) IsValid() bool
IsValid checks if the value is a valid enum value.
func (CommentKind) String ¶
func (e CommentKind) String() string
String returns the string representation.
type CommentKindFilter ¶
type CommentKindFilter struct {
// contains filtered or unexported fields
}
CommentKindFilter provides where clauses for the kind column.
func (CommentKindFilter) EQ ¶
func (f CommentKindFilter) EQ(val CommentKind) sqlgen.QueryMod
func (CommentKindFilter) GT ¶
func (f CommentKindFilter) GT(val CommentKind) sqlgen.QueryMod
func (CommentKindFilter) GTE ¶
func (f CommentKindFilter) GTE(val CommentKind) sqlgen.QueryMod
func (CommentKindFilter) IN ¶
func (f CommentKindFilter) IN(vals ...CommentKind) sqlgen.QueryMod
func (CommentKindFilter) LT ¶
func (f CommentKindFilter) LT(val CommentKind) sqlgen.QueryMod
func (CommentKindFilter) LTE ¶
func (f CommentKindFilter) LTE(val CommentKind) sqlgen.QueryMod
func (CommentKindFilter) NEQ ¶
func (f CommentKindFilter) NEQ(val CommentKind) sqlgen.QueryMod
type CommentMod ¶
type CommentMod func(*Comment)
CommentMod is a function that customizes a Comment before use.
type CommentRels ¶
CommentRels holds eagerly loaded relationships.
type CommentSlice ¶
type CommentSlice []*Comment
CommentSlice is a slice of Comment pointers.
func AllComments ¶
func AllComments(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (CommentSlice, error)
AllComments retrieves all rows from the comments table with the given query mods. Supports Preload() for LEFT JOIN eager loading of to-one relationships.
func (CommentSlice) InsertAll ¶
InsertAll batch-inserts all models in the slice. Each model's columns are scanned back via RETURNING, picking up defaults and generated values. Hooks are not fired (consistent with UpdateAll/DeleteAll).
func (CommentSlice) LoadRelations ¶
func (s CommentSlice) LoadRelations(ctx context.Context, exec sqlgen.Executor, loads ...*sqlgen.EagerLoadRequest) error
LoadRelations eagerly loads the specified relationships for a slice of Comment.
type Post ¶
type Post struct {
ID string `db:"id" json:"id"`
AuthorID string `db:"author_id" json:"author_id"`
CategoryID sqlgen.Null[int32] `db:"category_id" json:"category_id"`
Title string `db:"title" json:"title"`
Body string `db:"body" json:"body"`
Status PostStatus `db:"status" json:"status"`
CreatedAt time.Time `db:"created_at" json:"created_at"`
PublishedAt sqlgen.Null[time.Time] `db:"published_at" json:"published_at"`
R *PostRels `db:"-" json:"-"`
}
Post represents a row from the 'posts' table.
func FindPostByPK ¶
FindPostByPK finds a Post by primary key.
func InsertPost ¶
InsertPost creates a Post with random values, applies mods, and inserts it.
func NewPost ¶
NewPost creates a Post with random values for all non-auto-increment fields. Pass modifier functions to override specific fields.
func (*Post) Insert ¶
Insert inserts the Post into the database. Optional Columns parameter controls which columns are included (Whitelist/Blacklist).
func (*Post) RemoveCategory ¶
RemoveCategory clears the Category relationship by setting the FK to NULL.
func (*Post) RemoveTags ¶
RemoveTags removes from the Tags relationship by deleting join table rows.
func (*Post) SetCategory ¶
SetCategory sets the Category relationship by updating the FK column.
func (*Post) SetTags ¶
SetTags replaces the Tags relationship entirely. Deletes all existing join rows, then inserts new ones.
type PostAuthorIDFilter ¶
type PostAuthorIDFilter struct {
// contains filtered or unexported fields
}
PostAuthorIDFilter provides where clauses for the author_id column.
type PostBodyFilter ¶
type PostBodyFilter struct {
// contains filtered or unexported fields
}
PostBodyFilter provides where clauses for the body column.
type PostCategoryIDFilter ¶
type PostCategoryIDFilter struct {
// contains filtered or unexported fields
}
PostCategoryIDFilter provides where clauses for the category_id column.
func (PostCategoryIDFilter) IsNotNull ¶
func (f PostCategoryIDFilter) IsNotNull() sqlgen.QueryMod
func (PostCategoryIDFilter) IsNull ¶
func (f PostCategoryIDFilter) IsNull() sqlgen.QueryMod
type PostCreatedAtFilter ¶
type PostCreatedAtFilter struct {
// contains filtered or unexported fields
}
PostCreatedAtFilter provides where clauses for the created_at column.
type PostIDFilter ¶
type PostIDFilter struct {
// contains filtered or unexported fields
}
PostIDFilter provides where clauses for the id column.
type PostPublishedAtFilter ¶
type PostPublishedAtFilter struct {
// contains filtered or unexported fields
}
PostPublishedAtFilter provides where clauses for the published_at column.
func (PostPublishedAtFilter) IsNotNull ¶
func (f PostPublishedAtFilter) IsNotNull() sqlgen.QueryMod
func (PostPublishedAtFilter) IsNull ¶
func (f PostPublishedAtFilter) IsNull() sqlgen.QueryMod
type PostRels ¶
type PostRels struct {
User *User
Category *Category
Tags []*Tag
TagsCount *int64
Comments []*Comment
CommentsCount *int64
}
PostRels holds eagerly loaded relationships.
type PostSlice ¶
type PostSlice []*Post
PostSlice is a slice of Post pointers.
func AllPosts ¶
func AllPosts(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (PostSlice, error)
AllPosts retrieves all rows from the posts table with the given query mods. Supports Preload() for LEFT JOIN eager loading of to-one relationships.
func (PostSlice) InsertAll ¶
InsertAll batch-inserts all models in the slice. Each model's columns are scanned back via RETURNING, picking up defaults and generated values. Hooks are not fired (consistent with UpdateAll/DeleteAll).
func (PostSlice) LoadCountRelations ¶
func (s PostSlice) LoadCountRelations(ctx context.Context, exec sqlgen.Executor, names ...string) error
LoadCountRelations loads counts for the specified relationships. Pass relationship names (e.g., "Posts", "Tags") to load their counts.
func (PostSlice) LoadRelations ¶
func (s PostSlice) LoadRelations(ctx context.Context, exec sqlgen.Executor, loads ...*sqlgen.EagerLoadRequest) error
LoadRelations eagerly loads the specified relationships for a slice of Post.
type PostStatus ¶
type PostStatus string
PostStatus is the 'post_status' enum type.
const ( PostStatusDraft PostStatus = "draft" PostStatusPublished PostStatus = "published" PostStatusArchived PostStatus = "archived" )
func AllPostStatusValues ¶
func AllPostStatusValues() []PostStatus
AllPostStatusValues returns all valid values for this enum.
func (PostStatus) IsValid ¶
func (e PostStatus) IsValid() bool
IsValid checks if the value is a valid enum value.
func (PostStatus) String ¶
func (e PostStatus) String() string
String returns the string representation.
type PostStatusFilter ¶
type PostStatusFilter struct {
// contains filtered or unexported fields
}
PostStatusFilter provides where clauses for the status column.
func (PostStatusFilter) EQ ¶
func (f PostStatusFilter) EQ(val PostStatus) sqlgen.QueryMod
func (PostStatusFilter) GT ¶
func (f PostStatusFilter) GT(val PostStatus) sqlgen.QueryMod
func (PostStatusFilter) GTE ¶
func (f PostStatusFilter) GTE(val PostStatus) sqlgen.QueryMod
func (PostStatusFilter) IN ¶
func (f PostStatusFilter) IN(vals ...PostStatus) sqlgen.QueryMod
func (PostStatusFilter) LT ¶
func (f PostStatusFilter) LT(val PostStatus) sqlgen.QueryMod
func (PostStatusFilter) LTE ¶
func (f PostStatusFilter) LTE(val PostStatus) sqlgen.QueryMod
func (PostStatusFilter) NEQ ¶
func (f PostStatusFilter) NEQ(val PostStatus) sqlgen.QueryMod
type PostTag ¶
type PostTag struct {
PostID string `db:"post_id" json:"post_id"`
TagID int32 `db:"tag_id" json:"tag_id"`
R *PostTagRels `db:"-" json:"-"`
}
PostTag represents a row from the 'post_tags' table.
func FindPostTagByPK ¶
func FindPostTagByPK(ctx context.Context, exec sqlgen.Executor, postID string, tagID int32) (*PostTag, error)
FindPostTagByPK finds a PostTag by primary key.
func InsertPostTag ¶
InsertPostTag creates a PostTag with random values, applies mods, and inserts it.
func NewPostTag ¶
func NewPostTag(mods ...PostTagMod) *PostTag
NewPostTag creates a PostTag with random values for all non-auto-increment fields. Pass modifier functions to override specific fields.
func (*PostTag) Insert ¶
Insert inserts the PostTag into the database. Optional Columns parameter controls which columns are included (Whitelist/Blacklist).
type PostTagHook ¶
type PostTagHook func(ctx context.Context, exec sqlgen.Executor, model *PostTag) (context.Context, error)
PostTagHook is a typed hook function for PostTag lifecycle events.
type PostTagMod ¶
type PostTagMod func(*PostTag)
PostTagMod is a function that customizes a PostTag before use.
type PostTagPostIDFilter ¶
type PostTagPostIDFilter struct {
// contains filtered or unexported fields
}
PostTagPostIDFilter provides where clauses for the post_id column.
type PostTagSlice ¶
type PostTagSlice []*PostTag
PostTagSlice is a slice of PostTag pointers.
func AllPostTags ¶
func AllPostTags(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (PostTagSlice, error)
AllPostTags retrieves all rows from the post_tags table with the given query mods. Supports Preload() for LEFT JOIN eager loading of to-one relationships.
type PostTagTagIDFilter ¶
type PostTagTagIDFilter struct {
// contains filtered or unexported fields
}
PostTagTagIDFilter provides where clauses for the tag_id column.
type PostTitleFilter ¶
type PostTitleFilter struct {
// contains filtered or unexported fields
}
PostTitleFilter provides where clauses for the title column.
type Profile ¶
type Profile struct {
ID string `db:"id" json:"id"`
UserID string `db:"user_id" json:"user_id"`
AvatarURL sqlgen.Null[string] `db:"avatar_url" json:"avatar_url"`
Website sqlgen.Null[string] `db:"website" json:"website"`
R *ProfileRels `db:"-" json:"-"`
}
Profile represents a row from the 'profiles' table.
func FindProfileByPK ¶
FindProfileByPK finds a Profile by primary key.
func InsertProfile ¶
InsertProfile creates a Profile with random values, applies mods, and inserts it.
func NewProfile ¶
func NewProfile(mods ...ProfileMod) *Profile
NewProfile creates a Profile with random values for all non-auto-increment fields. Pass modifier functions to override specific fields.
func (*Profile) Insert ¶
Insert inserts the Profile into the database. Optional Columns parameter controls which columns are included (Whitelist/Blacklist).
type ProfileAvatarURLFilter ¶
type ProfileAvatarURLFilter struct {
// contains filtered or unexported fields
}
ProfileAvatarURLFilter provides where clauses for the avatar_url column.
func (ProfileAvatarURLFilter) IsNotNull ¶
func (f ProfileAvatarURLFilter) IsNotNull() sqlgen.QueryMod
func (ProfileAvatarURLFilter) IsNull ¶
func (f ProfileAvatarURLFilter) IsNull() sqlgen.QueryMod
type ProfileHook ¶
type ProfileHook func(ctx context.Context, exec sqlgen.Executor, model *Profile) (context.Context, error)
ProfileHook is a typed hook function for Profile lifecycle events.
type ProfileIDFilter ¶
type ProfileIDFilter struct {
// contains filtered or unexported fields
}
ProfileIDFilter provides where clauses for the id column.
type ProfileMod ¶
type ProfileMod func(*Profile)
ProfileMod is a function that customizes a Profile before use.
type ProfileRels ¶
type ProfileRels struct {
User *User
}
ProfileRels holds eagerly loaded relationships.
type ProfileSlice ¶
type ProfileSlice []*Profile
ProfileSlice is a slice of Profile pointers.
func AllProfiles ¶
func AllProfiles(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (ProfileSlice, error)
AllProfiles retrieves all rows from the profiles table with the given query mods. Supports Preload() for LEFT JOIN eager loading of to-one relationships.
func (ProfileSlice) InsertAll ¶
InsertAll batch-inserts all models in the slice. Each model's columns are scanned back via RETURNING, picking up defaults and generated values. Hooks are not fired (consistent with UpdateAll/DeleteAll).
func (ProfileSlice) LoadRelations ¶
func (s ProfileSlice) LoadRelations(ctx context.Context, exec sqlgen.Executor, loads ...*sqlgen.EagerLoadRequest) error
LoadRelations eagerly loads the specified relationships for a slice of Profile.
type ProfileUserIDFilter ¶
type ProfileUserIDFilter struct {
// contains filtered or unexported fields
}
ProfileUserIDFilter provides where clauses for the user_id column.
type ProfileWebsiteFilter ¶
type ProfileWebsiteFilter struct {
// contains filtered or unexported fields
}
ProfileWebsiteFilter provides where clauses for the website column.
func (ProfileWebsiteFilter) IsNotNull ¶
func (f ProfileWebsiteFilter) IsNotNull() sqlgen.QueryMod
func (ProfileWebsiteFilter) IsNull ¶
func (f ProfileWebsiteFilter) IsNull() sqlgen.QueryMod
type Tag ¶
type Tag struct {
ID int32 `db:"id" json:"id"`
Name string `db:"name" json:"name"`
R *TagRels `db:"-" json:"-"`
}
Tag represents a row from the 'tags' table.
func FindTagByPK ¶
FindTagByPK finds a Tag by primary key.
func NewTag ¶
NewTag creates a Tag with random values for all non-auto-increment fields. Pass modifier functions to override specific fields.
func (*Tag) Insert ¶
Insert inserts the Tag into the database. Optional Columns parameter controls which columns are included (Whitelist/Blacklist).
func (*Tag) RemovePosts ¶
RemovePosts removes from the Posts relationship by deleting join table rows.
func (*Tag) SetPosts ¶
SetPosts replaces the Posts relationship entirely. Deletes all existing join rows, then inserts new ones.
type TagIDFilter ¶
type TagIDFilter struct {
// contains filtered or unexported fields
}
TagIDFilter provides where clauses for the id column.
type TagNameFilter ¶
type TagNameFilter struct {
// contains filtered or unexported fields
}
TagNameFilter provides where clauses for the name column.
type TagSlice ¶
type TagSlice []*Tag
TagSlice is a slice of Tag pointers.
func AllTags ¶
AllTags retrieves all rows from the tags table with the given query mods. Supports Preload() for LEFT JOIN eager loading of to-one relationships.
func (TagSlice) InsertAll ¶
InsertAll batch-inserts all models in the slice. Each model's columns are scanned back via RETURNING, picking up defaults and generated values. Hooks are not fired (consistent with UpdateAll/DeleteAll).
func (TagSlice) LoadCountRelations ¶
func (s TagSlice) LoadCountRelations(ctx context.Context, exec sqlgen.Executor, names ...string) error
LoadCountRelations loads counts for the specified relationships. Pass relationship names (e.g., "Posts", "Tags") to load their counts.
func (TagSlice) LoadRelations ¶
func (s TagSlice) LoadRelations(ctx context.Context, exec sqlgen.Executor, loads ...*sqlgen.EagerLoadRequest) error
LoadRelations eagerly loads the specified relationships for a slice of Tag.
type User ¶
type User struct {
ID string `db:"id" json:"id"`
Email string `db:"email" json:"email"`
Name string `db:"name" json:"name"`
Bio sqlgen.Null[string] `db:"bio" json:"bio"`
Age sqlgen.Null[int32] `db:"age" json:"age"`
Score sqlgen.Null[string] `db:"score" json:"score"`
IsAdmin bool `db:"is_admin" json:"is_admin"`
Metadata sqlgen.Null[json.RawMessage] `db:"metadata" json:"metadata"`
CreatedAt time.Time `db:"created_at" json:"created_at"`
R *UserRels `db:"-" json:"-"`
}
User represents a row from the 'users' table.
func FindUserByPK ¶
FindUserByPK finds a User by primary key.
func InsertUser ¶
InsertUser creates a User with random values, applies mods, and inserts it.
func NewUser ¶
NewUser creates a User with random values for all non-auto-increment fields. Pass modifier functions to override specific fields.
func (*User) AddComments ¶
AddComments adds models to the Comments relationship by setting their FK.
func (*User) Insert ¶
Insert inserts the User into the database. Optional Columns parameter controls which columns are included (Whitelist/Blacklist).
func (*User) SetProfile ¶
SetProfile sets the Profile relationship by updating the related model's FK.
type UserAgeFilter ¶
type UserAgeFilter struct {
// contains filtered or unexported fields
}
UserAgeFilter provides where clauses for the age column.
func (UserAgeFilter) IsNotNull ¶
func (f UserAgeFilter) IsNotNull() sqlgen.QueryMod
func (UserAgeFilter) IsNull ¶
func (f UserAgeFilter) IsNull() sqlgen.QueryMod
type UserBioFilter ¶
type UserBioFilter struct {
// contains filtered or unexported fields
}
UserBioFilter provides where clauses for the bio column.
func (UserBioFilter) IsNotNull ¶
func (f UserBioFilter) IsNotNull() sqlgen.QueryMod
func (UserBioFilter) IsNull ¶
func (f UserBioFilter) IsNull() sqlgen.QueryMod
type UserCreatedAtFilter ¶
type UserCreatedAtFilter struct {
// contains filtered or unexported fields
}
UserCreatedAtFilter provides where clauses for the created_at column.
type UserEmailFilter ¶
type UserEmailFilter struct {
// contains filtered or unexported fields
}
UserEmailFilter provides where clauses for the email column.
type UserIDFilter ¶
type UserIDFilter struct {
// contains filtered or unexported fields
}
UserIDFilter provides where clauses for the id column.
type UserIsAdminFilter ¶
type UserIsAdminFilter struct {
// contains filtered or unexported fields
}
UserIsAdminFilter provides where clauses for the is_admin column.
type UserMetadataFilter ¶
type UserMetadataFilter struct {
// contains filtered or unexported fields
}
UserMetadataFilter provides where clauses for the metadata column.
func (UserMetadataFilter) EQ ¶
func (f UserMetadataFilter) EQ(val sqlgen.Null[json.RawMessage]) sqlgen.QueryMod
func (UserMetadataFilter) GT ¶
func (f UserMetadataFilter) GT(val sqlgen.Null[json.RawMessage]) sqlgen.QueryMod
func (UserMetadataFilter) GTE ¶
func (f UserMetadataFilter) GTE(val sqlgen.Null[json.RawMessage]) sqlgen.QueryMod
func (UserMetadataFilter) IN ¶
func (f UserMetadataFilter) IN(vals ...sqlgen.Null[json.RawMessage]) sqlgen.QueryMod
func (UserMetadataFilter) IsNotNull ¶
func (f UserMetadataFilter) IsNotNull() sqlgen.QueryMod
func (UserMetadataFilter) IsNull ¶
func (f UserMetadataFilter) IsNull() sqlgen.QueryMod
func (UserMetadataFilter) LT ¶
func (f UserMetadataFilter) LT(val sqlgen.Null[json.RawMessage]) sqlgen.QueryMod
func (UserMetadataFilter) LTE ¶
func (f UserMetadataFilter) LTE(val sqlgen.Null[json.RawMessage]) sqlgen.QueryMod
func (UserMetadataFilter) NEQ ¶
func (f UserMetadataFilter) NEQ(val sqlgen.Null[json.RawMessage]) sqlgen.QueryMod
type UserNameFilter ¶
type UserNameFilter struct {
// contains filtered or unexported fields
}
UserNameFilter provides where clauses for the name column.
type UserRels ¶
type UserRels struct {
Profile *Profile
Posts []*Post
PostsCount *int64
Comments []*Comment
CommentsCount *int64
}
UserRels holds eagerly loaded relationships.
type UserScoreFilter ¶
type UserScoreFilter struct {
// contains filtered or unexported fields
}
UserScoreFilter provides where clauses for the score column.
func (UserScoreFilter) IsNotNull ¶
func (f UserScoreFilter) IsNotNull() sqlgen.QueryMod
func (UserScoreFilter) IsNull ¶
func (f UserScoreFilter) IsNull() sqlgen.QueryMod
type UserSlice ¶
type UserSlice []*User
UserSlice is a slice of User pointers.
func AllUsers ¶
func AllUsers(ctx context.Context, exec sqlgen.Executor, mods ...sqlgen.QueryMod) (UserSlice, error)
AllUsers retrieves all rows from the users table with the given query mods. Supports Preload() for LEFT JOIN eager loading of to-one relationships.
func (UserSlice) InsertAll ¶
InsertAll batch-inserts all models in the slice. Each model's columns are scanned back via RETURNING, picking up defaults and generated values. Hooks are not fired (consistent with UpdateAll/DeleteAll).
func (UserSlice) LoadCountRelations ¶
func (s UserSlice) LoadCountRelations(ctx context.Context, exec sqlgen.Executor, names ...string) error
LoadCountRelations loads counts for the specified relationships. Pass relationship names (e.g., "Posts", "Tags") to load their counts.
func (UserSlice) LoadRelations ¶
func (s UserSlice) LoadRelations(ctx context.Context, exec sqlgen.Executor, loads ...*sqlgen.EagerLoadRequest) error
LoadRelations eagerly loads the specified relationships for a slice of User.
Source Files
¶
- sqlgen_categories_count_loaders.go
- sqlgen_categories_crud.go
- sqlgen_categories_factory.go
- sqlgen_categories_hooks.go
- sqlgen_categories_loaders.go
- sqlgen_categories_model.go
- sqlgen_categories_preload.go
- sqlgen_categories_relations.go
- sqlgen_categories_where.go
- sqlgen_comments_crud.go
- sqlgen_comments_factory.go
- sqlgen_comments_hooks.go
- sqlgen_comments_loaders.go
- sqlgen_comments_model.go
- sqlgen_comments_preload.go
- sqlgen_comments_relations.go
- sqlgen_comments_where.go
- sqlgen_dialect.go
- sqlgen_enum_comment_kind.go
- sqlgen_enum_post_status.go
- sqlgen_post_tags_crud.go
- sqlgen_post_tags_factory.go
- sqlgen_post_tags_hooks.go
- sqlgen_post_tags_model.go
- sqlgen_post_tags_where.go
- sqlgen_posts_count_loaders.go
- sqlgen_posts_crud.go
- sqlgen_posts_factory.go
- sqlgen_posts_hooks.go
- sqlgen_posts_loaders.go
- sqlgen_posts_model.go
- sqlgen_posts_preload.go
- sqlgen_posts_relations.go
- sqlgen_posts_where.go
- sqlgen_profiles_crud.go
- sqlgen_profiles_factory.go
- sqlgen_profiles_hooks.go
- sqlgen_profiles_loaders.go
- sqlgen_profiles_model.go
- sqlgen_profiles_preload.go
- sqlgen_profiles_relations.go
- sqlgen_profiles_where.go
- sqlgen_tags_count_loaders.go
- sqlgen_tags_crud.go
- sqlgen_tags_factory.go
- sqlgen_tags_hooks.go
- sqlgen_tags_loaders.go
- sqlgen_tags_model.go
- sqlgen_tags_relations.go
- sqlgen_tags_where.go
- sqlgen_users_count_loaders.go
- sqlgen_users_crud.go
- sqlgen_users_factory.go
- sqlgen_users_hooks.go
- sqlgen_users_loaders.go
- sqlgen_users_model.go
- sqlgen_users_preload.go
- sqlgen_users_relations.go
- sqlgen_users_where.go