Documentation ¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type Ride
- type RideClient
- func (c *RideClient) Create() *RideCreate
- func (c *RideClient) CreateBulk(builders ...*RideCreate) *RideCreateBulk
- func (c *RideClient) Delete() *RideDelete
- func (c *RideClient) DeleteOne(r *Ride) *RideDeleteOne
- func (c *RideClient) DeleteOneID(id uuid.UUID) *RideDeleteOne
- func (c *RideClient) Get(ctx context.Context, id uuid.UUID) (*Ride, error)
- func (c *RideClient) GetX(ctx context.Context, id uuid.UUID) *Ride
- func (c *RideClient) Hooks() []Hook
- func (c *RideClient) Intercept(interceptors ...Interceptor)
- func (c *RideClient) Interceptors() []Interceptor
- func (c *RideClient) Query() *RideQuery
- func (c *RideClient) QueryUser(r *Ride) *UserQuery
- func (c *RideClient) QueryVehicle(r *Ride) *VehicleQuery
- func (c *RideClient) QueryVehicleLocationHistories(r *Ride) *VehicleLocationHistoryQuery
- func (c *RideClient) Update() *RideUpdate
- func (c *RideClient) UpdateOne(r *Ride) *RideUpdateOne
- func (c *RideClient) UpdateOneID(id uuid.UUID) *RideUpdateOne
- func (c *RideClient) Use(hooks ...Hook)
- type RideCreate
- func (rc *RideCreate) AddVehicleLocationHistories(v ...*VehicleLocationHistory) *RideCreate
- func (rc *RideCreate) AddVehicleLocationHistoryIDs(ids ...uuid.UUID) *RideCreate
- func (rc *RideCreate) Exec(ctx context.Context) error
- func (rc *RideCreate) ExecX(ctx context.Context)
- func (rc *RideCreate) Mutation() *RideMutation
- func (rc *RideCreate) Save(ctx context.Context) (*Ride, error)
- func (rc *RideCreate) SaveX(ctx context.Context) *Ride
- func (rc *RideCreate) SetCity(s string) *RideCreate
- func (rc *RideCreate) SetEndAddress(s string) *RideCreate
- func (rc *RideCreate) SetEndTime(t time.Time) *RideCreate
- func (rc *RideCreate) SetID(u uuid.UUID) *RideCreate
- func (rc *RideCreate) SetNillableEndAddress(s *string) *RideCreate
- func (rc *RideCreate) SetNillableEndTime(t *time.Time) *RideCreate
- func (rc *RideCreate) SetNillableID(u *uuid.UUID) *RideCreate
- func (rc *RideCreate) SetNillableRevenue(f *float64) *RideCreate
- func (rc *RideCreate) SetNillableRiderID(u *uuid.UUID) *RideCreate
- func (rc *RideCreate) SetNillableStartAddress(s *string) *RideCreate
- func (rc *RideCreate) SetNillableStartTime(t *time.Time) *RideCreate
- func (rc *RideCreate) SetNillableUserID(id *uuid.UUID) *RideCreate
- func (rc *RideCreate) SetNillableVehicleCity(s *string) *RideCreate
- func (rc *RideCreate) SetNillableVehicleID(u *uuid.UUID) *RideCreate
- func (rc *RideCreate) SetRevenue(f float64) *RideCreate
- func (rc *RideCreate) SetRiderID(u uuid.UUID) *RideCreate
- func (rc *RideCreate) SetStartAddress(s string) *RideCreate
- func (rc *RideCreate) SetStartTime(t time.Time) *RideCreate
- func (rc *RideCreate) SetUser(u *User) *RideCreate
- func (rc *RideCreate) SetUserID(id uuid.UUID) *RideCreate
- func (rc *RideCreate) SetVehicle(v *Vehicle) *RideCreate
- func (rc *RideCreate) SetVehicleCity(s string) *RideCreate
- func (rc *RideCreate) SetVehicleID(u uuid.UUID) *RideCreate
- type RideCreateBulk
- type RideDelete
- type RideDeleteOne
- type RideEdges
- type RideGroupBy
- func (rgb *RideGroupBy) Aggregate(fns ...AggregateFunc) *RideGroupBy
- func (s *RideGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RideGroupBy) BoolX(ctx context.Context) bool
- func (s *RideGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RideGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RideGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RideGroupBy) Float64X(ctx context.Context) float64
- func (s *RideGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RideGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RideGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RideGroupBy) IntX(ctx context.Context) int
- func (s *RideGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RideGroupBy) IntsX(ctx context.Context) []int
- func (rgb *RideGroupBy) Scan(ctx context.Context, v any) error
- func (s *RideGroupBy) ScanX(ctx context.Context, v any)
- func (s *RideGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RideGroupBy) StringX(ctx context.Context) string
- func (s *RideGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RideGroupBy) StringsX(ctx context.Context) []string
- type RideMutation
- func (m *RideMutation) AddField(name string, value ent.Value) error
- func (m *RideMutation) AddRevenue(f float64)
- func (m *RideMutation) AddVehicleLocationHistoryIDs(ids ...uuid.UUID)
- func (m *RideMutation) AddedEdges() []string
- func (m *RideMutation) AddedField(name string) (ent.Value, bool)
- func (m *RideMutation) AddedFields() []string
- func (m *RideMutation) AddedIDs(name string) []ent.Value
- func (m *RideMutation) AddedRevenue() (r float64, exists bool)
- func (m *RideMutation) City() (r string, exists bool)
- func (m *RideMutation) ClearEdge(name string) error
- func (m *RideMutation) ClearEndAddress()
- func (m *RideMutation) ClearEndTime()
- func (m *RideMutation) ClearField(name string) error
- func (m *RideMutation) ClearRevenue()
- func (m *RideMutation) ClearRiderID()
- func (m *RideMutation) ClearStartAddress()
- func (m *RideMutation) ClearStartTime()
- func (m *RideMutation) ClearUser()
- func (m *RideMutation) ClearVehicle()
- func (m *RideMutation) ClearVehicleCity()
- func (m *RideMutation) ClearVehicleID()
- func (m *RideMutation) ClearVehicleLocationHistories()
- func (m *RideMutation) ClearedEdges() []string
- func (m *RideMutation) ClearedFields() []string
- func (m RideMutation) Client() *Client
- func (m *RideMutation) EdgeCleared(name string) bool
- func (m *RideMutation) EndAddress() (r string, exists bool)
- func (m *RideMutation) EndAddressCleared() bool
- func (m *RideMutation) EndTime() (r time.Time, exists bool)
- func (m *RideMutation) EndTimeCleared() bool
- func (m *RideMutation) Field(name string) (ent.Value, bool)
- func (m *RideMutation) FieldCleared(name string) bool
- func (m *RideMutation) Fields() []string
- func (m *RideMutation) ID() (id uuid.UUID, exists bool)
- func (m *RideMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *RideMutation) OldCity(ctx context.Context) (v string, err error)
- func (m *RideMutation) OldEndAddress(ctx context.Context) (v string, err error)
- func (m *RideMutation) OldEndTime(ctx context.Context) (v time.Time, err error)
- func (m *RideMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RideMutation) OldRevenue(ctx context.Context) (v float64, err error)
- func (m *RideMutation) OldRiderID(ctx context.Context) (v uuid.UUID, err error)
- func (m *RideMutation) OldStartAddress(ctx context.Context) (v string, err error)
- func (m *RideMutation) OldStartTime(ctx context.Context) (v time.Time, err error)
- func (m *RideMutation) OldVehicleCity(ctx context.Context) (v string, err error)
- func (m *RideMutation) OldVehicleID(ctx context.Context) (v uuid.UUID, err error)
- func (m *RideMutation) Op() Op
- func (m *RideMutation) RemoveVehicleLocationHistoryIDs(ids ...uuid.UUID)
- func (m *RideMutation) RemovedEdges() []string
- func (m *RideMutation) RemovedIDs(name string) []ent.Value
- func (m *RideMutation) RemovedVehicleLocationHistoriesIDs() (ids []uuid.UUID)
- func (m *RideMutation) ResetCity()
- func (m *RideMutation) ResetEdge(name string) error
- func (m *RideMutation) ResetEndAddress()
- func (m *RideMutation) ResetEndTime()
- func (m *RideMutation) ResetField(name string) error
- func (m *RideMutation) ResetRevenue()
- func (m *RideMutation) ResetRiderID()
- func (m *RideMutation) ResetStartAddress()
- func (m *RideMutation) ResetStartTime()
- func (m *RideMutation) ResetUser()
- func (m *RideMutation) ResetVehicle()
- func (m *RideMutation) ResetVehicleCity()
- func (m *RideMutation) ResetVehicleID()
- func (m *RideMutation) ResetVehicleLocationHistories()
- func (m *RideMutation) Revenue() (r float64, exists bool)
- func (m *RideMutation) RevenueCleared() bool
- func (m *RideMutation) RiderID() (r uuid.UUID, exists bool)
- func (m *RideMutation) RiderIDCleared() bool
- func (m *RideMutation) SetCity(s string)
- func (m *RideMutation) SetEndAddress(s string)
- func (m *RideMutation) SetEndTime(t time.Time)
- func (m *RideMutation) SetField(name string, value ent.Value) error
- func (m *RideMutation) SetID(id uuid.UUID)
- func (m *RideMutation) SetOp(op Op)
- func (m *RideMutation) SetRevenue(f float64)
- func (m *RideMutation) SetRiderID(u uuid.UUID)
- func (m *RideMutation) SetStartAddress(s string)
- func (m *RideMutation) SetStartTime(t time.Time)
- func (m *RideMutation) SetUserID(id uuid.UUID)
- func (m *RideMutation) SetVehicleCity(s string)
- func (m *RideMutation) SetVehicleID(u uuid.UUID)
- func (m *RideMutation) StartAddress() (r string, exists bool)
- func (m *RideMutation) StartAddressCleared() bool
- func (m *RideMutation) StartTime() (r time.Time, exists bool)
- func (m *RideMutation) StartTimeCleared() bool
- func (m RideMutation) Tx() (*Tx, error)
- func (m *RideMutation) Type() string
- func (m *RideMutation) UserCleared() bool
- func (m *RideMutation) UserID() (id uuid.UUID, exists bool)
- func (m *RideMutation) UserIDs() (ids []uuid.UUID)
- func (m *RideMutation) VehicleCity() (r string, exists bool)
- func (m *RideMutation) VehicleCityCleared() bool
- func (m *RideMutation) VehicleCleared() bool
- func (m *RideMutation) VehicleID() (r uuid.UUID, exists bool)
- func (m *RideMutation) VehicleIDCleared() bool
- func (m *RideMutation) VehicleIDs() (ids []uuid.UUID)
- func (m *RideMutation) VehicleLocationHistoriesCleared() bool
- func (m *RideMutation) VehicleLocationHistoriesIDs() (ids []uuid.UUID)
- func (m *RideMutation) Where(ps ...predicate.Ride)
- func (m *RideMutation) WhereP(ps ...func(*sql.Selector))
- type RideQuery
- func (rq *RideQuery) Aggregate(fns ...AggregateFunc) *RideSelect
- func (rq *RideQuery) All(ctx context.Context) ([]*Ride, error)
- func (rq *RideQuery) AllX(ctx context.Context) []*Ride
- func (rq *RideQuery) Clone() *RideQuery
- func (rq *RideQuery) Count(ctx context.Context) (int, error)
- func (rq *RideQuery) CountX(ctx context.Context) int
- func (rq *RideQuery) Exist(ctx context.Context) (bool, error)
- func (rq *RideQuery) ExistX(ctx context.Context) bool
- func (rq *RideQuery) First(ctx context.Context) (*Ride, error)
- func (rq *RideQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (rq *RideQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (rq *RideQuery) FirstX(ctx context.Context) *Ride
- func (rq *RideQuery) GroupBy(field string, fields ...string) *RideGroupBy
- func (rq *RideQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (rq *RideQuery) IDsX(ctx context.Context) []uuid.UUID
- func (rq *RideQuery) Limit(limit int) *RideQuery
- func (rq *RideQuery) Offset(offset int) *RideQuery
- func (rq *RideQuery) Only(ctx context.Context) (*Ride, error)
- func (rq *RideQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (rq *RideQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (rq *RideQuery) OnlyX(ctx context.Context) *Ride
- func (rq *RideQuery) Order(o ...OrderFunc) *RideQuery
- func (rq *RideQuery) QueryUser() *UserQuery
- func (rq *RideQuery) QueryVehicle() *VehicleQuery
- func (rq *RideQuery) QueryVehicleLocationHistories() *VehicleLocationHistoryQuery
- func (rq *RideQuery) Select(fields ...string) *RideSelect
- func (rq *RideQuery) Unique(unique bool) *RideQuery
- func (rq *RideQuery) Where(ps ...predicate.Ride) *RideQuery
- func (rq *RideQuery) WithUser(opts ...func(*UserQuery)) *RideQuery
- func (rq *RideQuery) WithVehicle(opts ...func(*VehicleQuery)) *RideQuery
- func (rq *RideQuery) WithVehicleLocationHistories(opts ...func(*VehicleLocationHistoryQuery)) *RideQuery
- type RideSelect
- func (rs *RideSelect) Aggregate(fns ...AggregateFunc) *RideSelect
- func (s *RideSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RideSelect) BoolX(ctx context.Context) bool
- func (s *RideSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RideSelect) BoolsX(ctx context.Context) []bool
- func (s *RideSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RideSelect) Float64X(ctx context.Context) float64
- func (s *RideSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RideSelect) Float64sX(ctx context.Context) []float64
- func (s *RideSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RideSelect) IntX(ctx context.Context) int
- func (s *RideSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RideSelect) IntsX(ctx context.Context) []int
- func (rs *RideSelect) Scan(ctx context.Context, v any) error
- func (s *RideSelect) ScanX(ctx context.Context, v any)
- func (s *RideSelect) String(ctx context.Context) (_ string, err error)
- func (s *RideSelect) StringX(ctx context.Context) string
- func (s *RideSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RideSelect) StringsX(ctx context.Context) []string
- type RideUpdate
- func (ru *RideUpdate) AddRevenue(f float64) *RideUpdate
- func (ru *RideUpdate) AddVehicleLocationHistories(v ...*VehicleLocationHistory) *RideUpdate
- func (ru *RideUpdate) AddVehicleLocationHistoryIDs(ids ...uuid.UUID) *RideUpdate
- func (ru *RideUpdate) ClearEndAddress() *RideUpdate
- func (ru *RideUpdate) ClearEndTime() *RideUpdate
- func (ru *RideUpdate) ClearRevenue() *RideUpdate
- func (ru *RideUpdate) ClearRiderID() *RideUpdate
- func (ru *RideUpdate) ClearStartAddress() *RideUpdate
- func (ru *RideUpdate) ClearStartTime() *RideUpdate
- func (ru *RideUpdate) ClearUser() *RideUpdate
- func (ru *RideUpdate) ClearVehicle() *RideUpdate
- func (ru *RideUpdate) ClearVehicleCity() *RideUpdate
- func (ru *RideUpdate) ClearVehicleID() *RideUpdate
- func (ru *RideUpdate) ClearVehicleLocationHistories() *RideUpdate
- func (ru *RideUpdate) Exec(ctx context.Context) error
- func (ru *RideUpdate) ExecX(ctx context.Context)
- func (ru *RideUpdate) Mutation() *RideMutation
- func (ru *RideUpdate) RemoveVehicleLocationHistories(v ...*VehicleLocationHistory) *RideUpdate
- func (ru *RideUpdate) RemoveVehicleLocationHistoryIDs(ids ...uuid.UUID) *RideUpdate
- func (ru *RideUpdate) Save(ctx context.Context) (int, error)
- func (ru *RideUpdate) SaveX(ctx context.Context) int
- func (ru *RideUpdate) SetCity(s string) *RideUpdate
- func (ru *RideUpdate) SetEndAddress(s string) *RideUpdate
- func (ru *RideUpdate) SetEndTime(t time.Time) *RideUpdate
- func (ru *RideUpdate) SetNillableEndAddress(s *string) *RideUpdate
- func (ru *RideUpdate) SetNillableEndTime(t *time.Time) *RideUpdate
- func (ru *RideUpdate) SetNillableRevenue(f *float64) *RideUpdate
- func (ru *RideUpdate) SetNillableRiderID(u *uuid.UUID) *RideUpdate
- func (ru *RideUpdate) SetNillableStartAddress(s *string) *RideUpdate
- func (ru *RideUpdate) SetNillableStartTime(t *time.Time) *RideUpdate
- func (ru *RideUpdate) SetNillableUserID(id *uuid.UUID) *RideUpdate
- func (ru *RideUpdate) SetNillableVehicleCity(s *string) *RideUpdate
- func (ru *RideUpdate) SetNillableVehicleID(u *uuid.UUID) *RideUpdate
- func (ru *RideUpdate) SetRevenue(f float64) *RideUpdate
- func (ru *RideUpdate) SetRiderID(u uuid.UUID) *RideUpdate
- func (ru *RideUpdate) SetStartAddress(s string) *RideUpdate
- func (ru *RideUpdate) SetStartTime(t time.Time) *RideUpdate
- func (ru *RideUpdate) SetUser(u *User) *RideUpdate
- func (ru *RideUpdate) SetUserID(id uuid.UUID) *RideUpdate
- func (ru *RideUpdate) SetVehicle(v *Vehicle) *RideUpdate
- func (ru *RideUpdate) SetVehicleCity(s string) *RideUpdate
- func (ru *RideUpdate) SetVehicleID(u uuid.UUID) *RideUpdate
- func (ru *RideUpdate) Where(ps ...predicate.Ride) *RideUpdate
- type RideUpdateOne
- func (ruo *RideUpdateOne) AddRevenue(f float64) *RideUpdateOne
- func (ruo *RideUpdateOne) AddVehicleLocationHistories(v ...*VehicleLocationHistory) *RideUpdateOne
- func (ruo *RideUpdateOne) AddVehicleLocationHistoryIDs(ids ...uuid.UUID) *RideUpdateOne
- func (ruo *RideUpdateOne) ClearEndAddress() *RideUpdateOne
- func (ruo *RideUpdateOne) ClearEndTime() *RideUpdateOne
- func (ruo *RideUpdateOne) ClearRevenue() *RideUpdateOne
- func (ruo *RideUpdateOne) ClearRiderID() *RideUpdateOne
- func (ruo *RideUpdateOne) ClearStartAddress() *RideUpdateOne
- func (ruo *RideUpdateOne) ClearStartTime() *RideUpdateOne
- func (ruo *RideUpdateOne) ClearUser() *RideUpdateOne
- func (ruo *RideUpdateOne) ClearVehicle() *RideUpdateOne
- func (ruo *RideUpdateOne) ClearVehicleCity() *RideUpdateOne
- func (ruo *RideUpdateOne) ClearVehicleID() *RideUpdateOne
- func (ruo *RideUpdateOne) ClearVehicleLocationHistories() *RideUpdateOne
- func (ruo *RideUpdateOne) Exec(ctx context.Context) error
- func (ruo *RideUpdateOne) ExecX(ctx context.Context)
- func (ruo *RideUpdateOne) Mutation() *RideMutation
- func (ruo *RideUpdateOne) RemoveVehicleLocationHistories(v ...*VehicleLocationHistory) *RideUpdateOne
- func (ruo *RideUpdateOne) RemoveVehicleLocationHistoryIDs(ids ...uuid.UUID) *RideUpdateOne
- func (ruo *RideUpdateOne) Save(ctx context.Context) (*Ride, error)
- func (ruo *RideUpdateOne) SaveX(ctx context.Context) *Ride
- func (ruo *RideUpdateOne) Select(field string, fields ...string) *RideUpdateOne
- func (ruo *RideUpdateOne) SetCity(s string) *RideUpdateOne
- func (ruo *RideUpdateOne) SetEndAddress(s string) *RideUpdateOne
- func (ruo *RideUpdateOne) SetEndTime(t time.Time) *RideUpdateOne
- func (ruo *RideUpdateOne) SetNillableEndAddress(s *string) *RideUpdateOne
- func (ruo *RideUpdateOne) SetNillableEndTime(t *time.Time) *RideUpdateOne
- func (ruo *RideUpdateOne) SetNillableRevenue(f *float64) *RideUpdateOne
- func (ruo *RideUpdateOne) SetNillableRiderID(u *uuid.UUID) *RideUpdateOne
- func (ruo *RideUpdateOne) SetNillableStartAddress(s *string) *RideUpdateOne
- func (ruo *RideUpdateOne) SetNillableStartTime(t *time.Time) *RideUpdateOne
- func (ruo *RideUpdateOne) SetNillableUserID(id *uuid.UUID) *RideUpdateOne
- func (ruo *RideUpdateOne) SetNillableVehicleCity(s *string) *RideUpdateOne
- func (ruo *RideUpdateOne) SetNillableVehicleID(u *uuid.UUID) *RideUpdateOne
- func (ruo *RideUpdateOne) SetRevenue(f float64) *RideUpdateOne
- func (ruo *RideUpdateOne) SetRiderID(u uuid.UUID) *RideUpdateOne
- func (ruo *RideUpdateOne) SetStartAddress(s string) *RideUpdateOne
- func (ruo *RideUpdateOne) SetStartTime(t time.Time) *RideUpdateOne
- func (ruo *RideUpdateOne) SetUser(u *User) *RideUpdateOne
- func (ruo *RideUpdateOne) SetUserID(id uuid.UUID) *RideUpdateOne
- func (ruo *RideUpdateOne) SetVehicle(v *Vehicle) *RideUpdateOne
- func (ruo *RideUpdateOne) SetVehicleCity(s string) *RideUpdateOne
- func (ruo *RideUpdateOne) SetVehicleID(u uuid.UUID) *RideUpdateOne
- type Rides
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type User
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id uuid.UUID) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryRides(u *User) *RideQuery
- func (c *UserClient) QueryUserPromoCodes(u *User) *UserPromoCodeQuery
- func (c *UserClient) QueryVehicles(u *User) *VehicleQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddRideIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddRides(r ...*Ride) *UserCreate
- func (uc *UserCreate) AddUserPromoCodeIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddUserPromoCodes(u ...*UserPromoCode) *UserCreate
- func (uc *UserCreate) AddVehicleIDs(ids ...uuid.UUID) *UserCreate
- func (uc *UserCreate) AddVehicles(v ...*Vehicle) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetAddress(s string) *UserCreate
- func (uc *UserCreate) SetCity(s string) *UserCreate
- func (uc *UserCreate) SetCreditCard(s string) *UserCreate
- func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
- func (uc *UserCreate) SetName(s string) *UserCreate
- func (uc *UserCreate) SetNillableAddress(s *string) *UserCreate
- func (uc *UserCreate) SetNillableCreditCard(s *string) *UserCreate
- func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
- func (uc *UserCreate) SetNillableName(s *string) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdges
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddRideIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddUserPromoCodeIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddVehicleIDs(ids ...uuid.UUID)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) Address() (r string, exists bool)
- func (m *UserMutation) AddressCleared() bool
- func (m *UserMutation) City() (r string, exists bool)
- func (m *UserMutation) ClearAddress()
- func (m *UserMutation) ClearCreditCard()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearName()
- func (m *UserMutation) ClearRides()
- func (m *UserMutation) ClearUserPromoCodes()
- func (m *UserMutation) ClearVehicles()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreditCard() (r string, exists bool)
- func (m *UserMutation) CreditCardCleared() bool
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) ID() (id uuid.UUID, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *UserMutation) Name() (r string, exists bool)
- func (m *UserMutation) NameCleared() bool
- func (m *UserMutation) OldAddress(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldCity(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldCreditCard(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) RemoveRideIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveUserPromoCodeIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemoveVehicleIDs(ids ...uuid.UUID)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedRidesIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedUserPromoCodesIDs() (ids []uuid.UUID)
- func (m *UserMutation) RemovedVehiclesIDs() (ids []uuid.UUID)
- func (m *UserMutation) ResetAddress()
- func (m *UserMutation) ResetCity()
- func (m *UserMutation) ResetCreditCard()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetName()
- func (m *UserMutation) ResetRides()
- func (m *UserMutation) ResetUserPromoCodes()
- func (m *UserMutation) ResetVehicles()
- func (m *UserMutation) RidesCleared() bool
- func (m *UserMutation) RidesIDs() (ids []uuid.UUID)
- func (m *UserMutation) SetAddress(s string)
- func (m *UserMutation) SetCity(s string)
- func (m *UserMutation) SetCreditCard(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetID(id uuid.UUID)
- func (m *UserMutation) SetName(s string)
- func (m *UserMutation) SetOp(op Op)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UserPromoCodesCleared() bool
- func (m *UserMutation) UserPromoCodesIDs() (ids []uuid.UUID)
- func (m *UserMutation) VehiclesCleared() bool
- func (m *UserMutation) VehiclesIDs() (ids []uuid.UUID)
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserPromoCode
- type UserPromoCodeClient
- func (c *UserPromoCodeClient) Create() *UserPromoCodeCreate
- func (c *UserPromoCodeClient) CreateBulk(builders ...*UserPromoCodeCreate) *UserPromoCodeCreateBulk
- func (c *UserPromoCodeClient) Delete() *UserPromoCodeDelete
- func (c *UserPromoCodeClient) DeleteOne(upc *UserPromoCode) *UserPromoCodeDeleteOne
- func (c *UserPromoCodeClient) DeleteOneID(id uuid.UUID) *UserPromoCodeDeleteOne
- func (c *UserPromoCodeClient) Get(ctx context.Context, id uuid.UUID) (*UserPromoCode, error)
- func (c *UserPromoCodeClient) GetX(ctx context.Context, id uuid.UUID) *UserPromoCode
- func (c *UserPromoCodeClient) Hooks() []Hook
- func (c *UserPromoCodeClient) Intercept(interceptors ...Interceptor)
- func (c *UserPromoCodeClient) Interceptors() []Interceptor
- func (c *UserPromoCodeClient) Query() *UserPromoCodeQuery
- func (c *UserPromoCodeClient) QueryUser(upc *UserPromoCode) *UserQuery
- func (c *UserPromoCodeClient) Update() *UserPromoCodeUpdate
- func (c *UserPromoCodeClient) UpdateOne(upc *UserPromoCode) *UserPromoCodeUpdateOne
- func (c *UserPromoCodeClient) UpdateOneID(id uuid.UUID) *UserPromoCodeUpdateOne
- func (c *UserPromoCodeClient) Use(hooks ...Hook)
- type UserPromoCodeCreate
- func (upcc *UserPromoCodeCreate) Exec(ctx context.Context) error
- func (upcc *UserPromoCodeCreate) ExecX(ctx context.Context)
- func (upcc *UserPromoCodeCreate) Mutation() *UserPromoCodeMutation
- func (upcc *UserPromoCodeCreate) Save(ctx context.Context) (*UserPromoCode, error)
- func (upcc *UserPromoCodeCreate) SaveX(ctx context.Context) *UserPromoCode
- func (upcc *UserPromoCodeCreate) SetCity(s string) *UserPromoCodeCreate
- func (upcc *UserPromoCodeCreate) SetCode(s string) *UserPromoCodeCreate
- func (upcc *UserPromoCodeCreate) SetID(u uuid.UUID) *UserPromoCodeCreate
- func (upcc *UserPromoCodeCreate) SetNillableID(u *uuid.UUID) *UserPromoCodeCreate
- func (upcc *UserPromoCodeCreate) SetNillableTimestamp(t *time.Time) *UserPromoCodeCreate
- func (upcc *UserPromoCodeCreate) SetNillableUsageCount(i *int) *UserPromoCodeCreate
- func (upcc *UserPromoCodeCreate) SetTimestamp(t time.Time) *UserPromoCodeCreate
- func (upcc *UserPromoCodeCreate) SetUsageCount(i int) *UserPromoCodeCreate
- func (upcc *UserPromoCodeCreate) SetUser(u *User) *UserPromoCodeCreate
- func (upcc *UserPromoCodeCreate) SetUserID(u uuid.UUID) *UserPromoCodeCreate
- type UserPromoCodeCreateBulk
- func (upccb *UserPromoCodeCreateBulk) Exec(ctx context.Context) error
- func (upccb *UserPromoCodeCreateBulk) ExecX(ctx context.Context)
- func (upccb *UserPromoCodeCreateBulk) Save(ctx context.Context) ([]*UserPromoCode, error)
- func (upccb *UserPromoCodeCreateBulk) SaveX(ctx context.Context) []*UserPromoCode
- type UserPromoCodeDelete
- type UserPromoCodeDeleteOne
- type UserPromoCodeEdges
- type UserPromoCodeGroupBy
- func (upcgb *UserPromoCodeGroupBy) Aggregate(fns ...AggregateFunc) *UserPromoCodeGroupBy
- func (s *UserPromoCodeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserPromoCodeGroupBy) BoolX(ctx context.Context) bool
- func (s *UserPromoCodeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserPromoCodeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserPromoCodeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserPromoCodeGroupBy) Float64X(ctx context.Context) float64
- func (s *UserPromoCodeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserPromoCodeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserPromoCodeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserPromoCodeGroupBy) IntX(ctx context.Context) int
- func (s *UserPromoCodeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserPromoCodeGroupBy) IntsX(ctx context.Context) []int
- func (upcgb *UserPromoCodeGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserPromoCodeGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserPromoCodeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserPromoCodeGroupBy) StringX(ctx context.Context) string
- func (s *UserPromoCodeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserPromoCodeGroupBy) StringsX(ctx context.Context) []string
- type UserPromoCodeMutation
- func (m *UserPromoCodeMutation) AddField(name string, value ent.Value) error
- func (m *UserPromoCodeMutation) AddUsageCount(i int)
- func (m *UserPromoCodeMutation) AddedEdges() []string
- func (m *UserPromoCodeMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserPromoCodeMutation) AddedFields() []string
- func (m *UserPromoCodeMutation) AddedIDs(name string) []ent.Value
- func (m *UserPromoCodeMutation) AddedUsageCount() (r int, exists bool)
- func (m *UserPromoCodeMutation) City() (r string, exists bool)
- func (m *UserPromoCodeMutation) ClearEdge(name string) error
- func (m *UserPromoCodeMutation) ClearField(name string) error
- func (m *UserPromoCodeMutation) ClearTimestamp()
- func (m *UserPromoCodeMutation) ClearUsageCount()
- func (m *UserPromoCodeMutation) ClearUser()
- func (m *UserPromoCodeMutation) ClearedEdges() []string
- func (m *UserPromoCodeMutation) ClearedFields() []string
- func (m UserPromoCodeMutation) Client() *Client
- func (m *UserPromoCodeMutation) Code() (r string, exists bool)
- func (m *UserPromoCodeMutation) EdgeCleared(name string) bool
- func (m *UserPromoCodeMutation) Field(name string) (ent.Value, bool)
- func (m *UserPromoCodeMutation) FieldCleared(name string) bool
- func (m *UserPromoCodeMutation) Fields() []string
- func (m *UserPromoCodeMutation) ID() (id uuid.UUID, exists bool)
- func (m *UserPromoCodeMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *UserPromoCodeMutation) OldCity(ctx context.Context) (v string, err error)
- func (m *UserPromoCodeMutation) OldCode(ctx context.Context) (v string, err error)
- func (m *UserPromoCodeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserPromoCodeMutation) OldTimestamp(ctx context.Context) (v time.Time, err error)
- func (m *UserPromoCodeMutation) OldUsageCount(ctx context.Context) (v int, err error)
- func (m *UserPromoCodeMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)
- func (m *UserPromoCodeMutation) Op() Op
- func (m *UserPromoCodeMutation) RemovedEdges() []string
- func (m *UserPromoCodeMutation) RemovedIDs(name string) []ent.Value
- func (m *UserPromoCodeMutation) ResetCity()
- func (m *UserPromoCodeMutation) ResetCode()
- func (m *UserPromoCodeMutation) ResetEdge(name string) error
- func (m *UserPromoCodeMutation) ResetField(name string) error
- func (m *UserPromoCodeMutation) ResetTimestamp()
- func (m *UserPromoCodeMutation) ResetUsageCount()
- func (m *UserPromoCodeMutation) ResetUser()
- func (m *UserPromoCodeMutation) ResetUserID()
- func (m *UserPromoCodeMutation) SetCity(s string)
- func (m *UserPromoCodeMutation) SetCode(s string)
- func (m *UserPromoCodeMutation) SetField(name string, value ent.Value) error
- func (m *UserPromoCodeMutation) SetID(id uuid.UUID)
- func (m *UserPromoCodeMutation) SetOp(op Op)
- func (m *UserPromoCodeMutation) SetTimestamp(t time.Time)
- func (m *UserPromoCodeMutation) SetUsageCount(i int)
- func (m *UserPromoCodeMutation) SetUserID(u uuid.UUID)
- func (m *UserPromoCodeMutation) Timestamp() (r time.Time, exists bool)
- func (m *UserPromoCodeMutation) TimestampCleared() bool
- func (m UserPromoCodeMutation) Tx() (*Tx, error)
- func (m *UserPromoCodeMutation) Type() string
- func (m *UserPromoCodeMutation) UsageCount() (r int, exists bool)
- func (m *UserPromoCodeMutation) UsageCountCleared() bool
- func (m *UserPromoCodeMutation) UserCleared() bool
- func (m *UserPromoCodeMutation) UserID() (r uuid.UUID, exists bool)
- func (m *UserPromoCodeMutation) UserIDs() (ids []uuid.UUID)
- func (m *UserPromoCodeMutation) Where(ps ...predicate.UserPromoCode)
- func (m *UserPromoCodeMutation) WhereP(ps ...func(*sql.Selector))
- type UserPromoCodeQuery
- func (upcq *UserPromoCodeQuery) Aggregate(fns ...AggregateFunc) *UserPromoCodeSelect
- func (upcq *UserPromoCodeQuery) All(ctx context.Context) ([]*UserPromoCode, error)
- func (upcq *UserPromoCodeQuery) AllX(ctx context.Context) []*UserPromoCode
- func (upcq *UserPromoCodeQuery) Clone() *UserPromoCodeQuery
- func (upcq *UserPromoCodeQuery) Count(ctx context.Context) (int, error)
- func (upcq *UserPromoCodeQuery) CountX(ctx context.Context) int
- func (upcq *UserPromoCodeQuery) Exist(ctx context.Context) (bool, error)
- func (upcq *UserPromoCodeQuery) ExistX(ctx context.Context) bool
- func (upcq *UserPromoCodeQuery) First(ctx context.Context) (*UserPromoCode, error)
- func (upcq *UserPromoCodeQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (upcq *UserPromoCodeQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (upcq *UserPromoCodeQuery) FirstX(ctx context.Context) *UserPromoCode
- func (upcq *UserPromoCodeQuery) GroupBy(field string, fields ...string) *UserPromoCodeGroupBy
- func (upcq *UserPromoCodeQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (upcq *UserPromoCodeQuery) IDsX(ctx context.Context) []uuid.UUID
- func (upcq *UserPromoCodeQuery) Limit(limit int) *UserPromoCodeQuery
- func (upcq *UserPromoCodeQuery) Offset(offset int) *UserPromoCodeQuery
- func (upcq *UserPromoCodeQuery) Only(ctx context.Context) (*UserPromoCode, error)
- func (upcq *UserPromoCodeQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (upcq *UserPromoCodeQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (upcq *UserPromoCodeQuery) OnlyX(ctx context.Context) *UserPromoCode
- func (upcq *UserPromoCodeQuery) Order(o ...OrderFunc) *UserPromoCodeQuery
- func (upcq *UserPromoCodeQuery) QueryUser() *UserQuery
- func (upcq *UserPromoCodeQuery) Select(fields ...string) *UserPromoCodeSelect
- func (upcq *UserPromoCodeQuery) Unique(unique bool) *UserPromoCodeQuery
- func (upcq *UserPromoCodeQuery) Where(ps ...predicate.UserPromoCode) *UserPromoCodeQuery
- func (upcq *UserPromoCodeQuery) WithUser(opts ...func(*UserQuery)) *UserPromoCodeQuery
- type UserPromoCodeSelect
- func (upcs *UserPromoCodeSelect) Aggregate(fns ...AggregateFunc) *UserPromoCodeSelect
- func (s *UserPromoCodeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserPromoCodeSelect) BoolX(ctx context.Context) bool
- func (s *UserPromoCodeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserPromoCodeSelect) BoolsX(ctx context.Context) []bool
- func (s *UserPromoCodeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserPromoCodeSelect) Float64X(ctx context.Context) float64
- func (s *UserPromoCodeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserPromoCodeSelect) Float64sX(ctx context.Context) []float64
- func (s *UserPromoCodeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserPromoCodeSelect) IntX(ctx context.Context) int
- func (s *UserPromoCodeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserPromoCodeSelect) IntsX(ctx context.Context) []int
- func (upcs *UserPromoCodeSelect) Scan(ctx context.Context, v any) error
- func (s *UserPromoCodeSelect) ScanX(ctx context.Context, v any)
- func (s *UserPromoCodeSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserPromoCodeSelect) StringX(ctx context.Context) string
- func (s *UserPromoCodeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserPromoCodeSelect) StringsX(ctx context.Context) []string
- type UserPromoCodeUpdate
- func (upcu *UserPromoCodeUpdate) AddUsageCount(i int) *UserPromoCodeUpdate
- func (upcu *UserPromoCodeUpdate) ClearTimestamp() *UserPromoCodeUpdate
- func (upcu *UserPromoCodeUpdate) ClearUsageCount() *UserPromoCodeUpdate
- func (upcu *UserPromoCodeUpdate) ClearUser() *UserPromoCodeUpdate
- func (upcu *UserPromoCodeUpdate) Exec(ctx context.Context) error
- func (upcu *UserPromoCodeUpdate) ExecX(ctx context.Context)
- func (upcu *UserPromoCodeUpdate) Mutation() *UserPromoCodeMutation
- func (upcu *UserPromoCodeUpdate) Save(ctx context.Context) (int, error)
- func (upcu *UserPromoCodeUpdate) SaveX(ctx context.Context) int
- func (upcu *UserPromoCodeUpdate) SetCity(s string) *UserPromoCodeUpdate
- func (upcu *UserPromoCodeUpdate) SetCode(s string) *UserPromoCodeUpdate
- func (upcu *UserPromoCodeUpdate) SetNillableTimestamp(t *time.Time) *UserPromoCodeUpdate
- func (upcu *UserPromoCodeUpdate) SetNillableUsageCount(i *int) *UserPromoCodeUpdate
- func (upcu *UserPromoCodeUpdate) SetTimestamp(t time.Time) *UserPromoCodeUpdate
- func (upcu *UserPromoCodeUpdate) SetUsageCount(i int) *UserPromoCodeUpdate
- func (upcu *UserPromoCodeUpdate) SetUser(u *User) *UserPromoCodeUpdate
- func (upcu *UserPromoCodeUpdate) SetUserID(u uuid.UUID) *UserPromoCodeUpdate
- func (upcu *UserPromoCodeUpdate) Where(ps ...predicate.UserPromoCode) *UserPromoCodeUpdate
- type UserPromoCodeUpdateOne
- func (upcuo *UserPromoCodeUpdateOne) AddUsageCount(i int) *UserPromoCodeUpdateOne
- func (upcuo *UserPromoCodeUpdateOne) ClearTimestamp() *UserPromoCodeUpdateOne
- func (upcuo *UserPromoCodeUpdateOne) ClearUsageCount() *UserPromoCodeUpdateOne
- func (upcuo *UserPromoCodeUpdateOne) ClearUser() *UserPromoCodeUpdateOne
- func (upcuo *UserPromoCodeUpdateOne) Exec(ctx context.Context) error
- func (upcuo *UserPromoCodeUpdateOne) ExecX(ctx context.Context)
- func (upcuo *UserPromoCodeUpdateOne) Mutation() *UserPromoCodeMutation
- func (upcuo *UserPromoCodeUpdateOne) Save(ctx context.Context) (*UserPromoCode, error)
- func (upcuo *UserPromoCodeUpdateOne) SaveX(ctx context.Context) *UserPromoCode
- func (upcuo *UserPromoCodeUpdateOne) Select(field string, fields ...string) *UserPromoCodeUpdateOne
- func (upcuo *UserPromoCodeUpdateOne) SetCity(s string) *UserPromoCodeUpdateOne
- func (upcuo *UserPromoCodeUpdateOne) SetCode(s string) *UserPromoCodeUpdateOne
- func (upcuo *UserPromoCodeUpdateOne) SetNillableTimestamp(t *time.Time) *UserPromoCodeUpdateOne
- func (upcuo *UserPromoCodeUpdateOne) SetNillableUsageCount(i *int) *UserPromoCodeUpdateOne
- func (upcuo *UserPromoCodeUpdateOne) SetTimestamp(t time.Time) *UserPromoCodeUpdateOne
- func (upcuo *UserPromoCodeUpdateOne) SetUsageCount(i int) *UserPromoCodeUpdateOne
- func (upcuo *UserPromoCodeUpdateOne) SetUser(u *User) *UserPromoCodeUpdateOne
- func (upcuo *UserPromoCodeUpdateOne) SetUserID(u uuid.UUID) *UserPromoCodeUpdateOne
- type UserPromoCodes
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (uq *UserQuery) IDsX(ctx context.Context) []uuid.UUID
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery
- func (uq *UserQuery) QueryRides() *RideQuery
- func (uq *UserQuery) QueryUserPromoCodes() *UserPromoCodeQuery
- func (uq *UserQuery) QueryVehicles() *VehicleQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithRides(opts ...func(*RideQuery)) *UserQuery
- func (uq *UserQuery) WithUserPromoCodes(opts ...func(*UserPromoCodeQuery)) *UserQuery
- func (uq *UserQuery) WithVehicles(opts ...func(*VehicleQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddRideIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddRides(r ...*Ride) *UserUpdate
- func (uu *UserUpdate) AddUserPromoCodeIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddUserPromoCodes(u ...*UserPromoCode) *UserUpdate
- func (uu *UserUpdate) AddVehicleIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) AddVehicles(v ...*Vehicle) *UserUpdate
- func (uu *UserUpdate) ClearAddress() *UserUpdate
- func (uu *UserUpdate) ClearCreditCard() *UserUpdate
- func (uu *UserUpdate) ClearName() *UserUpdate
- func (uu *UserUpdate) ClearRides() *UserUpdate
- func (uu *UserUpdate) ClearUserPromoCodes() *UserUpdate
- func (uu *UserUpdate) ClearVehicles() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveRideIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveRides(r ...*Ride) *UserUpdate
- func (uu *UserUpdate) RemoveUserPromoCodeIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveUserPromoCodes(u ...*UserPromoCode) *UserUpdate
- func (uu *UserUpdate) RemoveVehicleIDs(ids ...uuid.UUID) *UserUpdate
- func (uu *UserUpdate) RemoveVehicles(v ...*Vehicle) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetAddress(s string) *UserUpdate
- func (uu *UserUpdate) SetCity(s string) *UserUpdate
- func (uu *UserUpdate) SetCreditCard(s string) *UserUpdate
- func (uu *UserUpdate) SetName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableAddress(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableCreditCard(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableName(s *string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddRideIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddRides(r ...*Ride) *UserUpdateOne
- func (uuo *UserUpdateOne) AddUserPromoCodeIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddUserPromoCodes(u ...*UserPromoCode) *UserUpdateOne
- func (uuo *UserUpdateOne) AddVehicleIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) AddVehicles(v ...*Vehicle) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearAddress() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearCreditCard() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearName() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearRides() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearUserPromoCodes() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearVehicles() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveRideIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveRides(r ...*Ride) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveUserPromoCodeIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveUserPromoCodes(u ...*UserPromoCode) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveVehicleIDs(ids ...uuid.UUID) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveVehicles(v ...*Vehicle) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetAddress(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCity(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCreditCard(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableAddress(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCreditCard(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableName(s *string) *UserUpdateOne
- type Users
- type ValidationError
- type Value
- type Vehicle
- type VehicleClient
- func (c *VehicleClient) Create() *VehicleCreate
- func (c *VehicleClient) CreateBulk(builders ...*VehicleCreate) *VehicleCreateBulk
- func (c *VehicleClient) Delete() *VehicleDelete
- func (c *VehicleClient) DeleteOne(v *Vehicle) *VehicleDeleteOne
- func (c *VehicleClient) DeleteOneID(id uuid.UUID) *VehicleDeleteOne
- func (c *VehicleClient) Get(ctx context.Context, id uuid.UUID) (*Vehicle, error)
- func (c *VehicleClient) GetX(ctx context.Context, id uuid.UUID) *Vehicle
- func (c *VehicleClient) Hooks() []Hook
- func (c *VehicleClient) Intercept(interceptors ...Interceptor)
- func (c *VehicleClient) Interceptors() []Interceptor
- func (c *VehicleClient) Query() *VehicleQuery
- func (c *VehicleClient) QueryRides(v *Vehicle) *RideQuery
- func (c *VehicleClient) QueryUser(v *Vehicle) *UserQuery
- func (c *VehicleClient) Update() *VehicleUpdate
- func (c *VehicleClient) UpdateOne(v *Vehicle) *VehicleUpdateOne
- func (c *VehicleClient) UpdateOneID(id uuid.UUID) *VehicleUpdateOne
- func (c *VehicleClient) Use(hooks ...Hook)
- type VehicleCreate
- func (vc *VehicleCreate) AddRideIDs(ids ...uuid.UUID) *VehicleCreate
- func (vc *VehicleCreate) AddRides(r ...*Ride) *VehicleCreate
- func (vc *VehicleCreate) Exec(ctx context.Context) error
- func (vc *VehicleCreate) ExecX(ctx context.Context)
- func (vc *VehicleCreate) Mutation() *VehicleMutation
- func (vc *VehicleCreate) Save(ctx context.Context) (*Vehicle, error)
- func (vc *VehicleCreate) SaveX(ctx context.Context) *Vehicle
- func (vc *VehicleCreate) SetCity(s string) *VehicleCreate
- func (vc *VehicleCreate) SetCreationTime(t time.Time) *VehicleCreate
- func (vc *VehicleCreate) SetCurrentLocation(s string) *VehicleCreate
- func (vc *VehicleCreate) SetExt(m *map[string]interface{}) *VehicleCreate
- func (vc *VehicleCreate) SetID(u uuid.UUID) *VehicleCreate
- func (vc *VehicleCreate) SetNillableCreationTime(t *time.Time) *VehicleCreate
- func (vc *VehicleCreate) SetNillableCurrentLocation(s *string) *VehicleCreate
- func (vc *VehicleCreate) SetNillableID(u *uuid.UUID) *VehicleCreate
- func (vc *VehicleCreate) SetNillableOwnerID(u *uuid.UUID) *VehicleCreate
- func (vc *VehicleCreate) SetNillableStatus(s *string) *VehicleCreate
- func (vc *VehicleCreate) SetNillableType(s *string) *VehicleCreate
- func (vc *VehicleCreate) SetNillableUserID(id *uuid.UUID) *VehicleCreate
- func (vc *VehicleCreate) SetOwnerID(u uuid.UUID) *VehicleCreate
- func (vc *VehicleCreate) SetStatus(s string) *VehicleCreate
- func (vc *VehicleCreate) SetType(s string) *VehicleCreate
- func (vc *VehicleCreate) SetUser(u *User) *VehicleCreate
- func (vc *VehicleCreate) SetUserID(id uuid.UUID) *VehicleCreate
- type VehicleCreateBulk
- type VehicleDelete
- type VehicleDeleteOne
- type VehicleEdges
- type VehicleGroupBy
- func (vgb *VehicleGroupBy) Aggregate(fns ...AggregateFunc) *VehicleGroupBy
- func (s *VehicleGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *VehicleGroupBy) BoolX(ctx context.Context) bool
- func (s *VehicleGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *VehicleGroupBy) BoolsX(ctx context.Context) []bool
- func (s *VehicleGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *VehicleGroupBy) Float64X(ctx context.Context) float64
- func (s *VehicleGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *VehicleGroupBy) Float64sX(ctx context.Context) []float64
- func (s *VehicleGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *VehicleGroupBy) IntX(ctx context.Context) int
- func (s *VehicleGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *VehicleGroupBy) IntsX(ctx context.Context) []int
- func (vgb *VehicleGroupBy) Scan(ctx context.Context, v any) error
- func (s *VehicleGroupBy) ScanX(ctx context.Context, v any)
- func (s *VehicleGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *VehicleGroupBy) StringX(ctx context.Context) string
- func (s *VehicleGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *VehicleGroupBy) StringsX(ctx context.Context) []string
- type VehicleLocationHistories
- type VehicleLocationHistory
- type VehicleLocationHistoryClient
- func (c *VehicleLocationHistoryClient) Create() *VehicleLocationHistoryCreate
- func (c *VehicleLocationHistoryClient) CreateBulk(builders ...*VehicleLocationHistoryCreate) *VehicleLocationHistoryCreateBulk
- func (c *VehicleLocationHistoryClient) Delete() *VehicleLocationHistoryDelete
- func (c *VehicleLocationHistoryClient) DeleteOne(vlh *VehicleLocationHistory) *VehicleLocationHistoryDeleteOne
- func (c *VehicleLocationHistoryClient) DeleteOneID(id uuid.UUID) *VehicleLocationHistoryDeleteOne
- func (c *VehicleLocationHistoryClient) Get(ctx context.Context, id uuid.UUID) (*VehicleLocationHistory, error)
- func (c *VehicleLocationHistoryClient) GetX(ctx context.Context, id uuid.UUID) *VehicleLocationHistory
- func (c *VehicleLocationHistoryClient) Hooks() []Hook
- func (c *VehicleLocationHistoryClient) Intercept(interceptors ...Interceptor)
- func (c *VehicleLocationHistoryClient) Interceptors() []Interceptor
- func (c *VehicleLocationHistoryClient) Query() *VehicleLocationHistoryQuery
- func (c *VehicleLocationHistoryClient) QueryRides(vlh *VehicleLocationHistory) *RideQuery
- func (c *VehicleLocationHistoryClient) Update() *VehicleLocationHistoryUpdate
- func (c *VehicleLocationHistoryClient) UpdateOne(vlh *VehicleLocationHistory) *VehicleLocationHistoryUpdateOne
- func (c *VehicleLocationHistoryClient) UpdateOneID(id uuid.UUID) *VehicleLocationHistoryUpdateOne
- func (c *VehicleLocationHistoryClient) Use(hooks ...Hook)
- type VehicleLocationHistoryCreate
- func (vlhc *VehicleLocationHistoryCreate) Exec(ctx context.Context) error
- func (vlhc *VehicleLocationHistoryCreate) ExecX(ctx context.Context)
- func (vlhc *VehicleLocationHistoryCreate) Mutation() *VehicleLocationHistoryMutation
- func (vlhc *VehicleLocationHistoryCreate) Save(ctx context.Context) (*VehicleLocationHistory, error)
- func (vlhc *VehicleLocationHistoryCreate) SaveX(ctx context.Context) *VehicleLocationHistory
- func (vlhc *VehicleLocationHistoryCreate) SetCity(s string) *VehicleLocationHistoryCreate
- func (vlhc *VehicleLocationHistoryCreate) SetID(u uuid.UUID) *VehicleLocationHistoryCreate
- func (vlhc *VehicleLocationHistoryCreate) SetLat(f float64) *VehicleLocationHistoryCreate
- func (vlhc *VehicleLocationHistoryCreate) SetLong(f float64) *VehicleLocationHistoryCreate
- func (vlhc *VehicleLocationHistoryCreate) SetNillableID(u *uuid.UUID) *VehicleLocationHistoryCreate
- func (vlhc *VehicleLocationHistoryCreate) SetNillableLat(f *float64) *VehicleLocationHistoryCreate
- func (vlhc *VehicleLocationHistoryCreate) SetNillableLong(f *float64) *VehicleLocationHistoryCreate
- func (vlhc *VehicleLocationHistoryCreate) SetRideID(u uuid.UUID) *VehicleLocationHistoryCreate
- func (vlhc *VehicleLocationHistoryCreate) SetRides(r *Ride) *VehicleLocationHistoryCreate
- func (vlhc *VehicleLocationHistoryCreate) SetRidesID(id uuid.UUID) *VehicleLocationHistoryCreate
- func (vlhc *VehicleLocationHistoryCreate) SetTimestamp(t time.Time) *VehicleLocationHistoryCreate
- type VehicleLocationHistoryCreateBulk
- func (vlhcb *VehicleLocationHistoryCreateBulk) Exec(ctx context.Context) error
- func (vlhcb *VehicleLocationHistoryCreateBulk) ExecX(ctx context.Context)
- func (vlhcb *VehicleLocationHistoryCreateBulk) Save(ctx context.Context) ([]*VehicleLocationHistory, error)
- func (vlhcb *VehicleLocationHistoryCreateBulk) SaveX(ctx context.Context) []*VehicleLocationHistory
- type VehicleLocationHistoryDelete
- type VehicleLocationHistoryDeleteOne
- type VehicleLocationHistoryEdges
- type VehicleLocationHistoryGroupBy
- func (vlhgb *VehicleLocationHistoryGroupBy) Aggregate(fns ...AggregateFunc) *VehicleLocationHistoryGroupBy
- func (s *VehicleLocationHistoryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *VehicleLocationHistoryGroupBy) BoolX(ctx context.Context) bool
- func (s *VehicleLocationHistoryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *VehicleLocationHistoryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *VehicleLocationHistoryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *VehicleLocationHistoryGroupBy) Float64X(ctx context.Context) float64
- func (s *VehicleLocationHistoryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *VehicleLocationHistoryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *VehicleLocationHistoryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *VehicleLocationHistoryGroupBy) IntX(ctx context.Context) int
- func (s *VehicleLocationHistoryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *VehicleLocationHistoryGroupBy) IntsX(ctx context.Context) []int
- func (vlhgb *VehicleLocationHistoryGroupBy) Scan(ctx context.Context, v any) error
- func (s *VehicleLocationHistoryGroupBy) ScanX(ctx context.Context, v any)
- func (s *VehicleLocationHistoryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *VehicleLocationHistoryGroupBy) StringX(ctx context.Context) string
- func (s *VehicleLocationHistoryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *VehicleLocationHistoryGroupBy) StringsX(ctx context.Context) []string
- type VehicleLocationHistoryMutation
- func (m *VehicleLocationHistoryMutation) AddField(name string, value ent.Value) error
- func (m *VehicleLocationHistoryMutation) AddLat(f float64)
- func (m *VehicleLocationHistoryMutation) AddLong(f float64)
- func (m *VehicleLocationHistoryMutation) AddedEdges() []string
- func (m *VehicleLocationHistoryMutation) AddedField(name string) (ent.Value, bool)
- func (m *VehicleLocationHistoryMutation) AddedFields() []string
- func (m *VehicleLocationHistoryMutation) AddedIDs(name string) []ent.Value
- func (m *VehicleLocationHistoryMutation) AddedLat() (r float64, exists bool)
- func (m *VehicleLocationHistoryMutation) AddedLong() (r float64, exists bool)
- func (m *VehicleLocationHistoryMutation) City() (r string, exists bool)
- func (m *VehicleLocationHistoryMutation) ClearEdge(name string) error
- func (m *VehicleLocationHistoryMutation) ClearField(name string) error
- func (m *VehicleLocationHistoryMutation) ClearLat()
- func (m *VehicleLocationHistoryMutation) ClearLong()
- func (m *VehicleLocationHistoryMutation) ClearRides()
- func (m *VehicleLocationHistoryMutation) ClearedEdges() []string
- func (m *VehicleLocationHistoryMutation) ClearedFields() []string
- func (m VehicleLocationHistoryMutation) Client() *Client
- func (m *VehicleLocationHistoryMutation) EdgeCleared(name string) bool
- func (m *VehicleLocationHistoryMutation) Field(name string) (ent.Value, bool)
- func (m *VehicleLocationHistoryMutation) FieldCleared(name string) bool
- func (m *VehicleLocationHistoryMutation) Fields() []string
- func (m *VehicleLocationHistoryMutation) ID() (id uuid.UUID, exists bool)
- func (m *VehicleLocationHistoryMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *VehicleLocationHistoryMutation) Lat() (r float64, exists bool)
- func (m *VehicleLocationHistoryMutation) LatCleared() bool
- func (m *VehicleLocationHistoryMutation) Long() (r float64, exists bool)
- func (m *VehicleLocationHistoryMutation) LongCleared() bool
- func (m *VehicleLocationHistoryMutation) OldCity(ctx context.Context) (v string, err error)
- func (m *VehicleLocationHistoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *VehicleLocationHistoryMutation) OldLat(ctx context.Context) (v float64, err error)
- func (m *VehicleLocationHistoryMutation) OldLong(ctx context.Context) (v float64, err error)
- func (m *VehicleLocationHistoryMutation) OldRideID(ctx context.Context) (v uuid.UUID, err error)
- func (m *VehicleLocationHistoryMutation) OldTimestamp(ctx context.Context) (v time.Time, err error)
- func (m *VehicleLocationHistoryMutation) Op() Op
- func (m *VehicleLocationHistoryMutation) RemovedEdges() []string
- func (m *VehicleLocationHistoryMutation) RemovedIDs(name string) []ent.Value
- func (m *VehicleLocationHistoryMutation) ResetCity()
- func (m *VehicleLocationHistoryMutation) ResetEdge(name string) error
- func (m *VehicleLocationHistoryMutation) ResetField(name string) error
- func (m *VehicleLocationHistoryMutation) ResetLat()
- func (m *VehicleLocationHistoryMutation) ResetLong()
- func (m *VehicleLocationHistoryMutation) ResetRideID()
- func (m *VehicleLocationHistoryMutation) ResetRides()
- func (m *VehicleLocationHistoryMutation) ResetTimestamp()
- func (m *VehicleLocationHistoryMutation) RideID() (r uuid.UUID, exists bool)
- func (m *VehicleLocationHistoryMutation) RidesCleared() bool
- func (m *VehicleLocationHistoryMutation) RidesID() (id uuid.UUID, exists bool)
- func (m *VehicleLocationHistoryMutation) RidesIDs() (ids []uuid.UUID)
- func (m *VehicleLocationHistoryMutation) SetCity(s string)
- func (m *VehicleLocationHistoryMutation) SetField(name string, value ent.Value) error
- func (m *VehicleLocationHistoryMutation) SetID(id uuid.UUID)
- func (m *VehicleLocationHistoryMutation) SetLat(f float64)
- func (m *VehicleLocationHistoryMutation) SetLong(f float64)
- func (m *VehicleLocationHistoryMutation) SetOp(op Op)
- func (m *VehicleLocationHistoryMutation) SetRideID(u uuid.UUID)
- func (m *VehicleLocationHistoryMutation) SetRidesID(id uuid.UUID)
- func (m *VehicleLocationHistoryMutation) SetTimestamp(t time.Time)
- func (m *VehicleLocationHistoryMutation) Timestamp() (r time.Time, exists bool)
- func (m VehicleLocationHistoryMutation) Tx() (*Tx, error)
- func (m *VehicleLocationHistoryMutation) Type() string
- func (m *VehicleLocationHistoryMutation) Where(ps ...predicate.VehicleLocationHistory)
- func (m *VehicleLocationHistoryMutation) WhereP(ps ...func(*sql.Selector))
- type VehicleLocationHistoryQuery
- func (vlhq *VehicleLocationHistoryQuery) Aggregate(fns ...AggregateFunc) *VehicleLocationHistorySelect
- func (vlhq *VehicleLocationHistoryQuery) All(ctx context.Context) ([]*VehicleLocationHistory, error)
- func (vlhq *VehicleLocationHistoryQuery) AllX(ctx context.Context) []*VehicleLocationHistory
- func (vlhq *VehicleLocationHistoryQuery) Clone() *VehicleLocationHistoryQuery
- func (vlhq *VehicleLocationHistoryQuery) Count(ctx context.Context) (int, error)
- func (vlhq *VehicleLocationHistoryQuery) CountX(ctx context.Context) int
- func (vlhq *VehicleLocationHistoryQuery) Exist(ctx context.Context) (bool, error)
- func (vlhq *VehicleLocationHistoryQuery) ExistX(ctx context.Context) bool
- func (vlhq *VehicleLocationHistoryQuery) First(ctx context.Context) (*VehicleLocationHistory, error)
- func (vlhq *VehicleLocationHistoryQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (vlhq *VehicleLocationHistoryQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (vlhq *VehicleLocationHistoryQuery) FirstX(ctx context.Context) *VehicleLocationHistory
- func (vlhq *VehicleLocationHistoryQuery) GroupBy(field string, fields ...string) *VehicleLocationHistoryGroupBy
- func (vlhq *VehicleLocationHistoryQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (vlhq *VehicleLocationHistoryQuery) IDsX(ctx context.Context) []uuid.UUID
- func (vlhq *VehicleLocationHistoryQuery) Limit(limit int) *VehicleLocationHistoryQuery
- func (vlhq *VehicleLocationHistoryQuery) Offset(offset int) *VehicleLocationHistoryQuery
- func (vlhq *VehicleLocationHistoryQuery) Only(ctx context.Context) (*VehicleLocationHistory, error)
- func (vlhq *VehicleLocationHistoryQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (vlhq *VehicleLocationHistoryQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (vlhq *VehicleLocationHistoryQuery) OnlyX(ctx context.Context) *VehicleLocationHistory
- func (vlhq *VehicleLocationHistoryQuery) Order(o ...OrderFunc) *VehicleLocationHistoryQuery
- func (vlhq *VehicleLocationHistoryQuery) QueryRides() *RideQuery
- func (vlhq *VehicleLocationHistoryQuery) Select(fields ...string) *VehicleLocationHistorySelect
- func (vlhq *VehicleLocationHistoryQuery) Unique(unique bool) *VehicleLocationHistoryQuery
- func (vlhq *VehicleLocationHistoryQuery) Where(ps ...predicate.VehicleLocationHistory) *VehicleLocationHistoryQuery
- func (vlhq *VehicleLocationHistoryQuery) WithRides(opts ...func(*RideQuery)) *VehicleLocationHistoryQuery
- type VehicleLocationHistorySelect
- func (vlhs *VehicleLocationHistorySelect) Aggregate(fns ...AggregateFunc) *VehicleLocationHistorySelect
- func (s *VehicleLocationHistorySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *VehicleLocationHistorySelect) BoolX(ctx context.Context) bool
- func (s *VehicleLocationHistorySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *VehicleLocationHistorySelect) BoolsX(ctx context.Context) []bool
- func (s *VehicleLocationHistorySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *VehicleLocationHistorySelect) Float64X(ctx context.Context) float64
- func (s *VehicleLocationHistorySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *VehicleLocationHistorySelect) Float64sX(ctx context.Context) []float64
- func (s *VehicleLocationHistorySelect) Int(ctx context.Context) (_ int, err error)
- func (s *VehicleLocationHistorySelect) IntX(ctx context.Context) int
- func (s *VehicleLocationHistorySelect) Ints(ctx context.Context) ([]int, error)
- func (s *VehicleLocationHistorySelect) IntsX(ctx context.Context) []int
- func (vlhs *VehicleLocationHistorySelect) Scan(ctx context.Context, v any) error
- func (s *VehicleLocationHistorySelect) ScanX(ctx context.Context, v any)
- func (s *VehicleLocationHistorySelect) String(ctx context.Context) (_ string, err error)
- func (s *VehicleLocationHistorySelect) StringX(ctx context.Context) string
- func (s *VehicleLocationHistorySelect) Strings(ctx context.Context) ([]string, error)
- func (s *VehicleLocationHistorySelect) StringsX(ctx context.Context) []string
- type VehicleLocationHistoryUpdate
- func (vlhu *VehicleLocationHistoryUpdate) AddLat(f float64) *VehicleLocationHistoryUpdate
- func (vlhu *VehicleLocationHistoryUpdate) AddLong(f float64) *VehicleLocationHistoryUpdate
- func (vlhu *VehicleLocationHistoryUpdate) ClearLat() *VehicleLocationHistoryUpdate
- func (vlhu *VehicleLocationHistoryUpdate) ClearLong() *VehicleLocationHistoryUpdate
- func (vlhu *VehicleLocationHistoryUpdate) ClearRides() *VehicleLocationHistoryUpdate
- func (vlhu *VehicleLocationHistoryUpdate) Exec(ctx context.Context) error
- func (vlhu *VehicleLocationHistoryUpdate) ExecX(ctx context.Context)
- func (vlhu *VehicleLocationHistoryUpdate) Mutation() *VehicleLocationHistoryMutation
- func (vlhu *VehicleLocationHistoryUpdate) Save(ctx context.Context) (int, error)
- func (vlhu *VehicleLocationHistoryUpdate) SaveX(ctx context.Context) int
- func (vlhu *VehicleLocationHistoryUpdate) SetCity(s string) *VehicleLocationHistoryUpdate
- func (vlhu *VehicleLocationHistoryUpdate) SetLat(f float64) *VehicleLocationHistoryUpdate
- func (vlhu *VehicleLocationHistoryUpdate) SetLong(f float64) *VehicleLocationHistoryUpdate
- func (vlhu *VehicleLocationHistoryUpdate) SetNillableLat(f *float64) *VehicleLocationHistoryUpdate
- func (vlhu *VehicleLocationHistoryUpdate) SetNillableLong(f *float64) *VehicleLocationHistoryUpdate
- func (vlhu *VehicleLocationHistoryUpdate) SetRideID(u uuid.UUID) *VehicleLocationHistoryUpdate
- func (vlhu *VehicleLocationHistoryUpdate) SetRides(r *Ride) *VehicleLocationHistoryUpdate
- func (vlhu *VehicleLocationHistoryUpdate) SetRidesID(id uuid.UUID) *VehicleLocationHistoryUpdate
- func (vlhu *VehicleLocationHistoryUpdate) SetTimestamp(t time.Time) *VehicleLocationHistoryUpdate
- func (vlhu *VehicleLocationHistoryUpdate) Where(ps ...predicate.VehicleLocationHistory) *VehicleLocationHistoryUpdate
- type VehicleLocationHistoryUpdateOne
- func (vlhuo *VehicleLocationHistoryUpdateOne) AddLat(f float64) *VehicleLocationHistoryUpdateOne
- func (vlhuo *VehicleLocationHistoryUpdateOne) AddLong(f float64) *VehicleLocationHistoryUpdateOne
- func (vlhuo *VehicleLocationHistoryUpdateOne) ClearLat() *VehicleLocationHistoryUpdateOne
- func (vlhuo *VehicleLocationHistoryUpdateOne) ClearLong() *VehicleLocationHistoryUpdateOne
- func (vlhuo *VehicleLocationHistoryUpdateOne) ClearRides() *VehicleLocationHistoryUpdateOne
- func (vlhuo *VehicleLocationHistoryUpdateOne) Exec(ctx context.Context) error
- func (vlhuo *VehicleLocationHistoryUpdateOne) ExecX(ctx context.Context)
- func (vlhuo *VehicleLocationHistoryUpdateOne) Mutation() *VehicleLocationHistoryMutation
- func (vlhuo *VehicleLocationHistoryUpdateOne) Save(ctx context.Context) (*VehicleLocationHistory, error)
- func (vlhuo *VehicleLocationHistoryUpdateOne) SaveX(ctx context.Context) *VehicleLocationHistory
- func (vlhuo *VehicleLocationHistoryUpdateOne) Select(field string, fields ...string) *VehicleLocationHistoryUpdateOne
- func (vlhuo *VehicleLocationHistoryUpdateOne) SetCity(s string) *VehicleLocationHistoryUpdateOne
- func (vlhuo *VehicleLocationHistoryUpdateOne) SetLat(f float64) *VehicleLocationHistoryUpdateOne
- func (vlhuo *VehicleLocationHistoryUpdateOne) SetLong(f float64) *VehicleLocationHistoryUpdateOne
- func (vlhuo *VehicleLocationHistoryUpdateOne) SetNillableLat(f *float64) *VehicleLocationHistoryUpdateOne
- func (vlhuo *VehicleLocationHistoryUpdateOne) SetNillableLong(f *float64) *VehicleLocationHistoryUpdateOne
- func (vlhuo *VehicleLocationHistoryUpdateOne) SetRideID(u uuid.UUID) *VehicleLocationHistoryUpdateOne
- func (vlhuo *VehicleLocationHistoryUpdateOne) SetRides(r *Ride) *VehicleLocationHistoryUpdateOne
- func (vlhuo *VehicleLocationHistoryUpdateOne) SetRidesID(id uuid.UUID) *VehicleLocationHistoryUpdateOne
- func (vlhuo *VehicleLocationHistoryUpdateOne) SetTimestamp(t time.Time) *VehicleLocationHistoryUpdateOne
- type VehicleMutation
- func (m *VehicleMutation) AddField(name string, value ent.Value) error
- func (m *VehicleMutation) AddRideIDs(ids ...uuid.UUID)
- func (m *VehicleMutation) AddedEdges() []string
- func (m *VehicleMutation) AddedField(name string) (ent.Value, bool)
- func (m *VehicleMutation) AddedFields() []string
- func (m *VehicleMutation) AddedIDs(name string) []ent.Value
- func (m *VehicleMutation) City() (r string, exists bool)
- func (m *VehicleMutation) ClearCreationTime()
- func (m *VehicleMutation) ClearCurrentLocation()
- func (m *VehicleMutation) ClearEdge(name string) error
- func (m *VehicleMutation) ClearExt()
- func (m *VehicleMutation) ClearField(name string) error
- func (m *VehicleMutation) ClearOwnerID()
- func (m *VehicleMutation) ClearRides()
- func (m *VehicleMutation) ClearStatus()
- func (m *VehicleMutation) ClearType()
- func (m *VehicleMutation) ClearUser()
- func (m *VehicleMutation) ClearedEdges() []string
- func (m *VehicleMutation) ClearedFields() []string
- func (m VehicleMutation) Client() *Client
- func (m *VehicleMutation) CreationTime() (r time.Time, exists bool)
- func (m *VehicleMutation) CreationTimeCleared() bool
- func (m *VehicleMutation) CurrentLocation() (r string, exists bool)
- func (m *VehicleMutation) CurrentLocationCleared() bool
- func (m *VehicleMutation) EdgeCleared(name string) bool
- func (m *VehicleMutation) Ext() (r *map[string]interface{}, exists bool)
- func (m *VehicleMutation) ExtCleared() bool
- func (m *VehicleMutation) Field(name string) (ent.Value, bool)
- func (m *VehicleMutation) FieldCleared(name string) bool
- func (m *VehicleMutation) Fields() []string
- func (m *VehicleMutation) GetType() (r string, exists bool)
- func (m *VehicleMutation) ID() (id uuid.UUID, exists bool)
- func (m *VehicleMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *VehicleMutation) OldCity(ctx context.Context) (v string, err error)
- func (m *VehicleMutation) OldCreationTime(ctx context.Context) (v time.Time, err error)
- func (m *VehicleMutation) OldCurrentLocation(ctx context.Context) (v string, err error)
- func (m *VehicleMutation) OldExt(ctx context.Context) (v *map[string]interface{}, err error)
- func (m *VehicleMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *VehicleMutation) OldOwnerID(ctx context.Context) (v uuid.UUID, err error)
- func (m *VehicleMutation) OldStatus(ctx context.Context) (v string, err error)
- func (m *VehicleMutation) OldType(ctx context.Context) (v string, err error)
- func (m *VehicleMutation) Op() Op
- func (m *VehicleMutation) OwnerID() (r uuid.UUID, exists bool)
- func (m *VehicleMutation) OwnerIDCleared() bool
- func (m *VehicleMutation) RemoveRideIDs(ids ...uuid.UUID)
- func (m *VehicleMutation) RemovedEdges() []string
- func (m *VehicleMutation) RemovedIDs(name string) []ent.Value
- func (m *VehicleMutation) RemovedRidesIDs() (ids []uuid.UUID)
- func (m *VehicleMutation) ResetCity()
- func (m *VehicleMutation) ResetCreationTime()
- func (m *VehicleMutation) ResetCurrentLocation()
- func (m *VehicleMutation) ResetEdge(name string) error
- func (m *VehicleMutation) ResetExt()
- func (m *VehicleMutation) ResetField(name string) error
- func (m *VehicleMutation) ResetOwnerID()
- func (m *VehicleMutation) ResetRides()
- func (m *VehicleMutation) ResetStatus()
- func (m *VehicleMutation) ResetType()
- func (m *VehicleMutation) ResetUser()
- func (m *VehicleMutation) RidesCleared() bool
- func (m *VehicleMutation) RidesIDs() (ids []uuid.UUID)
- func (m *VehicleMutation) SetCity(s string)
- func (m *VehicleMutation) SetCreationTime(t time.Time)
- func (m *VehicleMutation) SetCurrentLocation(s string)
- func (m *VehicleMutation) SetExt(value *map[string]interface{})
- func (m *VehicleMutation) SetField(name string, value ent.Value) error
- func (m *VehicleMutation) SetID(id uuid.UUID)
- func (m *VehicleMutation) SetOp(op Op)
- func (m *VehicleMutation) SetOwnerID(u uuid.UUID)
- func (m *VehicleMutation) SetStatus(s string)
- func (m *VehicleMutation) SetType(s string)
- func (m *VehicleMutation) SetUserID(id uuid.UUID)
- func (m *VehicleMutation) Status() (r string, exists bool)
- func (m *VehicleMutation) StatusCleared() bool
- func (m VehicleMutation) Tx() (*Tx, error)
- func (m *VehicleMutation) Type() string
- func (m *VehicleMutation) TypeCleared() bool
- func (m *VehicleMutation) UserCleared() bool
- func (m *VehicleMutation) UserID() (id uuid.UUID, exists bool)
- func (m *VehicleMutation) UserIDs() (ids []uuid.UUID)
- func (m *VehicleMutation) Where(ps ...predicate.Vehicle)
- func (m *VehicleMutation) WhereP(ps ...func(*sql.Selector))
- type VehicleQuery
- func (vq *VehicleQuery) Aggregate(fns ...AggregateFunc) *VehicleSelect
- func (vq *VehicleQuery) All(ctx context.Context) ([]*Vehicle, error)
- func (vq *VehicleQuery) AllX(ctx context.Context) []*Vehicle
- func (vq *VehicleQuery) Clone() *VehicleQuery
- func (vq *VehicleQuery) Count(ctx context.Context) (int, error)
- func (vq *VehicleQuery) CountX(ctx context.Context) int
- func (vq *VehicleQuery) Exist(ctx context.Context) (bool, error)
- func (vq *VehicleQuery) ExistX(ctx context.Context) bool
- func (vq *VehicleQuery) First(ctx context.Context) (*Vehicle, error)
- func (vq *VehicleQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (vq *VehicleQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (vq *VehicleQuery) FirstX(ctx context.Context) *Vehicle
- func (vq *VehicleQuery) GroupBy(field string, fields ...string) *VehicleGroupBy
- func (vq *VehicleQuery) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (vq *VehicleQuery) IDsX(ctx context.Context) []uuid.UUID
- func (vq *VehicleQuery) Limit(limit int) *VehicleQuery
- func (vq *VehicleQuery) Offset(offset int) *VehicleQuery
- func (vq *VehicleQuery) Only(ctx context.Context) (*Vehicle, error)
- func (vq *VehicleQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (vq *VehicleQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (vq *VehicleQuery) OnlyX(ctx context.Context) *Vehicle
- func (vq *VehicleQuery) Order(o ...OrderFunc) *VehicleQuery
- func (vq *VehicleQuery) QueryRides() *RideQuery
- func (vq *VehicleQuery) QueryUser() *UserQuery
- func (vq *VehicleQuery) Select(fields ...string) *VehicleSelect
- func (vq *VehicleQuery) Unique(unique bool) *VehicleQuery
- func (vq *VehicleQuery) Where(ps ...predicate.Vehicle) *VehicleQuery
- func (vq *VehicleQuery) WithRides(opts ...func(*RideQuery)) *VehicleQuery
- func (vq *VehicleQuery) WithUser(opts ...func(*UserQuery)) *VehicleQuery
- type VehicleSelect
- func (vs *VehicleSelect) Aggregate(fns ...AggregateFunc) *VehicleSelect
- func (s *VehicleSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *VehicleSelect) BoolX(ctx context.Context) bool
- func (s *VehicleSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *VehicleSelect) BoolsX(ctx context.Context) []bool
- func (s *VehicleSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *VehicleSelect) Float64X(ctx context.Context) float64
- func (s *VehicleSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *VehicleSelect) Float64sX(ctx context.Context) []float64
- func (s *VehicleSelect) Int(ctx context.Context) (_ int, err error)
- func (s *VehicleSelect) IntX(ctx context.Context) int
- func (s *VehicleSelect) Ints(ctx context.Context) ([]int, error)
- func (s *VehicleSelect) IntsX(ctx context.Context) []int
- func (vs *VehicleSelect) Scan(ctx context.Context, v any) error
- func (s *VehicleSelect) ScanX(ctx context.Context, v any)
- func (s *VehicleSelect) String(ctx context.Context) (_ string, err error)
- func (s *VehicleSelect) StringX(ctx context.Context) string
- func (s *VehicleSelect) Strings(ctx context.Context) ([]string, error)
- func (s *VehicleSelect) StringsX(ctx context.Context) []string
- type VehicleUpdate
- func (vu *VehicleUpdate) AddRideIDs(ids ...uuid.UUID) *VehicleUpdate
- func (vu *VehicleUpdate) AddRides(r ...*Ride) *VehicleUpdate
- func (vu *VehicleUpdate) ClearCreationTime() *VehicleUpdate
- func (vu *VehicleUpdate) ClearCurrentLocation() *VehicleUpdate
- func (vu *VehicleUpdate) ClearExt() *VehicleUpdate
- func (vu *VehicleUpdate) ClearOwnerID() *VehicleUpdate
- func (vu *VehicleUpdate) ClearRides() *VehicleUpdate
- func (vu *VehicleUpdate) ClearStatus() *VehicleUpdate
- func (vu *VehicleUpdate) ClearType() *VehicleUpdate
- func (vu *VehicleUpdate) ClearUser() *VehicleUpdate
- func (vu *VehicleUpdate) Exec(ctx context.Context) error
- func (vu *VehicleUpdate) ExecX(ctx context.Context)
- func (vu *VehicleUpdate) Mutation() *VehicleMutation
- func (vu *VehicleUpdate) RemoveRideIDs(ids ...uuid.UUID) *VehicleUpdate
- func (vu *VehicleUpdate) RemoveRides(r ...*Ride) *VehicleUpdate
- func (vu *VehicleUpdate) Save(ctx context.Context) (int, error)
- func (vu *VehicleUpdate) SaveX(ctx context.Context) int
- func (vu *VehicleUpdate) SetCity(s string) *VehicleUpdate
- func (vu *VehicleUpdate) SetCreationTime(t time.Time) *VehicleUpdate
- func (vu *VehicleUpdate) SetCurrentLocation(s string) *VehicleUpdate
- func (vu *VehicleUpdate) SetExt(m *map[string]interface{}) *VehicleUpdate
- func (vu *VehicleUpdate) SetNillableCreationTime(t *time.Time) *VehicleUpdate
- func (vu *VehicleUpdate) SetNillableCurrentLocation(s *string) *VehicleUpdate
- func (vu *VehicleUpdate) SetNillableOwnerID(u *uuid.UUID) *VehicleUpdate
- func (vu *VehicleUpdate) SetNillableStatus(s *string) *VehicleUpdate
- func (vu *VehicleUpdate) SetNillableType(s *string) *VehicleUpdate
- func (vu *VehicleUpdate) SetNillableUserID(id *uuid.UUID) *VehicleUpdate
- func (vu *VehicleUpdate) SetOwnerID(u uuid.UUID) *VehicleUpdate
- func (vu *VehicleUpdate) SetStatus(s string) *VehicleUpdate
- func (vu *VehicleUpdate) SetType(s string) *VehicleUpdate
- func (vu *VehicleUpdate) SetUser(u *User) *VehicleUpdate
- func (vu *VehicleUpdate) SetUserID(id uuid.UUID) *VehicleUpdate
- func (vu *VehicleUpdate) Where(ps ...predicate.Vehicle) *VehicleUpdate
- type VehicleUpdateOne
- func (vuo *VehicleUpdateOne) AddRideIDs(ids ...uuid.UUID) *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) AddRides(r ...*Ride) *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) ClearCreationTime() *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) ClearCurrentLocation() *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) ClearExt() *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) ClearOwnerID() *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) ClearRides() *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) ClearStatus() *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) ClearType() *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) ClearUser() *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) Exec(ctx context.Context) error
- func (vuo *VehicleUpdateOne) ExecX(ctx context.Context)
- func (vuo *VehicleUpdateOne) Mutation() *VehicleMutation
- func (vuo *VehicleUpdateOne) RemoveRideIDs(ids ...uuid.UUID) *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) RemoveRides(r ...*Ride) *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) Save(ctx context.Context) (*Vehicle, error)
- func (vuo *VehicleUpdateOne) SaveX(ctx context.Context) *Vehicle
- func (vuo *VehicleUpdateOne) Select(field string, fields ...string) *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) SetCity(s string) *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) SetCreationTime(t time.Time) *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) SetCurrentLocation(s string) *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) SetExt(m *map[string]interface{}) *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) SetNillableCreationTime(t *time.Time) *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) SetNillableCurrentLocation(s *string) *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) SetNillableOwnerID(u *uuid.UUID) *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) SetNillableStatus(s *string) *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) SetNillableType(s *string) *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) SetNillableUserID(id *uuid.UUID) *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) SetOwnerID(u uuid.UUID) *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) SetStatus(s string) *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) SetType(s string) *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) SetUser(u *User) *VehicleUpdateOne
- func (vuo *VehicleUpdateOne) SetUserID(id uuid.UUID) *VehicleUpdateOne
- type Vehicles
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeRide = "Ride" TypeUser = "User" TypeUserPromoCode = "UserPromoCode" TypeVehicle = "Vehicle" TypeVehicleLocationHistory = "VehicleLocationHistory" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError 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 IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
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)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Ride is the client for interacting with the Ride builders. Ride *RideClient // User is the client for interacting with the User builders. User *UserClient // UserPromoCode is the client for interacting with the UserPromoCode builders. UserPromoCode *UserPromoCodeClient // Vehicle is the client for interacting with the Vehicle builders. Vehicle *VehicleClient // VehicleLocationHistory is the client for interacting with the VehicleLocationHistory builders. VehicleLocationHistory *VehicleLocationHistoryClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). Ride. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError 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 (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type Ride ¶
type Ride struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // City holds the value of the "city" field. City string `json:"city,omitempty"` // VehicleCity holds the value of the "vehicle_city" field. VehicleCity string `json:"vehicle_city,omitempty"` // RiderID holds the value of the "rider_id" field. RiderID uuid.UUID `json:"rider_id,omitempty"` // VehicleID holds the value of the "vehicle_id" field. VehicleID uuid.UUID `json:"vehicle_id,omitempty"` // StartAddress holds the value of the "start_address" field. StartAddress string `json:"start_address,omitempty"` // EndAddress holds the value of the "end_address" field. EndAddress string `json:"end_address,omitempty"` // StartTime holds the value of the "start_time" field. StartTime time.Time `json:"start_time,omitempty"` // EndTime holds the value of the "end_time" field. EndTime time.Time `json:"end_time,omitempty"` // Revenue holds the value of the "revenue" field. Revenue float64 `json:"revenue,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the RideQuery when eager-loading is set. Edges RideEdges `json:"edges"` // contains filtered or unexported fields }
Ride is the model entity for the Ride schema.
func (*Ride) QueryVehicle ¶
func (r *Ride) QueryVehicle() *VehicleQuery
QueryVehicle queries the "vehicle" edge of the Ride entity.
func (*Ride) QueryVehicleLocationHistories ¶
func (r *Ride) QueryVehicleLocationHistories() *VehicleLocationHistoryQuery
QueryVehicleLocationHistories queries the "vehicle_location_histories" edge of the Ride entity.
func (*Ride) Unwrap ¶
Unwrap unwraps the Ride entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Ride) Update ¶
func (r *Ride) Update() *RideUpdateOne
Update returns a builder for updating this Ride. Note that you need to call Ride.Unwrap() before calling this method if this Ride was returned from a transaction, and the transaction was committed or rolled back.
type RideClient ¶
type RideClient struct {
// contains filtered or unexported fields
}
RideClient is a client for the Ride schema.
func NewRideClient ¶
func NewRideClient(c config) *RideClient
NewRideClient returns a client for the Ride from the given config.
func (*RideClient) Create ¶
func (c *RideClient) Create() *RideCreate
Create returns a builder for creating a Ride entity.
func (*RideClient) CreateBulk ¶
func (c *RideClient) CreateBulk(builders ...*RideCreate) *RideCreateBulk
CreateBulk returns a builder for creating a bulk of Ride entities.
func (*RideClient) Delete ¶
func (c *RideClient) Delete() *RideDelete
Delete returns a delete builder for Ride.
func (*RideClient) DeleteOne ¶
func (c *RideClient) DeleteOne(r *Ride) *RideDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RideClient) DeleteOneID ¶
func (c *RideClient) DeleteOneID(id uuid.UUID) *RideDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RideClient) Intercept ¶
func (c *RideClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `ride.Intercept(f(g(h())))`.
func (*RideClient) Interceptors ¶
func (c *RideClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RideClient) Query ¶
func (c *RideClient) Query() *RideQuery
Query returns a query builder for Ride.
func (*RideClient) QueryUser ¶
func (c *RideClient) QueryUser(r *Ride) *UserQuery
QueryUser queries the user edge of a Ride.
func (*RideClient) QueryVehicle ¶
func (c *RideClient) QueryVehicle(r *Ride) *VehicleQuery
QueryVehicle queries the vehicle edge of a Ride.
func (*RideClient) QueryVehicleLocationHistories ¶
func (c *RideClient) QueryVehicleLocationHistories(r *Ride) *VehicleLocationHistoryQuery
QueryVehicleLocationHistories queries the vehicle_location_histories edge of a Ride.
func (*RideClient) Update ¶
func (c *RideClient) Update() *RideUpdate
Update returns an update builder for Ride.
func (*RideClient) UpdateOne ¶
func (c *RideClient) UpdateOne(r *Ride) *RideUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RideClient) UpdateOneID ¶
func (c *RideClient) UpdateOneID(id uuid.UUID) *RideUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RideClient) Use ¶
func (c *RideClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `ride.Hooks(f(g(h())))`.
type RideCreate ¶
type RideCreate struct {
// contains filtered or unexported fields
}
RideCreate is the builder for creating a Ride entity.
func (*RideCreate) AddVehicleLocationHistories ¶
func (rc *RideCreate) AddVehicleLocationHistories(v ...*VehicleLocationHistory) *RideCreate
AddVehicleLocationHistories adds the "vehicle_location_histories" edges to the VehicleLocationHistory entity.
func (*RideCreate) AddVehicleLocationHistoryIDs ¶
func (rc *RideCreate) AddVehicleLocationHistoryIDs(ids ...uuid.UUID) *RideCreate
AddVehicleLocationHistoryIDs adds the "vehicle_location_histories" edge to the VehicleLocationHistory entity by IDs.
func (*RideCreate) Exec ¶
func (rc *RideCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RideCreate) ExecX ¶
func (rc *RideCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RideCreate) Mutation ¶
func (rc *RideCreate) Mutation() *RideMutation
Mutation returns the RideMutation object of the builder.
func (*RideCreate) Save ¶
func (rc *RideCreate) Save(ctx context.Context) (*Ride, error)
Save creates the Ride in the database.
func (*RideCreate) SaveX ¶
func (rc *RideCreate) SaveX(ctx context.Context) *Ride
SaveX calls Save and panics if Save returns an error.
func (*RideCreate) SetCity ¶
func (rc *RideCreate) SetCity(s string) *RideCreate
SetCity sets the "city" field.
func (*RideCreate) SetEndAddress ¶
func (rc *RideCreate) SetEndAddress(s string) *RideCreate
SetEndAddress sets the "end_address" field.
func (*RideCreate) SetEndTime ¶
func (rc *RideCreate) SetEndTime(t time.Time) *RideCreate
SetEndTime sets the "end_time" field.
func (*RideCreate) SetID ¶
func (rc *RideCreate) SetID(u uuid.UUID) *RideCreate
SetID sets the "id" field.
func (*RideCreate) SetNillableEndAddress ¶
func (rc *RideCreate) SetNillableEndAddress(s *string) *RideCreate
SetNillableEndAddress sets the "end_address" field if the given value is not nil.
func (*RideCreate) SetNillableEndTime ¶
func (rc *RideCreate) SetNillableEndTime(t *time.Time) *RideCreate
SetNillableEndTime sets the "end_time" field if the given value is not nil.
func (*RideCreate) SetNillableID ¶
func (rc *RideCreate) SetNillableID(u *uuid.UUID) *RideCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*RideCreate) SetNillableRevenue ¶
func (rc *RideCreate) SetNillableRevenue(f *float64) *RideCreate
SetNillableRevenue sets the "revenue" field if the given value is not nil.
func (*RideCreate) SetNillableRiderID ¶
func (rc *RideCreate) SetNillableRiderID(u *uuid.UUID) *RideCreate
SetNillableRiderID sets the "rider_id" field if the given value is not nil.
func (*RideCreate) SetNillableStartAddress ¶
func (rc *RideCreate) SetNillableStartAddress(s *string) *RideCreate
SetNillableStartAddress sets the "start_address" field if the given value is not nil.
func (*RideCreate) SetNillableStartTime ¶
func (rc *RideCreate) SetNillableStartTime(t *time.Time) *RideCreate
SetNillableStartTime sets the "start_time" field if the given value is not nil.
func (*RideCreate) SetNillableUserID ¶
func (rc *RideCreate) SetNillableUserID(id *uuid.UUID) *RideCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*RideCreate) SetNillableVehicleCity ¶
func (rc *RideCreate) SetNillableVehicleCity(s *string) *RideCreate
SetNillableVehicleCity sets the "vehicle_city" field if the given value is not nil.
func (*RideCreate) SetNillableVehicleID ¶
func (rc *RideCreate) SetNillableVehicleID(u *uuid.UUID) *RideCreate
SetNillableVehicleID sets the "vehicle_id" field if the given value is not nil.
func (*RideCreate) SetRevenue ¶
func (rc *RideCreate) SetRevenue(f float64) *RideCreate
SetRevenue sets the "revenue" field.
func (*RideCreate) SetRiderID ¶
func (rc *RideCreate) SetRiderID(u uuid.UUID) *RideCreate
SetRiderID sets the "rider_id" field.
func (*RideCreate) SetStartAddress ¶
func (rc *RideCreate) SetStartAddress(s string) *RideCreate
SetStartAddress sets the "start_address" field.
func (*RideCreate) SetStartTime ¶
func (rc *RideCreate) SetStartTime(t time.Time) *RideCreate
SetStartTime sets the "start_time" field.
func (*RideCreate) SetUser ¶
func (rc *RideCreate) SetUser(u *User) *RideCreate
SetUser sets the "user" edge to the User entity.
func (*RideCreate) SetUserID ¶
func (rc *RideCreate) SetUserID(id uuid.UUID) *RideCreate
SetUserID sets the "user" edge to the User entity by ID.
func (*RideCreate) SetVehicle ¶
func (rc *RideCreate) SetVehicle(v *Vehicle) *RideCreate
SetVehicle sets the "vehicle" edge to the Vehicle entity.
func (*RideCreate) SetVehicleCity ¶
func (rc *RideCreate) SetVehicleCity(s string) *RideCreate
SetVehicleCity sets the "vehicle_city" field.
func (*RideCreate) SetVehicleID ¶
func (rc *RideCreate) SetVehicleID(u uuid.UUID) *RideCreate
SetVehicleID sets the "vehicle_id" field.
type RideCreateBulk ¶
type RideCreateBulk struct {
// contains filtered or unexported fields
}
RideCreateBulk is the builder for creating many Ride entities in bulk.
func (*RideCreateBulk) Exec ¶
func (rcb *RideCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RideCreateBulk) ExecX ¶
func (rcb *RideCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RideDelete ¶
type RideDelete struct {
// contains filtered or unexported fields
}
RideDelete is the builder for deleting a Ride entity.
func (*RideDelete) Exec ¶
func (rd *RideDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RideDelete) ExecX ¶
func (rd *RideDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RideDelete) Where ¶
func (rd *RideDelete) Where(ps ...predicate.Ride) *RideDelete
Where appends a list predicates to the RideDelete builder.
type RideDeleteOne ¶
type RideDeleteOne struct {
// contains filtered or unexported fields
}
RideDeleteOne is the builder for deleting a single Ride entity.
func (*RideDeleteOne) Exec ¶
func (rdo *RideDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RideDeleteOne) ExecX ¶
func (rdo *RideDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RideDeleteOne) Where ¶
func (rdo *RideDeleteOne) Where(ps ...predicate.Ride) *RideDeleteOne
Where appends a list predicates to the RideDelete builder.
type RideEdges ¶
type RideEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // Vehicle holds the value of the vehicle edge. Vehicle *Vehicle `json:"vehicle,omitempty"` // VehicleLocationHistories holds the value of the vehicle_location_histories edge. VehicleLocationHistories []*VehicleLocationHistory `json:"vehicle_location_histories,omitempty"` // contains filtered or unexported fields }
RideEdges holds the relations/edges for other nodes in the graph.
func (RideEdges) UserOrErr ¶
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (RideEdges) VehicleLocationHistoriesOrErr ¶
func (e RideEdges) VehicleLocationHistoriesOrErr() ([]*VehicleLocationHistory, error)
VehicleLocationHistoriesOrErr returns the VehicleLocationHistories value or an error if the edge was not loaded in eager-loading.
func (RideEdges) VehicleOrErr ¶
VehicleOrErr returns the Vehicle value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type RideGroupBy ¶
type RideGroupBy struct {
// contains filtered or unexported fields
}
RideGroupBy is the group-by builder for Ride entities.
func (*RideGroupBy) Aggregate ¶
func (rgb *RideGroupBy) Aggregate(fns ...AggregateFunc) *RideGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RideGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RideGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RideGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RideGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RideGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RideGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RideGroupBy) Scan ¶
func (rgb *RideGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RideGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RideMutation ¶
type RideMutation struct {
// contains filtered or unexported fields
}
RideMutation represents an operation that mutates the Ride nodes in the graph.
func (*RideMutation) AddField ¶
func (m *RideMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*RideMutation) AddRevenue ¶
func (m *RideMutation) AddRevenue(f float64)
AddRevenue adds f to the "revenue" field.
func (*RideMutation) AddVehicleLocationHistoryIDs ¶
func (m *RideMutation) AddVehicleLocationHistoryIDs(ids ...uuid.UUID)
AddVehicleLocationHistoryIDs adds the "vehicle_location_histories" edge to the VehicleLocationHistory entity by ids.
func (*RideMutation) AddedEdges ¶
func (m *RideMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RideMutation) AddedField ¶
func (m *RideMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*RideMutation) AddedFields ¶
func (m *RideMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RideMutation) AddedIDs ¶
func (m *RideMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RideMutation) AddedRevenue ¶
func (m *RideMutation) AddedRevenue() (r float64, exists bool)
AddedRevenue returns the value that was added to the "revenue" field in this mutation.
func (*RideMutation) City ¶
func (m *RideMutation) City() (r string, exists bool)
City returns the value of the "city" field in the mutation.
func (*RideMutation) ClearEdge ¶
func (m *RideMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*RideMutation) ClearEndAddress ¶
func (m *RideMutation) ClearEndAddress()
ClearEndAddress clears the value of the "end_address" field.
func (*RideMutation) ClearEndTime ¶
func (m *RideMutation) ClearEndTime()
ClearEndTime clears the value of the "end_time" field.
func (*RideMutation) ClearField ¶
func (m *RideMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*RideMutation) ClearRevenue ¶
func (m *RideMutation) ClearRevenue()
ClearRevenue clears the value of the "revenue" field.
func (*RideMutation) ClearRiderID ¶
func (m *RideMutation) ClearRiderID()
ClearRiderID clears the value of the "rider_id" field.
func (*RideMutation) ClearStartAddress ¶
func (m *RideMutation) ClearStartAddress()
ClearStartAddress clears the value of the "start_address" field.
func (*RideMutation) ClearStartTime ¶
func (m *RideMutation) ClearStartTime()
ClearStartTime clears the value of the "start_time" field.
func (*RideMutation) ClearUser ¶
func (m *RideMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*RideMutation) ClearVehicle ¶
func (m *RideMutation) ClearVehicle()
ClearVehicle clears the "vehicle" edge to the Vehicle entity.
func (*RideMutation) ClearVehicleCity ¶
func (m *RideMutation) ClearVehicleCity()
ClearVehicleCity clears the value of the "vehicle_city" field.
func (*RideMutation) ClearVehicleID ¶
func (m *RideMutation) ClearVehicleID()
ClearVehicleID clears the value of the "vehicle_id" field.
func (*RideMutation) ClearVehicleLocationHistories ¶
func (m *RideMutation) ClearVehicleLocationHistories()
ClearVehicleLocationHistories clears the "vehicle_location_histories" edge to the VehicleLocationHistory entity.
func (*RideMutation) ClearedEdges ¶
func (m *RideMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RideMutation) ClearedFields ¶
func (m *RideMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RideMutation) Client ¶
func (m RideMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*RideMutation) EdgeCleared ¶
func (m *RideMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RideMutation) EndAddress ¶
func (m *RideMutation) EndAddress() (r string, exists bool)
EndAddress returns the value of the "end_address" field in the mutation.
func (*RideMutation) EndAddressCleared ¶
func (m *RideMutation) EndAddressCleared() bool
EndAddressCleared returns if the "end_address" field was cleared in this mutation.
func (*RideMutation) EndTime ¶
func (m *RideMutation) EndTime() (r time.Time, exists bool)
EndTime returns the value of the "end_time" field in the mutation.
func (*RideMutation) EndTimeCleared ¶
func (m *RideMutation) EndTimeCleared() bool
EndTimeCleared returns if the "end_time" field was cleared in this mutation.
func (*RideMutation) Field ¶
func (m *RideMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*RideMutation) FieldCleared ¶
func (m *RideMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RideMutation) Fields ¶
func (m *RideMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*RideMutation) ID ¶
func (m *RideMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*RideMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*RideMutation) OldCity ¶
func (m *RideMutation) OldCity(ctx context.Context) (v string, err error)
OldCity returns the old "city" field's value of the Ride entity. If the Ride object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RideMutation) OldEndAddress ¶
func (m *RideMutation) OldEndAddress(ctx context.Context) (v string, err error)
OldEndAddress returns the old "end_address" field's value of the Ride entity. If the Ride object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RideMutation) OldEndTime ¶
OldEndTime returns the old "end_time" field's value of the Ride entity. If the Ride object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RideMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*RideMutation) OldRevenue ¶
func (m *RideMutation) OldRevenue(ctx context.Context) (v float64, err error)
OldRevenue returns the old "revenue" field's value of the Ride entity. If the Ride object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RideMutation) OldRiderID ¶
OldRiderID returns the old "rider_id" field's value of the Ride entity. If the Ride object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RideMutation) OldStartAddress ¶
func (m *RideMutation) OldStartAddress(ctx context.Context) (v string, err error)
OldStartAddress returns the old "start_address" field's value of the Ride entity. If the Ride object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RideMutation) OldStartTime ¶
OldStartTime returns the old "start_time" field's value of the Ride entity. If the Ride object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RideMutation) OldVehicleCity ¶
func (m *RideMutation) OldVehicleCity(ctx context.Context) (v string, err error)
OldVehicleCity returns the old "vehicle_city" field's value of the Ride entity. If the Ride object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RideMutation) OldVehicleID ¶
OldVehicleID returns the old "vehicle_id" field's value of the Ride entity. If the Ride object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RideMutation) RemoveVehicleLocationHistoryIDs ¶
func (m *RideMutation) RemoveVehicleLocationHistoryIDs(ids ...uuid.UUID)
RemoveVehicleLocationHistoryIDs removes the "vehicle_location_histories" edge to the VehicleLocationHistory entity by IDs.
func (*RideMutation) RemovedEdges ¶
func (m *RideMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RideMutation) RemovedIDs ¶
func (m *RideMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*RideMutation) RemovedVehicleLocationHistoriesIDs ¶
func (m *RideMutation) RemovedVehicleLocationHistoriesIDs() (ids []uuid.UUID)
RemovedVehicleLocationHistories returns the removed IDs of the "vehicle_location_histories" edge to the VehicleLocationHistory entity.
func (*RideMutation) ResetCity ¶
func (m *RideMutation) ResetCity()
ResetCity resets all changes to the "city" field.
func (*RideMutation) ResetEdge ¶
func (m *RideMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*RideMutation) ResetEndAddress ¶
func (m *RideMutation) ResetEndAddress()
ResetEndAddress resets all changes to the "end_address" field.
func (*RideMutation) ResetEndTime ¶
func (m *RideMutation) ResetEndTime()
ResetEndTime resets all changes to the "end_time" field.
func (*RideMutation) ResetField ¶
func (m *RideMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*RideMutation) ResetRevenue ¶
func (m *RideMutation) ResetRevenue()
ResetRevenue resets all changes to the "revenue" field.
func (*RideMutation) ResetRiderID ¶
func (m *RideMutation) ResetRiderID()
ResetRiderID resets all changes to the "rider_id" field.
func (*RideMutation) ResetStartAddress ¶
func (m *RideMutation) ResetStartAddress()
ResetStartAddress resets all changes to the "start_address" field.
func (*RideMutation) ResetStartTime ¶
func (m *RideMutation) ResetStartTime()
ResetStartTime resets all changes to the "start_time" field.
func (*RideMutation) ResetUser ¶
func (m *RideMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*RideMutation) ResetVehicle ¶
func (m *RideMutation) ResetVehicle()
ResetVehicle resets all changes to the "vehicle" edge.
func (*RideMutation) ResetVehicleCity ¶
func (m *RideMutation) ResetVehicleCity()
ResetVehicleCity resets all changes to the "vehicle_city" field.
func (*RideMutation) ResetVehicleID ¶
func (m *RideMutation) ResetVehicleID()
ResetVehicleID resets all changes to the "vehicle_id" field.
func (*RideMutation) ResetVehicleLocationHistories ¶
func (m *RideMutation) ResetVehicleLocationHistories()
ResetVehicleLocationHistories resets all changes to the "vehicle_location_histories" edge.
func (*RideMutation) Revenue ¶
func (m *RideMutation) Revenue() (r float64, exists bool)
Revenue returns the value of the "revenue" field in the mutation.
func (*RideMutation) RevenueCleared ¶
func (m *RideMutation) RevenueCleared() bool
RevenueCleared returns if the "revenue" field was cleared in this mutation.
func (*RideMutation) RiderID ¶
func (m *RideMutation) RiderID() (r uuid.UUID, exists bool)
RiderID returns the value of the "rider_id" field in the mutation.
func (*RideMutation) RiderIDCleared ¶
func (m *RideMutation) RiderIDCleared() bool
RiderIDCleared returns if the "rider_id" field was cleared in this mutation.
func (*RideMutation) SetCity ¶
func (m *RideMutation) SetCity(s string)
SetCity sets the "city" field.
func (*RideMutation) SetEndAddress ¶
func (m *RideMutation) SetEndAddress(s string)
SetEndAddress sets the "end_address" field.
func (*RideMutation) SetEndTime ¶
func (m *RideMutation) SetEndTime(t time.Time)
SetEndTime sets the "end_time" field.
func (*RideMutation) SetField ¶
func (m *RideMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*RideMutation) SetID ¶
func (m *RideMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Ride entities.
func (*RideMutation) SetOp ¶
func (m *RideMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*RideMutation) SetRevenue ¶
func (m *RideMutation) SetRevenue(f float64)
SetRevenue sets the "revenue" field.
func (*RideMutation) SetRiderID ¶
func (m *RideMutation) SetRiderID(u uuid.UUID)
SetRiderID sets the "rider_id" field.
func (*RideMutation) SetStartAddress ¶
func (m *RideMutation) SetStartAddress(s string)
SetStartAddress sets the "start_address" field.
func (*RideMutation) SetStartTime ¶
func (m *RideMutation) SetStartTime(t time.Time)
SetStartTime sets the "start_time" field.
func (*RideMutation) SetUserID ¶
func (m *RideMutation) SetUserID(id uuid.UUID)
SetUserID sets the "user" edge to the User entity by id.
func (*RideMutation) SetVehicleCity ¶
func (m *RideMutation) SetVehicleCity(s string)
SetVehicleCity sets the "vehicle_city" field.
func (*RideMutation) SetVehicleID ¶
func (m *RideMutation) SetVehicleID(u uuid.UUID)
SetVehicleID sets the "vehicle_id" field.
func (*RideMutation) StartAddress ¶
func (m *RideMutation) StartAddress() (r string, exists bool)
StartAddress returns the value of the "start_address" field in the mutation.
func (*RideMutation) StartAddressCleared ¶
func (m *RideMutation) StartAddressCleared() bool
StartAddressCleared returns if the "start_address" field was cleared in this mutation.
func (*RideMutation) StartTime ¶
func (m *RideMutation) StartTime() (r time.Time, exists bool)
StartTime returns the value of the "start_time" field in the mutation.
func (*RideMutation) StartTimeCleared ¶
func (m *RideMutation) StartTimeCleared() bool
StartTimeCleared returns if the "start_time" field was cleared in this mutation.
func (RideMutation) Tx ¶
func (m RideMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RideMutation) Type ¶
func (m *RideMutation) Type() string
Type returns the node type of this mutation (Ride).
func (*RideMutation) UserCleared ¶
func (m *RideMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*RideMutation) UserID ¶
func (m *RideMutation) UserID() (id uuid.UUID, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*RideMutation) UserIDs ¶
func (m *RideMutation) UserIDs() (ids []uuid.UUID)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*RideMutation) VehicleCity ¶
func (m *RideMutation) VehicleCity() (r string, exists bool)
VehicleCity returns the value of the "vehicle_city" field in the mutation.
func (*RideMutation) VehicleCityCleared ¶
func (m *RideMutation) VehicleCityCleared() bool
VehicleCityCleared returns if the "vehicle_city" field was cleared in this mutation.
func (*RideMutation) VehicleCleared ¶
func (m *RideMutation) VehicleCleared() bool
VehicleCleared reports if the "vehicle" edge to the Vehicle entity was cleared.
func (*RideMutation) VehicleID ¶
func (m *RideMutation) VehicleID() (r uuid.UUID, exists bool)
VehicleID returns the value of the "vehicle_id" field in the mutation.
func (*RideMutation) VehicleIDCleared ¶
func (m *RideMutation) VehicleIDCleared() bool
VehicleIDCleared returns if the "vehicle_id" field was cleared in this mutation.
func (*RideMutation) VehicleIDs ¶
func (m *RideMutation) VehicleIDs() (ids []uuid.UUID)
VehicleIDs returns the "vehicle" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use VehicleID instead. It exists only for internal usage by the builders.
func (*RideMutation) VehicleLocationHistoriesCleared ¶
func (m *RideMutation) VehicleLocationHistoriesCleared() bool
VehicleLocationHistoriesCleared reports if the "vehicle_location_histories" edge to the VehicleLocationHistory entity was cleared.
func (*RideMutation) VehicleLocationHistoriesIDs ¶
func (m *RideMutation) VehicleLocationHistoriesIDs() (ids []uuid.UUID)
VehicleLocationHistoriesIDs returns the "vehicle_location_histories" edge IDs in the mutation.
func (*RideMutation) Where ¶
func (m *RideMutation) Where(ps ...predicate.Ride)
Where appends a list predicates to the RideMutation builder.
func (*RideMutation) WhereP ¶
func (m *RideMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RideMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RideQuery ¶
type RideQuery struct {
// contains filtered or unexported fields
}
RideQuery is the builder for querying Ride entities.
func (*RideQuery) Aggregate ¶
func (rq *RideQuery) Aggregate(fns ...AggregateFunc) *RideSelect
Aggregate returns a RideSelect configured with the given aggregations.
func (*RideQuery) Clone ¶
Clone returns a duplicate of the RideQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RideQuery) First ¶
First returns the first Ride entity from the query. Returns a *NotFoundError when no Ride was found.
func (*RideQuery) FirstID ¶
FirstID returns the first Ride ID from the query. Returns a *NotFoundError when no Ride ID was found.
func (*RideQuery) GroupBy ¶
func (rq *RideQuery) GroupBy(field string, fields ...string) *RideGroupBy
GroupBy is 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 { City string `json:"city,omitempty"` Count int `json:"count,omitempty"` } client.Ride.Query(). GroupBy(ride.FieldCity). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RideQuery) Only ¶
Only returns a single Ride entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Ride entity is found. Returns a *NotFoundError when no Ride entities are found.
func (*RideQuery) OnlyID ¶
OnlyID is like Only, but returns the only Ride ID in the query. Returns a *NotSingularError when more than one Ride ID is found. Returns a *NotFoundError when no entities are found.
func (*RideQuery) QueryVehicle ¶
func (rq *RideQuery) QueryVehicle() *VehicleQuery
QueryVehicle chains the current query on the "vehicle" edge.
func (*RideQuery) QueryVehicleLocationHistories ¶
func (rq *RideQuery) QueryVehicleLocationHistories() *VehicleLocationHistoryQuery
QueryVehicleLocationHistories chains the current query on the "vehicle_location_histories" edge.
func (*RideQuery) Select ¶
func (rq *RideQuery) Select(fields ...string) *RideSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { City string `json:"city,omitempty"` } client.Ride.Query(). Select(ride.FieldCity). Scan(ctx, &v)
func (*RideQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*RideQuery) WithUser ¶
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
func (*RideQuery) WithVehicle ¶
func (rq *RideQuery) WithVehicle(opts ...func(*VehicleQuery)) *RideQuery
WithVehicle tells the query-builder to eager-load the nodes that are connected to the "vehicle" edge. The optional arguments are used to configure the query builder of the edge.
func (*RideQuery) WithVehicleLocationHistories ¶
func (rq *RideQuery) WithVehicleLocationHistories(opts ...func(*VehicleLocationHistoryQuery)) *RideQuery
WithVehicleLocationHistories tells the query-builder to eager-load the nodes that are connected to the "vehicle_location_histories" edge. The optional arguments are used to configure the query builder of the edge.
type RideSelect ¶
type RideSelect struct { *RideQuery // contains filtered or unexported fields }
RideSelect is the builder for selecting fields of Ride entities.
func (*RideSelect) Aggregate ¶
func (rs *RideSelect) Aggregate(fns ...AggregateFunc) *RideSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RideSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RideSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RideSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RideSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RideSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RideSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RideSelect) Scan ¶
func (rs *RideSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RideSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RideUpdate ¶
type RideUpdate struct {
// contains filtered or unexported fields
}
RideUpdate is the builder for updating Ride entities.
func (*RideUpdate) AddRevenue ¶
func (ru *RideUpdate) AddRevenue(f float64) *RideUpdate
AddRevenue adds f to the "revenue" field.
func (*RideUpdate) AddVehicleLocationHistories ¶
func (ru *RideUpdate) AddVehicleLocationHistories(v ...*VehicleLocationHistory) *RideUpdate
AddVehicleLocationHistories adds the "vehicle_location_histories" edges to the VehicleLocationHistory entity.
func (*RideUpdate) AddVehicleLocationHistoryIDs ¶
func (ru *RideUpdate) AddVehicleLocationHistoryIDs(ids ...uuid.UUID) *RideUpdate
AddVehicleLocationHistoryIDs adds the "vehicle_location_histories" edge to the VehicleLocationHistory entity by IDs.
func (*RideUpdate) ClearEndAddress ¶
func (ru *RideUpdate) ClearEndAddress() *RideUpdate
ClearEndAddress clears the value of the "end_address" field.
func (*RideUpdate) ClearEndTime ¶
func (ru *RideUpdate) ClearEndTime() *RideUpdate
ClearEndTime clears the value of the "end_time" field.
func (*RideUpdate) ClearRevenue ¶
func (ru *RideUpdate) ClearRevenue() *RideUpdate
ClearRevenue clears the value of the "revenue" field.
func (*RideUpdate) ClearRiderID ¶
func (ru *RideUpdate) ClearRiderID() *RideUpdate
ClearRiderID clears the value of the "rider_id" field.
func (*RideUpdate) ClearStartAddress ¶
func (ru *RideUpdate) ClearStartAddress() *RideUpdate
ClearStartAddress clears the value of the "start_address" field.
func (*RideUpdate) ClearStartTime ¶
func (ru *RideUpdate) ClearStartTime() *RideUpdate
ClearStartTime clears the value of the "start_time" field.
func (*RideUpdate) ClearUser ¶
func (ru *RideUpdate) ClearUser() *RideUpdate
ClearUser clears the "user" edge to the User entity.
func (*RideUpdate) ClearVehicle ¶
func (ru *RideUpdate) ClearVehicle() *RideUpdate
ClearVehicle clears the "vehicle" edge to the Vehicle entity.
func (*RideUpdate) ClearVehicleCity ¶
func (ru *RideUpdate) ClearVehicleCity() *RideUpdate
ClearVehicleCity clears the value of the "vehicle_city" field.
func (*RideUpdate) ClearVehicleID ¶
func (ru *RideUpdate) ClearVehicleID() *RideUpdate
ClearVehicleID clears the value of the "vehicle_id" field.
func (*RideUpdate) ClearVehicleLocationHistories ¶
func (ru *RideUpdate) ClearVehicleLocationHistories() *RideUpdate
ClearVehicleLocationHistories clears all "vehicle_location_histories" edges to the VehicleLocationHistory entity.
func (*RideUpdate) Exec ¶
func (ru *RideUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RideUpdate) ExecX ¶
func (ru *RideUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RideUpdate) Mutation ¶
func (ru *RideUpdate) Mutation() *RideMutation
Mutation returns the RideMutation object of the builder.
func (*RideUpdate) RemoveVehicleLocationHistories ¶
func (ru *RideUpdate) RemoveVehicleLocationHistories(v ...*VehicleLocationHistory) *RideUpdate
RemoveVehicleLocationHistories removes "vehicle_location_histories" edges to VehicleLocationHistory entities.
func (*RideUpdate) RemoveVehicleLocationHistoryIDs ¶
func (ru *RideUpdate) RemoveVehicleLocationHistoryIDs(ids ...uuid.UUID) *RideUpdate
RemoveVehicleLocationHistoryIDs removes the "vehicle_location_histories" edge to VehicleLocationHistory entities by IDs.
func (*RideUpdate) Save ¶
func (ru *RideUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RideUpdate) SaveX ¶
func (ru *RideUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RideUpdate) SetCity ¶
func (ru *RideUpdate) SetCity(s string) *RideUpdate
SetCity sets the "city" field.
func (*RideUpdate) SetEndAddress ¶
func (ru *RideUpdate) SetEndAddress(s string) *RideUpdate
SetEndAddress sets the "end_address" field.
func (*RideUpdate) SetEndTime ¶
func (ru *RideUpdate) SetEndTime(t time.Time) *RideUpdate
SetEndTime sets the "end_time" field.
func (*RideUpdate) SetNillableEndAddress ¶
func (ru *RideUpdate) SetNillableEndAddress(s *string) *RideUpdate
SetNillableEndAddress sets the "end_address" field if the given value is not nil.
func (*RideUpdate) SetNillableEndTime ¶
func (ru *RideUpdate) SetNillableEndTime(t *time.Time) *RideUpdate
SetNillableEndTime sets the "end_time" field if the given value is not nil.
func (*RideUpdate) SetNillableRevenue ¶
func (ru *RideUpdate) SetNillableRevenue(f *float64) *RideUpdate
SetNillableRevenue sets the "revenue" field if the given value is not nil.
func (*RideUpdate) SetNillableRiderID ¶
func (ru *RideUpdate) SetNillableRiderID(u *uuid.UUID) *RideUpdate
SetNillableRiderID sets the "rider_id" field if the given value is not nil.
func (*RideUpdate) SetNillableStartAddress ¶
func (ru *RideUpdate) SetNillableStartAddress(s *string) *RideUpdate
SetNillableStartAddress sets the "start_address" field if the given value is not nil.
func (*RideUpdate) SetNillableStartTime ¶
func (ru *RideUpdate) SetNillableStartTime(t *time.Time) *RideUpdate
SetNillableStartTime sets the "start_time" field if the given value is not nil.
func (*RideUpdate) SetNillableUserID ¶
func (ru *RideUpdate) SetNillableUserID(id *uuid.UUID) *RideUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*RideUpdate) SetNillableVehicleCity ¶
func (ru *RideUpdate) SetNillableVehicleCity(s *string) *RideUpdate
SetNillableVehicleCity sets the "vehicle_city" field if the given value is not nil.
func (*RideUpdate) SetNillableVehicleID ¶
func (ru *RideUpdate) SetNillableVehicleID(u *uuid.UUID) *RideUpdate
SetNillableVehicleID sets the "vehicle_id" field if the given value is not nil.
func (*RideUpdate) SetRevenue ¶
func (ru *RideUpdate) SetRevenue(f float64) *RideUpdate
SetRevenue sets the "revenue" field.
func (*RideUpdate) SetRiderID ¶
func (ru *RideUpdate) SetRiderID(u uuid.UUID) *RideUpdate
SetRiderID sets the "rider_id" field.
func (*RideUpdate) SetStartAddress ¶
func (ru *RideUpdate) SetStartAddress(s string) *RideUpdate
SetStartAddress sets the "start_address" field.
func (*RideUpdate) SetStartTime ¶
func (ru *RideUpdate) SetStartTime(t time.Time) *RideUpdate
SetStartTime sets the "start_time" field.
func (*RideUpdate) SetUser ¶
func (ru *RideUpdate) SetUser(u *User) *RideUpdate
SetUser sets the "user" edge to the User entity.
func (*RideUpdate) SetUserID ¶
func (ru *RideUpdate) SetUserID(id uuid.UUID) *RideUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*RideUpdate) SetVehicle ¶
func (ru *RideUpdate) SetVehicle(v *Vehicle) *RideUpdate
SetVehicle sets the "vehicle" edge to the Vehicle entity.
func (*RideUpdate) SetVehicleCity ¶
func (ru *RideUpdate) SetVehicleCity(s string) *RideUpdate
SetVehicleCity sets the "vehicle_city" field.
func (*RideUpdate) SetVehicleID ¶
func (ru *RideUpdate) SetVehicleID(u uuid.UUID) *RideUpdate
SetVehicleID sets the "vehicle_id" field.
func (*RideUpdate) Where ¶
func (ru *RideUpdate) Where(ps ...predicate.Ride) *RideUpdate
Where appends a list predicates to the RideUpdate builder.
type RideUpdateOne ¶
type RideUpdateOne struct {
// contains filtered or unexported fields
}
RideUpdateOne is the builder for updating a single Ride entity.
func (*RideUpdateOne) AddRevenue ¶
func (ruo *RideUpdateOne) AddRevenue(f float64) *RideUpdateOne
AddRevenue adds f to the "revenue" field.
func (*RideUpdateOne) AddVehicleLocationHistories ¶
func (ruo *RideUpdateOne) AddVehicleLocationHistories(v ...*VehicleLocationHistory) *RideUpdateOne
AddVehicleLocationHistories adds the "vehicle_location_histories" edges to the VehicleLocationHistory entity.
func (*RideUpdateOne) AddVehicleLocationHistoryIDs ¶
func (ruo *RideUpdateOne) AddVehicleLocationHistoryIDs(ids ...uuid.UUID) *RideUpdateOne
AddVehicleLocationHistoryIDs adds the "vehicle_location_histories" edge to the VehicleLocationHistory entity by IDs.
func (*RideUpdateOne) ClearEndAddress ¶
func (ruo *RideUpdateOne) ClearEndAddress() *RideUpdateOne
ClearEndAddress clears the value of the "end_address" field.
func (*RideUpdateOne) ClearEndTime ¶
func (ruo *RideUpdateOne) ClearEndTime() *RideUpdateOne
ClearEndTime clears the value of the "end_time" field.
func (*RideUpdateOne) ClearRevenue ¶
func (ruo *RideUpdateOne) ClearRevenue() *RideUpdateOne
ClearRevenue clears the value of the "revenue" field.
func (*RideUpdateOne) ClearRiderID ¶
func (ruo *RideUpdateOne) ClearRiderID() *RideUpdateOne
ClearRiderID clears the value of the "rider_id" field.
func (*RideUpdateOne) ClearStartAddress ¶
func (ruo *RideUpdateOne) ClearStartAddress() *RideUpdateOne
ClearStartAddress clears the value of the "start_address" field.
func (*RideUpdateOne) ClearStartTime ¶
func (ruo *RideUpdateOne) ClearStartTime() *RideUpdateOne
ClearStartTime clears the value of the "start_time" field.
func (*RideUpdateOne) ClearUser ¶
func (ruo *RideUpdateOne) ClearUser() *RideUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*RideUpdateOne) ClearVehicle ¶
func (ruo *RideUpdateOne) ClearVehicle() *RideUpdateOne
ClearVehicle clears the "vehicle" edge to the Vehicle entity.
func (*RideUpdateOne) ClearVehicleCity ¶
func (ruo *RideUpdateOne) ClearVehicleCity() *RideUpdateOne
ClearVehicleCity clears the value of the "vehicle_city" field.
func (*RideUpdateOne) ClearVehicleID ¶
func (ruo *RideUpdateOne) ClearVehicleID() *RideUpdateOne
ClearVehicleID clears the value of the "vehicle_id" field.
func (*RideUpdateOne) ClearVehicleLocationHistories ¶
func (ruo *RideUpdateOne) ClearVehicleLocationHistories() *RideUpdateOne
ClearVehicleLocationHistories clears all "vehicle_location_histories" edges to the VehicleLocationHistory entity.
func (*RideUpdateOne) Exec ¶
func (ruo *RideUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RideUpdateOne) ExecX ¶
func (ruo *RideUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RideUpdateOne) Mutation ¶
func (ruo *RideUpdateOne) Mutation() *RideMutation
Mutation returns the RideMutation object of the builder.
func (*RideUpdateOne) RemoveVehicleLocationHistories ¶
func (ruo *RideUpdateOne) RemoveVehicleLocationHistories(v ...*VehicleLocationHistory) *RideUpdateOne
RemoveVehicleLocationHistories removes "vehicle_location_histories" edges to VehicleLocationHistory entities.
func (*RideUpdateOne) RemoveVehicleLocationHistoryIDs ¶
func (ruo *RideUpdateOne) RemoveVehicleLocationHistoryIDs(ids ...uuid.UUID) *RideUpdateOne
RemoveVehicleLocationHistoryIDs removes the "vehicle_location_histories" edge to VehicleLocationHistory entities by IDs.
func (*RideUpdateOne) Save ¶
func (ruo *RideUpdateOne) Save(ctx context.Context) (*Ride, error)
Save executes the query and returns the updated Ride entity.
func (*RideUpdateOne) SaveX ¶
func (ruo *RideUpdateOne) SaveX(ctx context.Context) *Ride
SaveX is like Save, but panics if an error occurs.
func (*RideUpdateOne) Select ¶
func (ruo *RideUpdateOne) Select(field string, fields ...string) *RideUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RideUpdateOne) SetCity ¶
func (ruo *RideUpdateOne) SetCity(s string) *RideUpdateOne
SetCity sets the "city" field.
func (*RideUpdateOne) SetEndAddress ¶
func (ruo *RideUpdateOne) SetEndAddress(s string) *RideUpdateOne
SetEndAddress sets the "end_address" field.
func (*RideUpdateOne) SetEndTime ¶
func (ruo *RideUpdateOne) SetEndTime(t time.Time) *RideUpdateOne
SetEndTime sets the "end_time" field.
func (*RideUpdateOne) SetNillableEndAddress ¶
func (ruo *RideUpdateOne) SetNillableEndAddress(s *string) *RideUpdateOne
SetNillableEndAddress sets the "end_address" field if the given value is not nil.
func (*RideUpdateOne) SetNillableEndTime ¶
func (ruo *RideUpdateOne) SetNillableEndTime(t *time.Time) *RideUpdateOne
SetNillableEndTime sets the "end_time" field if the given value is not nil.
func (*RideUpdateOne) SetNillableRevenue ¶
func (ruo *RideUpdateOne) SetNillableRevenue(f *float64) *RideUpdateOne
SetNillableRevenue sets the "revenue" field if the given value is not nil.
func (*RideUpdateOne) SetNillableRiderID ¶
func (ruo *RideUpdateOne) SetNillableRiderID(u *uuid.UUID) *RideUpdateOne
SetNillableRiderID sets the "rider_id" field if the given value is not nil.
func (*RideUpdateOne) SetNillableStartAddress ¶
func (ruo *RideUpdateOne) SetNillableStartAddress(s *string) *RideUpdateOne
SetNillableStartAddress sets the "start_address" field if the given value is not nil.
func (*RideUpdateOne) SetNillableStartTime ¶
func (ruo *RideUpdateOne) SetNillableStartTime(t *time.Time) *RideUpdateOne
SetNillableStartTime sets the "start_time" field if the given value is not nil.
func (*RideUpdateOne) SetNillableUserID ¶
func (ruo *RideUpdateOne) SetNillableUserID(id *uuid.UUID) *RideUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*RideUpdateOne) SetNillableVehicleCity ¶
func (ruo *RideUpdateOne) SetNillableVehicleCity(s *string) *RideUpdateOne
SetNillableVehicleCity sets the "vehicle_city" field if the given value is not nil.
func (*RideUpdateOne) SetNillableVehicleID ¶
func (ruo *RideUpdateOne) SetNillableVehicleID(u *uuid.UUID) *RideUpdateOne
SetNillableVehicleID sets the "vehicle_id" field if the given value is not nil.
func (*RideUpdateOne) SetRevenue ¶
func (ruo *RideUpdateOne) SetRevenue(f float64) *RideUpdateOne
SetRevenue sets the "revenue" field.
func (*RideUpdateOne) SetRiderID ¶
func (ruo *RideUpdateOne) SetRiderID(u uuid.UUID) *RideUpdateOne
SetRiderID sets the "rider_id" field.
func (*RideUpdateOne) SetStartAddress ¶
func (ruo *RideUpdateOne) SetStartAddress(s string) *RideUpdateOne
SetStartAddress sets the "start_address" field.
func (*RideUpdateOne) SetStartTime ¶
func (ruo *RideUpdateOne) SetStartTime(t time.Time) *RideUpdateOne
SetStartTime sets the "start_time" field.
func (*RideUpdateOne) SetUser ¶
func (ruo *RideUpdateOne) SetUser(u *User) *RideUpdateOne
SetUser sets the "user" edge to the User entity.
func (*RideUpdateOne) SetUserID ¶
func (ruo *RideUpdateOne) SetUserID(id uuid.UUID) *RideUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (*RideUpdateOne) SetVehicle ¶
func (ruo *RideUpdateOne) SetVehicle(v *Vehicle) *RideUpdateOne
SetVehicle sets the "vehicle" edge to the Vehicle entity.
func (*RideUpdateOne) SetVehicleCity ¶
func (ruo *RideUpdateOne) SetVehicleCity(s string) *RideUpdateOne
SetVehicleCity sets the "vehicle_city" field.
func (*RideUpdateOne) SetVehicleID ¶
func (ruo *RideUpdateOne) SetVehicleID(u uuid.UUID) *RideUpdateOne
SetVehicleID sets the "vehicle_id" field.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Ride is the client for interacting with the Ride builders. Ride *RideClient // User is the client for interacting with the User builders. User *UserClient // UserPromoCode is the client for interacting with the UserPromoCode builders. UserPromoCode *UserPromoCodeClient // Vehicle is the client for interacting with the Vehicle builders. Vehicle *VehicleClient // VehicleLocationHistory is the client for interacting with the VehicleLocationHistory builders. VehicleLocationHistory *VehicleLocationHistoryClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type User ¶
type User struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // City holds the value of the "city" field. City string `json:"city,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Address holds the value of the "address" field. Address string `json:"address,omitempty"` // CreditCard holds the value of the "credit_card" field. CreditCard string `json:"credit_card,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) QueryRides ¶
QueryRides queries the "rides" edge of the User entity.
func (*User) QueryUserPromoCodes ¶
func (u *User) QueryUserPromoCodes() *UserPromoCodeQuery
QueryUserPromoCodes queries the "user_promo_codes" edge of the User entity.
func (*User) QueryVehicles ¶
func (u *User) QueryVehicles() *VehicleQuery
QueryVehicles queries the "vehicles" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryRides ¶
func (c *UserClient) QueryRides(u *User) *RideQuery
QueryRides queries the rides edge of a User.
func (*UserClient) QueryUserPromoCodes ¶
func (c *UserClient) QueryUserPromoCodes(u *User) *UserPromoCodeQuery
QueryUserPromoCodes queries the user_promo_codes edge of a User.
func (*UserClient) QueryVehicles ¶
func (c *UserClient) QueryVehicles(u *User) *VehicleQuery
QueryVehicles queries the vehicles edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddRideIDs ¶
func (uc *UserCreate) AddRideIDs(ids ...uuid.UUID) *UserCreate
AddRideIDs adds the "rides" edge to the Ride entity by IDs.
func (*UserCreate) AddRides ¶
func (uc *UserCreate) AddRides(r ...*Ride) *UserCreate
AddRides adds the "rides" edges to the Ride entity.
func (*UserCreate) AddUserPromoCodeIDs ¶
func (uc *UserCreate) AddUserPromoCodeIDs(ids ...uuid.UUID) *UserCreate
AddUserPromoCodeIDs adds the "user_promo_codes" edge to the UserPromoCode entity by IDs.
func (*UserCreate) AddUserPromoCodes ¶
func (uc *UserCreate) AddUserPromoCodes(u ...*UserPromoCode) *UserCreate
AddUserPromoCodes adds the "user_promo_codes" edges to the UserPromoCode entity.
func (*UserCreate) AddVehicleIDs ¶
func (uc *UserCreate) AddVehicleIDs(ids ...uuid.UUID) *UserCreate
AddVehicleIDs adds the "vehicles" edge to the Vehicle entity by IDs.
func (*UserCreate) AddVehicles ¶
func (uc *UserCreate) AddVehicles(v ...*Vehicle) *UserCreate
AddVehicles adds the "vehicles" edges to the Vehicle entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetAddress ¶
func (uc *UserCreate) SetAddress(s string) *UserCreate
SetAddress sets the "address" field.
func (*UserCreate) SetCity ¶
func (uc *UserCreate) SetCity(s string) *UserCreate
SetCity sets the "city" field.
func (*UserCreate) SetCreditCard ¶
func (uc *UserCreate) SetCreditCard(s string) *UserCreate
SetCreditCard sets the "credit_card" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetName ¶
func (uc *UserCreate) SetName(s string) *UserCreate
SetName sets the "name" field.
func (*UserCreate) SetNillableAddress ¶
func (uc *UserCreate) SetNillableAddress(s *string) *UserCreate
SetNillableAddress sets the "address" field if the given value is not nil.
func (*UserCreate) SetNillableCreditCard ¶
func (uc *UserCreate) SetNillableCreditCard(s *string) *UserCreate
SetNillableCreditCard sets the "credit_card" field if the given value is not nil.
func (*UserCreate) SetNillableID ¶
func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*UserCreate) SetNillableName ¶
func (uc *UserCreate) SetNillableName(s *string) *UserCreate
SetNillableName sets the "name" field if the given value is not nil.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserEdges ¶
type UserEdges struct { // Vehicles holds the value of the vehicles edge. Vehicles []*Vehicle `json:"vehicles,omitempty"` // Rides holds the value of the rides edge. Rides []*Ride `json:"rides,omitempty"` // UserPromoCodes holds the value of the user_promo_codes edge. UserPromoCodes []*UserPromoCode `json:"user_promo_codes,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) RidesOrErr ¶
RidesOrErr returns the Rides value or an error if the edge was not loaded in eager-loading.
func (UserEdges) UserPromoCodesOrErr ¶
func (e UserEdges) UserPromoCodesOrErr() ([]*UserPromoCode, error)
UserPromoCodesOrErr returns the UserPromoCodes value or an error if the edge was not loaded in eager-loading.
func (UserEdges) VehiclesOrErr ¶
VehiclesOrErr returns the Vehicles value or an error if the edge was not loaded in eager-loading.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) AddRideIDs ¶
func (m *UserMutation) AddRideIDs(ids ...uuid.UUID)
AddRideIDs adds the "rides" edge to the Ride entity by ids.
func (*UserMutation) AddUserPromoCodeIDs ¶
func (m *UserMutation) AddUserPromoCodeIDs(ids ...uuid.UUID)
AddUserPromoCodeIDs adds the "user_promo_codes" edge to the UserPromoCode entity by ids.
func (*UserMutation) AddVehicleIDs ¶
func (m *UserMutation) AddVehicleIDs(ids ...uuid.UUID)
AddVehicleIDs adds the "vehicles" edge to the Vehicle entity by ids.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) Address ¶
func (m *UserMutation) Address() (r string, exists bool)
Address returns the value of the "address" field in the mutation.
func (*UserMutation) AddressCleared ¶
func (m *UserMutation) AddressCleared() bool
AddressCleared returns if the "address" field was cleared in this mutation.
func (*UserMutation) City ¶
func (m *UserMutation) City() (r string, exists bool)
City returns the value of the "city" field in the mutation.
func (*UserMutation) ClearAddress ¶
func (m *UserMutation) ClearAddress()
ClearAddress clears the value of the "address" field.
func (*UserMutation) ClearCreditCard ¶
func (m *UserMutation) ClearCreditCard()
ClearCreditCard clears the value of the "credit_card" field.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearName ¶
func (m *UserMutation) ClearName()
ClearName clears the value of the "name" field.
func (*UserMutation) ClearRides ¶
func (m *UserMutation) ClearRides()
ClearRides clears the "rides" edge to the Ride entity.
func (*UserMutation) ClearUserPromoCodes ¶
func (m *UserMutation) ClearUserPromoCodes()
ClearUserPromoCodes clears the "user_promo_codes" edge to the UserPromoCode entity.
func (*UserMutation) ClearVehicles ¶
func (m *UserMutation) ClearVehicles()
ClearVehicles clears the "vehicles" edge to the Vehicle entity.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) CreditCard ¶
func (m *UserMutation) CreditCard() (r string, exists bool)
CreditCard returns the value of the "credit_card" field in the mutation.
func (*UserMutation) CreditCardCleared ¶
func (m *UserMutation) CreditCardCleared() bool
CreditCardCleared returns if the "credit_card" field was cleared in this mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) Name ¶
func (m *UserMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*UserMutation) NameCleared ¶
func (m *UserMutation) NameCleared() bool
NameCleared returns if the "name" field was cleared in this mutation.
func (*UserMutation) OldAddress ¶
func (m *UserMutation) OldAddress(ctx context.Context) (v string, err error)
OldAddress returns the old "address" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldCity ¶
func (m *UserMutation) OldCity(ctx context.Context) (v string, err error)
OldCity returns the old "city" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldCreditCard ¶
func (m *UserMutation) OldCreditCard(ctx context.Context) (v string, err error)
OldCreditCard returns the old "credit_card" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserMutation) OldName ¶
func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) RemoveRideIDs ¶
func (m *UserMutation) RemoveRideIDs(ids ...uuid.UUID)
RemoveRideIDs removes the "rides" edge to the Ride entity by IDs.
func (*UserMutation) RemoveUserPromoCodeIDs ¶
func (m *UserMutation) RemoveUserPromoCodeIDs(ids ...uuid.UUID)
RemoveUserPromoCodeIDs removes the "user_promo_codes" edge to the UserPromoCode entity by IDs.
func (*UserMutation) RemoveVehicleIDs ¶
func (m *UserMutation) RemoveVehicleIDs(ids ...uuid.UUID)
RemoveVehicleIDs removes the "vehicles" edge to the Vehicle entity by IDs.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserMutation) RemovedRidesIDs ¶
func (m *UserMutation) RemovedRidesIDs() (ids []uuid.UUID)
RemovedRides returns the removed IDs of the "rides" edge to the Ride entity.
func (*UserMutation) RemovedUserPromoCodesIDs ¶
func (m *UserMutation) RemovedUserPromoCodesIDs() (ids []uuid.UUID)
RemovedUserPromoCodes returns the removed IDs of the "user_promo_codes" edge to the UserPromoCode entity.
func (*UserMutation) RemovedVehiclesIDs ¶
func (m *UserMutation) RemovedVehiclesIDs() (ids []uuid.UUID)
RemovedVehicles returns the removed IDs of the "vehicles" edge to the Vehicle entity.
func (*UserMutation) ResetAddress ¶
func (m *UserMutation) ResetAddress()
ResetAddress resets all changes to the "address" field.
func (*UserMutation) ResetCity ¶
func (m *UserMutation) ResetCity()
ResetCity resets all changes to the "city" field.
func (*UserMutation) ResetCreditCard ¶
func (m *UserMutation) ResetCreditCard()
ResetCreditCard resets all changes to the "credit_card" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetName ¶
func (m *UserMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*UserMutation) ResetRides ¶
func (m *UserMutation) ResetRides()
ResetRides resets all changes to the "rides" edge.
func (*UserMutation) ResetUserPromoCodes ¶
func (m *UserMutation) ResetUserPromoCodes()
ResetUserPromoCodes resets all changes to the "user_promo_codes" edge.
func (*UserMutation) ResetVehicles ¶
func (m *UserMutation) ResetVehicles()
ResetVehicles resets all changes to the "vehicles" edge.
func (*UserMutation) RidesCleared ¶
func (m *UserMutation) RidesCleared() bool
RidesCleared reports if the "rides" edge to the Ride entity was cleared.
func (*UserMutation) RidesIDs ¶
func (m *UserMutation) RidesIDs() (ids []uuid.UUID)
RidesIDs returns the "rides" edge IDs in the mutation.
func (*UserMutation) SetAddress ¶
func (m *UserMutation) SetAddress(s string)
SetAddress sets the "address" field.
func (*UserMutation) SetCity ¶
func (m *UserMutation) SetCity(s string)
SetCity sets the "city" field.
func (*UserMutation) SetCreditCard ¶
func (m *UserMutation) SetCreditCard(s string)
SetCreditCard sets the "credit_card" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetName ¶
func (m *UserMutation) SetName(s string)
SetName sets the "name" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UserPromoCodesCleared ¶
func (m *UserMutation) UserPromoCodesCleared() bool
UserPromoCodesCleared reports if the "user_promo_codes" edge to the UserPromoCode entity was cleared.
func (*UserMutation) UserPromoCodesIDs ¶
func (m *UserMutation) UserPromoCodesIDs() (ids []uuid.UUID)
UserPromoCodesIDs returns the "user_promo_codes" edge IDs in the mutation.
func (*UserMutation) VehiclesCleared ¶
func (m *UserMutation) VehiclesCleared() bool
VehiclesCleared reports if the "vehicles" edge to the Vehicle entity was cleared.
func (*UserMutation) VehiclesIDs ¶
func (m *UserMutation) VehiclesIDs() (ids []uuid.UUID)
VehiclesIDs returns the "vehicles" edge IDs in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserPromoCode ¶
type UserPromoCode struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // City holds the value of the "city" field. City string `json:"city,omitempty"` // UserID holds the value of the "user_id" field. UserID uuid.UUID `json:"user_id,omitempty"` // Code holds the value of the "code" field. Code string `json:"code,omitempty"` // Timestamp holds the value of the "timestamp" field. Timestamp time.Time `json:"timestamp,omitempty"` // UsageCount holds the value of the "usage_count" field. UsageCount int `json:"usage_count,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserPromoCodeQuery when eager-loading is set. Edges UserPromoCodeEdges `json:"edges"` // contains filtered or unexported fields }
UserPromoCode is the model entity for the UserPromoCode schema.
func (*UserPromoCode) QueryUser ¶
func (upc *UserPromoCode) QueryUser() *UserQuery
QueryUser queries the "user" edge of the UserPromoCode entity.
func (*UserPromoCode) String ¶
func (upc *UserPromoCode) String() string
String implements the fmt.Stringer.
func (*UserPromoCode) Unwrap ¶
func (upc *UserPromoCode) Unwrap() *UserPromoCode
Unwrap unwraps the UserPromoCode entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*UserPromoCode) Update ¶
func (upc *UserPromoCode) Update() *UserPromoCodeUpdateOne
Update returns a builder for updating this UserPromoCode. Note that you need to call UserPromoCode.Unwrap() before calling this method if this UserPromoCode was returned from a transaction, and the transaction was committed or rolled back.
type UserPromoCodeClient ¶
type UserPromoCodeClient struct {
// contains filtered or unexported fields
}
UserPromoCodeClient is a client for the UserPromoCode schema.
func NewUserPromoCodeClient ¶
func NewUserPromoCodeClient(c config) *UserPromoCodeClient
NewUserPromoCodeClient returns a client for the UserPromoCode from the given config.
func (*UserPromoCodeClient) Create ¶
func (c *UserPromoCodeClient) Create() *UserPromoCodeCreate
Create returns a builder for creating a UserPromoCode entity.
func (*UserPromoCodeClient) CreateBulk ¶
func (c *UserPromoCodeClient) CreateBulk(builders ...*UserPromoCodeCreate) *UserPromoCodeCreateBulk
CreateBulk returns a builder for creating a bulk of UserPromoCode entities.
func (*UserPromoCodeClient) Delete ¶
func (c *UserPromoCodeClient) Delete() *UserPromoCodeDelete
Delete returns a delete builder for UserPromoCode.
func (*UserPromoCodeClient) DeleteOne ¶
func (c *UserPromoCodeClient) DeleteOne(upc *UserPromoCode) *UserPromoCodeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserPromoCodeClient) DeleteOneID ¶
func (c *UserPromoCodeClient) DeleteOneID(id uuid.UUID) *UserPromoCodeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserPromoCodeClient) Get ¶
func (c *UserPromoCodeClient) Get(ctx context.Context, id uuid.UUID) (*UserPromoCode, error)
Get returns a UserPromoCode entity by its id.
func (*UserPromoCodeClient) GetX ¶
func (c *UserPromoCodeClient) GetX(ctx context.Context, id uuid.UUID) *UserPromoCode
GetX is like Get, but panics if an error occurs.
func (*UserPromoCodeClient) Hooks ¶
func (c *UserPromoCodeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserPromoCodeClient) Intercept ¶
func (c *UserPromoCodeClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `userpromocode.Intercept(f(g(h())))`.
func (*UserPromoCodeClient) Interceptors ¶
func (c *UserPromoCodeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserPromoCodeClient) Query ¶
func (c *UserPromoCodeClient) Query() *UserPromoCodeQuery
Query returns a query builder for UserPromoCode.
func (*UserPromoCodeClient) QueryUser ¶
func (c *UserPromoCodeClient) QueryUser(upc *UserPromoCode) *UserQuery
QueryUser queries the user edge of a UserPromoCode.
func (*UserPromoCodeClient) Update ¶
func (c *UserPromoCodeClient) Update() *UserPromoCodeUpdate
Update returns an update builder for UserPromoCode.
func (*UserPromoCodeClient) UpdateOne ¶
func (c *UserPromoCodeClient) UpdateOne(upc *UserPromoCode) *UserPromoCodeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserPromoCodeClient) UpdateOneID ¶
func (c *UserPromoCodeClient) UpdateOneID(id uuid.UUID) *UserPromoCodeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserPromoCodeClient) Use ¶
func (c *UserPromoCodeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `userpromocode.Hooks(f(g(h())))`.
type UserPromoCodeCreate ¶
type UserPromoCodeCreate struct {
// contains filtered or unexported fields
}
UserPromoCodeCreate is the builder for creating a UserPromoCode entity.
func (*UserPromoCodeCreate) Exec ¶
func (upcc *UserPromoCodeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserPromoCodeCreate) ExecX ¶
func (upcc *UserPromoCodeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserPromoCodeCreate) Mutation ¶
func (upcc *UserPromoCodeCreate) Mutation() *UserPromoCodeMutation
Mutation returns the UserPromoCodeMutation object of the builder.
func (*UserPromoCodeCreate) Save ¶
func (upcc *UserPromoCodeCreate) Save(ctx context.Context) (*UserPromoCode, error)
Save creates the UserPromoCode in the database.
func (*UserPromoCodeCreate) SaveX ¶
func (upcc *UserPromoCodeCreate) SaveX(ctx context.Context) *UserPromoCode
SaveX calls Save and panics if Save returns an error.
func (*UserPromoCodeCreate) SetCity ¶
func (upcc *UserPromoCodeCreate) SetCity(s string) *UserPromoCodeCreate
SetCity sets the "city" field.
func (*UserPromoCodeCreate) SetCode ¶
func (upcc *UserPromoCodeCreate) SetCode(s string) *UserPromoCodeCreate
SetCode sets the "code" field.
func (*UserPromoCodeCreate) SetID ¶
func (upcc *UserPromoCodeCreate) SetID(u uuid.UUID) *UserPromoCodeCreate
SetID sets the "id" field.
func (*UserPromoCodeCreate) SetNillableID ¶
func (upcc *UserPromoCodeCreate) SetNillableID(u *uuid.UUID) *UserPromoCodeCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*UserPromoCodeCreate) SetNillableTimestamp ¶
func (upcc *UserPromoCodeCreate) SetNillableTimestamp(t *time.Time) *UserPromoCodeCreate
SetNillableTimestamp sets the "timestamp" field if the given value is not nil.
func (*UserPromoCodeCreate) SetNillableUsageCount ¶
func (upcc *UserPromoCodeCreate) SetNillableUsageCount(i *int) *UserPromoCodeCreate
SetNillableUsageCount sets the "usage_count" field if the given value is not nil.
func (*UserPromoCodeCreate) SetTimestamp ¶
func (upcc *UserPromoCodeCreate) SetTimestamp(t time.Time) *UserPromoCodeCreate
SetTimestamp sets the "timestamp" field.
func (*UserPromoCodeCreate) SetUsageCount ¶
func (upcc *UserPromoCodeCreate) SetUsageCount(i int) *UserPromoCodeCreate
SetUsageCount sets the "usage_count" field.
func (*UserPromoCodeCreate) SetUser ¶
func (upcc *UserPromoCodeCreate) SetUser(u *User) *UserPromoCodeCreate
SetUser sets the "user" edge to the User entity.
func (*UserPromoCodeCreate) SetUserID ¶
func (upcc *UserPromoCodeCreate) SetUserID(u uuid.UUID) *UserPromoCodeCreate
SetUserID sets the "user_id" field.
type UserPromoCodeCreateBulk ¶
type UserPromoCodeCreateBulk struct {
// contains filtered or unexported fields
}
UserPromoCodeCreateBulk is the builder for creating many UserPromoCode entities in bulk.
func (*UserPromoCodeCreateBulk) Exec ¶
func (upccb *UserPromoCodeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserPromoCodeCreateBulk) ExecX ¶
func (upccb *UserPromoCodeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserPromoCodeCreateBulk) Save ¶
func (upccb *UserPromoCodeCreateBulk) Save(ctx context.Context) ([]*UserPromoCode, error)
Save creates the UserPromoCode entities in the database.
func (*UserPromoCodeCreateBulk) SaveX ¶
func (upccb *UserPromoCodeCreateBulk) SaveX(ctx context.Context) []*UserPromoCode
SaveX is like Save, but panics if an error occurs.
type UserPromoCodeDelete ¶
type UserPromoCodeDelete struct {
// contains filtered or unexported fields
}
UserPromoCodeDelete is the builder for deleting a UserPromoCode entity.
func (*UserPromoCodeDelete) Exec ¶
func (upcd *UserPromoCodeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserPromoCodeDelete) ExecX ¶
func (upcd *UserPromoCodeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserPromoCodeDelete) Where ¶
func (upcd *UserPromoCodeDelete) Where(ps ...predicate.UserPromoCode) *UserPromoCodeDelete
Where appends a list predicates to the UserPromoCodeDelete builder.
type UserPromoCodeDeleteOne ¶
type UserPromoCodeDeleteOne struct {
// contains filtered or unexported fields
}
UserPromoCodeDeleteOne is the builder for deleting a single UserPromoCode entity.
func (*UserPromoCodeDeleteOne) Exec ¶
func (upcdo *UserPromoCodeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserPromoCodeDeleteOne) ExecX ¶
func (upcdo *UserPromoCodeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserPromoCodeDeleteOne) Where ¶
func (upcdo *UserPromoCodeDeleteOne) Where(ps ...predicate.UserPromoCode) *UserPromoCodeDeleteOne
Where appends a list predicates to the UserPromoCodeDelete builder.
type UserPromoCodeEdges ¶
type UserPromoCodeEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // contains filtered or unexported fields }
UserPromoCodeEdges holds the relations/edges for other nodes in the graph.
func (UserPromoCodeEdges) UserOrErr ¶
func (e UserPromoCodeEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserPromoCodeGroupBy ¶
type UserPromoCodeGroupBy struct {
// contains filtered or unexported fields
}
UserPromoCodeGroupBy is the group-by builder for UserPromoCode entities.
func (*UserPromoCodeGroupBy) Aggregate ¶
func (upcgb *UserPromoCodeGroupBy) Aggregate(fns ...AggregateFunc) *UserPromoCodeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserPromoCodeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserPromoCodeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserPromoCodeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserPromoCodeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserPromoCodeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserPromoCodeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserPromoCodeGroupBy) Scan ¶
func (upcgb *UserPromoCodeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserPromoCodeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserPromoCodeMutation ¶
type UserPromoCodeMutation struct {
// contains filtered or unexported fields
}
UserPromoCodeMutation represents an operation that mutates the UserPromoCode nodes in the graph.
func (*UserPromoCodeMutation) AddField ¶
func (m *UserPromoCodeMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserPromoCodeMutation) AddUsageCount ¶
func (m *UserPromoCodeMutation) AddUsageCount(i int)
AddUsageCount adds i to the "usage_count" field.
func (*UserPromoCodeMutation) AddedEdges ¶
func (m *UserPromoCodeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserPromoCodeMutation) AddedField ¶
func (m *UserPromoCodeMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserPromoCodeMutation) AddedFields ¶
func (m *UserPromoCodeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserPromoCodeMutation) AddedIDs ¶
func (m *UserPromoCodeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserPromoCodeMutation) AddedUsageCount ¶
func (m *UserPromoCodeMutation) AddedUsageCount() (r int, exists bool)
AddedUsageCount returns the value that was added to the "usage_count" field in this mutation.
func (*UserPromoCodeMutation) City ¶
func (m *UserPromoCodeMutation) City() (r string, exists bool)
City returns the value of the "city" field in the mutation.
func (*UserPromoCodeMutation) ClearEdge ¶
func (m *UserPromoCodeMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserPromoCodeMutation) ClearField ¶
func (m *UserPromoCodeMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserPromoCodeMutation) ClearTimestamp ¶
func (m *UserPromoCodeMutation) ClearTimestamp()
ClearTimestamp clears the value of the "timestamp" field.
func (*UserPromoCodeMutation) ClearUsageCount ¶
func (m *UserPromoCodeMutation) ClearUsageCount()
ClearUsageCount clears the value of the "usage_count" field.
func (*UserPromoCodeMutation) ClearUser ¶
func (m *UserPromoCodeMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*UserPromoCodeMutation) ClearedEdges ¶
func (m *UserPromoCodeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserPromoCodeMutation) ClearedFields ¶
func (m *UserPromoCodeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserPromoCodeMutation) Client ¶
func (m UserPromoCodeMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserPromoCodeMutation) Code ¶
func (m *UserPromoCodeMutation) Code() (r string, exists bool)
Code returns the value of the "code" field in the mutation.
func (*UserPromoCodeMutation) EdgeCleared ¶
func (m *UserPromoCodeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserPromoCodeMutation) Field ¶
func (m *UserPromoCodeMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserPromoCodeMutation) FieldCleared ¶
func (m *UserPromoCodeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserPromoCodeMutation) Fields ¶
func (m *UserPromoCodeMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserPromoCodeMutation) ID ¶
func (m *UserPromoCodeMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserPromoCodeMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserPromoCodeMutation) OldCity ¶
func (m *UserPromoCodeMutation) OldCity(ctx context.Context) (v string, err error)
OldCity returns the old "city" field's value of the UserPromoCode entity. If the UserPromoCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserPromoCodeMutation) OldCode ¶
func (m *UserPromoCodeMutation) OldCode(ctx context.Context) (v string, err error)
OldCode returns the old "code" field's value of the UserPromoCode entity. If the UserPromoCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserPromoCodeMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserPromoCodeMutation) OldTimestamp ¶
OldTimestamp returns the old "timestamp" field's value of the UserPromoCode entity. If the UserPromoCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserPromoCodeMutation) OldUsageCount ¶
func (m *UserPromoCodeMutation) OldUsageCount(ctx context.Context) (v int, err error)
OldUsageCount returns the old "usage_count" field's value of the UserPromoCode entity. If the UserPromoCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserPromoCodeMutation) OldUserID ¶
OldUserID returns the old "user_id" field's value of the UserPromoCode entity. If the UserPromoCode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserPromoCodeMutation) Op ¶
func (m *UserPromoCodeMutation) Op() Op
Op returns the operation name.
func (*UserPromoCodeMutation) RemovedEdges ¶
func (m *UserPromoCodeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserPromoCodeMutation) RemovedIDs ¶
func (m *UserPromoCodeMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserPromoCodeMutation) ResetCity ¶
func (m *UserPromoCodeMutation) ResetCity()
ResetCity resets all changes to the "city" field.
func (*UserPromoCodeMutation) ResetCode ¶
func (m *UserPromoCodeMutation) ResetCode()
ResetCode resets all changes to the "code" field.
func (*UserPromoCodeMutation) ResetEdge ¶
func (m *UserPromoCodeMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserPromoCodeMutation) ResetField ¶
func (m *UserPromoCodeMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserPromoCodeMutation) ResetTimestamp ¶
func (m *UserPromoCodeMutation) ResetTimestamp()
ResetTimestamp resets all changes to the "timestamp" field.
func (*UserPromoCodeMutation) ResetUsageCount ¶
func (m *UserPromoCodeMutation) ResetUsageCount()
ResetUsageCount resets all changes to the "usage_count" field.
func (*UserPromoCodeMutation) ResetUser ¶
func (m *UserPromoCodeMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*UserPromoCodeMutation) ResetUserID ¶
func (m *UserPromoCodeMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*UserPromoCodeMutation) SetCity ¶
func (m *UserPromoCodeMutation) SetCity(s string)
SetCity sets the "city" field.
func (*UserPromoCodeMutation) SetCode ¶
func (m *UserPromoCodeMutation) SetCode(s string)
SetCode sets the "code" field.
func (*UserPromoCodeMutation) SetField ¶
func (m *UserPromoCodeMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserPromoCodeMutation) SetID ¶
func (m *UserPromoCodeMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of UserPromoCode entities.
func (*UserPromoCodeMutation) SetOp ¶
func (m *UserPromoCodeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserPromoCodeMutation) SetTimestamp ¶
func (m *UserPromoCodeMutation) SetTimestamp(t time.Time)
SetTimestamp sets the "timestamp" field.
func (*UserPromoCodeMutation) SetUsageCount ¶
func (m *UserPromoCodeMutation) SetUsageCount(i int)
SetUsageCount sets the "usage_count" field.
func (*UserPromoCodeMutation) SetUserID ¶
func (m *UserPromoCodeMutation) SetUserID(u uuid.UUID)
SetUserID sets the "user_id" field.
func (*UserPromoCodeMutation) Timestamp ¶
func (m *UserPromoCodeMutation) Timestamp() (r time.Time, exists bool)
Timestamp returns the value of the "timestamp" field in the mutation.
func (*UserPromoCodeMutation) TimestampCleared ¶
func (m *UserPromoCodeMutation) TimestampCleared() bool
TimestampCleared returns if the "timestamp" field was cleared in this mutation.
func (UserPromoCodeMutation) Tx ¶
func (m UserPromoCodeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserPromoCodeMutation) Type ¶
func (m *UserPromoCodeMutation) Type() string
Type returns the node type of this mutation (UserPromoCode).
func (*UserPromoCodeMutation) UsageCount ¶
func (m *UserPromoCodeMutation) UsageCount() (r int, exists bool)
UsageCount returns the value of the "usage_count" field in the mutation.
func (*UserPromoCodeMutation) UsageCountCleared ¶
func (m *UserPromoCodeMutation) UsageCountCleared() bool
UsageCountCleared returns if the "usage_count" field was cleared in this mutation.
func (*UserPromoCodeMutation) UserCleared ¶
func (m *UserPromoCodeMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*UserPromoCodeMutation) UserID ¶
func (m *UserPromoCodeMutation) UserID() (r uuid.UUID, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*UserPromoCodeMutation) UserIDs ¶
func (m *UserPromoCodeMutation) UserIDs() (ids []uuid.UUID)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*UserPromoCodeMutation) Where ¶
func (m *UserPromoCodeMutation) Where(ps ...predicate.UserPromoCode)
Where appends a list predicates to the UserPromoCodeMutation builder.
func (*UserPromoCodeMutation) WhereP ¶
func (m *UserPromoCodeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserPromoCodeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserPromoCodeQuery ¶
type UserPromoCodeQuery struct {
// contains filtered or unexported fields
}
UserPromoCodeQuery is the builder for querying UserPromoCode entities.
func (*UserPromoCodeQuery) Aggregate ¶
func (upcq *UserPromoCodeQuery) Aggregate(fns ...AggregateFunc) *UserPromoCodeSelect
Aggregate returns a UserPromoCodeSelect configured with the given aggregations.
func (*UserPromoCodeQuery) All ¶
func (upcq *UserPromoCodeQuery) All(ctx context.Context) ([]*UserPromoCode, error)
All executes the query and returns a list of UserPromoCodes.
func (*UserPromoCodeQuery) AllX ¶
func (upcq *UserPromoCodeQuery) AllX(ctx context.Context) []*UserPromoCode
AllX is like All, but panics if an error occurs.
func (*UserPromoCodeQuery) Clone ¶
func (upcq *UserPromoCodeQuery) Clone() *UserPromoCodeQuery
Clone returns a duplicate of the UserPromoCodeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserPromoCodeQuery) Count ¶
func (upcq *UserPromoCodeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserPromoCodeQuery) CountX ¶
func (upcq *UserPromoCodeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserPromoCodeQuery) Exist ¶
func (upcq *UserPromoCodeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserPromoCodeQuery) ExistX ¶
func (upcq *UserPromoCodeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserPromoCodeQuery) First ¶
func (upcq *UserPromoCodeQuery) First(ctx context.Context) (*UserPromoCode, error)
First returns the first UserPromoCode entity from the query. Returns a *NotFoundError when no UserPromoCode was found.
func (*UserPromoCodeQuery) FirstID ¶
FirstID returns the first UserPromoCode ID from the query. Returns a *NotFoundError when no UserPromoCode ID was found.
func (*UserPromoCodeQuery) FirstIDX ¶
func (upcq *UserPromoCodeQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserPromoCodeQuery) FirstX ¶
func (upcq *UserPromoCodeQuery) FirstX(ctx context.Context) *UserPromoCode
FirstX is like First, but panics if an error occurs.
func (*UserPromoCodeQuery) GroupBy ¶
func (upcq *UserPromoCodeQuery) GroupBy(field string, fields ...string) *UserPromoCodeGroupBy
GroupBy is 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 { City string `json:"city,omitempty"` Count int `json:"count,omitempty"` } client.UserPromoCode.Query(). GroupBy(userpromocode.FieldCity). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserPromoCodeQuery) IDsX ¶
func (upcq *UserPromoCodeQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*UserPromoCodeQuery) Limit ¶
func (upcq *UserPromoCodeQuery) Limit(limit int) *UserPromoCodeQuery
Limit the number of records to be returned by this query.
func (*UserPromoCodeQuery) Offset ¶
func (upcq *UserPromoCodeQuery) Offset(offset int) *UserPromoCodeQuery
Offset to start from.
func (*UserPromoCodeQuery) Only ¶
func (upcq *UserPromoCodeQuery) Only(ctx context.Context) (*UserPromoCode, error)
Only returns a single UserPromoCode entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserPromoCode entity is found. Returns a *NotFoundError when no UserPromoCode entities are found.
func (*UserPromoCodeQuery) OnlyID ¶
OnlyID is like Only, but returns the only UserPromoCode ID in the query. Returns a *NotSingularError when more than one UserPromoCode ID is found. Returns a *NotFoundError when no entities are found.
func (*UserPromoCodeQuery) OnlyIDX ¶
func (upcq *UserPromoCodeQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserPromoCodeQuery) OnlyX ¶
func (upcq *UserPromoCodeQuery) OnlyX(ctx context.Context) *UserPromoCode
OnlyX is like Only, but panics if an error occurs.
func (*UserPromoCodeQuery) Order ¶
func (upcq *UserPromoCodeQuery) Order(o ...OrderFunc) *UserPromoCodeQuery
Order specifies how the records should be ordered.
func (*UserPromoCodeQuery) QueryUser ¶
func (upcq *UserPromoCodeQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*UserPromoCodeQuery) Select ¶
func (upcq *UserPromoCodeQuery) Select(fields ...string) *UserPromoCodeSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { City string `json:"city,omitempty"` } client.UserPromoCode.Query(). Select(userpromocode.FieldCity). Scan(ctx, &v)
func (*UserPromoCodeQuery) Unique ¶
func (upcq *UserPromoCodeQuery) Unique(unique bool) *UserPromoCodeQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserPromoCodeQuery) Where ¶
func (upcq *UserPromoCodeQuery) Where(ps ...predicate.UserPromoCode) *UserPromoCodeQuery
Where adds a new predicate for the UserPromoCodeQuery builder.
func (*UserPromoCodeQuery) WithUser ¶
func (upcq *UserPromoCodeQuery) WithUser(opts ...func(*UserQuery)) *UserPromoCodeQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type UserPromoCodeSelect ¶
type UserPromoCodeSelect struct { *UserPromoCodeQuery // contains filtered or unexported fields }
UserPromoCodeSelect is the builder for selecting fields of UserPromoCode entities.
func (*UserPromoCodeSelect) Aggregate ¶
func (upcs *UserPromoCodeSelect) Aggregate(fns ...AggregateFunc) *UserPromoCodeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserPromoCodeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserPromoCodeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserPromoCodeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserPromoCodeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserPromoCodeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserPromoCodeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserPromoCodeSelect) Scan ¶
func (upcs *UserPromoCodeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserPromoCodeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserPromoCodeUpdate ¶
type UserPromoCodeUpdate struct {
// contains filtered or unexported fields
}
UserPromoCodeUpdate is the builder for updating UserPromoCode entities.
func (*UserPromoCodeUpdate) AddUsageCount ¶
func (upcu *UserPromoCodeUpdate) AddUsageCount(i int) *UserPromoCodeUpdate
AddUsageCount adds i to the "usage_count" field.
func (*UserPromoCodeUpdate) ClearTimestamp ¶
func (upcu *UserPromoCodeUpdate) ClearTimestamp() *UserPromoCodeUpdate
ClearTimestamp clears the value of the "timestamp" field.
func (*UserPromoCodeUpdate) ClearUsageCount ¶
func (upcu *UserPromoCodeUpdate) ClearUsageCount() *UserPromoCodeUpdate
ClearUsageCount clears the value of the "usage_count" field.
func (*UserPromoCodeUpdate) ClearUser ¶
func (upcu *UserPromoCodeUpdate) ClearUser() *UserPromoCodeUpdate
ClearUser clears the "user" edge to the User entity.
func (*UserPromoCodeUpdate) Exec ¶
func (upcu *UserPromoCodeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserPromoCodeUpdate) ExecX ¶
func (upcu *UserPromoCodeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserPromoCodeUpdate) Mutation ¶
func (upcu *UserPromoCodeUpdate) Mutation() *UserPromoCodeMutation
Mutation returns the UserPromoCodeMutation object of the builder.
func (*UserPromoCodeUpdate) Save ¶
func (upcu *UserPromoCodeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserPromoCodeUpdate) SaveX ¶
func (upcu *UserPromoCodeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserPromoCodeUpdate) SetCity ¶
func (upcu *UserPromoCodeUpdate) SetCity(s string) *UserPromoCodeUpdate
SetCity sets the "city" field.
func (*UserPromoCodeUpdate) SetCode ¶
func (upcu *UserPromoCodeUpdate) SetCode(s string) *UserPromoCodeUpdate
SetCode sets the "code" field.
func (*UserPromoCodeUpdate) SetNillableTimestamp ¶
func (upcu *UserPromoCodeUpdate) SetNillableTimestamp(t *time.Time) *UserPromoCodeUpdate
SetNillableTimestamp sets the "timestamp" field if the given value is not nil.
func (*UserPromoCodeUpdate) SetNillableUsageCount ¶
func (upcu *UserPromoCodeUpdate) SetNillableUsageCount(i *int) *UserPromoCodeUpdate
SetNillableUsageCount sets the "usage_count" field if the given value is not nil.
func (*UserPromoCodeUpdate) SetTimestamp ¶
func (upcu *UserPromoCodeUpdate) SetTimestamp(t time.Time) *UserPromoCodeUpdate
SetTimestamp sets the "timestamp" field.
func (*UserPromoCodeUpdate) SetUsageCount ¶
func (upcu *UserPromoCodeUpdate) SetUsageCount(i int) *UserPromoCodeUpdate
SetUsageCount sets the "usage_count" field.
func (*UserPromoCodeUpdate) SetUser ¶
func (upcu *UserPromoCodeUpdate) SetUser(u *User) *UserPromoCodeUpdate
SetUser sets the "user" edge to the User entity.
func (*UserPromoCodeUpdate) SetUserID ¶
func (upcu *UserPromoCodeUpdate) SetUserID(u uuid.UUID) *UserPromoCodeUpdate
SetUserID sets the "user_id" field.
func (*UserPromoCodeUpdate) Where ¶
func (upcu *UserPromoCodeUpdate) Where(ps ...predicate.UserPromoCode) *UserPromoCodeUpdate
Where appends a list predicates to the UserPromoCodeUpdate builder.
type UserPromoCodeUpdateOne ¶
type UserPromoCodeUpdateOne struct {
// contains filtered or unexported fields
}
UserPromoCodeUpdateOne is the builder for updating a single UserPromoCode entity.
func (*UserPromoCodeUpdateOne) AddUsageCount ¶
func (upcuo *UserPromoCodeUpdateOne) AddUsageCount(i int) *UserPromoCodeUpdateOne
AddUsageCount adds i to the "usage_count" field.
func (*UserPromoCodeUpdateOne) ClearTimestamp ¶
func (upcuo *UserPromoCodeUpdateOne) ClearTimestamp() *UserPromoCodeUpdateOne
ClearTimestamp clears the value of the "timestamp" field.
func (*UserPromoCodeUpdateOne) ClearUsageCount ¶
func (upcuo *UserPromoCodeUpdateOne) ClearUsageCount() *UserPromoCodeUpdateOne
ClearUsageCount clears the value of the "usage_count" field.
func (*UserPromoCodeUpdateOne) ClearUser ¶
func (upcuo *UserPromoCodeUpdateOne) ClearUser() *UserPromoCodeUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*UserPromoCodeUpdateOne) Exec ¶
func (upcuo *UserPromoCodeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserPromoCodeUpdateOne) ExecX ¶
func (upcuo *UserPromoCodeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserPromoCodeUpdateOne) Mutation ¶
func (upcuo *UserPromoCodeUpdateOne) Mutation() *UserPromoCodeMutation
Mutation returns the UserPromoCodeMutation object of the builder.
func (*UserPromoCodeUpdateOne) Save ¶
func (upcuo *UserPromoCodeUpdateOne) Save(ctx context.Context) (*UserPromoCode, error)
Save executes the query and returns the updated UserPromoCode entity.
func (*UserPromoCodeUpdateOne) SaveX ¶
func (upcuo *UserPromoCodeUpdateOne) SaveX(ctx context.Context) *UserPromoCode
SaveX is like Save, but panics if an error occurs.
func (*UserPromoCodeUpdateOne) Select ¶
func (upcuo *UserPromoCodeUpdateOne) Select(field string, fields ...string) *UserPromoCodeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserPromoCodeUpdateOne) SetCity ¶
func (upcuo *UserPromoCodeUpdateOne) SetCity(s string) *UserPromoCodeUpdateOne
SetCity sets the "city" field.
func (*UserPromoCodeUpdateOne) SetCode ¶
func (upcuo *UserPromoCodeUpdateOne) SetCode(s string) *UserPromoCodeUpdateOne
SetCode sets the "code" field.
func (*UserPromoCodeUpdateOne) SetNillableTimestamp ¶
func (upcuo *UserPromoCodeUpdateOne) SetNillableTimestamp(t *time.Time) *UserPromoCodeUpdateOne
SetNillableTimestamp sets the "timestamp" field if the given value is not nil.
func (*UserPromoCodeUpdateOne) SetNillableUsageCount ¶
func (upcuo *UserPromoCodeUpdateOne) SetNillableUsageCount(i *int) *UserPromoCodeUpdateOne
SetNillableUsageCount sets the "usage_count" field if the given value is not nil.
func (*UserPromoCodeUpdateOne) SetTimestamp ¶
func (upcuo *UserPromoCodeUpdateOne) SetTimestamp(t time.Time) *UserPromoCodeUpdateOne
SetTimestamp sets the "timestamp" field.
func (*UserPromoCodeUpdateOne) SetUsageCount ¶
func (upcuo *UserPromoCodeUpdateOne) SetUsageCount(i int) *UserPromoCodeUpdateOne
SetUsageCount sets the "usage_count" field.
func (*UserPromoCodeUpdateOne) SetUser ¶
func (upcuo *UserPromoCodeUpdateOne) SetUser(u *User) *UserPromoCodeUpdateOne
SetUser sets the "user" edge to the User entity.
func (*UserPromoCodeUpdateOne) SetUserID ¶
func (upcuo *UserPromoCodeUpdateOne) SetUserID(u uuid.UUID) *UserPromoCodeUpdateOne
SetUserID sets the "user_id" field.
type UserPromoCodes ¶
type UserPromoCodes []*UserPromoCode
UserPromoCodes is a parsable slice of UserPromoCode.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is 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 { City string `json:"city,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldCity). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) QueryRides ¶
QueryRides chains the current query on the "rides" edge.
func (*UserQuery) QueryUserPromoCodes ¶
func (uq *UserQuery) QueryUserPromoCodes() *UserPromoCodeQuery
QueryUserPromoCodes chains the current query on the "user_promo_codes" edge.
func (*UserQuery) QueryVehicles ¶
func (uq *UserQuery) QueryVehicles() *VehicleQuery
QueryVehicles chains the current query on the "vehicles" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { City string `json:"city,omitempty"` } client.User.Query(). Select(user.FieldCity). Scan(ctx, &v)
func (*UserQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserQuery) WithRides ¶
WithRides tells the query-builder to eager-load the nodes that are connected to the "rides" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithUserPromoCodes ¶
func (uq *UserQuery) WithUserPromoCodes(opts ...func(*UserPromoCodeQuery)) *UserQuery
WithUserPromoCodes tells the query-builder to eager-load the nodes that are connected to the "user_promo_codes" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithVehicles ¶
func (uq *UserQuery) WithVehicles(opts ...func(*VehicleQuery)) *UserQuery
WithVehicles tells the query-builder to eager-load the nodes that are connected to the "vehicles" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddRideIDs ¶
func (uu *UserUpdate) AddRideIDs(ids ...uuid.UUID) *UserUpdate
AddRideIDs adds the "rides" edge to the Ride entity by IDs.
func (*UserUpdate) AddRides ¶
func (uu *UserUpdate) AddRides(r ...*Ride) *UserUpdate
AddRides adds the "rides" edges to the Ride entity.
func (*UserUpdate) AddUserPromoCodeIDs ¶
func (uu *UserUpdate) AddUserPromoCodeIDs(ids ...uuid.UUID) *UserUpdate
AddUserPromoCodeIDs adds the "user_promo_codes" edge to the UserPromoCode entity by IDs.
func (*UserUpdate) AddUserPromoCodes ¶
func (uu *UserUpdate) AddUserPromoCodes(u ...*UserPromoCode) *UserUpdate
AddUserPromoCodes adds the "user_promo_codes" edges to the UserPromoCode entity.
func (*UserUpdate) AddVehicleIDs ¶
func (uu *UserUpdate) AddVehicleIDs(ids ...uuid.UUID) *UserUpdate
AddVehicleIDs adds the "vehicles" edge to the Vehicle entity by IDs.
func (*UserUpdate) AddVehicles ¶
func (uu *UserUpdate) AddVehicles(v ...*Vehicle) *UserUpdate
AddVehicles adds the "vehicles" edges to the Vehicle entity.
func (*UserUpdate) ClearAddress ¶
func (uu *UserUpdate) ClearAddress() *UserUpdate
ClearAddress clears the value of the "address" field.
func (*UserUpdate) ClearCreditCard ¶
func (uu *UserUpdate) ClearCreditCard() *UserUpdate
ClearCreditCard clears the value of the "credit_card" field.
func (*UserUpdate) ClearName ¶
func (uu *UserUpdate) ClearName() *UserUpdate
ClearName clears the value of the "name" field.
func (*UserUpdate) ClearRides ¶
func (uu *UserUpdate) ClearRides() *UserUpdate
ClearRides clears all "rides" edges to the Ride entity.
func (*UserUpdate) ClearUserPromoCodes ¶
func (uu *UserUpdate) ClearUserPromoCodes() *UserUpdate
ClearUserPromoCodes clears all "user_promo_codes" edges to the UserPromoCode entity.
func (*UserUpdate) ClearVehicles ¶
func (uu *UserUpdate) ClearVehicles() *UserUpdate
ClearVehicles clears all "vehicles" edges to the Vehicle entity.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveRideIDs ¶
func (uu *UserUpdate) RemoveRideIDs(ids ...uuid.UUID) *UserUpdate
RemoveRideIDs removes the "rides" edge to Ride entities by IDs.
func (*UserUpdate) RemoveRides ¶
func (uu *UserUpdate) RemoveRides(r ...*Ride) *UserUpdate
RemoveRides removes "rides" edges to Ride entities.
func (*UserUpdate) RemoveUserPromoCodeIDs ¶
func (uu *UserUpdate) RemoveUserPromoCodeIDs(ids ...uuid.UUID) *UserUpdate
RemoveUserPromoCodeIDs removes the "user_promo_codes" edge to UserPromoCode entities by IDs.
func (*UserUpdate) RemoveUserPromoCodes ¶
func (uu *UserUpdate) RemoveUserPromoCodes(u ...*UserPromoCode) *UserUpdate
RemoveUserPromoCodes removes "user_promo_codes" edges to UserPromoCode entities.
func (*UserUpdate) RemoveVehicleIDs ¶
func (uu *UserUpdate) RemoveVehicleIDs(ids ...uuid.UUID) *UserUpdate
RemoveVehicleIDs removes the "vehicles" edge to Vehicle entities by IDs.
func (*UserUpdate) RemoveVehicles ¶
func (uu *UserUpdate) RemoveVehicles(v ...*Vehicle) *UserUpdate
RemoveVehicles removes "vehicles" edges to Vehicle entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetAddress ¶
func (uu *UserUpdate) SetAddress(s string) *UserUpdate
SetAddress sets the "address" field.
func (*UserUpdate) SetCity ¶
func (uu *UserUpdate) SetCity(s string) *UserUpdate
SetCity sets the "city" field.
func (*UserUpdate) SetCreditCard ¶
func (uu *UserUpdate) SetCreditCard(s string) *UserUpdate
SetCreditCard sets the "credit_card" field.
func (*UserUpdate) SetName ¶
func (uu *UserUpdate) SetName(s string) *UserUpdate
SetName sets the "name" field.
func (*UserUpdate) SetNillableAddress ¶
func (uu *UserUpdate) SetNillableAddress(s *string) *UserUpdate
SetNillableAddress sets the "address" field if the given value is not nil.
func (*UserUpdate) SetNillableCreditCard ¶
func (uu *UserUpdate) SetNillableCreditCard(s *string) *UserUpdate
SetNillableCreditCard sets the "credit_card" field if the given value is not nil.
func (*UserUpdate) SetNillableName ¶
func (uu *UserUpdate) SetNillableName(s *string) *UserUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddRideIDs ¶
func (uuo *UserUpdateOne) AddRideIDs(ids ...uuid.UUID) *UserUpdateOne
AddRideIDs adds the "rides" edge to the Ride entity by IDs.
func (*UserUpdateOne) AddRides ¶
func (uuo *UserUpdateOne) AddRides(r ...*Ride) *UserUpdateOne
AddRides adds the "rides" edges to the Ride entity.
func (*UserUpdateOne) AddUserPromoCodeIDs ¶
func (uuo *UserUpdateOne) AddUserPromoCodeIDs(ids ...uuid.UUID) *UserUpdateOne
AddUserPromoCodeIDs adds the "user_promo_codes" edge to the UserPromoCode entity by IDs.
func (*UserUpdateOne) AddUserPromoCodes ¶
func (uuo *UserUpdateOne) AddUserPromoCodes(u ...*UserPromoCode) *UserUpdateOne
AddUserPromoCodes adds the "user_promo_codes" edges to the UserPromoCode entity.
func (*UserUpdateOne) AddVehicleIDs ¶
func (uuo *UserUpdateOne) AddVehicleIDs(ids ...uuid.UUID) *UserUpdateOne
AddVehicleIDs adds the "vehicles" edge to the Vehicle entity by IDs.
func (*UserUpdateOne) AddVehicles ¶
func (uuo *UserUpdateOne) AddVehicles(v ...*Vehicle) *UserUpdateOne
AddVehicles adds the "vehicles" edges to the Vehicle entity.
func (*UserUpdateOne) ClearAddress ¶
func (uuo *UserUpdateOne) ClearAddress() *UserUpdateOne
ClearAddress clears the value of the "address" field.
func (*UserUpdateOne) ClearCreditCard ¶
func (uuo *UserUpdateOne) ClearCreditCard() *UserUpdateOne
ClearCreditCard clears the value of the "credit_card" field.
func (*UserUpdateOne) ClearName ¶
func (uuo *UserUpdateOne) ClearName() *UserUpdateOne
ClearName clears the value of the "name" field.
func (*UserUpdateOne) ClearRides ¶
func (uuo *UserUpdateOne) ClearRides() *UserUpdateOne
ClearRides clears all "rides" edges to the Ride entity.
func (*UserUpdateOne) ClearUserPromoCodes ¶
func (uuo *UserUpdateOne) ClearUserPromoCodes() *UserUpdateOne
ClearUserPromoCodes clears all "user_promo_codes" edges to the UserPromoCode entity.
func (*UserUpdateOne) ClearVehicles ¶
func (uuo *UserUpdateOne) ClearVehicles() *UserUpdateOne
ClearVehicles clears all "vehicles" edges to the Vehicle entity.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveRideIDs ¶
func (uuo *UserUpdateOne) RemoveRideIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveRideIDs removes the "rides" edge to Ride entities by IDs.
func (*UserUpdateOne) RemoveRides ¶
func (uuo *UserUpdateOne) RemoveRides(r ...*Ride) *UserUpdateOne
RemoveRides removes "rides" edges to Ride entities.
func (*UserUpdateOne) RemoveUserPromoCodeIDs ¶
func (uuo *UserUpdateOne) RemoveUserPromoCodeIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveUserPromoCodeIDs removes the "user_promo_codes" edge to UserPromoCode entities by IDs.
func (*UserUpdateOne) RemoveUserPromoCodes ¶
func (uuo *UserUpdateOne) RemoveUserPromoCodes(u ...*UserPromoCode) *UserUpdateOne
RemoveUserPromoCodes removes "user_promo_codes" edges to UserPromoCode entities.
func (*UserUpdateOne) RemoveVehicleIDs ¶
func (uuo *UserUpdateOne) RemoveVehicleIDs(ids ...uuid.UUID) *UserUpdateOne
RemoveVehicleIDs removes the "vehicles" edge to Vehicle entities by IDs.
func (*UserUpdateOne) RemoveVehicles ¶
func (uuo *UserUpdateOne) RemoveVehicles(v ...*Vehicle) *UserUpdateOne
RemoveVehicles removes "vehicles" edges to Vehicle entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetAddress ¶
func (uuo *UserUpdateOne) SetAddress(s string) *UserUpdateOne
SetAddress sets the "address" field.
func (*UserUpdateOne) SetCity ¶
func (uuo *UserUpdateOne) SetCity(s string) *UserUpdateOne
SetCity sets the "city" field.
func (*UserUpdateOne) SetCreditCard ¶
func (uuo *UserUpdateOne) SetCreditCard(s string) *UserUpdateOne
SetCreditCard sets the "credit_card" field.
func (*UserUpdateOne) SetName ¶
func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
SetName sets the "name" field.
func (*UserUpdateOne) SetNillableAddress ¶
func (uuo *UserUpdateOne) SetNillableAddress(s *string) *UserUpdateOne
SetNillableAddress sets the "address" field if the given value is not nil.
func (*UserUpdateOne) SetNillableCreditCard ¶
func (uuo *UserUpdateOne) SetNillableCreditCard(s *string) *UserUpdateOne
SetNillableCreditCard sets the "credit_card" field if the given value is not nil.
func (*UserUpdateOne) SetNillableName ¶
func (uuo *UserUpdateOne) SetNillableName(s *string) *UserUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Vehicle ¶
type Vehicle struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // City holds the value of the "city" field. City string `json:"city,omitempty"` // Type holds the value of the "type" field. Type string `json:"type,omitempty"` // OwnerID holds the value of the "owner_id" field. OwnerID uuid.UUID `json:"owner_id,omitempty"` // CreationTime holds the value of the "creation_time" field. CreationTime time.Time `json:"creation_time,omitempty"` // Status holds the value of the "status" field. Status string `json:"status,omitempty"` // CurrentLocation holds the value of the "current_location" field. CurrentLocation string `json:"current_location,omitempty"` // Ext holds the value of the "ext" field. Ext *map[string]interface{} `json:"ext,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the VehicleQuery when eager-loading is set. Edges VehicleEdges `json:"edges"` // contains filtered or unexported fields }
Vehicle is the model entity for the Vehicle schema.
func (*Vehicle) QueryRides ¶
QueryRides queries the "rides" edge of the Vehicle entity.
func (*Vehicle) Unwrap ¶
Unwrap unwraps the Vehicle entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Vehicle) Update ¶
func (v *Vehicle) Update() *VehicleUpdateOne
Update returns a builder for updating this Vehicle. Note that you need to call Vehicle.Unwrap() before calling this method if this Vehicle was returned from a transaction, and the transaction was committed or rolled back.
type VehicleClient ¶
type VehicleClient struct {
// contains filtered or unexported fields
}
VehicleClient is a client for the Vehicle schema.
func NewVehicleClient ¶
func NewVehicleClient(c config) *VehicleClient
NewVehicleClient returns a client for the Vehicle from the given config.
func (*VehicleClient) Create ¶
func (c *VehicleClient) Create() *VehicleCreate
Create returns a builder for creating a Vehicle entity.
func (*VehicleClient) CreateBulk ¶
func (c *VehicleClient) CreateBulk(builders ...*VehicleCreate) *VehicleCreateBulk
CreateBulk returns a builder for creating a bulk of Vehicle entities.
func (*VehicleClient) Delete ¶
func (c *VehicleClient) Delete() *VehicleDelete
Delete returns a delete builder for Vehicle.
func (*VehicleClient) DeleteOne ¶
func (c *VehicleClient) DeleteOne(v *Vehicle) *VehicleDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*VehicleClient) DeleteOneID ¶
func (c *VehicleClient) DeleteOneID(id uuid.UUID) *VehicleDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*VehicleClient) Hooks ¶
func (c *VehicleClient) Hooks() []Hook
Hooks returns the client hooks.
func (*VehicleClient) Intercept ¶
func (c *VehicleClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `vehicle.Intercept(f(g(h())))`.
func (*VehicleClient) Interceptors ¶
func (c *VehicleClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*VehicleClient) Query ¶
func (c *VehicleClient) Query() *VehicleQuery
Query returns a query builder for Vehicle.
func (*VehicleClient) QueryRides ¶
func (c *VehicleClient) QueryRides(v *Vehicle) *RideQuery
QueryRides queries the rides edge of a Vehicle.
func (*VehicleClient) QueryUser ¶
func (c *VehicleClient) QueryUser(v *Vehicle) *UserQuery
QueryUser queries the user edge of a Vehicle.
func (*VehicleClient) Update ¶
func (c *VehicleClient) Update() *VehicleUpdate
Update returns an update builder for Vehicle.
func (*VehicleClient) UpdateOne ¶
func (c *VehicleClient) UpdateOne(v *Vehicle) *VehicleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*VehicleClient) UpdateOneID ¶
func (c *VehicleClient) UpdateOneID(id uuid.UUID) *VehicleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*VehicleClient) Use ¶
func (c *VehicleClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `vehicle.Hooks(f(g(h())))`.
type VehicleCreate ¶
type VehicleCreate struct {
// contains filtered or unexported fields
}
VehicleCreate is the builder for creating a Vehicle entity.
func (*VehicleCreate) AddRideIDs ¶
func (vc *VehicleCreate) AddRideIDs(ids ...uuid.UUID) *VehicleCreate
AddRideIDs adds the "rides" edge to the Ride entity by IDs.
func (*VehicleCreate) AddRides ¶
func (vc *VehicleCreate) AddRides(r ...*Ride) *VehicleCreate
AddRides adds the "rides" edges to the Ride entity.
func (*VehicleCreate) Exec ¶
func (vc *VehicleCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*VehicleCreate) ExecX ¶
func (vc *VehicleCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VehicleCreate) Mutation ¶
func (vc *VehicleCreate) Mutation() *VehicleMutation
Mutation returns the VehicleMutation object of the builder.
func (*VehicleCreate) Save ¶
func (vc *VehicleCreate) Save(ctx context.Context) (*Vehicle, error)
Save creates the Vehicle in the database.
func (*VehicleCreate) SaveX ¶
func (vc *VehicleCreate) SaveX(ctx context.Context) *Vehicle
SaveX calls Save and panics if Save returns an error.
func (*VehicleCreate) SetCity ¶
func (vc *VehicleCreate) SetCity(s string) *VehicleCreate
SetCity sets the "city" field.
func (*VehicleCreate) SetCreationTime ¶
func (vc *VehicleCreate) SetCreationTime(t time.Time) *VehicleCreate
SetCreationTime sets the "creation_time" field.
func (*VehicleCreate) SetCurrentLocation ¶
func (vc *VehicleCreate) SetCurrentLocation(s string) *VehicleCreate
SetCurrentLocation sets the "current_location" field.
func (*VehicleCreate) SetExt ¶
func (vc *VehicleCreate) SetExt(m *map[string]interface{}) *VehicleCreate
SetExt sets the "ext" field.
func (*VehicleCreate) SetID ¶
func (vc *VehicleCreate) SetID(u uuid.UUID) *VehicleCreate
SetID sets the "id" field.
func (*VehicleCreate) SetNillableCreationTime ¶
func (vc *VehicleCreate) SetNillableCreationTime(t *time.Time) *VehicleCreate
SetNillableCreationTime sets the "creation_time" field if the given value is not nil.
func (*VehicleCreate) SetNillableCurrentLocation ¶
func (vc *VehicleCreate) SetNillableCurrentLocation(s *string) *VehicleCreate
SetNillableCurrentLocation sets the "current_location" field if the given value is not nil.
func (*VehicleCreate) SetNillableID ¶
func (vc *VehicleCreate) SetNillableID(u *uuid.UUID) *VehicleCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*VehicleCreate) SetNillableOwnerID ¶
func (vc *VehicleCreate) SetNillableOwnerID(u *uuid.UUID) *VehicleCreate
SetNillableOwnerID sets the "owner_id" field if the given value is not nil.
func (*VehicleCreate) SetNillableStatus ¶
func (vc *VehicleCreate) SetNillableStatus(s *string) *VehicleCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*VehicleCreate) SetNillableType ¶
func (vc *VehicleCreate) SetNillableType(s *string) *VehicleCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*VehicleCreate) SetNillableUserID ¶
func (vc *VehicleCreate) SetNillableUserID(id *uuid.UUID) *VehicleCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*VehicleCreate) SetOwnerID ¶
func (vc *VehicleCreate) SetOwnerID(u uuid.UUID) *VehicleCreate
SetOwnerID sets the "owner_id" field.
func (*VehicleCreate) SetStatus ¶
func (vc *VehicleCreate) SetStatus(s string) *VehicleCreate
SetStatus sets the "status" field.
func (*VehicleCreate) SetType ¶
func (vc *VehicleCreate) SetType(s string) *VehicleCreate
SetType sets the "type" field.
func (*VehicleCreate) SetUser ¶
func (vc *VehicleCreate) SetUser(u *User) *VehicleCreate
SetUser sets the "user" edge to the User entity.
func (*VehicleCreate) SetUserID ¶
func (vc *VehicleCreate) SetUserID(id uuid.UUID) *VehicleCreate
SetUserID sets the "user" edge to the User entity by ID.
type VehicleCreateBulk ¶
type VehicleCreateBulk struct {
// contains filtered or unexported fields
}
VehicleCreateBulk is the builder for creating many Vehicle entities in bulk.
func (*VehicleCreateBulk) Exec ¶
func (vcb *VehicleCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*VehicleCreateBulk) ExecX ¶
func (vcb *VehicleCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type VehicleDelete ¶
type VehicleDelete struct {
// contains filtered or unexported fields
}
VehicleDelete is the builder for deleting a Vehicle entity.
func (*VehicleDelete) Exec ¶
func (vd *VehicleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*VehicleDelete) ExecX ¶
func (vd *VehicleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*VehicleDelete) Where ¶
func (vd *VehicleDelete) Where(ps ...predicate.Vehicle) *VehicleDelete
Where appends a list predicates to the VehicleDelete builder.
type VehicleDeleteOne ¶
type VehicleDeleteOne struct {
// contains filtered or unexported fields
}
VehicleDeleteOne is the builder for deleting a single Vehicle entity.
func (*VehicleDeleteOne) Exec ¶
func (vdo *VehicleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*VehicleDeleteOne) ExecX ¶
func (vdo *VehicleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VehicleDeleteOne) Where ¶
func (vdo *VehicleDeleteOne) Where(ps ...predicate.Vehicle) *VehicleDeleteOne
Where appends a list predicates to the VehicleDelete builder.
type VehicleEdges ¶
type VehicleEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // Rides holds the value of the rides edge. Rides []*Ride `json:"rides,omitempty"` // contains filtered or unexported fields }
VehicleEdges holds the relations/edges for other nodes in the graph.
func (VehicleEdges) RidesOrErr ¶
func (e VehicleEdges) RidesOrErr() ([]*Ride, error)
RidesOrErr returns the Rides value or an error if the edge was not loaded in eager-loading.
func (VehicleEdges) UserOrErr ¶
func (e VehicleEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type VehicleGroupBy ¶
type VehicleGroupBy struct {
// contains filtered or unexported fields
}
VehicleGroupBy is the group-by builder for Vehicle entities.
func (*VehicleGroupBy) Aggregate ¶
func (vgb *VehicleGroupBy) Aggregate(fns ...AggregateFunc) *VehicleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*VehicleGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*VehicleGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*VehicleGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*VehicleGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*VehicleGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*VehicleGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*VehicleGroupBy) Scan ¶
func (vgb *VehicleGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*VehicleGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type VehicleLocationHistories ¶
type VehicleLocationHistories []*VehicleLocationHistory
VehicleLocationHistories is a parsable slice of VehicleLocationHistory.
type VehicleLocationHistory ¶
type VehicleLocationHistory struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // City holds the value of the "city" field. City string `json:"city,omitempty"` // RideID holds the value of the "ride_id" field. RideID uuid.UUID `json:"ride_id,omitempty"` // Timestamp holds the value of the "timestamp" field. Timestamp time.Time `json:"timestamp,omitempty"` // Lat holds the value of the "lat" field. Lat float64 `json:"lat,omitempty"` // Long holds the value of the "long" field. Long float64 `json:"long,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the VehicleLocationHistoryQuery when eager-loading is set. Edges VehicleLocationHistoryEdges `json:"edges"` // contains filtered or unexported fields }
VehicleLocationHistory is the model entity for the VehicleLocationHistory schema.
func (*VehicleLocationHistory) QueryRides ¶
func (vlh *VehicleLocationHistory) QueryRides() *RideQuery
QueryRides queries the "rides" edge of the VehicleLocationHistory entity.
func (*VehicleLocationHistory) String ¶
func (vlh *VehicleLocationHistory) String() string
String implements the fmt.Stringer.
func (*VehicleLocationHistory) Unwrap ¶
func (vlh *VehicleLocationHistory) Unwrap() *VehicleLocationHistory
Unwrap unwraps the VehicleLocationHistory entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*VehicleLocationHistory) Update ¶
func (vlh *VehicleLocationHistory) Update() *VehicleLocationHistoryUpdateOne
Update returns a builder for updating this VehicleLocationHistory. Note that you need to call VehicleLocationHistory.Unwrap() before calling this method if this VehicleLocationHistory was returned from a transaction, and the transaction was committed or rolled back.
type VehicleLocationHistoryClient ¶
type VehicleLocationHistoryClient struct {
// contains filtered or unexported fields
}
VehicleLocationHistoryClient is a client for the VehicleLocationHistory schema.
func NewVehicleLocationHistoryClient ¶
func NewVehicleLocationHistoryClient(c config) *VehicleLocationHistoryClient
NewVehicleLocationHistoryClient returns a client for the VehicleLocationHistory from the given config.
func (*VehicleLocationHistoryClient) Create ¶
func (c *VehicleLocationHistoryClient) Create() *VehicleLocationHistoryCreate
Create returns a builder for creating a VehicleLocationHistory entity.
func (*VehicleLocationHistoryClient) CreateBulk ¶
func (c *VehicleLocationHistoryClient) CreateBulk(builders ...*VehicleLocationHistoryCreate) *VehicleLocationHistoryCreateBulk
CreateBulk returns a builder for creating a bulk of VehicleLocationHistory entities.
func (*VehicleLocationHistoryClient) Delete ¶
func (c *VehicleLocationHistoryClient) Delete() *VehicleLocationHistoryDelete
Delete returns a delete builder for VehicleLocationHistory.
func (*VehicleLocationHistoryClient) DeleteOne ¶
func (c *VehicleLocationHistoryClient) DeleteOne(vlh *VehicleLocationHistory) *VehicleLocationHistoryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*VehicleLocationHistoryClient) DeleteOneID ¶
func (c *VehicleLocationHistoryClient) DeleteOneID(id uuid.UUID) *VehicleLocationHistoryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*VehicleLocationHistoryClient) Get ¶
func (c *VehicleLocationHistoryClient) Get(ctx context.Context, id uuid.UUID) (*VehicleLocationHistory, error)
Get returns a VehicleLocationHistory entity by its id.
func (*VehicleLocationHistoryClient) GetX ¶
func (c *VehicleLocationHistoryClient) GetX(ctx context.Context, id uuid.UUID) *VehicleLocationHistory
GetX is like Get, but panics if an error occurs.
func (*VehicleLocationHistoryClient) Hooks ¶
func (c *VehicleLocationHistoryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*VehicleLocationHistoryClient) Intercept ¶
func (c *VehicleLocationHistoryClient) Intercept(interceptors ...Interceptor)
Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `vehiclelocationhistory.Intercept(f(g(h())))`.
func (*VehicleLocationHistoryClient) Interceptors ¶
func (c *VehicleLocationHistoryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*VehicleLocationHistoryClient) Query ¶
func (c *VehicleLocationHistoryClient) Query() *VehicleLocationHistoryQuery
Query returns a query builder for VehicleLocationHistory.
func (*VehicleLocationHistoryClient) QueryRides ¶
func (c *VehicleLocationHistoryClient) QueryRides(vlh *VehicleLocationHistory) *RideQuery
QueryRides queries the rides edge of a VehicleLocationHistory.
func (*VehicleLocationHistoryClient) Update ¶
func (c *VehicleLocationHistoryClient) Update() *VehicleLocationHistoryUpdate
Update returns an update builder for VehicleLocationHistory.
func (*VehicleLocationHistoryClient) UpdateOne ¶
func (c *VehicleLocationHistoryClient) UpdateOne(vlh *VehicleLocationHistory) *VehicleLocationHistoryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*VehicleLocationHistoryClient) UpdateOneID ¶
func (c *VehicleLocationHistoryClient) UpdateOneID(id uuid.UUID) *VehicleLocationHistoryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*VehicleLocationHistoryClient) Use ¶
func (c *VehicleLocationHistoryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `vehiclelocationhistory.Hooks(f(g(h())))`.
type VehicleLocationHistoryCreate ¶
type VehicleLocationHistoryCreate struct {
// contains filtered or unexported fields
}
VehicleLocationHistoryCreate is the builder for creating a VehicleLocationHistory entity.
func (*VehicleLocationHistoryCreate) Exec ¶
func (vlhc *VehicleLocationHistoryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*VehicleLocationHistoryCreate) ExecX ¶
func (vlhc *VehicleLocationHistoryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VehicleLocationHistoryCreate) Mutation ¶
func (vlhc *VehicleLocationHistoryCreate) Mutation() *VehicleLocationHistoryMutation
Mutation returns the VehicleLocationHistoryMutation object of the builder.
func (*VehicleLocationHistoryCreate) Save ¶
func (vlhc *VehicleLocationHistoryCreate) Save(ctx context.Context) (*VehicleLocationHistory, error)
Save creates the VehicleLocationHistory in the database.
func (*VehicleLocationHistoryCreate) SaveX ¶
func (vlhc *VehicleLocationHistoryCreate) SaveX(ctx context.Context) *VehicleLocationHistory
SaveX calls Save and panics if Save returns an error.
func (*VehicleLocationHistoryCreate) SetCity ¶
func (vlhc *VehicleLocationHistoryCreate) SetCity(s string) *VehicleLocationHistoryCreate
SetCity sets the "city" field.
func (*VehicleLocationHistoryCreate) SetID ¶
func (vlhc *VehicleLocationHistoryCreate) SetID(u uuid.UUID) *VehicleLocationHistoryCreate
SetID sets the "id" field.
func (*VehicleLocationHistoryCreate) SetLat ¶
func (vlhc *VehicleLocationHistoryCreate) SetLat(f float64) *VehicleLocationHistoryCreate
SetLat sets the "lat" field.
func (*VehicleLocationHistoryCreate) SetLong ¶
func (vlhc *VehicleLocationHistoryCreate) SetLong(f float64) *VehicleLocationHistoryCreate
SetLong sets the "long" field.
func (*VehicleLocationHistoryCreate) SetNillableID ¶
func (vlhc *VehicleLocationHistoryCreate) SetNillableID(u *uuid.UUID) *VehicleLocationHistoryCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*VehicleLocationHistoryCreate) SetNillableLat ¶
func (vlhc *VehicleLocationHistoryCreate) SetNillableLat(f *float64) *VehicleLocationHistoryCreate
SetNillableLat sets the "lat" field if the given value is not nil.
func (*VehicleLocationHistoryCreate) SetNillableLong ¶
func (vlhc *VehicleLocationHistoryCreate) SetNillableLong(f *float64) *VehicleLocationHistoryCreate
SetNillableLong sets the "long" field if the given value is not nil.
func (*VehicleLocationHistoryCreate) SetRideID ¶
func (vlhc *VehicleLocationHistoryCreate) SetRideID(u uuid.UUID) *VehicleLocationHistoryCreate
SetRideID sets the "ride_id" field.
func (*VehicleLocationHistoryCreate) SetRides ¶
func (vlhc *VehicleLocationHistoryCreate) SetRides(r *Ride) *VehicleLocationHistoryCreate
SetRides sets the "rides" edge to the Ride entity.
func (*VehicleLocationHistoryCreate) SetRidesID ¶
func (vlhc *VehicleLocationHistoryCreate) SetRidesID(id uuid.UUID) *VehicleLocationHistoryCreate
SetRidesID sets the "rides" edge to the Ride entity by ID.
func (*VehicleLocationHistoryCreate) SetTimestamp ¶
func (vlhc *VehicleLocationHistoryCreate) SetTimestamp(t time.Time) *VehicleLocationHistoryCreate
SetTimestamp sets the "timestamp" field.
type VehicleLocationHistoryCreateBulk ¶
type VehicleLocationHistoryCreateBulk struct {
// contains filtered or unexported fields
}
VehicleLocationHistoryCreateBulk is the builder for creating many VehicleLocationHistory entities in bulk.
func (*VehicleLocationHistoryCreateBulk) Exec ¶
func (vlhcb *VehicleLocationHistoryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*VehicleLocationHistoryCreateBulk) ExecX ¶
func (vlhcb *VehicleLocationHistoryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VehicleLocationHistoryCreateBulk) Save ¶
func (vlhcb *VehicleLocationHistoryCreateBulk) Save(ctx context.Context) ([]*VehicleLocationHistory, error)
Save creates the VehicleLocationHistory entities in the database.
func (*VehicleLocationHistoryCreateBulk) SaveX ¶
func (vlhcb *VehicleLocationHistoryCreateBulk) SaveX(ctx context.Context) []*VehicleLocationHistory
SaveX is like Save, but panics if an error occurs.
type VehicleLocationHistoryDelete ¶
type VehicleLocationHistoryDelete struct {
// contains filtered or unexported fields
}
VehicleLocationHistoryDelete is the builder for deleting a VehicleLocationHistory entity.
func (*VehicleLocationHistoryDelete) Exec ¶
func (vlhd *VehicleLocationHistoryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*VehicleLocationHistoryDelete) ExecX ¶
func (vlhd *VehicleLocationHistoryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*VehicleLocationHistoryDelete) Where ¶
func (vlhd *VehicleLocationHistoryDelete) Where(ps ...predicate.VehicleLocationHistory) *VehicleLocationHistoryDelete
Where appends a list predicates to the VehicleLocationHistoryDelete builder.
type VehicleLocationHistoryDeleteOne ¶
type VehicleLocationHistoryDeleteOne struct {
// contains filtered or unexported fields
}
VehicleLocationHistoryDeleteOne is the builder for deleting a single VehicleLocationHistory entity.
func (*VehicleLocationHistoryDeleteOne) Exec ¶
func (vlhdo *VehicleLocationHistoryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*VehicleLocationHistoryDeleteOne) ExecX ¶
func (vlhdo *VehicleLocationHistoryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VehicleLocationHistoryDeleteOne) Where ¶
func (vlhdo *VehicleLocationHistoryDeleteOne) Where(ps ...predicate.VehicleLocationHistory) *VehicleLocationHistoryDeleteOne
Where appends a list predicates to the VehicleLocationHistoryDelete builder.
type VehicleLocationHistoryEdges ¶
type VehicleLocationHistoryEdges struct { // Rides holds the value of the rides edge. Rides *Ride `json:"rides,omitempty"` // contains filtered or unexported fields }
VehicleLocationHistoryEdges holds the relations/edges for other nodes in the graph.
func (VehicleLocationHistoryEdges) RidesOrErr ¶
func (e VehicleLocationHistoryEdges) RidesOrErr() (*Ride, error)
RidesOrErr returns the Rides value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type VehicleLocationHistoryGroupBy ¶
type VehicleLocationHistoryGroupBy struct {
// contains filtered or unexported fields
}
VehicleLocationHistoryGroupBy is the group-by builder for VehicleLocationHistory entities.
func (*VehicleLocationHistoryGroupBy) Aggregate ¶
func (vlhgb *VehicleLocationHistoryGroupBy) Aggregate(fns ...AggregateFunc) *VehicleLocationHistoryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*VehicleLocationHistoryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*VehicleLocationHistoryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*VehicleLocationHistoryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*VehicleLocationHistoryGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*VehicleLocationHistoryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*VehicleLocationHistoryGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*VehicleLocationHistoryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*VehicleLocationHistoryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*VehicleLocationHistoryGroupBy) Scan ¶
func (vlhgb *VehicleLocationHistoryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*VehicleLocationHistoryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
func (*VehicleLocationHistoryGroupBy) StringX ¶
StringX is like String, but panics if an error occurs.
type VehicleLocationHistoryMutation ¶
type VehicleLocationHistoryMutation struct {
// contains filtered or unexported fields
}
VehicleLocationHistoryMutation represents an operation that mutates the VehicleLocationHistory nodes in the graph.
func (*VehicleLocationHistoryMutation) AddField ¶
func (m *VehicleLocationHistoryMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*VehicleLocationHistoryMutation) AddLat ¶
func (m *VehicleLocationHistoryMutation) AddLat(f float64)
AddLat adds f to the "lat" field.
func (*VehicleLocationHistoryMutation) AddLong ¶
func (m *VehicleLocationHistoryMutation) AddLong(f float64)
AddLong adds f to the "long" field.
func (*VehicleLocationHistoryMutation) AddedEdges ¶
func (m *VehicleLocationHistoryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*VehicleLocationHistoryMutation) AddedField ¶
func (m *VehicleLocationHistoryMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*VehicleLocationHistoryMutation) AddedFields ¶
func (m *VehicleLocationHistoryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*VehicleLocationHistoryMutation) AddedIDs ¶
func (m *VehicleLocationHistoryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*VehicleLocationHistoryMutation) AddedLat ¶
func (m *VehicleLocationHistoryMutation) AddedLat() (r float64, exists bool)
AddedLat returns the value that was added to the "lat" field in this mutation.
func (*VehicleLocationHistoryMutation) AddedLong ¶
func (m *VehicleLocationHistoryMutation) AddedLong() (r float64, exists bool)
AddedLong returns the value that was added to the "long" field in this mutation.
func (*VehicleLocationHistoryMutation) City ¶
func (m *VehicleLocationHistoryMutation) City() (r string, exists bool)
City returns the value of the "city" field in the mutation.
func (*VehicleLocationHistoryMutation) ClearEdge ¶
func (m *VehicleLocationHistoryMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*VehicleLocationHistoryMutation) ClearField ¶
func (m *VehicleLocationHistoryMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*VehicleLocationHistoryMutation) ClearLat ¶
func (m *VehicleLocationHistoryMutation) ClearLat()
ClearLat clears the value of the "lat" field.
func (*VehicleLocationHistoryMutation) ClearLong ¶
func (m *VehicleLocationHistoryMutation) ClearLong()
ClearLong clears the value of the "long" field.
func (*VehicleLocationHistoryMutation) ClearRides ¶
func (m *VehicleLocationHistoryMutation) ClearRides()
ClearRides clears the "rides" edge to the Ride entity.
func (*VehicleLocationHistoryMutation) ClearedEdges ¶
func (m *VehicleLocationHistoryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*VehicleLocationHistoryMutation) ClearedFields ¶
func (m *VehicleLocationHistoryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (VehicleLocationHistoryMutation) Client ¶
func (m VehicleLocationHistoryMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*VehicleLocationHistoryMutation) EdgeCleared ¶
func (m *VehicleLocationHistoryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*VehicleLocationHistoryMutation) Field ¶
func (m *VehicleLocationHistoryMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*VehicleLocationHistoryMutation) FieldCleared ¶
func (m *VehicleLocationHistoryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*VehicleLocationHistoryMutation) Fields ¶
func (m *VehicleLocationHistoryMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*VehicleLocationHistoryMutation) ID ¶
func (m *VehicleLocationHistoryMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*VehicleLocationHistoryMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*VehicleLocationHistoryMutation) Lat ¶
func (m *VehicleLocationHistoryMutation) Lat() (r float64, exists bool)
Lat returns the value of the "lat" field in the mutation.
func (*VehicleLocationHistoryMutation) LatCleared ¶
func (m *VehicleLocationHistoryMutation) LatCleared() bool
LatCleared returns if the "lat" field was cleared in this mutation.
func (*VehicleLocationHistoryMutation) Long ¶
func (m *VehicleLocationHistoryMutation) Long() (r float64, exists bool)
Long returns the value of the "long" field in the mutation.
func (*VehicleLocationHistoryMutation) LongCleared ¶
func (m *VehicleLocationHistoryMutation) LongCleared() bool
LongCleared returns if the "long" field was cleared in this mutation.
func (*VehicleLocationHistoryMutation) OldCity ¶
func (m *VehicleLocationHistoryMutation) OldCity(ctx context.Context) (v string, err error)
OldCity returns the old "city" field's value of the VehicleLocationHistory entity. If the VehicleLocationHistory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VehicleLocationHistoryMutation) OldField ¶
func (m *VehicleLocationHistoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*VehicleLocationHistoryMutation) OldLat ¶
func (m *VehicleLocationHistoryMutation) OldLat(ctx context.Context) (v float64, err error)
OldLat returns the old "lat" field's value of the VehicleLocationHistory entity. If the VehicleLocationHistory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VehicleLocationHistoryMutation) OldLong ¶
func (m *VehicleLocationHistoryMutation) OldLong(ctx context.Context) (v float64, err error)
OldLong returns the old "long" field's value of the VehicleLocationHistory entity. If the VehicleLocationHistory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VehicleLocationHistoryMutation) OldRideID ¶
OldRideID returns the old "ride_id" field's value of the VehicleLocationHistory entity. If the VehicleLocationHistory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VehicleLocationHistoryMutation) OldTimestamp ¶
OldTimestamp returns the old "timestamp" field's value of the VehicleLocationHistory entity. If the VehicleLocationHistory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VehicleLocationHistoryMutation) Op ¶
func (m *VehicleLocationHistoryMutation) Op() Op
Op returns the operation name.
func (*VehicleLocationHistoryMutation) RemovedEdges ¶
func (m *VehicleLocationHistoryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*VehicleLocationHistoryMutation) RemovedIDs ¶
func (m *VehicleLocationHistoryMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*VehicleLocationHistoryMutation) ResetCity ¶
func (m *VehicleLocationHistoryMutation) ResetCity()
ResetCity resets all changes to the "city" field.
func (*VehicleLocationHistoryMutation) ResetEdge ¶
func (m *VehicleLocationHistoryMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*VehicleLocationHistoryMutation) ResetField ¶
func (m *VehicleLocationHistoryMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*VehicleLocationHistoryMutation) ResetLat ¶
func (m *VehicleLocationHistoryMutation) ResetLat()
ResetLat resets all changes to the "lat" field.
func (*VehicleLocationHistoryMutation) ResetLong ¶
func (m *VehicleLocationHistoryMutation) ResetLong()
ResetLong resets all changes to the "long" field.
func (*VehicleLocationHistoryMutation) ResetRideID ¶
func (m *VehicleLocationHistoryMutation) ResetRideID()
ResetRideID resets all changes to the "ride_id" field.
func (*VehicleLocationHistoryMutation) ResetRides ¶
func (m *VehicleLocationHistoryMutation) ResetRides()
ResetRides resets all changes to the "rides" edge.
func (*VehicleLocationHistoryMutation) ResetTimestamp ¶
func (m *VehicleLocationHistoryMutation) ResetTimestamp()
ResetTimestamp resets all changes to the "timestamp" field.
func (*VehicleLocationHistoryMutation) RideID ¶
func (m *VehicleLocationHistoryMutation) RideID() (r uuid.UUID, exists bool)
RideID returns the value of the "ride_id" field in the mutation.
func (*VehicleLocationHistoryMutation) RidesCleared ¶
func (m *VehicleLocationHistoryMutation) RidesCleared() bool
RidesCleared reports if the "rides" edge to the Ride entity was cleared.
func (*VehicleLocationHistoryMutation) RidesID ¶
func (m *VehicleLocationHistoryMutation) RidesID() (id uuid.UUID, exists bool)
RidesID returns the "rides" edge ID in the mutation.
func (*VehicleLocationHistoryMutation) RidesIDs ¶
func (m *VehicleLocationHistoryMutation) RidesIDs() (ids []uuid.UUID)
RidesIDs returns the "rides" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RidesID instead. It exists only for internal usage by the builders.
func (*VehicleLocationHistoryMutation) SetCity ¶
func (m *VehicleLocationHistoryMutation) SetCity(s string)
SetCity sets the "city" field.
func (*VehicleLocationHistoryMutation) SetField ¶
func (m *VehicleLocationHistoryMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*VehicleLocationHistoryMutation) SetID ¶
func (m *VehicleLocationHistoryMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of VehicleLocationHistory entities.
func (*VehicleLocationHistoryMutation) SetLat ¶
func (m *VehicleLocationHistoryMutation) SetLat(f float64)
SetLat sets the "lat" field.
func (*VehicleLocationHistoryMutation) SetLong ¶
func (m *VehicleLocationHistoryMutation) SetLong(f float64)
SetLong sets the "long" field.
func (*VehicleLocationHistoryMutation) SetOp ¶
func (m *VehicleLocationHistoryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*VehicleLocationHistoryMutation) SetRideID ¶
func (m *VehicleLocationHistoryMutation) SetRideID(u uuid.UUID)
SetRideID sets the "ride_id" field.
func (*VehicleLocationHistoryMutation) SetRidesID ¶
func (m *VehicleLocationHistoryMutation) SetRidesID(id uuid.UUID)
SetRidesID sets the "rides" edge to the Ride entity by id.
func (*VehicleLocationHistoryMutation) SetTimestamp ¶
func (m *VehicleLocationHistoryMutation) SetTimestamp(t time.Time)
SetTimestamp sets the "timestamp" field.
func (*VehicleLocationHistoryMutation) Timestamp ¶
func (m *VehicleLocationHistoryMutation) Timestamp() (r time.Time, exists bool)
Timestamp returns the value of the "timestamp" field in the mutation.
func (VehicleLocationHistoryMutation) Tx ¶
func (m VehicleLocationHistoryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*VehicleLocationHistoryMutation) Type ¶
func (m *VehicleLocationHistoryMutation) Type() string
Type returns the node type of this mutation (VehicleLocationHistory).
func (*VehicleLocationHistoryMutation) Where ¶
func (m *VehicleLocationHistoryMutation) Where(ps ...predicate.VehicleLocationHistory)
Where appends a list predicates to the VehicleLocationHistoryMutation builder.
func (*VehicleLocationHistoryMutation) WhereP ¶
func (m *VehicleLocationHistoryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the VehicleLocationHistoryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type VehicleLocationHistoryQuery ¶
type VehicleLocationHistoryQuery struct {
// contains filtered or unexported fields
}
VehicleLocationHistoryQuery is the builder for querying VehicleLocationHistory entities.
func (*VehicleLocationHistoryQuery) Aggregate ¶
func (vlhq *VehicleLocationHistoryQuery) Aggregate(fns ...AggregateFunc) *VehicleLocationHistorySelect
Aggregate returns a VehicleLocationHistorySelect configured with the given aggregations.
func (*VehicleLocationHistoryQuery) All ¶
func (vlhq *VehicleLocationHistoryQuery) All(ctx context.Context) ([]*VehicleLocationHistory, error)
All executes the query and returns a list of VehicleLocationHistories.
func (*VehicleLocationHistoryQuery) AllX ¶
func (vlhq *VehicleLocationHistoryQuery) AllX(ctx context.Context) []*VehicleLocationHistory
AllX is like All, but panics if an error occurs.
func (*VehicleLocationHistoryQuery) Clone ¶
func (vlhq *VehicleLocationHistoryQuery) Clone() *VehicleLocationHistoryQuery
Clone returns a duplicate of the VehicleLocationHistoryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*VehicleLocationHistoryQuery) Count ¶
func (vlhq *VehicleLocationHistoryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*VehicleLocationHistoryQuery) CountX ¶
func (vlhq *VehicleLocationHistoryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*VehicleLocationHistoryQuery) Exist ¶
func (vlhq *VehicleLocationHistoryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*VehicleLocationHistoryQuery) ExistX ¶
func (vlhq *VehicleLocationHistoryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*VehicleLocationHistoryQuery) First ¶
func (vlhq *VehicleLocationHistoryQuery) First(ctx context.Context) (*VehicleLocationHistory, error)
First returns the first VehicleLocationHistory entity from the query. Returns a *NotFoundError when no VehicleLocationHistory was found.
func (*VehicleLocationHistoryQuery) FirstID ¶
FirstID returns the first VehicleLocationHistory ID from the query. Returns a *NotFoundError when no VehicleLocationHistory ID was found.
func (*VehicleLocationHistoryQuery) FirstIDX ¶
func (vlhq *VehicleLocationHistoryQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*VehicleLocationHistoryQuery) FirstX ¶
func (vlhq *VehicleLocationHistoryQuery) FirstX(ctx context.Context) *VehicleLocationHistory
FirstX is like First, but panics if an error occurs.
func (*VehicleLocationHistoryQuery) GroupBy ¶
func (vlhq *VehicleLocationHistoryQuery) GroupBy(field string, fields ...string) *VehicleLocationHistoryGroupBy
GroupBy is 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 { City string `json:"city,omitempty"` Count int `json:"count,omitempty"` } client.VehicleLocationHistory.Query(). GroupBy(vehiclelocationhistory.FieldCity). Aggregate(ent.Count()). Scan(ctx, &v)
func (*VehicleLocationHistoryQuery) IDs ¶
IDs executes the query and returns a list of VehicleLocationHistory IDs.
func (*VehicleLocationHistoryQuery) IDsX ¶
func (vlhq *VehicleLocationHistoryQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*VehicleLocationHistoryQuery) Limit ¶
func (vlhq *VehicleLocationHistoryQuery) Limit(limit int) *VehicleLocationHistoryQuery
Limit the number of records to be returned by this query.
func (*VehicleLocationHistoryQuery) Offset ¶
func (vlhq *VehicleLocationHistoryQuery) Offset(offset int) *VehicleLocationHistoryQuery
Offset to start from.
func (*VehicleLocationHistoryQuery) Only ¶
func (vlhq *VehicleLocationHistoryQuery) Only(ctx context.Context) (*VehicleLocationHistory, error)
Only returns a single VehicleLocationHistory entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one VehicleLocationHistory entity is found. Returns a *NotFoundError when no VehicleLocationHistory entities are found.
func (*VehicleLocationHistoryQuery) OnlyID ¶
OnlyID is like Only, but returns the only VehicleLocationHistory ID in the query. Returns a *NotSingularError when more than one VehicleLocationHistory ID is found. Returns a *NotFoundError when no entities are found.
func (*VehicleLocationHistoryQuery) OnlyIDX ¶
func (vlhq *VehicleLocationHistoryQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*VehicleLocationHistoryQuery) OnlyX ¶
func (vlhq *VehicleLocationHistoryQuery) OnlyX(ctx context.Context) *VehicleLocationHistory
OnlyX is like Only, but panics if an error occurs.
func (*VehicleLocationHistoryQuery) Order ¶
func (vlhq *VehicleLocationHistoryQuery) Order(o ...OrderFunc) *VehicleLocationHistoryQuery
Order specifies how the records should be ordered.
func (*VehicleLocationHistoryQuery) QueryRides ¶
func (vlhq *VehicleLocationHistoryQuery) QueryRides() *RideQuery
QueryRides chains the current query on the "rides" edge.
func (*VehicleLocationHistoryQuery) Select ¶
func (vlhq *VehicleLocationHistoryQuery) Select(fields ...string) *VehicleLocationHistorySelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { City string `json:"city,omitempty"` } client.VehicleLocationHistory.Query(). Select(vehiclelocationhistory.FieldCity). Scan(ctx, &v)
func (*VehicleLocationHistoryQuery) Unique ¶
func (vlhq *VehicleLocationHistoryQuery) Unique(unique bool) *VehicleLocationHistoryQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*VehicleLocationHistoryQuery) Where ¶
func (vlhq *VehicleLocationHistoryQuery) Where(ps ...predicate.VehicleLocationHistory) *VehicleLocationHistoryQuery
Where adds a new predicate for the VehicleLocationHistoryQuery builder.
func (*VehicleLocationHistoryQuery) WithRides ¶
func (vlhq *VehicleLocationHistoryQuery) WithRides(opts ...func(*RideQuery)) *VehicleLocationHistoryQuery
WithRides tells the query-builder to eager-load the nodes that are connected to the "rides" edge. The optional arguments are used to configure the query builder of the edge.
type VehicleLocationHistorySelect ¶
type VehicleLocationHistorySelect struct { *VehicleLocationHistoryQuery // contains filtered or unexported fields }
VehicleLocationHistorySelect is the builder for selecting fields of VehicleLocationHistory entities.
func (*VehicleLocationHistorySelect) Aggregate ¶
func (vlhs *VehicleLocationHistorySelect) Aggregate(fns ...AggregateFunc) *VehicleLocationHistorySelect
Aggregate adds the given aggregation functions to the selector query.
func (*VehicleLocationHistorySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*VehicleLocationHistorySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*VehicleLocationHistorySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*VehicleLocationHistorySelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*VehicleLocationHistorySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*VehicleLocationHistorySelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*VehicleLocationHistorySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*VehicleLocationHistorySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*VehicleLocationHistorySelect) Scan ¶
func (vlhs *VehicleLocationHistorySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*VehicleLocationHistorySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
func (*VehicleLocationHistorySelect) StringX ¶
StringX is like String, but panics if an error occurs.
type VehicleLocationHistoryUpdate ¶
type VehicleLocationHistoryUpdate struct {
// contains filtered or unexported fields
}
VehicleLocationHistoryUpdate is the builder for updating VehicleLocationHistory entities.
func (*VehicleLocationHistoryUpdate) AddLat ¶
func (vlhu *VehicleLocationHistoryUpdate) AddLat(f float64) *VehicleLocationHistoryUpdate
AddLat adds f to the "lat" field.
func (*VehicleLocationHistoryUpdate) AddLong ¶
func (vlhu *VehicleLocationHistoryUpdate) AddLong(f float64) *VehicleLocationHistoryUpdate
AddLong adds f to the "long" field.
func (*VehicleLocationHistoryUpdate) ClearLat ¶
func (vlhu *VehicleLocationHistoryUpdate) ClearLat() *VehicleLocationHistoryUpdate
ClearLat clears the value of the "lat" field.
func (*VehicleLocationHistoryUpdate) ClearLong ¶
func (vlhu *VehicleLocationHistoryUpdate) ClearLong() *VehicleLocationHistoryUpdate
ClearLong clears the value of the "long" field.
func (*VehicleLocationHistoryUpdate) ClearRides ¶
func (vlhu *VehicleLocationHistoryUpdate) ClearRides() *VehicleLocationHistoryUpdate
ClearRides clears the "rides" edge to the Ride entity.
func (*VehicleLocationHistoryUpdate) Exec ¶
func (vlhu *VehicleLocationHistoryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*VehicleLocationHistoryUpdate) ExecX ¶
func (vlhu *VehicleLocationHistoryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VehicleLocationHistoryUpdate) Mutation ¶
func (vlhu *VehicleLocationHistoryUpdate) Mutation() *VehicleLocationHistoryMutation
Mutation returns the VehicleLocationHistoryMutation object of the builder.
func (*VehicleLocationHistoryUpdate) Save ¶
func (vlhu *VehicleLocationHistoryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*VehicleLocationHistoryUpdate) SaveX ¶
func (vlhu *VehicleLocationHistoryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*VehicleLocationHistoryUpdate) SetCity ¶
func (vlhu *VehicleLocationHistoryUpdate) SetCity(s string) *VehicleLocationHistoryUpdate
SetCity sets the "city" field.
func (*VehicleLocationHistoryUpdate) SetLat ¶
func (vlhu *VehicleLocationHistoryUpdate) SetLat(f float64) *VehicleLocationHistoryUpdate
SetLat sets the "lat" field.
func (*VehicleLocationHistoryUpdate) SetLong ¶
func (vlhu *VehicleLocationHistoryUpdate) SetLong(f float64) *VehicleLocationHistoryUpdate
SetLong sets the "long" field.
func (*VehicleLocationHistoryUpdate) SetNillableLat ¶
func (vlhu *VehicleLocationHistoryUpdate) SetNillableLat(f *float64) *VehicleLocationHistoryUpdate
SetNillableLat sets the "lat" field if the given value is not nil.
func (*VehicleLocationHistoryUpdate) SetNillableLong ¶
func (vlhu *VehicleLocationHistoryUpdate) SetNillableLong(f *float64) *VehicleLocationHistoryUpdate
SetNillableLong sets the "long" field if the given value is not nil.
func (*VehicleLocationHistoryUpdate) SetRideID ¶
func (vlhu *VehicleLocationHistoryUpdate) SetRideID(u uuid.UUID) *VehicleLocationHistoryUpdate
SetRideID sets the "ride_id" field.
func (*VehicleLocationHistoryUpdate) SetRides ¶
func (vlhu *VehicleLocationHistoryUpdate) SetRides(r *Ride) *VehicleLocationHistoryUpdate
SetRides sets the "rides" edge to the Ride entity.
func (*VehicleLocationHistoryUpdate) SetRidesID ¶
func (vlhu *VehicleLocationHistoryUpdate) SetRidesID(id uuid.UUID) *VehicleLocationHistoryUpdate
SetRidesID sets the "rides" edge to the Ride entity by ID.
func (*VehicleLocationHistoryUpdate) SetTimestamp ¶
func (vlhu *VehicleLocationHistoryUpdate) SetTimestamp(t time.Time) *VehicleLocationHistoryUpdate
SetTimestamp sets the "timestamp" field.
func (*VehicleLocationHistoryUpdate) Where ¶
func (vlhu *VehicleLocationHistoryUpdate) Where(ps ...predicate.VehicleLocationHistory) *VehicleLocationHistoryUpdate
Where appends a list predicates to the VehicleLocationHistoryUpdate builder.
type VehicleLocationHistoryUpdateOne ¶
type VehicleLocationHistoryUpdateOne struct {
// contains filtered or unexported fields
}
VehicleLocationHistoryUpdateOne is the builder for updating a single VehicleLocationHistory entity.
func (*VehicleLocationHistoryUpdateOne) AddLat ¶
func (vlhuo *VehicleLocationHistoryUpdateOne) AddLat(f float64) *VehicleLocationHistoryUpdateOne
AddLat adds f to the "lat" field.
func (*VehicleLocationHistoryUpdateOne) AddLong ¶
func (vlhuo *VehicleLocationHistoryUpdateOne) AddLong(f float64) *VehicleLocationHistoryUpdateOne
AddLong adds f to the "long" field.
func (*VehicleLocationHistoryUpdateOne) ClearLat ¶
func (vlhuo *VehicleLocationHistoryUpdateOne) ClearLat() *VehicleLocationHistoryUpdateOne
ClearLat clears the value of the "lat" field.
func (*VehicleLocationHistoryUpdateOne) ClearLong ¶
func (vlhuo *VehicleLocationHistoryUpdateOne) ClearLong() *VehicleLocationHistoryUpdateOne
ClearLong clears the value of the "long" field.
func (*VehicleLocationHistoryUpdateOne) ClearRides ¶
func (vlhuo *VehicleLocationHistoryUpdateOne) ClearRides() *VehicleLocationHistoryUpdateOne
ClearRides clears the "rides" edge to the Ride entity.
func (*VehicleLocationHistoryUpdateOne) Exec ¶
func (vlhuo *VehicleLocationHistoryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*VehicleLocationHistoryUpdateOne) ExecX ¶
func (vlhuo *VehicleLocationHistoryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VehicleLocationHistoryUpdateOne) Mutation ¶
func (vlhuo *VehicleLocationHistoryUpdateOne) Mutation() *VehicleLocationHistoryMutation
Mutation returns the VehicleLocationHistoryMutation object of the builder.
func (*VehicleLocationHistoryUpdateOne) Save ¶
func (vlhuo *VehicleLocationHistoryUpdateOne) Save(ctx context.Context) (*VehicleLocationHistory, error)
Save executes the query and returns the updated VehicleLocationHistory entity.
func (*VehicleLocationHistoryUpdateOne) SaveX ¶
func (vlhuo *VehicleLocationHistoryUpdateOne) SaveX(ctx context.Context) *VehicleLocationHistory
SaveX is like Save, but panics if an error occurs.
func (*VehicleLocationHistoryUpdateOne) Select ¶
func (vlhuo *VehicleLocationHistoryUpdateOne) Select(field string, fields ...string) *VehicleLocationHistoryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*VehicleLocationHistoryUpdateOne) SetCity ¶
func (vlhuo *VehicleLocationHistoryUpdateOne) SetCity(s string) *VehicleLocationHistoryUpdateOne
SetCity sets the "city" field.
func (*VehicleLocationHistoryUpdateOne) SetLat ¶
func (vlhuo *VehicleLocationHistoryUpdateOne) SetLat(f float64) *VehicleLocationHistoryUpdateOne
SetLat sets the "lat" field.
func (*VehicleLocationHistoryUpdateOne) SetLong ¶
func (vlhuo *VehicleLocationHistoryUpdateOne) SetLong(f float64) *VehicleLocationHistoryUpdateOne
SetLong sets the "long" field.
func (*VehicleLocationHistoryUpdateOne) SetNillableLat ¶
func (vlhuo *VehicleLocationHistoryUpdateOne) SetNillableLat(f *float64) *VehicleLocationHistoryUpdateOne
SetNillableLat sets the "lat" field if the given value is not nil.
func (*VehicleLocationHistoryUpdateOne) SetNillableLong ¶
func (vlhuo *VehicleLocationHistoryUpdateOne) SetNillableLong(f *float64) *VehicleLocationHistoryUpdateOne
SetNillableLong sets the "long" field if the given value is not nil.
func (*VehicleLocationHistoryUpdateOne) SetRideID ¶
func (vlhuo *VehicleLocationHistoryUpdateOne) SetRideID(u uuid.UUID) *VehicleLocationHistoryUpdateOne
SetRideID sets the "ride_id" field.
func (*VehicleLocationHistoryUpdateOne) SetRides ¶
func (vlhuo *VehicleLocationHistoryUpdateOne) SetRides(r *Ride) *VehicleLocationHistoryUpdateOne
SetRides sets the "rides" edge to the Ride entity.
func (*VehicleLocationHistoryUpdateOne) SetRidesID ¶
func (vlhuo *VehicleLocationHistoryUpdateOne) SetRidesID(id uuid.UUID) *VehicleLocationHistoryUpdateOne
SetRidesID sets the "rides" edge to the Ride entity by ID.
func (*VehicleLocationHistoryUpdateOne) SetTimestamp ¶
func (vlhuo *VehicleLocationHistoryUpdateOne) SetTimestamp(t time.Time) *VehicleLocationHistoryUpdateOne
SetTimestamp sets the "timestamp" field.
type VehicleMutation ¶
type VehicleMutation struct {
// contains filtered or unexported fields
}
VehicleMutation represents an operation that mutates the Vehicle nodes in the graph.
func (*VehicleMutation) AddField ¶
func (m *VehicleMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*VehicleMutation) AddRideIDs ¶
func (m *VehicleMutation) AddRideIDs(ids ...uuid.UUID)
AddRideIDs adds the "rides" edge to the Ride entity by ids.
func (*VehicleMutation) AddedEdges ¶
func (m *VehicleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*VehicleMutation) AddedField ¶
func (m *VehicleMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*VehicleMutation) AddedFields ¶
func (m *VehicleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*VehicleMutation) AddedIDs ¶
func (m *VehicleMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*VehicleMutation) City ¶
func (m *VehicleMutation) City() (r string, exists bool)
City returns the value of the "city" field in the mutation.
func (*VehicleMutation) ClearCreationTime ¶
func (m *VehicleMutation) ClearCreationTime()
ClearCreationTime clears the value of the "creation_time" field.
func (*VehicleMutation) ClearCurrentLocation ¶
func (m *VehicleMutation) ClearCurrentLocation()
ClearCurrentLocation clears the value of the "current_location" field.
func (*VehicleMutation) ClearEdge ¶
func (m *VehicleMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*VehicleMutation) ClearExt ¶
func (m *VehicleMutation) ClearExt()
ClearExt clears the value of the "ext" field.
func (*VehicleMutation) ClearField ¶
func (m *VehicleMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*VehicleMutation) ClearOwnerID ¶
func (m *VehicleMutation) ClearOwnerID()
ClearOwnerID clears the value of the "owner_id" field.
func (*VehicleMutation) ClearRides ¶
func (m *VehicleMutation) ClearRides()
ClearRides clears the "rides" edge to the Ride entity.
func (*VehicleMutation) ClearStatus ¶
func (m *VehicleMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*VehicleMutation) ClearType ¶
func (m *VehicleMutation) ClearType()
ClearType clears the value of the "type" field.
func (*VehicleMutation) ClearUser ¶
func (m *VehicleMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*VehicleMutation) ClearedEdges ¶
func (m *VehicleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*VehicleMutation) ClearedFields ¶
func (m *VehicleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (VehicleMutation) Client ¶
func (m VehicleMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*VehicleMutation) CreationTime ¶
func (m *VehicleMutation) CreationTime() (r time.Time, exists bool)
CreationTime returns the value of the "creation_time" field in the mutation.
func (*VehicleMutation) CreationTimeCleared ¶
func (m *VehicleMutation) CreationTimeCleared() bool
CreationTimeCleared returns if the "creation_time" field was cleared in this mutation.
func (*VehicleMutation) CurrentLocation ¶
func (m *VehicleMutation) CurrentLocation() (r string, exists bool)
CurrentLocation returns the value of the "current_location" field in the mutation.
func (*VehicleMutation) CurrentLocationCleared ¶
func (m *VehicleMutation) CurrentLocationCleared() bool
CurrentLocationCleared returns if the "current_location" field was cleared in this mutation.
func (*VehicleMutation) EdgeCleared ¶
func (m *VehicleMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*VehicleMutation) Ext ¶
func (m *VehicleMutation) Ext() (r *map[string]interface{}, exists bool)
Ext returns the value of the "ext" field in the mutation.
func (*VehicleMutation) ExtCleared ¶
func (m *VehicleMutation) ExtCleared() bool
ExtCleared returns if the "ext" field was cleared in this mutation.
func (*VehicleMutation) Field ¶
func (m *VehicleMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*VehicleMutation) FieldCleared ¶
func (m *VehicleMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*VehicleMutation) Fields ¶
func (m *VehicleMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*VehicleMutation) GetType ¶
func (m *VehicleMutation) GetType() (r string, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*VehicleMutation) ID ¶
func (m *VehicleMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*VehicleMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*VehicleMutation) OldCity ¶
func (m *VehicleMutation) OldCity(ctx context.Context) (v string, err error)
OldCity returns the old "city" field's value of the Vehicle entity. If the Vehicle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VehicleMutation) OldCreationTime ¶
OldCreationTime returns the old "creation_time" field's value of the Vehicle entity. If the Vehicle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VehicleMutation) OldCurrentLocation ¶
func (m *VehicleMutation) OldCurrentLocation(ctx context.Context) (v string, err error)
OldCurrentLocation returns the old "current_location" field's value of the Vehicle entity. If the Vehicle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VehicleMutation) OldExt ¶
func (m *VehicleMutation) OldExt(ctx context.Context) (v *map[string]interface{}, err error)
OldExt returns the old "ext" field's value of the Vehicle entity. If the Vehicle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VehicleMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*VehicleMutation) OldOwnerID ¶
OldOwnerID returns the old "owner_id" field's value of the Vehicle entity. If the Vehicle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VehicleMutation) OldStatus ¶
func (m *VehicleMutation) OldStatus(ctx context.Context) (v string, err error)
OldStatus returns the old "status" field's value of the Vehicle entity. If the Vehicle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VehicleMutation) OldType ¶
func (m *VehicleMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "type" field's value of the Vehicle entity. If the Vehicle object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VehicleMutation) OwnerID ¶
func (m *VehicleMutation) OwnerID() (r uuid.UUID, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*VehicleMutation) OwnerIDCleared ¶
func (m *VehicleMutation) OwnerIDCleared() bool
OwnerIDCleared returns if the "owner_id" field was cleared in this mutation.
func (*VehicleMutation) RemoveRideIDs ¶
func (m *VehicleMutation) RemoveRideIDs(ids ...uuid.UUID)
RemoveRideIDs removes the "rides" edge to the Ride entity by IDs.
func (*VehicleMutation) RemovedEdges ¶
func (m *VehicleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*VehicleMutation) RemovedIDs ¶
func (m *VehicleMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*VehicleMutation) RemovedRidesIDs ¶
func (m *VehicleMutation) RemovedRidesIDs() (ids []uuid.UUID)
RemovedRides returns the removed IDs of the "rides" edge to the Ride entity.
func (*VehicleMutation) ResetCity ¶
func (m *VehicleMutation) ResetCity()
ResetCity resets all changes to the "city" field.
func (*VehicleMutation) ResetCreationTime ¶
func (m *VehicleMutation) ResetCreationTime()
ResetCreationTime resets all changes to the "creation_time" field.
func (*VehicleMutation) ResetCurrentLocation ¶
func (m *VehicleMutation) ResetCurrentLocation()
ResetCurrentLocation resets all changes to the "current_location" field.
func (*VehicleMutation) ResetEdge ¶
func (m *VehicleMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*VehicleMutation) ResetExt ¶
func (m *VehicleMutation) ResetExt()
ResetExt resets all changes to the "ext" field.
func (*VehicleMutation) ResetField ¶
func (m *VehicleMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*VehicleMutation) ResetOwnerID ¶
func (m *VehicleMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*VehicleMutation) ResetRides ¶
func (m *VehicleMutation) ResetRides()
ResetRides resets all changes to the "rides" edge.
func (*VehicleMutation) ResetStatus ¶
func (m *VehicleMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*VehicleMutation) ResetType ¶
func (m *VehicleMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*VehicleMutation) ResetUser ¶
func (m *VehicleMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*VehicleMutation) RidesCleared ¶
func (m *VehicleMutation) RidesCleared() bool
RidesCleared reports if the "rides" edge to the Ride entity was cleared.
func (*VehicleMutation) RidesIDs ¶
func (m *VehicleMutation) RidesIDs() (ids []uuid.UUID)
RidesIDs returns the "rides" edge IDs in the mutation.
func (*VehicleMutation) SetCity ¶
func (m *VehicleMutation) SetCity(s string)
SetCity sets the "city" field.
func (*VehicleMutation) SetCreationTime ¶
func (m *VehicleMutation) SetCreationTime(t time.Time)
SetCreationTime sets the "creation_time" field.
func (*VehicleMutation) SetCurrentLocation ¶
func (m *VehicleMutation) SetCurrentLocation(s string)
SetCurrentLocation sets the "current_location" field.
func (*VehicleMutation) SetExt ¶
func (m *VehicleMutation) SetExt(value *map[string]interface{})
SetExt sets the "ext" field.
func (*VehicleMutation) SetField ¶
func (m *VehicleMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*VehicleMutation) SetID ¶
func (m *VehicleMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Vehicle entities.
func (*VehicleMutation) SetOp ¶
func (m *VehicleMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*VehicleMutation) SetOwnerID ¶
func (m *VehicleMutation) SetOwnerID(u uuid.UUID)
SetOwnerID sets the "owner_id" field.
func (*VehicleMutation) SetStatus ¶
func (m *VehicleMutation) SetStatus(s string)
SetStatus sets the "status" field.
func (*VehicleMutation) SetType ¶
func (m *VehicleMutation) SetType(s string)
SetType sets the "type" field.
func (*VehicleMutation) SetUserID ¶
func (m *VehicleMutation) SetUserID(id uuid.UUID)
SetUserID sets the "user" edge to the User entity by id.
func (*VehicleMutation) Status ¶
func (m *VehicleMutation) Status() (r string, exists bool)
Status returns the value of the "status" field in the mutation.
func (*VehicleMutation) StatusCleared ¶
func (m *VehicleMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (VehicleMutation) Tx ¶
func (m VehicleMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*VehicleMutation) Type ¶
func (m *VehicleMutation) Type() string
Type returns the node type of this mutation (Vehicle).
func (*VehicleMutation) TypeCleared ¶
func (m *VehicleMutation) TypeCleared() bool
TypeCleared returns if the "type" field was cleared in this mutation.
func (*VehicleMutation) UserCleared ¶
func (m *VehicleMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*VehicleMutation) UserID ¶
func (m *VehicleMutation) UserID() (id uuid.UUID, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*VehicleMutation) UserIDs ¶
func (m *VehicleMutation) UserIDs() (ids []uuid.UUID)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*VehicleMutation) Where ¶
func (m *VehicleMutation) Where(ps ...predicate.Vehicle)
Where appends a list predicates to the VehicleMutation builder.
func (*VehicleMutation) WhereP ¶
func (m *VehicleMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the VehicleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type VehicleQuery ¶
type VehicleQuery struct {
// contains filtered or unexported fields
}
VehicleQuery is the builder for querying Vehicle entities.
func (*VehicleQuery) Aggregate ¶
func (vq *VehicleQuery) Aggregate(fns ...AggregateFunc) *VehicleSelect
Aggregate returns a VehicleSelect configured with the given aggregations.
func (*VehicleQuery) All ¶
func (vq *VehicleQuery) All(ctx context.Context) ([]*Vehicle, error)
All executes the query and returns a list of Vehicles.
func (*VehicleQuery) AllX ¶
func (vq *VehicleQuery) AllX(ctx context.Context) []*Vehicle
AllX is like All, but panics if an error occurs.
func (*VehicleQuery) Clone ¶
func (vq *VehicleQuery) Clone() *VehicleQuery
Clone returns a duplicate of the VehicleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*VehicleQuery) Count ¶
func (vq *VehicleQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*VehicleQuery) CountX ¶
func (vq *VehicleQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*VehicleQuery) Exist ¶
func (vq *VehicleQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*VehicleQuery) ExistX ¶
func (vq *VehicleQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*VehicleQuery) First ¶
func (vq *VehicleQuery) First(ctx context.Context) (*Vehicle, error)
First returns the first Vehicle entity from the query. Returns a *NotFoundError when no Vehicle was found.
func (*VehicleQuery) FirstID ¶
FirstID returns the first Vehicle ID from the query. Returns a *NotFoundError when no Vehicle ID was found.
func (*VehicleQuery) FirstIDX ¶
func (vq *VehicleQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*VehicleQuery) FirstX ¶
func (vq *VehicleQuery) FirstX(ctx context.Context) *Vehicle
FirstX is like First, but panics if an error occurs.
func (*VehicleQuery) GroupBy ¶
func (vq *VehicleQuery) GroupBy(field string, fields ...string) *VehicleGroupBy
GroupBy is 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 { City string `json:"city,omitempty"` Count int `json:"count,omitempty"` } client.Vehicle.Query(). GroupBy(vehicle.FieldCity). Aggregate(ent.Count()). Scan(ctx, &v)
func (*VehicleQuery) IDsX ¶
func (vq *VehicleQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*VehicleQuery) Limit ¶
func (vq *VehicleQuery) Limit(limit int) *VehicleQuery
Limit the number of records to be returned by this query.
func (*VehicleQuery) Offset ¶
func (vq *VehicleQuery) Offset(offset int) *VehicleQuery
Offset to start from.
func (*VehicleQuery) Only ¶
func (vq *VehicleQuery) Only(ctx context.Context) (*Vehicle, error)
Only returns a single Vehicle entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Vehicle entity is found. Returns a *NotFoundError when no Vehicle entities are found.
func (*VehicleQuery) OnlyID ¶
OnlyID is like Only, but returns the only Vehicle ID in the query. Returns a *NotSingularError when more than one Vehicle ID is found. Returns a *NotFoundError when no entities are found.
func (*VehicleQuery) OnlyIDX ¶
func (vq *VehicleQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*VehicleQuery) OnlyX ¶
func (vq *VehicleQuery) OnlyX(ctx context.Context) *Vehicle
OnlyX is like Only, but panics if an error occurs.
func (*VehicleQuery) Order ¶
func (vq *VehicleQuery) Order(o ...OrderFunc) *VehicleQuery
Order specifies how the records should be ordered.
func (*VehicleQuery) QueryRides ¶
func (vq *VehicleQuery) QueryRides() *RideQuery
QueryRides chains the current query on the "rides" edge.
func (*VehicleQuery) QueryUser ¶
func (vq *VehicleQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*VehicleQuery) Select ¶
func (vq *VehicleQuery) Select(fields ...string) *VehicleSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { City string `json:"city,omitempty"` } client.Vehicle.Query(). Select(vehicle.FieldCity). Scan(ctx, &v)
func (*VehicleQuery) Unique ¶
func (vq *VehicleQuery) Unique(unique bool) *VehicleQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*VehicleQuery) Where ¶
func (vq *VehicleQuery) Where(ps ...predicate.Vehicle) *VehicleQuery
Where adds a new predicate for the VehicleQuery builder.
func (*VehicleQuery) WithRides ¶
func (vq *VehicleQuery) WithRides(opts ...func(*RideQuery)) *VehicleQuery
WithRides tells the query-builder to eager-load the nodes that are connected to the "rides" edge. The optional arguments are used to configure the query builder of the edge.
func (*VehicleQuery) WithUser ¶
func (vq *VehicleQuery) WithUser(opts ...func(*UserQuery)) *VehicleQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type VehicleSelect ¶
type VehicleSelect struct { *VehicleQuery // contains filtered or unexported fields }
VehicleSelect is the builder for selecting fields of Vehicle entities.
func (*VehicleSelect) Aggregate ¶
func (vs *VehicleSelect) Aggregate(fns ...AggregateFunc) *VehicleSelect
Aggregate adds the given aggregation functions to the selector query.
func (*VehicleSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*VehicleSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*VehicleSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*VehicleSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*VehicleSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*VehicleSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*VehicleSelect) Scan ¶
func (vs *VehicleSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*VehicleSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type VehicleUpdate ¶
type VehicleUpdate struct {
// contains filtered or unexported fields
}
VehicleUpdate is the builder for updating Vehicle entities.
func (*VehicleUpdate) AddRideIDs ¶
func (vu *VehicleUpdate) AddRideIDs(ids ...uuid.UUID) *VehicleUpdate
AddRideIDs adds the "rides" edge to the Ride entity by IDs.
func (*VehicleUpdate) AddRides ¶
func (vu *VehicleUpdate) AddRides(r ...*Ride) *VehicleUpdate
AddRides adds the "rides" edges to the Ride entity.
func (*VehicleUpdate) ClearCreationTime ¶
func (vu *VehicleUpdate) ClearCreationTime() *VehicleUpdate
ClearCreationTime clears the value of the "creation_time" field.
func (*VehicleUpdate) ClearCurrentLocation ¶
func (vu *VehicleUpdate) ClearCurrentLocation() *VehicleUpdate
ClearCurrentLocation clears the value of the "current_location" field.
func (*VehicleUpdate) ClearExt ¶
func (vu *VehicleUpdate) ClearExt() *VehicleUpdate
ClearExt clears the value of the "ext" field.
func (*VehicleUpdate) ClearOwnerID ¶
func (vu *VehicleUpdate) ClearOwnerID() *VehicleUpdate
ClearOwnerID clears the value of the "owner_id" field.
func (*VehicleUpdate) ClearRides ¶
func (vu *VehicleUpdate) ClearRides() *VehicleUpdate
ClearRides clears all "rides" edges to the Ride entity.
func (*VehicleUpdate) ClearStatus ¶
func (vu *VehicleUpdate) ClearStatus() *VehicleUpdate
ClearStatus clears the value of the "status" field.
func (*VehicleUpdate) ClearType ¶
func (vu *VehicleUpdate) ClearType() *VehicleUpdate
ClearType clears the value of the "type" field.
func (*VehicleUpdate) ClearUser ¶
func (vu *VehicleUpdate) ClearUser() *VehicleUpdate
ClearUser clears the "user" edge to the User entity.
func (*VehicleUpdate) Exec ¶
func (vu *VehicleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*VehicleUpdate) ExecX ¶
func (vu *VehicleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VehicleUpdate) Mutation ¶
func (vu *VehicleUpdate) Mutation() *VehicleMutation
Mutation returns the VehicleMutation object of the builder.
func (*VehicleUpdate) RemoveRideIDs ¶
func (vu *VehicleUpdate) RemoveRideIDs(ids ...uuid.UUID) *VehicleUpdate
RemoveRideIDs removes the "rides" edge to Ride entities by IDs.
func (*VehicleUpdate) RemoveRides ¶
func (vu *VehicleUpdate) RemoveRides(r ...*Ride) *VehicleUpdate
RemoveRides removes "rides" edges to Ride entities.
func (*VehicleUpdate) Save ¶
func (vu *VehicleUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*VehicleUpdate) SaveX ¶
func (vu *VehicleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*VehicleUpdate) SetCity ¶
func (vu *VehicleUpdate) SetCity(s string) *VehicleUpdate
SetCity sets the "city" field.
func (*VehicleUpdate) SetCreationTime ¶
func (vu *VehicleUpdate) SetCreationTime(t time.Time) *VehicleUpdate
SetCreationTime sets the "creation_time" field.
func (*VehicleUpdate) SetCurrentLocation ¶
func (vu *VehicleUpdate) SetCurrentLocation(s string) *VehicleUpdate
SetCurrentLocation sets the "current_location" field.
func (*VehicleUpdate) SetExt ¶
func (vu *VehicleUpdate) SetExt(m *map[string]interface{}) *VehicleUpdate
SetExt sets the "ext" field.
func (*VehicleUpdate) SetNillableCreationTime ¶
func (vu *VehicleUpdate) SetNillableCreationTime(t *time.Time) *VehicleUpdate
SetNillableCreationTime sets the "creation_time" field if the given value is not nil.
func (*VehicleUpdate) SetNillableCurrentLocation ¶
func (vu *VehicleUpdate) SetNillableCurrentLocation(s *string) *VehicleUpdate
SetNillableCurrentLocation sets the "current_location" field if the given value is not nil.
func (*VehicleUpdate) SetNillableOwnerID ¶
func (vu *VehicleUpdate) SetNillableOwnerID(u *uuid.UUID) *VehicleUpdate
SetNillableOwnerID sets the "owner_id" field if the given value is not nil.
func (*VehicleUpdate) SetNillableStatus ¶
func (vu *VehicleUpdate) SetNillableStatus(s *string) *VehicleUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*VehicleUpdate) SetNillableType ¶
func (vu *VehicleUpdate) SetNillableType(s *string) *VehicleUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*VehicleUpdate) SetNillableUserID ¶
func (vu *VehicleUpdate) SetNillableUserID(id *uuid.UUID) *VehicleUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*VehicleUpdate) SetOwnerID ¶
func (vu *VehicleUpdate) SetOwnerID(u uuid.UUID) *VehicleUpdate
SetOwnerID sets the "owner_id" field.
func (*VehicleUpdate) SetStatus ¶
func (vu *VehicleUpdate) SetStatus(s string) *VehicleUpdate
SetStatus sets the "status" field.
func (*VehicleUpdate) SetType ¶
func (vu *VehicleUpdate) SetType(s string) *VehicleUpdate
SetType sets the "type" field.
func (*VehicleUpdate) SetUser ¶
func (vu *VehicleUpdate) SetUser(u *User) *VehicleUpdate
SetUser sets the "user" edge to the User entity.
func (*VehicleUpdate) SetUserID ¶
func (vu *VehicleUpdate) SetUserID(id uuid.UUID) *VehicleUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*VehicleUpdate) Where ¶
func (vu *VehicleUpdate) Where(ps ...predicate.Vehicle) *VehicleUpdate
Where appends a list predicates to the VehicleUpdate builder.
type VehicleUpdateOne ¶
type VehicleUpdateOne struct {
// contains filtered or unexported fields
}
VehicleUpdateOne is the builder for updating a single Vehicle entity.
func (*VehicleUpdateOne) AddRideIDs ¶
func (vuo *VehicleUpdateOne) AddRideIDs(ids ...uuid.UUID) *VehicleUpdateOne
AddRideIDs adds the "rides" edge to the Ride entity by IDs.
func (*VehicleUpdateOne) AddRides ¶
func (vuo *VehicleUpdateOne) AddRides(r ...*Ride) *VehicleUpdateOne
AddRides adds the "rides" edges to the Ride entity.
func (*VehicleUpdateOne) ClearCreationTime ¶
func (vuo *VehicleUpdateOne) ClearCreationTime() *VehicleUpdateOne
ClearCreationTime clears the value of the "creation_time" field.
func (*VehicleUpdateOne) ClearCurrentLocation ¶
func (vuo *VehicleUpdateOne) ClearCurrentLocation() *VehicleUpdateOne
ClearCurrentLocation clears the value of the "current_location" field.
func (*VehicleUpdateOne) ClearExt ¶
func (vuo *VehicleUpdateOne) ClearExt() *VehicleUpdateOne
ClearExt clears the value of the "ext" field.
func (*VehicleUpdateOne) ClearOwnerID ¶
func (vuo *VehicleUpdateOne) ClearOwnerID() *VehicleUpdateOne
ClearOwnerID clears the value of the "owner_id" field.
func (*VehicleUpdateOne) ClearRides ¶
func (vuo *VehicleUpdateOne) ClearRides() *VehicleUpdateOne
ClearRides clears all "rides" edges to the Ride entity.
func (*VehicleUpdateOne) ClearStatus ¶
func (vuo *VehicleUpdateOne) ClearStatus() *VehicleUpdateOne
ClearStatus clears the value of the "status" field.
func (*VehicleUpdateOne) ClearType ¶
func (vuo *VehicleUpdateOne) ClearType() *VehicleUpdateOne
ClearType clears the value of the "type" field.
func (*VehicleUpdateOne) ClearUser ¶
func (vuo *VehicleUpdateOne) ClearUser() *VehicleUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*VehicleUpdateOne) Exec ¶
func (vuo *VehicleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*VehicleUpdateOne) ExecX ¶
func (vuo *VehicleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VehicleUpdateOne) Mutation ¶
func (vuo *VehicleUpdateOne) Mutation() *VehicleMutation
Mutation returns the VehicleMutation object of the builder.
func (*VehicleUpdateOne) RemoveRideIDs ¶
func (vuo *VehicleUpdateOne) RemoveRideIDs(ids ...uuid.UUID) *VehicleUpdateOne
RemoveRideIDs removes the "rides" edge to Ride entities by IDs.
func (*VehicleUpdateOne) RemoveRides ¶
func (vuo *VehicleUpdateOne) RemoveRides(r ...*Ride) *VehicleUpdateOne
RemoveRides removes "rides" edges to Ride entities.
func (*VehicleUpdateOne) Save ¶
func (vuo *VehicleUpdateOne) Save(ctx context.Context) (*Vehicle, error)
Save executes the query and returns the updated Vehicle entity.
func (*VehicleUpdateOne) SaveX ¶
func (vuo *VehicleUpdateOne) SaveX(ctx context.Context) *Vehicle
SaveX is like Save, but panics if an error occurs.
func (*VehicleUpdateOne) Select ¶
func (vuo *VehicleUpdateOne) Select(field string, fields ...string) *VehicleUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*VehicleUpdateOne) SetCity ¶
func (vuo *VehicleUpdateOne) SetCity(s string) *VehicleUpdateOne
SetCity sets the "city" field.
func (*VehicleUpdateOne) SetCreationTime ¶
func (vuo *VehicleUpdateOne) SetCreationTime(t time.Time) *VehicleUpdateOne
SetCreationTime sets the "creation_time" field.
func (*VehicleUpdateOne) SetCurrentLocation ¶
func (vuo *VehicleUpdateOne) SetCurrentLocation(s string) *VehicleUpdateOne
SetCurrentLocation sets the "current_location" field.
func (*VehicleUpdateOne) SetExt ¶
func (vuo *VehicleUpdateOne) SetExt(m *map[string]interface{}) *VehicleUpdateOne
SetExt sets the "ext" field.
func (*VehicleUpdateOne) SetNillableCreationTime ¶
func (vuo *VehicleUpdateOne) SetNillableCreationTime(t *time.Time) *VehicleUpdateOne
SetNillableCreationTime sets the "creation_time" field if the given value is not nil.
func (*VehicleUpdateOne) SetNillableCurrentLocation ¶
func (vuo *VehicleUpdateOne) SetNillableCurrentLocation(s *string) *VehicleUpdateOne
SetNillableCurrentLocation sets the "current_location" field if the given value is not nil.
func (*VehicleUpdateOne) SetNillableOwnerID ¶
func (vuo *VehicleUpdateOne) SetNillableOwnerID(u *uuid.UUID) *VehicleUpdateOne
SetNillableOwnerID sets the "owner_id" field if the given value is not nil.
func (*VehicleUpdateOne) SetNillableStatus ¶
func (vuo *VehicleUpdateOne) SetNillableStatus(s *string) *VehicleUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*VehicleUpdateOne) SetNillableType ¶
func (vuo *VehicleUpdateOne) SetNillableType(s *string) *VehicleUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*VehicleUpdateOne) SetNillableUserID ¶
func (vuo *VehicleUpdateOne) SetNillableUserID(id *uuid.UUID) *VehicleUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*VehicleUpdateOne) SetOwnerID ¶
func (vuo *VehicleUpdateOne) SetOwnerID(u uuid.UUID) *VehicleUpdateOne
SetOwnerID sets the "owner_id" field.
func (*VehicleUpdateOne) SetStatus ¶
func (vuo *VehicleUpdateOne) SetStatus(s string) *VehicleUpdateOne
SetStatus sets the "status" field.
func (*VehicleUpdateOne) SetType ¶
func (vuo *VehicleUpdateOne) SetType(s string) *VehicleUpdateOne
SetType sets the "type" field.
func (*VehicleUpdateOne) SetUser ¶
func (vuo *VehicleUpdateOne) SetUser(u *User) *VehicleUpdateOne
SetUser sets the "user" edge to the User entity.
func (*VehicleUpdateOne) SetUserID ¶
func (vuo *VehicleUpdateOne) SetUserID(id uuid.UUID) *VehicleUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
Source Files ¶
- client.go
- config.go
- context.go
- ent.go
- generate.go
- mutation.go
- ride.go
- ride_create.go
- ride_delete.go
- ride_query.go
- ride_update.go
- runtime.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go
- userpromocode.go
- userpromocode_create.go
- userpromocode_delete.go
- userpromocode_query.go
- userpromocode_update.go
- vehicle.go
- vehicle_create.go
- vehicle_delete.go
- vehicle_query.go
- vehicle_update.go
- vehiclelocationhistory.go
- vehiclelocationhistory_create.go
- vehiclelocationhistory_delete.go
- vehiclelocationhistory_query.go
- vehiclelocationhistory_update.go