Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OrderItem ¶
type OrderItem struct {
ProductSKU string `theorydb:""`
Quantity int `theorydb:""`
Price float64 `theorydb:""`
}
OrderItem represents an item in an order
type TestOrder ¶
type TestOrder struct {
CreatedAt time.Time `theorydb:"index:gsi-customer,sk"`
UpdatedAt time.Time `theorydb:""`
OrderID string `theorydb:"pk"`
CustomerID string `theorydb:"sk,index:gsi-customer,pk"`
Status string `theorydb:"index:gsi-status,pk"`
Items []OrderItem `theorydb:""`
Total float64 `theorydb:"index:gsi-status,sk"`
}
TestOrder is a test model for complex queries
type TestProduct ¶
type TestProduct struct {
CreatedAt time.Time `theorydb:""`
SKU string `theorydb:"pk"`
Category string `theorydb:"sk,index:gsi-category,pk"`
Name string `theorydb:""`
Description string `theorydb:""`
Price float64 `theorydb:"index:gsi-category,sk"`
InStock bool `theorydb:""`
}
TestProduct is a test model for product data
type TestUser ¶
type TestUser struct {
CreatedAt time.Time `theorydb:"index:gsi-email,sk"`
ID string `theorydb:"pk"`
Email string `theorydb:"sk,index:gsi-email,pk"`
Status string `theorydb:""`
Name string `theorydb:""`
Tags []string `theorydb:""`
Age int `theorydb:""`
}
TestUser is a test model for user data
Click to show internal directories.
Click to hide internal directories.