Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PostMeta = drel.ModelMeta[Post]{ Table: "posts", Columns: []string{"id", "title", "author_id", "created_at", "updated_at"}, PKColumns: []string{"id"}, Scan: scanPost, Snapshot: snapshotPost, Diff: diffPost, PKValue: postPKValue, InsertColumns: postInsertColumns, ScanReturning: postScanReturning, ColumnValue: postColumnValue, NormalizeKey: postNormalizeKey, }
View Source
var Posts = struct { ID drel.OrderedColumn[int] Title drel.StringColumn AuthorID drel.OrderedColumn[int] CreatedAt drel.TimeColumn UpdatedAt drel.TimeColumn }{ ID: drel.NewOrderedCol[int]("id"), Title: drel.NewStringCol("title"), AuthorID: drel.NewOrderedCol[int]("author_id"), CreatedAt: drel.NewTimeCol("created_at"), UpdatedAt: drel.NewTimeCol("updated_at"), }
Functions ¶
This section is empty.
Types ¶
type Post ¶
Post is owned by the posts slice. Deleting features/posts removes the model, the generated code and the migrations of this feature together.
type PostRepository ¶
type PostRepository struct {
*drel.Repository[Post]
}
type TxPostRepository ¶
type TxPostRepository struct {
*drel.TxRepository[Post]
}
Click to show internal directories.
Click to hide internal directories.