Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ProductMeta = drel.ModelMeta[Product]{ Table: "products", Columns: []string{"id", "name", "price", "created_at", "updated_at"}, PKColumns: []string{"id"}, Scan: scanProduct, Snapshot: snapshotProduct, Diff: diffProduct, PKValue: productPKValue, InsertColumns: productInsertColumns, ScanReturning: productScanReturning, ColumnValue: productColumnValue, NormalizeKey: productNormalizeKey, }
View Source
var Products = struct { ID drel.OrderedColumn[int] Name drel.StringColumn Price drel.OrderedColumn[int] CreatedAt drel.TimeColumn UpdatedAt drel.TimeColumn }{ ID: drel.NewOrderedCol[int]("id"), Name: drel.NewStringCol("name"), Price: drel.NewOrderedCol[int]("price"), CreatedAt: drel.NewTimeCol("created_at"), UpdatedAt: drel.NewTimeCol("updated_at"), }
Functions ¶
This section is empty.
Types ¶
type Product ¶
Product is a minimal model used to demonstrate drel's observability hooks: structured query logging, tracing spans, and dev-mode diagnostics.
func NewProduct ¶
type ProductRepository ¶
type ProductRepository struct {
*drel.Repository[Product]
}
type TxProductRepository ¶
type TxProductRepository struct {
*drel.TxRepository[Product]
}
Click to show internal directories.
Click to hide internal directories.