Documentation ¶
Index ¶
- Variables
- func AddCommentHook(hookPoint boil.HookPoint, commentHook CommentHook)
- func AddCommentLikeHook(hookPoint boil.HookPoint, commentLikeHook CommentLikeHook)
- func AddFriendshipHook(hookPoint boil.HookPoint, friendshipHook FriendshipHook)
- func AddImageHook(hookPoint boil.HookPoint, imageHook ImageHook)
- func AddImageVariationHook(hookPoint boil.HookPoint, imageVariationHook ImageVariationHook)
- func AddLikeHook(hookPoint boil.HookPoint, likeHook LikeHook)
- func AddPostHook(hookPoint boil.HookPoint, postHook PostHook)
- func AddUserHook(hookPoint boil.HookPoint, userHook UserHook)
- func CommentExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func CommentLikeExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func CommentLikes(mods ...qm.QueryMod) commentLikeQuery
- func Comments(mods ...qm.QueryMod) commentQuery
- func FriendshipExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Friendships(mods ...qm.QueryMod) friendshipQuery
- func ImageExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func ImageVariationExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func ImageVariations(mods ...qm.QueryMod) imageVariationQuery
- func Images(mods ...qm.QueryMod) imageQuery
- func LikeExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Likes(mods ...qm.QueryMod) likeQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func PostExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Posts(mods ...qm.QueryMod) postQuery
- func UserExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Users(mods ...qm.QueryMod) userQuery
- type Comment
- func (o *Comment) AddCommentLikes(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Comment) CommentLikes(mods ...qm.QueryMod) commentLikeQuery
- func (o *Comment) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Comment) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Comment) Post(mods ...qm.QueryMod) postQuery
- func (o *Comment) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Comment) RemovePost(ctx context.Context, exec boil.ContextExecutor, related *Post) error
- func (o *Comment) SetPost(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Post) error
- func (o *Comment) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *Comment) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Comment) Upsert(ctx context.Context, exec boil.ContextExecutor, ...) error
- func (o *Comment) User(mods ...qm.QueryMod) userQuery
- type CommentHook
- type CommentLike
- func (o *CommentLike) Comment(mods ...qm.QueryMod) commentQuery
- func (o *CommentLike) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *CommentLike) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *CommentLike) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *CommentLike) SetComment(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Comment) error
- func (o *CommentLike) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *CommentLike) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *CommentLike) Upsert(ctx context.Context, exec boil.ContextExecutor, ...) error
- func (o *CommentLike) User(mods ...qm.QueryMod) userQuery
- type CommentLikeHook
- type CommentLikeSlice
- type CommentSlice
- type Friendship
- func (o *Friendship) AddUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
- func (o *Friendship) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Friendship) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Friendship) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Friendship) RemoveUsers(ctx context.Context, exec boil.ContextExecutor, related ...*User) error
- func (o *Friendship) SetUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
- func (o *Friendship) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Friendship) Upsert(ctx context.Context, exec boil.ContextExecutor, ...) error
- func (o *Friendship) Users(mods ...qm.QueryMod) userQuery
- type FriendshipHook
- type FriendshipSlice
- type Image
- func (o *Image) AddImageVariations(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Image) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Image) ImageVariations(mods ...qm.QueryMod) imageVariationQuery
- func (o *Image) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Image) Post(mods ...qm.QueryMod) postQuery
- func (o *Image) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Image) SetPost(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Post) error
- func (o *Image) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Image) Upsert(ctx context.Context, exec boil.ContextExecutor, ...) error
- type ImageHook
- type ImageSlice
- type ImageVariation
- func (o *ImageVariation) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *ImageVariation) Image(mods ...qm.QueryMod) imageQuery
- func (o *ImageVariation) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *ImageVariation) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *ImageVariation) SetImage(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Image) error
- func (o *ImageVariation) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *ImageVariation) Upsert(ctx context.Context, exec boil.ContextExecutor, ...) error
- type ImageVariationHook
- type ImageVariationSlice
- func (o ImageVariationSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *ImageVariationSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
- func (o ImageVariationSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
- type Like
- func (o *Like) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Like) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Like) Post(mods ...qm.QueryMod) postQuery
- func (o *Like) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Like) SetPost(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Post) error
- func (o *Like) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *Like) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Like) Upsert(ctx context.Context, exec boil.ContextExecutor, ...) error
- func (o *Like) User(mods ...qm.QueryMod) userQuery
- type LikeHook
- type LikeSlice
- type M
- type Post
- func (o *Post) AddComments(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Post) AddImages(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Image) error
- func (o *Post) AddLikes(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Like) error
- func (o *Post) Comments(mods ...qm.QueryMod) commentQuery
- func (o *Post) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Post) Images(mods ...qm.QueryMod) imageQuery
- func (o *Post) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Post) Likes(mods ...qm.QueryMod) likeQuery
- func (o *Post) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Post) RemoveComments(ctx context.Context, exec boil.ContextExecutor, related ...*Comment) error
- func (o *Post) SetComments(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Post) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *Post) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Post) Upsert(ctx context.Context, exec boil.ContextExecutor, ...) error
- func (o *Post) User(mods ...qm.QueryMod) userQuery
- type PostHook
- type PostSlice
- type User
- func (o *User) AddCommentLikes(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) AddComments(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) AddFriendships(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) AddLikes(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Like) error
- func (o *User) AddPosts(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Post) error
- func (o *User) CommentLikes(mods ...qm.QueryMod) commentLikeQuery
- func (o *User) Comments(mods ...qm.QueryMod) commentQuery
- func (o *User) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *User) Friendships(mods ...qm.QueryMod) friendshipQuery
- func (o *User) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *User) Likes(mods ...qm.QueryMod) likeQuery
- func (o *User) Posts(mods ...qm.QueryMod) postQuery
- func (o *User) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *User) RemoveFriendships(ctx context.Context, exec boil.ContextExecutor, related ...*Friendship) error
- func (o *User) SetFriendships(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *User) Upsert(ctx context.Context, exec boil.ContextExecutor, ...) error
- type UserHook
- type UserSlice
Constants ¶
This section is empty.
Variables ¶
var CommentColumns = struct { ID string Content string PostID string UserID string }{ ID: "id", Content: "content", PostID: "post_id", UserID: "user_id", }
var CommentLikeColumns = struct { ID string CommentID string UserID string CreatedAt string LikeType string }{ ID: "id", CommentID: "comment_id", UserID: "user_id", CreatedAt: "created_at", LikeType: "like_type", }
var CommentLikeRels = struct { Comment string User string }{ Comment: "Comment", User: "User", }
CommentLikeRels is where relationship names are stored.
var CommentLikeWhere = struct { ID whereHelperstring CommentID whereHelperstring UserID whereHelperstring CreatedAt whereHelpernull_Time LikeType whereHelperstring }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, CommentID: whereHelperstring{/* contains filtered or unexported fields */}, UserID: whereHelperstring{/* contains filtered or unexported fields */}, CreatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, LikeType: whereHelperstring{/* contains filtered or unexported fields */}, }
var CommentRels = struct { Post string User string CommentLikes string }{ Post: "Post", User: "User", CommentLikes: "CommentLikes", }
CommentRels is where relationship names are stored.
var CommentWhere = struct { ID whereHelperstring Content whereHelperstring PostID whereHelpernull_String UserID whereHelperstring }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, Content: whereHelperstring{/* contains filtered or unexported fields */}, PostID: whereHelpernull_String{/* contains filtered or unexported fields */}, UserID: whereHelperstring{/* contains filtered or unexported fields */}, }
var ErrSyncFail = errors.New("models: failed to synchronize data after insert")
ErrSyncFail occurs during insert when the record could not be retrieved in order to populate default value information. This usually happens when LastInsertId fails or there was a primary key configuration that was not resolvable.
var FriendshipColumns = struct { ID string CreatedAt string }{ ID: "id", CreatedAt: "created_at", }
var FriendshipRels = struct { Users string }{ Users: "Users", }
FriendshipRels is where relationship names are stored.
var FriendshipWhere = struct { ID whereHelperstring CreatedAt whereHelpernull_Time }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, CreatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, }
var ImageColumns = struct { ID string PostID string Views string OriginalURL string }{ ID: "id", PostID: "post_id", Views: "views", OriginalURL: "original_url", }
var ImageRels = struct { Post string ImageVariations string }{ Post: "Post", ImageVariations: "ImageVariations", }
ImageRels is where relationship names are stored.
var ImageVariationColumns = struct { ID string ImageID string }{ ID: "id", ImageID: "image_id", }
var ImageVariationRels = struct { Image string }{ Image: "Image", }
ImageVariationRels is where relationship names are stored.
var ImageVariationWhere = struct { ID whereHelperstring ImageID whereHelperstring }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, ImageID: whereHelperstring{/* contains filtered or unexported fields */}, }
var ImageWhere = struct { ID whereHelperstring PostID whereHelperstring Views whereHelpernull_Int OriginalURL whereHelpernull_String }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, PostID: whereHelperstring{/* contains filtered or unexported fields */}, Views: whereHelpernull_Int{/* contains filtered or unexported fields */}, OriginalURL: whereHelpernull_String{/* contains filtered or unexported fields */}, }
var LikeColumns = struct { ID string PostID string UserID string CreatedAt string LikeType string }{ ID: "id", PostID: "post_id", UserID: "user_id", CreatedAt: "created_at", LikeType: "like_type", }
var LikeRels = struct { Post string User string }{ Post: "Post", User: "User", }
LikeRels is where relationship names are stored.
var LikeWhere = struct { ID whereHelperstring PostID whereHelperstring UserID whereHelperstring CreatedAt whereHelpernull_Time LikeType whereHelperstring }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, PostID: whereHelperstring{/* contains filtered or unexported fields */}, UserID: whereHelperstring{/* contains filtered or unexported fields */}, CreatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, LikeType: whereHelperstring{/* contains filtered or unexported fields */}, }
var PostColumns = struct { ID string Content string UserID string }{ ID: "id", Content: "content", UserID: "user_id", }
var PostRels = struct { User string Comments string Images string Likes string }{ User: "User", Comments: "Comments", Images: "Images", Likes: "Likes", }
PostRels is where relationship names are stored.
var PostWhere = struct { ID whereHelperstring Content whereHelperstring UserID whereHelperstring }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, Content: whereHelperstring{/* contains filtered or unexported fields */}, UserID: whereHelperstring{/* contains filtered or unexported fields */}, }
var TableNames = struct { Comment string CommentLike string Friendship string Image string ImageVariation string Like string Post string User string UserHasFriendship string }{ Comment: "comment", CommentLike: "comment_like", Friendship: "friendship", Image: "image", ImageVariation: "image_variation", Like: "like", Post: "post", User: "user", UserHasFriendship: "user_has_friendship", }
var UserColumns = struct { ID string FirstName string LastName string Email string Password string }{ ID: "id", FirstName: "first_name", LastName: "last_name", Email: "email", Password: "password", }
var UserRels = struct { Comments string CommentLikes string Likes string Posts string Friendships string }{ Comments: "Comments", CommentLikes: "CommentLikes", Likes: "Likes", Posts: "Posts", Friendships: "Friendships", }
UserRels is where relationship names are stored.
var UserWhere = struct { ID whereHelperstring FirstName whereHelperstring LastName whereHelperstring Email whereHelperstring Password whereHelper__byte }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, FirstName: whereHelperstring{/* contains filtered or unexported fields */}, LastName: whereHelperstring{/* contains filtered or unexported fields */}, Email: whereHelperstring{/* contains filtered or unexported fields */}, Password: whereHelper__byte{/* contains filtered or unexported fields */}, }
Functions ¶
func AddCommentHook ¶
func AddCommentHook(hookPoint boil.HookPoint, commentHook CommentHook)
AddCommentHook registers your hook function for all future operations.
func AddCommentLikeHook ¶
func AddCommentLikeHook(hookPoint boil.HookPoint, commentLikeHook CommentLikeHook)
AddCommentLikeHook registers your hook function for all future operations.
func AddFriendshipHook ¶
func AddFriendshipHook(hookPoint boil.HookPoint, friendshipHook FriendshipHook)
AddFriendshipHook registers your hook function for all future operations.
func AddImageHook ¶
AddImageHook registers your hook function for all future operations.
func AddImageVariationHook ¶
func AddImageVariationHook(hookPoint boil.HookPoint, imageVariationHook ImageVariationHook)
AddImageVariationHook registers your hook function for all future operations.
func AddLikeHook ¶
AddLikeHook registers your hook function for all future operations.
func AddPostHook ¶
AddPostHook registers your hook function for all future operations.
func AddUserHook ¶
AddUserHook registers your hook function for all future operations.
func CommentExists ¶
CommentExists checks if the Comment row exists.
func CommentLikeExists ¶
CommentLikeExists checks if the CommentLike row exists.
func CommentLikes ¶
CommentLikes retrieves all the records using an executor.
func FriendshipExists ¶
FriendshipExists checks if the Friendship row exists.
func Friendships ¶
Friendships retrieves all the records using an executor.
func ImageExists ¶
ImageExists checks if the Image row exists.
func ImageVariationExists ¶
ImageVariationExists checks if the ImageVariation row exists.
func ImageVariations ¶
ImageVariations retrieves all the records using an executor.
func LikeExists ¶
LikeExists checks if the Like row exists.
func PostExists ¶
PostExists checks if the Post row exists.
func UserExists ¶
UserExists checks if the User row exists.
Types ¶
type Comment ¶
type Comment struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` Content string `boil:"content" json:"content" toml:"content" yaml:"content"` PostID null.String `boil:"post_id" json:"post_id,omitempty" toml:"post_id" yaml:"post_id,omitempty"` UserID string `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"` R *commentR `boil:"-" json:"-" toml:"-" yaml:"-"` L commentL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Comment is an object representing the database table.
func FindComment ¶
func FindComment(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Comment, error)
FindComment retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Comment) AddCommentLikes ¶
func (o *Comment) AddCommentLikes(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*CommentLike) error
AddCommentLikes adds the given related objects to the existing relationships of the comment, optionally inserting them as new records. Appends related to o.R.CommentLikes. Sets related.R.Comment appropriately.
func (*Comment) CommentLikes ¶
CommentLikes retrieves all the comment_like's CommentLikes with an executor.
func (*Comment) Delete ¶
Delete deletes a single Comment record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Comment) Insert ¶
func (o *Comment) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Comment) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Comment) RemovePost ¶
RemovePost relationship. Sets o.R.Post to nil. Removes o from all passed in related items' relationships struct (Optional).
func (*Comment) SetPost ¶
func (o *Comment) SetPost(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Post) error
SetPost of the comment to the related item. Sets o.R.Post to related. Adds o to related.R.Comments.
func (*Comment) SetUser ¶
func (o *Comment) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetUser of the comment to the related item. Sets o.R.User to related. Adds o to related.R.Comments.
func (*Comment) Update ¶
func (o *Comment) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Comment. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*Comment) Upsert ¶
func (o *Comment) Upsert(ctx context.Context, exec boil.ContextExecutor, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type CommentHook ¶
CommentHook is the signature for custom Comment hook methods
type CommentLike ¶
type CommentLike struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` CommentID string `boil:"comment_id" json:"comment_id" toml:"comment_id" yaml:"comment_id"` UserID string `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"` CreatedAt null.Time `boil:"created_at" json:"created_at,omitempty" toml:"created_at" yaml:"created_at,omitempty"` LikeType string `boil:"like_type" json:"like_type" toml:"like_type" yaml:"like_type"` R *commentLikeR `boil:"-" json:"-" toml:"-" yaml:"-"` L commentLikeL `boil:"-" json:"-" toml:"-" yaml:"-"` }
CommentLike is an object representing the database table.
func FindCommentLike ¶
func FindCommentLike(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*CommentLike, error)
FindCommentLike retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*CommentLike) Comment ¶
func (o *CommentLike) Comment(mods ...qm.QueryMod) commentQuery
Comment pointed to by the foreign key.
func (*CommentLike) Delete ¶
func (o *CommentLike) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single CommentLike record with an executor. Delete will match against the primary key column to find the record to delete.
func (*CommentLike) Insert ¶
func (o *CommentLike) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*CommentLike) Reload ¶
func (o *CommentLike) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*CommentLike) SetComment ¶
func (o *CommentLike) SetComment(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Comment) error
SetComment of the commentLike to the related item. Sets o.R.Comment to related. Adds o to related.R.CommentLikes.
func (*CommentLike) SetUser ¶
func (o *CommentLike) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetUser of the commentLike to the related item. Sets o.R.User to related. Adds o to related.R.CommentLikes.
func (*CommentLike) Update ¶
func (o *CommentLike) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the CommentLike. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*CommentLike) Upsert ¶
func (o *CommentLike) Upsert(ctx context.Context, exec boil.ContextExecutor, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
func (*CommentLike) User ¶
func (o *CommentLike) User(mods ...qm.QueryMod) userQuery
User pointed to by the foreign key.
type CommentLikeHook ¶
type CommentLikeHook func(context.Context, boil.ContextExecutor, *CommentLike) error
CommentLikeHook is the signature for custom CommentLike hook methods
type CommentLikeSlice ¶
type CommentLikeSlice []*CommentLike
CommentLikeSlice is an alias for a slice of pointers to CommentLike. This should generally be used opposed to []CommentLike.
func (CommentLikeSlice) DeleteAll ¶
func (o CommentLikeSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*CommentLikeSlice) ReloadAll ¶
func (o *CommentLikeSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (CommentLikeSlice) UpdateAll ¶
func (o CommentLikeSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type CommentSlice ¶
type CommentSlice []*Comment
CommentSlice is an alias for a slice of pointers to Comment. This should generally be used opposed to []Comment.
func (CommentSlice) DeleteAll ¶
func (o CommentSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*CommentSlice) ReloadAll ¶
func (o *CommentSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (CommentSlice) UpdateAll ¶
func (o CommentSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type Friendship ¶
type Friendship struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` CreatedAt null.Time `boil:"created_at" json:"created_at,omitempty" toml:"created_at" yaml:"created_at,omitempty"` R *friendshipR `boil:"-" json:"-" toml:"-" yaml:"-"` L friendshipL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Friendship is an object representing the database table.
func FindFriendship ¶
func FindFriendship(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Friendship, error)
FindFriendship retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Friendship) AddUsers ¶
func (o *Friendship) AddUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
AddUsers adds the given related objects to the existing relationships of the friendship, optionally inserting them as new records. Appends related to o.R.Users. Sets related.R.Friendships appropriately.
func (*Friendship) Delete ¶
func (o *Friendship) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single Friendship record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Friendship) Insert ¶
func (o *Friendship) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Friendship) Reload ¶
func (o *Friendship) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*Friendship) RemoveUsers ¶
func (o *Friendship) RemoveUsers(ctx context.Context, exec boil.ContextExecutor, related ...*User) error
RemoveUsers relationships from objects passed in. Removes related items from R.Users (uses pointer comparison, removal does not keep order) Sets related.R.Friendships.
func (*Friendship) SetUsers ¶
func (o *Friendship) SetUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
SetUsers removes all previously related items of the friendship replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Friendships's Users accordingly. Replaces o.R.Users with related. Sets related.R.Friendships's Users accordingly.
func (*Friendship) Update ¶
func (o *Friendship) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Friendship. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*Friendship) Upsert ¶
func (o *Friendship) Upsert(ctx context.Context, exec boil.ContextExecutor, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
func (*Friendship) Users ¶
func (o *Friendship) Users(mods ...qm.QueryMod) userQuery
Users retrieves all the user's Users with an executor.
type FriendshipHook ¶
type FriendshipHook func(context.Context, boil.ContextExecutor, *Friendship) error
FriendshipHook is the signature for custom Friendship hook methods
type FriendshipSlice ¶
type FriendshipSlice []*Friendship
FriendshipSlice is an alias for a slice of pointers to Friendship. This should generally be used opposed to []Friendship.
func (FriendshipSlice) DeleteAll ¶
func (o FriendshipSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*FriendshipSlice) ReloadAll ¶
func (o *FriendshipSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (FriendshipSlice) UpdateAll ¶
func (o FriendshipSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type Image ¶
type Image struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` PostID string `boil:"post_id" json:"post_id" toml:"post_id" yaml:"post_id"` Views null.Int `boil:"views" json:"views,omitempty" toml:"views" yaml:"views,omitempty"` OriginalURL null.String `boil:"original_url" json:"original_url,omitempty" toml:"original_url" yaml:"original_url,omitempty"` R *imageR `boil:"-" json:"-" toml:"-" yaml:"-"` L imageL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Image is an object representing the database table.
func FindImage ¶
func FindImage(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Image, error)
FindImage retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Image) AddImageVariations ¶
func (o *Image) AddImageVariations(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*ImageVariation) error
AddImageVariations adds the given related objects to the existing relationships of the image, optionally inserting them as new records. Appends related to o.R.ImageVariations. Sets related.R.Image appropriately.
func (*Image) Delete ¶
Delete deletes a single Image record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Image) ImageVariations ¶
ImageVariations retrieves all the image_variation's ImageVariations with an executor.
func (*Image) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Image) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Image) SetPost ¶
func (o *Image) SetPost(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Post) error
SetPost of the image to the related item. Sets o.R.Post to related. Adds o to related.R.Images.
func (*Image) Update ¶
func (o *Image) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Image. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*Image) Upsert ¶
func (o *Image) Upsert(ctx context.Context, exec boil.ContextExecutor, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type ImageSlice ¶
type ImageSlice []*Image
ImageSlice is an alias for a slice of pointers to Image. This should generally be used opposed to []Image.
func (ImageSlice) DeleteAll ¶
func (o ImageSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*ImageSlice) ReloadAll ¶
func (o *ImageSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (ImageSlice) UpdateAll ¶
func (o ImageSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type ImageVariation ¶
type ImageVariation struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` ImageID string `boil:"image_id" json:"image_id" toml:"image_id" yaml:"image_id"` R *imageVariationR `boil:"-" json:"-" toml:"-" yaml:"-"` L imageVariationL `boil:"-" json:"-" toml:"-" yaml:"-"` }
ImageVariation is an object representing the database table.
func FindImageVariation ¶
func FindImageVariation(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*ImageVariation, error)
FindImageVariation retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*ImageVariation) Delete ¶
func (o *ImageVariation) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single ImageVariation record with an executor. Delete will match against the primary key column to find the record to delete.
func (*ImageVariation) Image ¶
func (o *ImageVariation) Image(mods ...qm.QueryMod) imageQuery
Image pointed to by the foreign key.
func (*ImageVariation) Insert ¶
func (o *ImageVariation) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*ImageVariation) Reload ¶
func (o *ImageVariation) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*ImageVariation) SetImage ¶
func (o *ImageVariation) SetImage(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Image) error
SetImage of the imageVariation to the related item. Sets o.R.Image to related. Adds o to related.R.ImageVariations.
func (*ImageVariation) Update ¶
func (o *ImageVariation) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the ImageVariation. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*ImageVariation) Upsert ¶
func (o *ImageVariation) Upsert(ctx context.Context, exec boil.ContextExecutor, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type ImageVariationHook ¶
type ImageVariationHook func(context.Context, boil.ContextExecutor, *ImageVariation) error
ImageVariationHook is the signature for custom ImageVariation hook methods
type ImageVariationSlice ¶
type ImageVariationSlice []*ImageVariation
ImageVariationSlice is an alias for a slice of pointers to ImageVariation. This should generally be used opposed to []ImageVariation.
func (ImageVariationSlice) DeleteAll ¶
func (o ImageVariationSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*ImageVariationSlice) ReloadAll ¶
func (o *ImageVariationSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (ImageVariationSlice) UpdateAll ¶
func (o ImageVariationSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type Like ¶
type Like struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` PostID string `boil:"post_id" json:"post_id" toml:"post_id" yaml:"post_id"` UserID string `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"` CreatedAt null.Time `boil:"created_at" json:"created_at,omitempty" toml:"created_at" yaml:"created_at,omitempty"` LikeType string `boil:"like_type" json:"like_type" toml:"like_type" yaml:"like_type"` R *likeR `boil:"-" json:"-" toml:"-" yaml:"-"` L likeL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Like is an object representing the database table.
func FindLike ¶
func FindLike(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Like, error)
FindLike retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Like) Delete ¶
Delete deletes a single Like record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Like) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Like) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Like) SetPost ¶
func (o *Like) SetPost(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Post) error
SetPost of the like to the related item. Sets o.R.Post to related. Adds o to related.R.Likes.
func (*Like) SetUser ¶
func (o *Like) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetUser of the like to the related item. Sets o.R.User to related. Adds o to related.R.Likes.
func (*Like) Update ¶
func (o *Like) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Like. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*Like) Upsert ¶
func (o *Like) Upsert(ctx context.Context, exec boil.ContextExecutor, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type LikeSlice ¶
type LikeSlice []*Like
LikeSlice is an alias for a slice of pointers to Like. This should generally be used opposed to []Like.
type M ¶
type M map[string]interface{}
M type is for providing columns and column values to UpdateAll.
type Post ¶
type Post struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` Content string `boil:"content" json:"content" toml:"content" yaml:"content"` UserID string `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"` R *postR `boil:"-" json:"-" toml:"-" yaml:"-"` L postL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Post is an object representing the database table.
func FindPost ¶
func FindPost(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Post, error)
FindPost retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Post) AddComments ¶
func (o *Post) AddComments(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Comment) error
AddComments adds the given related objects to the existing relationships of the post, optionally inserting them as new records. Appends related to o.R.Comments. Sets related.R.Post appropriately.
func (*Post) AddImages ¶
func (o *Post) AddImages(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Image) error
AddImages adds the given related objects to the existing relationships of the post, optionally inserting them as new records. Appends related to o.R.Images. Sets related.R.Post appropriately.
func (*Post) AddLikes ¶
func (o *Post) AddLikes(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Like) error
AddLikes adds the given related objects to the existing relationships of the post, optionally inserting them as new records. Appends related to o.R.Likes. Sets related.R.Post appropriately.
func (*Post) Delete ¶
Delete deletes a single Post record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Post) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Post) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Post) RemoveComments ¶
func (o *Post) RemoveComments(ctx context.Context, exec boil.ContextExecutor, related ...*Comment) error
RemoveComments relationships from objects passed in. Removes related items from R.Comments (uses pointer comparison, removal does not keep order) Sets related.R.Post.
func (*Post) SetComments ¶
func (o *Post) SetComments(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Comment) error
SetComments removes all previously related items of the post replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Post's Comments accordingly. Replaces o.R.Comments with related. Sets related.R.Post's Comments accordingly.
func (*Post) SetUser ¶
func (o *Post) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetUser of the post to the related item. Sets o.R.User to related. Adds o to related.R.Posts.
func (*Post) Update ¶
func (o *Post) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Post. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*Post) Upsert ¶
func (o *Post) Upsert(ctx context.Context, exec boil.ContextExecutor, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type PostSlice ¶
type PostSlice []*Post
PostSlice is an alias for a slice of pointers to Post. This should generally be used opposed to []Post.
type User ¶
type User struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` FirstName string `boil:"first_name" json:"first_name" toml:"first_name" yaml:"first_name"` LastName string `boil:"last_name" json:"last_name" toml:"last_name" yaml:"last_name"` Email string `boil:"email" json:"email" toml:"email" yaml:"email"` Password []byte `boil:"password" json:"password" toml:"password" yaml:"password"` R *userR `boil:"-" json:"-" toml:"-" yaml:"-"` L userL `boil:"-" json:"-" toml:"-" yaml:"-"` }
User is an object representing the database table.
func FindUser ¶
func FindUser(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*User, error)
FindUser retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*User) AddCommentLikes ¶
func (o *User) AddCommentLikes(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*CommentLike) error
AddCommentLikes adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.CommentLikes. Sets related.R.User appropriately.
func (*User) AddComments ¶
func (o *User) AddComments(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Comment) error
AddComments adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Comments. Sets related.R.User appropriately.
func (*User) AddFriendships ¶
func (o *User) AddFriendships(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Friendship) error
AddFriendships adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Friendships. Sets related.R.Users appropriately.
func (*User) AddLikes ¶
func (o *User) AddLikes(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Like) error
AddLikes adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Likes. Sets related.R.User appropriately.
func (*User) AddPosts ¶
func (o *User) AddPosts(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Post) error
AddPosts adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Posts. Sets related.R.User appropriately.
func (*User) CommentLikes ¶
CommentLikes retrieves all the comment_like's CommentLikes with an executor.
func (*User) Delete ¶
Delete deletes a single User record with an executor. Delete will match against the primary key column to find the record to delete.
func (*User) Friendships ¶
Friendships retrieves all the friendship's Friendships with an executor.
func (*User) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*User) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*User) RemoveFriendships ¶
func (o *User) RemoveFriendships(ctx context.Context, exec boil.ContextExecutor, related ...*Friendship) error
RemoveFriendships relationships from objects passed in. Removes related items from R.Friendships (uses pointer comparison, removal does not keep order) Sets related.R.Users.
func (*User) SetFriendships ¶
func (o *User) SetFriendships(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Friendship) error
SetFriendships removes all previously related items of the user replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Users's Friendships accordingly. Replaces o.R.Friendships with related. Sets related.R.Users's Friendships accordingly.
func (*User) Update ¶
func (o *User) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the User. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.
func (*User) Upsert ¶
func (o *User) Upsert(ctx context.Context, exec boil.ContextExecutor, updateColumns, insertColumns boil.Columns) error
Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.
type UserSlice ¶
type UserSlice []*User
UserSlice is an alias for a slice of pointers to User. This should generally be used opposed to []User.