Exclude excludes the specified struct fields from being inserted/updated into the DB table.
Rest
...attrs: string[]Insert inserts a row in the table using the struct model associated with this query.
By default, it inserts all public fields into the table, including those nil or empty ones. You may pass a list of the fields to this method to indicate that only those fields should be inserted. You may also call Exclude to exclude some fields from being inserted.
If a model has an empty primary key, it is considered auto-incremental and the corresponding struct field will be filled with the generated primary key value after a successful insertion.
Rest
...attrs: string[]Update updates a row in the table using the struct model associated with this query. The row being updated has the same primary key as specified by the model.
By default, it updates all public fields in the table, including those nil or empty ones. You may pass a list of the fields to this method to indicate that only those fields should be updated. You may also call Exclude to exclude some fields from being updated.
Rest
...attrs: string[]WithContext associates a context with the query.
Generated using TypeDoc
ModelQuery represents a query associated with a struct model.