package
0.0.0-20240528100830-79c95e3d0934
Repository: https://github.com/go-kratos/examples.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 validaton 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.
NewArticleClient returns a client for the Article from the given config.
NewClient creates a new client configured with the given options.
NewCommentClient returns a client for the Comment from the given config.
NewContext returns a new context with the given Client attached.
NewTagClient returns a client for the Tag 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
Article is the model entity for the Article schema.
ArticleClient is a client for the Article schema.
ArticleCreate is the builder for creating a Article entity.
ArticleCreateBulk is the builder for creating many Article entities in bulk.
ArticleDelete is the builder for deleting a Article entity.
ArticleDeleteOne is the builder for deleting a single Article entity.
ArticleEdges holds the relations/edges for other nodes in the graph.
ArticleGroupBy is the group-by builder for Article entities.
ArticleMutation represents an operation that mutates the Article nodes in the graph.
ArticleQuery is the builder for querying Article entities.
ArticleSelect is the builder for selecting fields of Article entities.
ArticleUpdate is the builder for updating Article entities.
ArticleUpdateOne is the builder for updating a single Article entity.
Client is the client that holds all ent builders.
Comment is the model entity for the Comment schema.
CommentClient is a client for the Comment schema.
CommentCreate is the builder for creating a Comment entity.
CommentCreateBulk is the builder for creating many Comment entities in bulk.
CommentDelete is the builder for deleting a Comment entity.
CommentDeleteOne is the builder for deleting a single Comment entity.
CommentEdges holds the relations/edges for other nodes in the graph.
CommentGroupBy is the group-by builder for Comment entities.
CommentMutation represents an operation that mutates the Comment nodes in the graph.
CommentQuery is the builder for querying Comment entities.
CommentSelect is the builder for selecting fields of Comment entities.
CommentUpdate is the builder for updating Comment entities.
CommentUpdateOne is the builder for updating a single Comment entity.
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.
Tag is the model entity for the Tag schema.
TagClient is a client for the Tag schema.
TagCreate is the builder for creating a Tag entity.
TagCreateBulk is the builder for creating many Tag entities in bulk.
TagDelete is the builder for deleting a Tag entity.
TagDeleteOne is the builder for deleting a single Tag entity.
TagEdges holds the relations/edges for other nodes in the graph.
TagGroupBy is the group-by builder for Tag entities.
TagMutation represents an operation that mutates the Tag nodes in the graph.
TagQuery is the builder for querying Tag entities.
TagSelect is the builder for selecting fields of Tag entities.
TagUpdate is the builder for updating Tag entities.
TagUpdateOne is the builder for updating a single Tag 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.
Articles is a parsable slice of Article.
Comments is a parsable slice of Comment.
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.
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
Tags is a parsable slice of Tag.
ent aliases to avoid import conflicts in user's code.