package
0.0.0-20211115074926-5136324f2adf
Repository: https://github.com/funfun/entgo-example.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
As is a pseudo aggregation function for renaming another other functions with custom names.
Asc applies the given fields in ASC order.
Count applies the "count" aggregation function on each group.
Debug enables debug logging on the ent.Driver.
Desc applies the given fields in DESC order.
Driver configures the client driver.
FromContext returns a Client stored inside a context, or nil if there isn't one.
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
IsNotFound returns a boolean indicating whether the error is a not found error.
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
IsNotSingular returns a boolean indicating whether the error is a not singular error.
IsValidationError returns a boolean indicating whether the error is a validation error.
Log sets the logging function for debug mode.
MaskNotFound masks not found error.
Max applies the "max" aggregation function on the given field of each group.
Mean applies the "mean" aggregation function on the given field of each group.
Min applies the "min" aggregation function on the given field of each group.
NewBookClient returns a client for the Book from the given config.
NewClient creates a new client configured with the given options.
NewContext returns a new context with the given Client attached.
NewPersonClient returns a client for the Person from the given config.
NewPlayerClient returns a client for the Player from the given config.
NewTxContext returns a new context with the given Tx attached.
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it.
Sum applies the "sum" aggregation function on the given field of each group.
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
# Constants
Operation types.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Node types.
No description provided by the author
No description provided by the author
# Structs
Book is the model entity for the Book schema.
BookClient is a client for the Book schema.
BookCreate is the builder for creating a Book entity.
BookCreateBulk is the builder for creating many Book entities in bulk.
BookDelete is the builder for deleting a Book entity.
BookDeleteOne is the builder for deleting a single Book entity.
BookEdges holds the relations/edges for other nodes in the graph.
BookGroupBy is the group-by builder for Book entities.
BookMutation represents an operation that mutates the Book nodes in the graph.
BookQuery is the builder for querying Book entities.
BookSelect is the builder for selecting fields of Book entities.
BookUpdate is the builder for updating Book entities.
BookUpdateOne is the builder for updating a single Book entity.
Client is the client that holds all ent builders.
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed.
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
NotLoadedError returns when trying to get a node that was not loaded by the query.
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
Person is the model entity for the Person schema.
PersonClient is a client for the Person schema.
PersonCreate is the builder for creating a Person entity.
PersonCreateBulk is the builder for creating many Person entities in bulk.
PersonDelete is the builder for deleting a Person entity.
PersonDeleteOne is the builder for deleting a single Person entity.
PersonEdges holds the relations/edges for other nodes in the graph.
PersonGroupBy is the group-by builder for Person entities.
PersonMutation represents an operation that mutates the Person nodes in the graph.
PersonQuery is the builder for querying Person entities.
PersonSelect is the builder for selecting fields of Person entities.
PersonUpdate is the builder for updating Person entities.
PersonUpdateOne is the builder for updating a single Person entity.
Player is the model entity for the Player schema.
PlayerClient is a client for the Player schema.
PlayerCreate is the builder for creating a Player entity.
PlayerCreateBulk is the builder for creating many Player entities in bulk.
PlayerDelete is the builder for deleting a Player entity.
PlayerDeleteOne is the builder for deleting a single Player entity.
PlayerGroupBy is the group-by builder for Player entities.
PlayerMutation represents an operation that mutates the Player nodes in the graph.
PlayerQuery is the builder for querying Player entities.
PlayerSelect is the builder for selecting fields of Player entities.
PlayerUpdate is the builder for updating Player entities.
PlayerUpdateOne is the builder for updating a single Player entity.
Tx is a transactional client that is created by calling Client.Tx().
ValidationError returns when validating a field fails.
# Type aliases
AggregateFunc applies an aggregation step on the group-by traversal/selector.
Books is a parsable slice of Book.
No description provided by the author
No description provided by the author
ent aliases to avoid import conflicts in user's code.
ent aliases to avoid import conflicts in user's code.
ent aliases to avoid import conflicts in user's code.
ent aliases to avoid import conflicts in user's code.
ent aliases to avoid import conflicts in user's code.
Option function to configure the client.
OrderFunc applies an ordering on the sql selector.
Persons is a parsable slice of Person.
Players is a parsable slice of Player.
ent aliases to avoid import conflicts in user's code.
ent aliases to avoid import conflicts in user's code.
No description provided by the author
No description provided by the author
ent aliases to avoid import conflicts in user's code.