Documentation
¶
Overview ¶
Code generated by bsonq-gen. DO NOT EDIT.
Index ¶
- type AddressBuilder
- type AddressLinesArrayBuilder
- type Collection
- type CustomerBuilder
- type CustomerCollection
- type CustomerOrdersArrayBuilder
- type Customer_OrdersBuilderInterface
- type Customer_OrdersBuilder_forArrays
- type Customer_OrdersItemsArrayBuilder
- type ItemsBuilderInterface
- type ItemsBuilder_forArrays
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressBuilder ¶
AddressBuilder allows for constructing type-safe queries on the Address struct. RT is the type of the root document.
func (AddressBuilder[RT]) City ¶
func (b AddressBuilder[RT]) City() bsonq.StringF[RT, string, string]
City returns a builder for the City field.
func (AddressBuilder[RT]) Lines ¶
func (b AddressBuilder[RT]) Lines() AddressLinesArrayBuilder[RT]
Lines returns a builder for the Lines field.
type AddressLinesArrayBuilder ¶
type AddressLinesArrayBuilder[RT any] struct { bsonq.StringF[RT, []string, string] bsonq.ValueArrayF[RT, string, bsonq.StringV[string, string]] }
AddressLinesArrayBuilder is a composite builder for the Lines field of Address. RT is the type of the root document.
type Collection ¶
type CustomerBuilder ¶
CustomerBuilder allows for constructing type-safe queries on the Customer struct. RT is the type of the root document.
func QCustomer ¶
func QCustomer() CustomerBuilder[dao.Customer]
QCustomer is the main entry point to start a type-safe query for the Customer struct.
func (CustomerBuilder[RT]) Address ¶
func (b CustomerBuilder[RT]) Address() AddressBuilder[RT]
Address returns a builder for the Address field.
func (CustomerBuilder[RT]) Name ¶
func (b CustomerBuilder[RT]) Name() bsonq.StringF[RT, string, string]
Name returns a builder for the Name field.
func (CustomerBuilder[RT]) Orders ¶
func (b CustomerBuilder[RT]) Orders() CustomerOrdersArrayBuilder[RT]
Orders returns a builder for the Orders field.
type CustomerCollection ¶
type CustomerCollection struct {
// contains filtered or unexported fields
}
abstraction over mongo.Collection with type-safe methods.
func NewCustomerCollection ¶
func NewCustomerCollection(c Collection) *CustomerCollection
func (*CustomerCollection) CorrectCitySpelling ¶
type CustomerOrdersArrayBuilder ¶
type CustomerOrdersArrayBuilder[RT any] struct { Customer_OrdersBuilder_forArrays[RT] bsonq.DocumentArrayF[RT, struct { ID string `bson:"orderId"` Items []dao.Items `bson:"items"` }, Customer_OrdersBuilderInterface[struct { ID string `bson:"orderId"` Items []dao.Items `bson:"items"` }]] }
CustomerOrdersArrayBuilder is a composite builder for the Orders field of Customer. RT is the type of the root document.
type Customer_OrdersBuilderInterface ¶
type Customer_OrdersBuilderInterface[RT any] interface { ID() bsonq.StringF[RT, string, string] Items() Customer_OrdersItemsArrayBuilder[RT] }
Customer_OrdersBuilderInterface defines the methods available on the Customer_OrdersBuilder. It is used as a parameter in functions like ElemMatch to enforce type safety. RT is the type of the root document.
type Customer_OrdersBuilder_forArrays ¶
type Customer_OrdersBuilder_forArrays[RT any] struct { bsonq.F[RT, []struct { ID string `bson:"orderId"` Items []dao.Items `bson:"items"` }, struct { ID string `bson:"orderId"` Items []dao.Items `bson:"items"` }] }
Customer_OrdersBuilder_forArrays is used for constructing Customer_Orders, when it is used as an array element. RT is the type of the root document.
func (Customer_OrdersBuilder_forArrays[RT]) ID ¶
func (b Customer_OrdersBuilder_forArrays[RT]) ID() bsonq.StringF[RT, string, string]
ID returns a builder for the ID field when Customer_Orders is used as an array element.
func (Customer_OrdersBuilder_forArrays[RT]) Items ¶
func (b Customer_OrdersBuilder_forArrays[RT]) Items() Customer_OrdersItemsArrayBuilder[RT]
Items returns a builder for the Items field when Customer_Orders is used as an array element.
type Customer_OrdersItemsArrayBuilder ¶
type Customer_OrdersItemsArrayBuilder[RT any] struct { ItemsBuilder_forArrays[RT] bsonq.DocumentArrayF[RT, dao.Items, ItemsBuilderInterface[dao.Items]] }
Customer_OrdersItemsArrayBuilder is a composite builder for the Items field of Customer_Orders. RT is the type of the root document.
type ItemsBuilderInterface ¶
type ItemsBuilderInterface[RT any] interface { ProductID() bsonq.StringF[RT, dao.PID, dao.PID] Quantity() bsonq.NumericF[RT, int, int] Size() bsonq.NumericF[RT, *int, *int] }
ItemsBuilderInterface defines the methods available on the ItemsBuilder. It is used as a parameter in functions like ElemMatch to enforce type safety. RT is the type of the root document.
type ItemsBuilder_forArrays ¶
ItemsBuilder_forArrays is used for constructing Items, when it is used as an array element. RT is the type of the root document.
func (ItemsBuilder_forArrays[RT]) ProductID ¶
ProductID returns a builder for the ProductID field when Items is used as an array element.