Documentation ¶
Index ¶
- func IsConstraintFailure(err error) bool
- func IsNotFound(err error) bool
- func IsNotSingular(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- type Aggregate
- type Blob
- type BlobClient
- func (c *BlobClient) Create() *BlobCreate
- func (c *BlobClient) Delete() *BlobDelete
- func (c *BlobClient) DeleteOne(b *Blob) *BlobDeleteOne
- func (c *BlobClient) DeleteOneID(id int) *BlobDeleteOne
- func (c *BlobClient) Get(ctx context.Context, id int) (*Blob, error)
- func (c *BlobClient) GetX(ctx context.Context, id int) *Blob
- func (c *BlobClient) Query() *BlobQuery
- func (c *BlobClient) Update() *BlobUpdate
- func (c *BlobClient) UpdateOne(b *Blob) *BlobUpdateOne
- func (c *BlobClient) UpdateOneID(id int) *BlobUpdateOne
- type BlobCreate
- func (bc *BlobCreate) Save(ctx context.Context) (*Blob, error)
- func (bc *BlobCreate) SaveX(ctx context.Context) *Blob
- func (bc *BlobCreate) SetKey(s string) *BlobCreate
- func (bc *BlobCreate) SetNetworkID(s string) *BlobCreate
- func (bc *BlobCreate) SetNillableVersion(u *uint64) *BlobCreate
- func (bc *BlobCreate) SetType(s string) *BlobCreate
- func (bc *BlobCreate) SetValue(b []byte) *BlobCreate
- func (bc *BlobCreate) SetVersion(u uint64) *BlobCreate
- type BlobDelete
- type BlobDeleteOne
- type BlobGroupBy
- func (bgb *BlobGroupBy) Aggregate(fns ...Aggregate) *BlobGroupBy
- func (bgb *BlobGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (bgb *BlobGroupBy) BoolsX(ctx context.Context) []bool
- func (bgb *BlobGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (bgb *BlobGroupBy) Float64sX(ctx context.Context) []float64
- func (bgb *BlobGroupBy) Ints(ctx context.Context) ([]int, error)
- func (bgb *BlobGroupBy) IntsX(ctx context.Context) []int
- func (bgb *BlobGroupBy) Scan(ctx context.Context, v interface{}) error
- func (bgb *BlobGroupBy) ScanX(ctx context.Context, v interface{})
- func (bgb *BlobGroupBy) Strings(ctx context.Context) ([]string, error)
- func (bgb *BlobGroupBy) StringsX(ctx context.Context) []string
- type BlobQuery
- func (bq *BlobQuery) All(ctx context.Context) ([]*Blob, error)
- func (bq *BlobQuery) AllX(ctx context.Context) []*Blob
- func (bq *BlobQuery) Clone() *BlobQuery
- func (bq *BlobQuery) Count(ctx context.Context) (int, error)
- func (bq *BlobQuery) CountX(ctx context.Context) int
- func (bq *BlobQuery) Exist(ctx context.Context) (bool, error)
- func (bq *BlobQuery) ExistX(ctx context.Context) bool
- func (bq *BlobQuery) First(ctx context.Context) (*Blob, error)
- func (bq *BlobQuery) FirstID(ctx context.Context) (id int, err error)
- func (bq *BlobQuery) FirstX(ctx context.Context) *Blob
- func (bq *BlobQuery) FirstXID(ctx context.Context) int
- func (bq *BlobQuery) GroupBy(field string, fields ...string) *BlobGroupBy
- func (bq *BlobQuery) IDs(ctx context.Context) ([]int, error)
- func (bq *BlobQuery) IDsX(ctx context.Context) []int
- func (bq *BlobQuery) Limit(limit int) *BlobQuery
- func (bq *BlobQuery) Offset(offset int) *BlobQuery
- func (bq *BlobQuery) Only(ctx context.Context) (*Blob, error)
- func (bq *BlobQuery) OnlyID(ctx context.Context) (id int, err error)
- func (bq *BlobQuery) OnlyX(ctx context.Context) *Blob
- func (bq *BlobQuery) OnlyXID(ctx context.Context) int
- func (bq *BlobQuery) Order(o ...Order) *BlobQuery
- func (bq *BlobQuery) Select(field string, fields ...string) *BlobSelect
- func (bq *BlobQuery) Where(ps ...predicate.Blob) *BlobQuery
- type BlobSelect
- func (bs *BlobSelect) Bools(ctx context.Context) ([]bool, error)
- func (bs *BlobSelect) BoolsX(ctx context.Context) []bool
- func (bs *BlobSelect) Float64s(ctx context.Context) ([]float64, error)
- func (bs *BlobSelect) Float64sX(ctx context.Context) []float64
- func (bs *BlobSelect) Ints(ctx context.Context) ([]int, error)
- func (bs *BlobSelect) IntsX(ctx context.Context) []int
- func (bs *BlobSelect) Scan(ctx context.Context, v interface{}) error
- func (bs *BlobSelect) ScanX(ctx context.Context, v interface{})
- func (bs *BlobSelect) Strings(ctx context.Context) ([]string, error)
- func (bs *BlobSelect) StringsX(ctx context.Context) []string
- type BlobUpdate
- func (bu *BlobUpdate) AddVersion(u uint64) *BlobUpdate
- func (bu *BlobUpdate) ClearValue() *BlobUpdate
- func (bu *BlobUpdate) Exec(ctx context.Context) error
- func (bu *BlobUpdate) ExecX(ctx context.Context)
- func (bu *BlobUpdate) Save(ctx context.Context) (int, error)
- func (bu *BlobUpdate) SaveX(ctx context.Context) int
- func (bu *BlobUpdate) SetKey(s string) *BlobUpdate
- func (bu *BlobUpdate) SetNetworkID(s string) *BlobUpdate
- func (bu *BlobUpdate) SetNillableVersion(u *uint64) *BlobUpdate
- func (bu *BlobUpdate) SetType(s string) *BlobUpdate
- func (bu *BlobUpdate) SetValue(b []byte) *BlobUpdate
- func (bu *BlobUpdate) SetVersion(u uint64) *BlobUpdate
- func (bu *BlobUpdate) Where(ps ...predicate.Blob) *BlobUpdate
- type BlobUpdateOne
- func (buo *BlobUpdateOne) AddVersion(u uint64) *BlobUpdateOne
- func (buo *BlobUpdateOne) ClearValue() *BlobUpdateOne
- func (buo *BlobUpdateOne) Exec(ctx context.Context) error
- func (buo *BlobUpdateOne) ExecX(ctx context.Context)
- func (buo *BlobUpdateOne) Save(ctx context.Context) (*Blob, error)
- func (buo *BlobUpdateOne) SaveX(ctx context.Context) *Blob
- func (buo *BlobUpdateOne) SetKey(s string) *BlobUpdateOne
- func (buo *BlobUpdateOne) SetNetworkID(s string) *BlobUpdateOne
- func (buo *BlobUpdateOne) SetNillableVersion(u *uint64) *BlobUpdateOne
- func (buo *BlobUpdateOne) SetType(s string) *BlobUpdateOne
- func (buo *BlobUpdateOne) SetValue(b []byte) *BlobUpdateOne
- func (buo *BlobUpdateOne) SetVersion(u uint64) *BlobUpdateOne
- type Blobs
- type Client
- type ErrConstraintFailed
- type ErrNotFound
- type ErrNotSingular
- type Option
- type Order
- type Tx
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsConstraintFailure ¶
IsConstraintFailure returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
Types ¶
type Aggregate ¶
type Aggregate struct { // SQL the column wrapped with the aggregation function. SQL func(*sql.Selector) string }
Aggregate applies an aggregation step on the group-by traversal/selector.
func As ¶
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
type Blob ¶
type Blob struct { // ID of the ent. ID int `json:"id,omitempty"` // NetworkID holds the value of the "network_id" field. NetworkID string `json:"network_id,omitempty"` // Type holds the value of the "type" field. Type string `json:"type,omitempty"` // Key holds the value of the "key" field. Key string `json:"key,omitempty"` // Value holds the value of the "value" field. Value []byte `json:"value,omitempty"` // Version holds the value of the "version" field. Version uint64 `json:"version,omitempty"` // contains filtered or unexported fields }
Blob is the model entity for the Blob schema.
Example ¶
/* * Copyright 2020 The Magma Authors * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Code generated (@generated) by entc, DO NOT EDIT. package main import ( "context" "log" "github.com/facebookincubator/ent/dialect/sql" ) // dsn for the database. In order to run the tests locally, run the following command: // // ENT_INTEGRATION_ENDPOINT="root:pass@tcp(localhost:3306)/test?parseTime=True" go test -v var dsn string func main() { if dsn == "" { return } ctx := context.Background() drv, err := sql.Open("mysql", dsn) if err != nil { log.Fatalf("failed creating database client: %v", err) } defer drv.Close() client := NewClient(Driver(drv)) // creating vertices for the blob's edges. // create blob vertex with its edges. b := client.Blob. Create(). SetNetworkID("string"). SetType("string"). SetKey("string"). SetValue(nil). SetVersion(1). SaveX(ctx) log.Println("blob created:", b) // query edges. }
Output:
func (*Blob) Unwrap ¶
Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.
func (*Blob) Update ¶
func (b *Blob) Update() *BlobUpdateOne
Update returns a builder for updating this Blob. Note that, you need to call Blob.Unwrap() before calling this method, if this Blob was returned from a transaction, and the transaction was committed or rolled back.
type BlobClient ¶
type BlobClient struct {
// contains filtered or unexported fields
}
BlobClient is a client for the Blob schema.
func NewBlobClient ¶
func NewBlobClient(c config) *BlobClient
NewBlobClient returns a client for the Blob from the given config.
func (*BlobClient) Create ¶
func (c *BlobClient) Create() *BlobCreate
Create returns a create builder for Blob.
func (*BlobClient) Delete ¶
func (c *BlobClient) Delete() *BlobDelete
Delete returns a delete builder for Blob.
func (*BlobClient) DeleteOne ¶
func (c *BlobClient) DeleteOne(b *Blob) *BlobDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*BlobClient) DeleteOneID ¶
func (c *BlobClient) DeleteOneID(id int) *BlobDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*BlobClient) GetX ¶
func (c *BlobClient) GetX(ctx context.Context, id int) *Blob
GetX is like Get, but panics if an error occurs.
func (*BlobClient) Query ¶
func (c *BlobClient) Query() *BlobQuery
Create returns a query builder for Blob.
func (*BlobClient) Update ¶
func (c *BlobClient) Update() *BlobUpdate
Update returns an update builder for Blob.
func (*BlobClient) UpdateOne ¶
func (c *BlobClient) UpdateOne(b *Blob) *BlobUpdateOne
UpdateOne returns an update builder for the given entity.
func (*BlobClient) UpdateOneID ¶
func (c *BlobClient) UpdateOneID(id int) *BlobUpdateOne
UpdateOneID returns an update builder for the given id.
type BlobCreate ¶
type BlobCreate struct {
// contains filtered or unexported fields
}
BlobCreate is the builder for creating a Blob entity.
func (*BlobCreate) Save ¶
func (bc *BlobCreate) Save(ctx context.Context) (*Blob, error)
Save creates the Blob in the database.
func (*BlobCreate) SaveX ¶
func (bc *BlobCreate) SaveX(ctx context.Context) *Blob
SaveX calls Save and panics if Save returns an error.
func (*BlobCreate) SetKey ¶
func (bc *BlobCreate) SetKey(s string) *BlobCreate
SetKey sets the key field.
func (*BlobCreate) SetNetworkID ¶
func (bc *BlobCreate) SetNetworkID(s string) *BlobCreate
SetNetworkID sets the network_id field.
func (*BlobCreate) SetNillableVersion ¶
func (bc *BlobCreate) SetNillableVersion(u *uint64) *BlobCreate
SetNillableVersion sets the version field if the given value is not nil.
func (*BlobCreate) SetType ¶
func (bc *BlobCreate) SetType(s string) *BlobCreate
SetType sets the type field.
func (*BlobCreate) SetValue ¶
func (bc *BlobCreate) SetValue(b []byte) *BlobCreate
SetValue sets the value field.
func (*BlobCreate) SetVersion ¶
func (bc *BlobCreate) SetVersion(u uint64) *BlobCreate
SetVersion sets the version field.
type BlobDelete ¶
type BlobDelete struct {
// contains filtered or unexported fields
}
BlobDelete is the builder for deleting a Blob entity.
func (*BlobDelete) Exec ¶
func (bd *BlobDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*BlobDelete) ExecX ¶
func (bd *BlobDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*BlobDelete) Where ¶
func (bd *BlobDelete) Where(ps ...predicate.Blob) *BlobDelete
Where adds a new predicate to the delete builder.
type BlobDeleteOne ¶
type BlobDeleteOne struct {
// contains filtered or unexported fields
}
BlobDeleteOne is the builder for deleting a single Blob entity.
func (*BlobDeleteOne) Exec ¶
func (bdo *BlobDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*BlobDeleteOne) ExecX ¶
func (bdo *BlobDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type BlobGroupBy ¶
type BlobGroupBy struct {
// contains filtered or unexported fields
}
BlobGroupBy is the builder for group-by Blob entities.
func (*BlobGroupBy) Aggregate ¶
func (bgb *BlobGroupBy) Aggregate(fns ...Aggregate) *BlobGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*BlobGroupBy) Bools ¶
func (bgb *BlobGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.
func (*BlobGroupBy) BoolsX ¶
func (bgb *BlobGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*BlobGroupBy) Float64s ¶
func (bgb *BlobGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.
func (*BlobGroupBy) Float64sX ¶
func (bgb *BlobGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*BlobGroupBy) Ints ¶
func (bgb *BlobGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.
func (*BlobGroupBy) IntsX ¶
func (bgb *BlobGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*BlobGroupBy) Scan ¶
func (bgb *BlobGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scan the result into the given value.
func (*BlobGroupBy) ScanX ¶
func (bgb *BlobGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type BlobQuery ¶
type BlobQuery struct {
// contains filtered or unexported fields
}
BlobQuery is the builder for querying Blob entities.
func (*BlobQuery) Clone ¶
Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*BlobQuery) First ¶
First returns the first Blob entity in the query. Returns *ErrNotFound when no blob was found.
func (*BlobQuery) FirstID ¶
FirstID returns the first Blob id in the query. Returns *ErrNotFound when no id was found.
func (*BlobQuery) GroupBy ¶
func (bq *BlobQuery) GroupBy(field string, fields ...string) *BlobGroupBy
GroupBy used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { NetworkID string `json:"network_id,omitempty"` Count int `json:"count,omitempty"` } client.Blob.Query(). GroupBy(blob.FieldNetworkID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*BlobQuery) Only ¶
Only returns the only Blob entity in the query, returns an error if not exactly one entity was returned.
func (*BlobQuery) OnlyID ¶
OnlyID returns the only Blob id in the query, returns an error if not exactly one id was returned.
type BlobSelect ¶
type BlobSelect struct {
// contains filtered or unexported fields
}
BlobSelect is the builder for select fields of Blob entities.
func (*BlobSelect) Bools ¶
func (bs *BlobSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from selector. It is only allowed when selecting one field.
func (*BlobSelect) BoolsX ¶
func (bs *BlobSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*BlobSelect) Float64s ¶
func (bs *BlobSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from selector. It is only allowed when selecting one field.
func (*BlobSelect) Float64sX ¶
func (bs *BlobSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*BlobSelect) Ints ¶
func (bs *BlobSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from selector. It is only allowed when selecting one field.
func (*BlobSelect) IntsX ¶
func (bs *BlobSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*BlobSelect) Scan ¶
func (bs *BlobSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scan the result into the given value.
func (*BlobSelect) ScanX ¶
func (bs *BlobSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
type BlobUpdate ¶
type BlobUpdate struct {
// contains filtered or unexported fields
}
BlobUpdate is the builder for updating Blob entities.
func (*BlobUpdate) AddVersion ¶
func (bu *BlobUpdate) AddVersion(u uint64) *BlobUpdate
AddVersion adds u to version.
func (*BlobUpdate) ClearValue ¶
func (bu *BlobUpdate) ClearValue() *BlobUpdate
ClearValue clears the value of value.
func (*BlobUpdate) Exec ¶
func (bu *BlobUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*BlobUpdate) ExecX ¶
func (bu *BlobUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BlobUpdate) Save ¶
func (bu *BlobUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of rows/vertices matched by this operation.
func (*BlobUpdate) SaveX ¶
func (bu *BlobUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*BlobUpdate) SetKey ¶
func (bu *BlobUpdate) SetKey(s string) *BlobUpdate
SetKey sets the key field.
func (*BlobUpdate) SetNetworkID ¶
func (bu *BlobUpdate) SetNetworkID(s string) *BlobUpdate
SetNetworkID sets the network_id field.
func (*BlobUpdate) SetNillableVersion ¶
func (bu *BlobUpdate) SetNillableVersion(u *uint64) *BlobUpdate
SetNillableVersion sets the version field if the given value is not nil.
func (*BlobUpdate) SetType ¶
func (bu *BlobUpdate) SetType(s string) *BlobUpdate
SetType sets the type field.
func (*BlobUpdate) SetValue ¶
func (bu *BlobUpdate) SetValue(b []byte) *BlobUpdate
SetValue sets the value field.
func (*BlobUpdate) SetVersion ¶
func (bu *BlobUpdate) SetVersion(u uint64) *BlobUpdate
SetVersion sets the version field.
func (*BlobUpdate) Where ¶
func (bu *BlobUpdate) Where(ps ...predicate.Blob) *BlobUpdate
Where adds a new predicate for the builder.
type BlobUpdateOne ¶
type BlobUpdateOne struct {
// contains filtered or unexported fields
}
BlobUpdateOne is the builder for updating a single Blob entity.
func (*BlobUpdateOne) AddVersion ¶
func (buo *BlobUpdateOne) AddVersion(u uint64) *BlobUpdateOne
AddVersion adds u to version.
func (*BlobUpdateOne) ClearValue ¶
func (buo *BlobUpdateOne) ClearValue() *BlobUpdateOne
ClearValue clears the value of value.
func (*BlobUpdateOne) Exec ¶
func (buo *BlobUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*BlobUpdateOne) ExecX ¶
func (buo *BlobUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BlobUpdateOne) Save ¶
func (buo *BlobUpdateOne) Save(ctx context.Context) (*Blob, error)
Save executes the query and returns the updated entity.
func (*BlobUpdateOne) SaveX ¶
func (buo *BlobUpdateOne) SaveX(ctx context.Context) *Blob
SaveX is like Save, but panics if an error occurs.
func (*BlobUpdateOne) SetKey ¶
func (buo *BlobUpdateOne) SetKey(s string) *BlobUpdateOne
SetKey sets the key field.
func (*BlobUpdateOne) SetNetworkID ¶
func (buo *BlobUpdateOne) SetNetworkID(s string) *BlobUpdateOne
SetNetworkID sets the network_id field.
func (*BlobUpdateOne) SetNillableVersion ¶
func (buo *BlobUpdateOne) SetNillableVersion(u *uint64) *BlobUpdateOne
SetNillableVersion sets the version field if the given value is not nil.
func (*BlobUpdateOne) SetType ¶
func (buo *BlobUpdateOne) SetType(s string) *BlobUpdateOne
SetType sets the type field.
func (*BlobUpdateOne) SetValue ¶
func (buo *BlobUpdateOne) SetValue(b []byte) *BlobUpdateOne
SetValue sets the value field.
func (*BlobUpdateOne) SetVersion ¶
func (buo *BlobUpdateOne) SetVersion(u uint64) *BlobUpdateOne
SetVersion sets the version field.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Blob is the client for interacting with the Blob builders. Blob *BlobClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns the Client stored in a context, or nil if there isn't one.
func Open ¶
Open opens a connection to the database specified by the driver name and a driver-specific data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
type ErrConstraintFailed ¶
type ErrConstraintFailed struct {
// contains filtered or unexported fields
}
ErrConstraintFailed returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ErrConstraintFailed) Error ¶
func (e ErrConstraintFailed) Error() string
Error implements the error interface.
func (*ErrConstraintFailed) Unwrap ¶
func (e *ErrConstraintFailed) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type ErrNotFound ¶
type ErrNotFound struct {
// contains filtered or unexported fields
}
ErrNotFound returns when trying to fetch a specific entity and it was not found in the database.
func (*ErrNotFound) Error ¶
func (e *ErrNotFound) Error() string
Error implements the error interface.
type ErrNotSingular ¶
type ErrNotSingular struct {
// contains filtered or unexported fields
}
ErrNotSingular returns when trying to fetch a singular entity and more then one was found in the database.
func (*ErrNotSingular) Error ¶
func (e *ErrNotSingular) Error() string
Error implements the error interface.
type Tx ¶
type Tx struct { // Blob is the client for interacting with the Blob builders. Blob *BlobClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().