Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AuthorMeta = drel.ModelMeta[Author]{ Table: "authors", Columns: []string{"id", "name", "created_at", "updated_at"}, PKColumn: "id", Scan: scanAuthor, Snapshot: snapshotAuthor, Diff: diffAuthor, PKValue: authorPKValue, InsertColumns: authorInsertColumns, ScanReturning: authorScanReturning, ColumnValue: authorColumnValue, }
View Source
var AuthorProfileMeta = drel.ModelMeta[AuthorProfile]{ Table: "author_profiles", Columns: []string{"id", "bio", "author_id", "created_at", "updated_at"}, PKColumn: "id", Scan: scanAuthorprofile, Snapshot: snapshotAuthorprofile, Diff: diffAuthorprofile, PKValue: authorprofilePKValue, InsertColumns: authorprofileInsertColumns, ScanReturning: authorprofileScanReturning, ColumnValue: authorprofileColumnValue, }
View Source
var AuthorProfiles = struct { ID drel.OrderedColumn[int] Bio drel.StringColumn AuthorID drel.OrderedColumn[int] CreatedAt drel.Column[time.Time] UpdatedAt drel.Column[time.Time] }{ ID: drel.NewOrderedCol[int]("id"), Bio: drel.NewStringCol("bio"), AuthorID: drel.NewOrderedCol[int]("author_id"), CreatedAt: drel.NewCol[time.Time]("created_at"), UpdatedAt: drel.NewCol[time.Time]("updated_at"), }
View Source
var Authors = struct { ID drel.OrderedColumn[int] Name drel.StringColumn CreatedAt drel.Column[time.Time] UpdatedAt drel.Column[time.Time] }{ ID: drel.NewOrderedCol[int]("id"), Name: drel.NewStringCol("name"), CreatedAt: drel.NewCol[time.Time]("created_at"), UpdatedAt: drel.NewCol[time.Time]("updated_at"), }
View Source
var BookMeta = drel.ModelMeta[Book]{ Table: "books", Columns: []string{"id", "title", "author_id", "created_at", "updated_at"}, PKColumn: "id", Scan: scanBook, Snapshot: snapshotBook, Diff: diffBook, PKValue: bookPKValue, InsertColumns: bookInsertColumns, ScanReturning: bookScanReturning, ColumnValue: bookColumnValue, }
View Source
var Books = struct { ID drel.OrderedColumn[int] Title drel.StringColumn AuthorID drel.OrderedColumn[int] CreatedAt drel.Column[time.Time] UpdatedAt drel.Column[time.Time] }{ ID: drel.NewOrderedCol[int]("id"), Title: drel.NewStringCol("title"), AuthorID: drel.NewOrderedCol[int]("author_id"), CreatedAt: drel.NewCol[time.Time]("created_at"), UpdatedAt: drel.NewCol[time.Time]("updated_at"), }
Functions ¶
This section is empty.
Types ¶
type AuthorProfile ¶
type AuthorProfileRepository ¶
type AuthorProfileRepository struct {
*drel.Repository[AuthorProfile]
}
func (*AuthorProfileRepository) FindByID ¶
func (r *AuthorProfileRepository) FindByID(ctx context.Context, id int) (*AuthorProfile, error)
type AuthorRepository ¶
type AuthorRepository struct {
*drel.Repository[Author]
}
type BookRepository ¶
type BookRepository struct {
*drel.Repository[Book]
}
type TxAuthorProfileRepository ¶
type TxAuthorProfileRepository struct {
*drel.TxRepository[AuthorProfile]
}
func (*TxAuthorProfileRepository) FindByID ¶
func (r *TxAuthorProfileRepository) FindByID(ctx context.Context, id int) (*AuthorProfile, error)
type TxAuthorRepository ¶
type TxAuthorRepository struct {
*drel.TxRepository[Author]
}
type TxBookRepository ¶
type TxBookRepository struct {
*drel.TxRepository[Book]
}
type UoWAuthorProfileRepository ¶ added in v0.3.0
type UoWAuthorProfileRepository struct {
*drel.UoWRepository[AuthorProfile]
}
func (*UoWAuthorProfileRepository) FindByID ¶ added in v0.3.0
func (r *UoWAuthorProfileRepository) FindByID(ctx context.Context, id int) (*AuthorProfile, error)
type UoWAuthorRepository ¶ added in v0.3.0
type UoWAuthorRepository struct {
*drel.UoWRepository[Author]
}
type UoWBookRepository ¶ added in v0.3.0
type UoWBookRepository struct {
*drel.UoWRepository[Book]
}
Click to show internal directories.
Click to hide internal directories.