ent

package
v0.0.0-...-009ff64 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2020 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsConstraintError

func IsConstraintError(err error) bool

IsConstraintError returns a boolean indicating whether the error is a constraint failure.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns a boolean indicating whether the error is a not found error.

func IsNotLoaded

func IsNotLoaded(err error) bool

IsNotLoaded returns a boolean indicating whether the error is a not loaded error.

func IsNotSingular

func IsNotSingular(err error) bool

IsNotSingular returns a boolean indicating whether the error is a not singular error.

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks nor found error.

func NewContext

func NewContext(parent context.Context, c *Client) context.Context

NewContext returns a new context with the given Client attached.

Types

type Aggregate

type Aggregate func(*sql.Selector) string

Aggregate applies an aggregation step on the group-by traversal/selector.

func As

func As(fn Aggregate, end string) Aggregate

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() Aggregate

Count applies the "count" aggregation function on each group.

func Max

func Max(field string) Aggregate

Max applies the "max" aggregation function on the given field of each group.

func Mean

func Mean(field string) Aggregate

Mean applies the "mean" aggregation function on the given field of each group.

func Min

func Min(field string) Aggregate

Min applies the "min" aggregation function on the given field of each group.

func Sum

func Sum(field string) Aggregate

Sum applies the "sum" aggregation function on the given field of each group.

type Alert

type Alert struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// contains filtered or unexported fields
}

Alert is the model entity for the Alert schema.

func (*Alert) String

func (a *Alert) String() string

String implements the fmt.Stringer.

func (*Alert) Unwrap

func (a *Alert) Unwrap() *Alert

Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.

func (*Alert) Update

func (a *Alert) Update() *AlertUpdateOne

Update returns a builder for updating this Alert. Note that, you need to call Alert.Unwrap() before calling this method, if this Alert was returned from a transaction, and the transaction was committed or rolled back.

type AlertClient

type AlertClient struct {
	// contains filtered or unexported fields
}

AlertClient is a client for the Alert schema.

func NewAlertClient

func NewAlertClient(c config) *AlertClient

NewAlertClient returns a client for the Alert from the given config.

func (*AlertClient) Create

func (c *AlertClient) Create() *AlertCreate

Create returns a create builder for Alert.

func (*AlertClient) Delete

func (c *AlertClient) Delete() *AlertDelete

Delete returns a delete builder for Alert.

func (*AlertClient) DeleteOne

func (c *AlertClient) DeleteOne(a *Alert) *AlertDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*AlertClient) DeleteOneID

func (c *AlertClient) DeleteOneID(id int) *AlertDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*AlertClient) Get

func (c *AlertClient) Get(ctx context.Context, id int) (*Alert, error)

Get returns a Alert entity by its id.

func (*AlertClient) GetX

func (c *AlertClient) GetX(ctx context.Context, id int) *Alert

GetX is like Get, but panics if an error occurs.

func (*AlertClient) Query

func (c *AlertClient) Query() *AlertQuery

Create returns a query builder for Alert.

func (*AlertClient) Update

func (c *AlertClient) Update() *AlertUpdate

Update returns an update builder for Alert.

func (*AlertClient) UpdateOne

func (c *AlertClient) UpdateOne(a *Alert) *AlertUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AlertClient) UpdateOneID

func (c *AlertClient) UpdateOneID(id int) *AlertUpdateOne

UpdateOneID returns an update builder for the given id.

type AlertCreate

type AlertCreate struct {
	// contains filtered or unexported fields
}

AlertCreate is the builder for creating a Alert entity.

func (*AlertCreate) Save

func (ac *AlertCreate) Save(ctx context.Context) (*Alert, error)

Save creates the Alert in the database.

func (*AlertCreate) SaveX

func (ac *AlertCreate) SaveX(ctx context.Context) *Alert

SaveX calls Save and panics if Save returns an error.

type AlertDelete

type AlertDelete struct {
	// contains filtered or unexported fields
}

AlertDelete is the builder for deleting a Alert entity.

func (*AlertDelete) Exec

func (ad *AlertDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*AlertDelete) ExecX

func (ad *AlertDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*AlertDelete) Where

func (ad *AlertDelete) Where(ps ...predicate.Alert) *AlertDelete

Where adds a new predicate to the delete builder.

type AlertDeleteOne

type AlertDeleteOne struct {
	// contains filtered or unexported fields
}

AlertDeleteOne is the builder for deleting a single Alert entity.

func (*AlertDeleteOne) Exec

func (ado *AlertDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AlertDeleteOne) ExecX

func (ado *AlertDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type AlertGroupBy

type AlertGroupBy struct {
	// contains filtered or unexported fields
}

AlertGroupBy is the builder for group-by Alert entities.

func (*AlertGroupBy) Aggregate

func (agb *AlertGroupBy) Aggregate(fns ...Aggregate) *AlertGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*AlertGroupBy) Bools

func (agb *AlertGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.

func (*AlertGroupBy) BoolsX

func (agb *AlertGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AlertGroupBy) Float64s

func (agb *AlertGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.

func (*AlertGroupBy) Float64sX

func (agb *AlertGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AlertGroupBy) Ints

func (agb *AlertGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.

func (*AlertGroupBy) IntsX

func (agb *AlertGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AlertGroupBy) Scan

func (agb *AlertGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scan the result into the given value.

func (*AlertGroupBy) ScanX

func (agb *AlertGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*AlertGroupBy) Strings

func (agb *AlertGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when querying group-by with one field.

func (*AlertGroupBy) StringsX

func (agb *AlertGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AlertQuery

type AlertQuery struct {
	// contains filtered or unexported fields
}

AlertQuery is the builder for querying Alert entities.

func (*AlertQuery) All

func (aq *AlertQuery) All(ctx context.Context) ([]*Alert, error)

All executes the query and returns a list of Alerts.

func (*AlertQuery) AllX

func (aq *AlertQuery) AllX(ctx context.Context) []*Alert

AllX is like All, but panics if an error occurs.

func (*AlertQuery) Clone

func (aq *AlertQuery) Clone() *AlertQuery

Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*AlertQuery) Count

func (aq *AlertQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AlertQuery) CountX

func (aq *AlertQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*AlertQuery) Exist

func (aq *AlertQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*AlertQuery) ExistX

func (aq *AlertQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*AlertQuery) First

func (aq *AlertQuery) First(ctx context.Context) (*Alert, error)

First returns the first Alert entity in the query. Returns *NotFoundError when no alert was found.

func (*AlertQuery) FirstID

func (aq *AlertQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Alert id in the query. Returns *NotFoundError when no id was found.

func (*AlertQuery) FirstX

func (aq *AlertQuery) FirstX(ctx context.Context) *Alert

FirstX is like First, but panics if an error occurs.

func (*AlertQuery) FirstXID

func (aq *AlertQuery) FirstXID(ctx context.Context) int

FirstXID is like FirstID, but panics if an error occurs.

func (*AlertQuery) GroupBy

func (aq *AlertQuery) GroupBy(field string, fields ...string) *AlertGroupBy

GroupBy used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

func (*AlertQuery) IDs

func (aq *AlertQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of Alert ids.

func (*AlertQuery) IDsX

func (aq *AlertQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*AlertQuery) Limit

func (aq *AlertQuery) Limit(limit int) *AlertQuery

Limit adds a limit step to the query.

func (*AlertQuery) Offset

func (aq *AlertQuery) Offset(offset int) *AlertQuery

Offset adds an offset step to the query.

func (*AlertQuery) Only

func (aq *AlertQuery) Only(ctx context.Context) (*Alert, error)

Only returns the only Alert entity in the query, returns an error if not exactly one entity was returned.

func (*AlertQuery) OnlyID

func (aq *AlertQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID returns the only Alert id in the query, returns an error if not exactly one id was returned.

func (*AlertQuery) OnlyX

func (aq *AlertQuery) OnlyX(ctx context.Context) *Alert

OnlyX is like Only, but panics if an error occurs.

func (*AlertQuery) OnlyXID

func (aq *AlertQuery) OnlyXID(ctx context.Context) int

OnlyXID is like OnlyID, but panics if an error occurs.

func (*AlertQuery) Order

func (aq *AlertQuery) Order(o ...Order) *AlertQuery

Order adds an order step to the query.

func (*AlertQuery) Select

func (aq *AlertQuery) Select(field string, fields ...string) *AlertSelect

Select one or more fields from the given query.

func (*AlertQuery) Where

func (aq *AlertQuery) Where(ps ...predicate.Alert) *AlertQuery

Where adds a new predicate for the builder.

type AlertSelect

type AlertSelect struct {
	// contains filtered or unexported fields
}

AlertSelect is the builder for select fields of Alert entities.

func (*AlertSelect) Bools

func (as *AlertSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from selector. It is only allowed when selecting one field.

func (*AlertSelect) BoolsX

func (as *AlertSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AlertSelect) Float64s

func (as *AlertSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from selector. It is only allowed when selecting one field.

func (*AlertSelect) Float64sX

func (as *AlertSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AlertSelect) Ints

func (as *AlertSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from selector. It is only allowed when selecting one field.

func (*AlertSelect) IntsX

func (as *AlertSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AlertSelect) Scan

func (as *AlertSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scan the result into the given value.

func (*AlertSelect) ScanX

func (as *AlertSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*AlertSelect) Strings

func (as *AlertSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from selector. It is only allowed when selecting one field.

func (*AlertSelect) StringsX

func (as *AlertSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AlertUpdate

type AlertUpdate struct {
	// contains filtered or unexported fields
}

AlertUpdate is the builder for updating Alert entities.

func (*AlertUpdate) Exec

func (au *AlertUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AlertUpdate) ExecX

func (au *AlertUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AlertUpdate) Save

func (au *AlertUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of rows/vertices matched by this operation.

func (*AlertUpdate) SaveX

func (au *AlertUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*AlertUpdate) Where

func (au *AlertUpdate) Where(ps ...predicate.Alert) *AlertUpdate

Where adds a new predicate for the builder.

type AlertUpdateOne

type AlertUpdateOne struct {
	// contains filtered or unexported fields
}

AlertUpdateOne is the builder for updating a single Alert entity.

func (*AlertUpdateOne) Exec

func (auo *AlertUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AlertUpdateOne) ExecX

func (auo *AlertUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AlertUpdateOne) Save

func (auo *AlertUpdateOne) Save(ctx context.Context) (*Alert, error)

Save executes the query and returns the updated entity.

func (*AlertUpdateOne) SaveX

func (auo *AlertUpdateOne) SaveX(ctx context.Context) *Alert

SaveX is like Save, but panics if an error occurs.

type Alerts

type Alerts []*Alert

Alerts is a parsable slice of Alert.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Alert is the client for interacting with the Alert builders.
	Alert *AlertClient
	// ClinicalResults is the client for interacting with the ClinicalResults builders.
	ClinicalResults *ClinicalResultsClient
	// Doctor is the client for interacting with the Doctor builders.
	Doctor *DoctorClient
	// EpidemiologicResults is the client for interacting with the EpidemiologicResults builders.
	EpidemiologicResults *EpidemiologicResultsClient
	// History is the client for interacting with the History builders.
	History *HistoryClient
	// MedicalNote is the client for interacting with the MedicalNote builders.
	MedicalNote *MedicalNoteClient
	// Patient is the client for interacting with the Patient builders.
	Patient *PatientClient
	// Schedule is the client for interacting with the Schedule builders.
	Schedule *ScheduleClient
	// Task is the client for interacting with the Task builders.
	Task *TaskClient
	// TaskResponse is the client for interacting with the TaskResponse builders.
	TaskResponse *TaskResponseClient
	// Test is the client for interacting with the Test builders.
	Test *TestClient
	// contains filtered or unexported fields
}

Client is the client that holds all ent builders.

func FromContext

func FromContext(ctx context.Context) *Client

FromContext returns the Client stored in a context, or nil if there isn't one.

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

func Open(driverName, dataSourceName string, options ...Option) (*Client, error)

Open opens a connection to the database specified by the driver name and a driver-specific data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.

func (*Client) Close

func (c *Client) Close() error

Close closes the database connection and prevents new queries from starting.

func (*Client) Debug

func (c *Client) Debug() *Client

Debug returns a new debug-client. It's used to get verbose logging on specific operations.

client.Debug().
	Alert.
	Query().
	Count(ctx)

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client.

type ClinicalResults

type ClinicalResults struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// GeneralDiscomfort holds the value of the "generalDiscomfort" field.
	GeneralDiscomfort bool `json:"generalDiscomfort,omitempty"`
	// Fever holds the value of the "fever" field.
	Fever bool `json:"fever,omitempty"`
	// ThirdAge holds the value of the "thirdAge" field.
	ThirdAge bool `json:"thirdAge,omitempty"`
	// Dyspnea holds the value of the "dyspnea" field.
	Dyspnea bool `json:"dyspnea,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ClinicalResultsQuery when eager-loading is set.
	Edges ClinicalResultsEdges `json:"edges"`
	// contains filtered or unexported fields
}

ClinicalResults is the model entity for the ClinicalResults schema.

func (*ClinicalResults) QueryTest

func (cr *ClinicalResults) QueryTest() *TestQuery

QueryTest queries the test edge of the ClinicalResults.

func (*ClinicalResults) String

func (cr *ClinicalResults) String() string

String implements the fmt.Stringer.

func (*ClinicalResults) Unwrap

func (cr *ClinicalResults) Unwrap() *ClinicalResults

Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.

func (*ClinicalResults) Update

Update returns a builder for updating this ClinicalResults. Note that, you need to call ClinicalResults.Unwrap() before calling this method, if this ClinicalResults was returned from a transaction, and the transaction was committed or rolled back.

type ClinicalResultsClient

type ClinicalResultsClient struct {
	// contains filtered or unexported fields
}

ClinicalResultsClient is a client for the ClinicalResults schema.

func NewClinicalResultsClient

func NewClinicalResultsClient(c config) *ClinicalResultsClient

NewClinicalResultsClient returns a client for the ClinicalResults from the given config.

func (*ClinicalResultsClient) Create

Create returns a create builder for ClinicalResults.

func (*ClinicalResultsClient) Delete

Delete returns a delete builder for ClinicalResults.

func (*ClinicalResultsClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*ClinicalResultsClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*ClinicalResultsClient) Get

Get returns a ClinicalResults entity by its id.

func (*ClinicalResultsClient) GetX

GetX is like Get, but panics if an error occurs.

func (*ClinicalResultsClient) Query

Create returns a query builder for ClinicalResults.

func (*ClinicalResultsClient) QueryTest

func (c *ClinicalResultsClient) QueryTest(cr *ClinicalResults) *TestQuery

QueryTest queries the test edge of a ClinicalResults.

func (*ClinicalResultsClient) Update

Update returns an update builder for ClinicalResults.

func (*ClinicalResultsClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ClinicalResultsClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

type ClinicalResultsCreate

type ClinicalResultsCreate struct {
	// contains filtered or unexported fields
}

ClinicalResultsCreate is the builder for creating a ClinicalResults entity.

func (*ClinicalResultsCreate) Save

Save creates the ClinicalResults in the database.

func (*ClinicalResultsCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*ClinicalResultsCreate) SetDyspnea

func (crc *ClinicalResultsCreate) SetDyspnea(b bool) *ClinicalResultsCreate

SetDyspnea sets the dyspnea field.

func (*ClinicalResultsCreate) SetFever

SetFever sets the fever field.

func (*ClinicalResultsCreate) SetGeneralDiscomfort

func (crc *ClinicalResultsCreate) SetGeneralDiscomfort(b bool) *ClinicalResultsCreate

SetGeneralDiscomfort sets the generalDiscomfort field.

func (*ClinicalResultsCreate) SetID

SetID sets the id field.

func (*ClinicalResultsCreate) SetNillableTestID

func (crc *ClinicalResultsCreate) SetNillableTestID(id *uuid.UUID) *ClinicalResultsCreate

SetNillableTestID sets the test edge to Test by id if the given value is not nil.

func (*ClinicalResultsCreate) SetTest

SetTest sets the test edge to Test.

func (*ClinicalResultsCreate) SetTestID

SetTestID sets the test edge to Test by id.

func (*ClinicalResultsCreate) SetThirdAge

func (crc *ClinicalResultsCreate) SetThirdAge(b bool) *ClinicalResultsCreate

SetThirdAge sets the thirdAge field.

type ClinicalResultsDelete

type ClinicalResultsDelete struct {
	// contains filtered or unexported fields
}

ClinicalResultsDelete is the builder for deleting a ClinicalResults entity.

func (*ClinicalResultsDelete) Exec

func (crd *ClinicalResultsDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ClinicalResultsDelete) ExecX

func (crd *ClinicalResultsDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ClinicalResultsDelete) Where

Where adds a new predicate to the delete builder.

type ClinicalResultsDeleteOne

type ClinicalResultsDeleteOne struct {
	// contains filtered or unexported fields
}

ClinicalResultsDeleteOne is the builder for deleting a single ClinicalResults entity.

func (*ClinicalResultsDeleteOne) Exec

Exec executes the deletion query.

func (*ClinicalResultsDeleteOne) ExecX

func (crdo *ClinicalResultsDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type ClinicalResultsEdges

type ClinicalResultsEdges struct {
	// Test holds the value of the test edge.
	Test *Test
	// contains filtered or unexported fields
}

ClinicalResultsEdges holds the relations/edges for other nodes in the graph.

func (ClinicalResultsEdges) TestOrErr

func (e ClinicalResultsEdges) TestOrErr() (*Test, error)

TestOrErr returns the Test value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ClinicalResultsGroupBy

type ClinicalResultsGroupBy struct {
	// contains filtered or unexported fields
}

ClinicalResultsGroupBy is the builder for group-by ClinicalResults entities.

func (*ClinicalResultsGroupBy) Aggregate

func (crgb *ClinicalResultsGroupBy) Aggregate(fns ...Aggregate) *ClinicalResultsGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ClinicalResultsGroupBy) Bools

func (crgb *ClinicalResultsGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.

func (*ClinicalResultsGroupBy) BoolsX

func (crgb *ClinicalResultsGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ClinicalResultsGroupBy) Float64s

func (crgb *ClinicalResultsGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.

func (*ClinicalResultsGroupBy) Float64sX

func (crgb *ClinicalResultsGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ClinicalResultsGroupBy) Ints

func (crgb *ClinicalResultsGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.

func (*ClinicalResultsGroupBy) IntsX

func (crgb *ClinicalResultsGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ClinicalResultsGroupBy) Scan

func (crgb *ClinicalResultsGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scan the result into the given value.

func (*ClinicalResultsGroupBy) ScanX

func (crgb *ClinicalResultsGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*ClinicalResultsGroupBy) Strings

func (crgb *ClinicalResultsGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when querying group-by with one field.

func (*ClinicalResultsGroupBy) StringsX

func (crgb *ClinicalResultsGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ClinicalResultsQuery

type ClinicalResultsQuery struct {
	// contains filtered or unexported fields
}

ClinicalResultsQuery is the builder for querying ClinicalResults entities.

func (*ClinicalResultsQuery) All

All executes the query and returns a list of ClinicalResultsSlice.

func (*ClinicalResultsQuery) AllX

AllX is like All, but panics if an error occurs.

func (*ClinicalResultsQuery) Clone

Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ClinicalResultsQuery) Count

func (crq *ClinicalResultsQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ClinicalResultsQuery) CountX

func (crq *ClinicalResultsQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ClinicalResultsQuery) Exist

func (crq *ClinicalResultsQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ClinicalResultsQuery) ExistX

func (crq *ClinicalResultsQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ClinicalResultsQuery) First

First returns the first ClinicalResults entity in the query. Returns *NotFoundError when no clinicalresults was found.

func (*ClinicalResultsQuery) FirstID

func (crq *ClinicalResultsQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first ClinicalResults id in the query. Returns *NotFoundError when no id was found.

func (*ClinicalResultsQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*ClinicalResultsQuery) FirstXID

func (crq *ClinicalResultsQuery) FirstXID(ctx context.Context) uuid.UUID

FirstXID is like FirstID, but panics if an error occurs.

func (*ClinicalResultsQuery) GroupBy

func (crq *ClinicalResultsQuery) GroupBy(field string, fields ...string) *ClinicalResultsGroupBy

GroupBy used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	GeneralDiscomfort bool `json:"generalDiscomfort,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ClinicalResults.Query().
	GroupBy(clinicalresults.FieldGeneralDiscomfort).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ClinicalResultsQuery) IDs

func (crq *ClinicalResultsQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of ClinicalResults ids.

func (*ClinicalResultsQuery) IDsX

func (crq *ClinicalResultsQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*ClinicalResultsQuery) Limit

func (crq *ClinicalResultsQuery) Limit(limit int) *ClinicalResultsQuery

Limit adds a limit step to the query.

func (*ClinicalResultsQuery) Offset

func (crq *ClinicalResultsQuery) Offset(offset int) *ClinicalResultsQuery

Offset adds an offset step to the query.

func (*ClinicalResultsQuery) Only

Only returns the only ClinicalResults entity in the query, returns an error if not exactly one entity was returned.

func (*ClinicalResultsQuery) OnlyID

func (crq *ClinicalResultsQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID returns the only ClinicalResults id in the query, returns an error if not exactly one id was returned.

func (*ClinicalResultsQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*ClinicalResultsQuery) OnlyXID

func (crq *ClinicalResultsQuery) OnlyXID(ctx context.Context) uuid.UUID

OnlyXID is like OnlyID, but panics if an error occurs.

func (*ClinicalResultsQuery) Order

Order adds an order step to the query.

func (*ClinicalResultsQuery) QueryTest

func (crq *ClinicalResultsQuery) QueryTest() *TestQuery

QueryTest chains the current query on the test edge.

func (*ClinicalResultsQuery) Select

func (crq *ClinicalResultsQuery) Select(field string, fields ...string) *ClinicalResultsSelect

Select one or more fields from the given query.

Example:

var v []struct {
	GeneralDiscomfort bool `json:"generalDiscomfort,omitempty"`
}

client.ClinicalResults.Query().
	Select(clinicalresults.FieldGeneralDiscomfort).
	Scan(ctx, &v)

func (*ClinicalResultsQuery) Where

Where adds a new predicate for the builder.

func (*ClinicalResultsQuery) WithTest

func (crq *ClinicalResultsQuery) WithTest(opts ...func(*TestQuery)) *ClinicalResultsQuery
WithTest tells the query-builder to eager-loads the nodes that are connected to

the "test" edge. The optional arguments used to configure the query builder of the edge.

type ClinicalResultsSelect

type ClinicalResultsSelect struct {
	// contains filtered or unexported fields
}

ClinicalResultsSelect is the builder for select fields of ClinicalResults entities.

func (*ClinicalResultsSelect) Bools

func (crs *ClinicalResultsSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from selector. It is only allowed when selecting one field.

func (*ClinicalResultsSelect) BoolsX

func (crs *ClinicalResultsSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ClinicalResultsSelect) Float64s

func (crs *ClinicalResultsSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from selector. It is only allowed when selecting one field.

func (*ClinicalResultsSelect) Float64sX

func (crs *ClinicalResultsSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ClinicalResultsSelect) Ints

func (crs *ClinicalResultsSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from selector. It is only allowed when selecting one field.

func (*ClinicalResultsSelect) IntsX

func (crs *ClinicalResultsSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ClinicalResultsSelect) Scan

func (crs *ClinicalResultsSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scan the result into the given value.

func (*ClinicalResultsSelect) ScanX

func (crs *ClinicalResultsSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*ClinicalResultsSelect) Strings

func (crs *ClinicalResultsSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from selector. It is only allowed when selecting one field.

func (*ClinicalResultsSelect) StringsX

func (crs *ClinicalResultsSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ClinicalResultsSlice

type ClinicalResultsSlice []*ClinicalResults

ClinicalResultsSlice is a parsable slice of ClinicalResults.

type ClinicalResultsUpdate

type ClinicalResultsUpdate struct {
	// contains filtered or unexported fields
}

ClinicalResultsUpdate is the builder for updating ClinicalResults entities.

func (*ClinicalResultsUpdate) ClearTest

func (cru *ClinicalResultsUpdate) ClearTest() *ClinicalResultsUpdate

ClearTest clears the test edge to Test.

func (*ClinicalResultsUpdate) Exec

func (cru *ClinicalResultsUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ClinicalResultsUpdate) ExecX

func (cru *ClinicalResultsUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ClinicalResultsUpdate) Save

func (cru *ClinicalResultsUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of rows/vertices matched by this operation.

func (*ClinicalResultsUpdate) SaveX

func (cru *ClinicalResultsUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ClinicalResultsUpdate) SetDyspnea

func (cru *ClinicalResultsUpdate) SetDyspnea(b bool) *ClinicalResultsUpdate

SetDyspnea sets the dyspnea field.

func (*ClinicalResultsUpdate) SetFever

SetFever sets the fever field.

func (*ClinicalResultsUpdate) SetGeneralDiscomfort

func (cru *ClinicalResultsUpdate) SetGeneralDiscomfort(b bool) *ClinicalResultsUpdate

SetGeneralDiscomfort sets the generalDiscomfort field.

func (*ClinicalResultsUpdate) SetNillableTestID

func (cru *ClinicalResultsUpdate) SetNillableTestID(id *uuid.UUID) *ClinicalResultsUpdate

SetNillableTestID sets the test edge to Test by id if the given value is not nil.

func (*ClinicalResultsUpdate) SetTest

SetTest sets the test edge to Test.

func (*ClinicalResultsUpdate) SetTestID

SetTestID sets the test edge to Test by id.

func (*ClinicalResultsUpdate) SetThirdAge

func (cru *ClinicalResultsUpdate) SetThirdAge(b bool) *ClinicalResultsUpdate

SetThirdAge sets the thirdAge field.

func (*ClinicalResultsUpdate) Where

Where adds a new predicate for the builder.

type ClinicalResultsUpdateOne

type ClinicalResultsUpdateOne struct {
	// contains filtered or unexported fields
}

ClinicalResultsUpdateOne is the builder for updating a single ClinicalResults entity.

func (*ClinicalResultsUpdateOne) ClearTest

ClearTest clears the test edge to Test.

func (*ClinicalResultsUpdateOne) Exec

Exec executes the query on the entity.

func (*ClinicalResultsUpdateOne) ExecX

func (cruo *ClinicalResultsUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ClinicalResultsUpdateOne) Save

Save executes the query and returns the updated entity.

func (*ClinicalResultsUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*ClinicalResultsUpdateOne) SetDyspnea

SetDyspnea sets the dyspnea field.

func (*ClinicalResultsUpdateOne) SetFever

SetFever sets the fever field.

func (*ClinicalResultsUpdateOne) SetGeneralDiscomfort

func (cruo *ClinicalResultsUpdateOne) SetGeneralDiscomfort(b bool) *ClinicalResultsUpdateOne

SetGeneralDiscomfort sets the generalDiscomfort field.

func (*ClinicalResultsUpdateOne) SetNillableTestID

func (cruo *ClinicalResultsUpdateOne) SetNillableTestID(id *uuid.UUID) *ClinicalResultsUpdateOne

SetNillableTestID sets the test edge to Test by id if the given value is not nil.

func (*ClinicalResultsUpdateOne) SetTest

SetTest sets the test edge to Test.

func (*ClinicalResultsUpdateOne) SetTestID

SetTestID sets the test edge to Test by id.

func (*ClinicalResultsUpdateOne) SetThirdAge

SetThirdAge sets the thirdAge field.

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 Doctor

type Doctor struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name []string `json:"name,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// Phone holds the value of the "phone" field.
	Phone string `json:"phone,omitempty"`
	// State holds the value of the "state" field.
	State doctor.State `json:"state,omitempty"`
	// LastConnection holds the value of the "lastConnection" field.
	LastConnection time.Time `json:"lastConnection,omitempty"`
	// Volunteer holds the value of the "volunteer" field.
	Volunteer bool `json:"volunteer,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the DoctorQuery when eager-loading is set.
	Edges DoctorEdges `json:"edges"`
	// contains filtered or unexported fields
}

Doctor is the model entity for the Doctor schema.

func (*Doctor) QueryNotes

func (d *Doctor) QueryNotes() *MedicalNoteQuery

QueryNotes queries the notes edge of the Doctor.

func (*Doctor) QueryResponses

func (d *Doctor) QueryResponses() *TaskResponseQuery

QueryResponses queries the responses edge of the Doctor.

func (*Doctor) QueryTasks

func (d *Doctor) QueryTasks() *TaskQuery

QueryTasks queries the tasks edge of the Doctor.

func (*Doctor) String

func (d *Doctor) String() string

String implements the fmt.Stringer.

func (*Doctor) Unwrap

func (d *Doctor) Unwrap() *Doctor

Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.

func (*Doctor) Update

func (d *Doctor) Update() *DoctorUpdateOne

Update returns a builder for updating this Doctor. Note that, you need to call Doctor.Unwrap() before calling this method, if this Doctor was returned from a transaction, and the transaction was committed or rolled back.

type DoctorClient

type DoctorClient struct {
	// contains filtered or unexported fields
}

DoctorClient is a client for the Doctor schema.

func NewDoctorClient

func NewDoctorClient(c config) *DoctorClient

NewDoctorClient returns a client for the Doctor from the given config.

func (*DoctorClient) Create

func (c *DoctorClient) Create() *DoctorCreate

Create returns a create builder for Doctor.

func (*DoctorClient) Delete

func (c *DoctorClient) Delete() *DoctorDelete

Delete returns a delete builder for Doctor.

func (*DoctorClient) DeleteOne

func (c *DoctorClient) DeleteOne(d *Doctor) *DoctorDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*DoctorClient) DeleteOneID

func (c *DoctorClient) DeleteOneID(id uuid.UUID) *DoctorDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*DoctorClient) Get

func (c *DoctorClient) Get(ctx context.Context, id uuid.UUID) (*Doctor, error)

Get returns a Doctor entity by its id.

func (*DoctorClient) GetX

func (c *DoctorClient) GetX(ctx context.Context, id uuid.UUID) *Doctor

GetX is like Get, but panics if an error occurs.

func (*DoctorClient) Query

func (c *DoctorClient) Query() *DoctorQuery

Create returns a query builder for Doctor.

func (*DoctorClient) QueryNotes

func (c *DoctorClient) QueryNotes(d *Doctor) *MedicalNoteQuery

QueryNotes queries the notes edge of a Doctor.

func (*DoctorClient) QueryResponses

func (c *DoctorClient) QueryResponses(d *Doctor) *TaskResponseQuery

QueryResponses queries the responses edge of a Doctor.

func (*DoctorClient) QueryTasks

func (c *DoctorClient) QueryTasks(d *Doctor) *TaskQuery

QueryTasks queries the tasks edge of a Doctor.

func (*DoctorClient) Update

func (c *DoctorClient) Update() *DoctorUpdate

Update returns an update builder for Doctor.

func (*DoctorClient) UpdateOne

func (c *DoctorClient) UpdateOne(d *Doctor) *DoctorUpdateOne

UpdateOne returns an update builder for the given entity.

func (*DoctorClient) UpdateOneID

func (c *DoctorClient) UpdateOneID(id uuid.UUID) *DoctorUpdateOne

UpdateOneID returns an update builder for the given id.

type DoctorCreate

type DoctorCreate struct {
	// contains filtered or unexported fields
}

DoctorCreate is the builder for creating a Doctor entity.

func (*DoctorCreate) AddNoteIDs

func (dc *DoctorCreate) AddNoteIDs(ids ...uuid.UUID) *DoctorCreate

AddNoteIDs adds the notes edge to MedicalNote by ids.

func (*DoctorCreate) AddNotes

func (dc *DoctorCreate) AddNotes(m ...*MedicalNote) *DoctorCreate

AddNotes adds the notes edges to MedicalNote.

func (*DoctorCreate) AddResponseIDs

func (dc *DoctorCreate) AddResponseIDs(ids ...uuid.UUID) *DoctorCreate

AddResponseIDs adds the responses edge to TaskResponse by ids.

func (*DoctorCreate) AddResponses

func (dc *DoctorCreate) AddResponses(t ...*TaskResponse) *DoctorCreate

AddResponses adds the responses edges to TaskResponse.

func (*DoctorCreate) AddTaskIDs

func (dc *DoctorCreate) AddTaskIDs(ids ...uuid.UUID) *DoctorCreate

AddTaskIDs adds the tasks edge to Task by ids.

func (*DoctorCreate) AddTasks

func (dc *DoctorCreate) AddTasks(t ...*Task) *DoctorCreate

AddTasks adds the tasks edges to Task.

func (*DoctorCreate) Save

func (dc *DoctorCreate) Save(ctx context.Context) (*Doctor, error)

Save creates the Doctor in the database.

func (*DoctorCreate) SaveX

func (dc *DoctorCreate) SaveX(ctx context.Context) *Doctor

SaveX calls Save and panics if Save returns an error.

func (*DoctorCreate) SetEmail

func (dc *DoctorCreate) SetEmail(s string) *DoctorCreate

SetEmail sets the email field.

func (*DoctorCreate) SetID

func (dc *DoctorCreate) SetID(u uuid.UUID) *DoctorCreate

SetID sets the id field.

func (*DoctorCreate) SetLastConnection

func (dc *DoctorCreate) SetLastConnection(t time.Time) *DoctorCreate

SetLastConnection sets the lastConnection field.

func (*DoctorCreate) SetName

func (dc *DoctorCreate) SetName(s []string) *DoctorCreate

SetName sets the name field.

func (*DoctorCreate) SetNillableLastConnection

func (dc *DoctorCreate) SetNillableLastConnection(t *time.Time) *DoctorCreate

SetNillableLastConnection sets the lastConnection field if the given value is not nil.

func (*DoctorCreate) SetNillableVolunteer

func (dc *DoctorCreate) SetNillableVolunteer(b *bool) *DoctorCreate

SetNillableVolunteer sets the volunteer field if the given value is not nil.

func (*DoctorCreate) SetPhone

func (dc *DoctorCreate) SetPhone(s string) *DoctorCreate

SetPhone sets the phone field.

func (*DoctorCreate) SetState

func (dc *DoctorCreate) SetState(d doctor.State) *DoctorCreate

SetState sets the state field.

func (*DoctorCreate) SetVolunteer

func (dc *DoctorCreate) SetVolunteer(b bool) *DoctorCreate

SetVolunteer sets the volunteer field.

type DoctorDelete

type DoctorDelete struct {
	// contains filtered or unexported fields
}

DoctorDelete is the builder for deleting a Doctor entity.

func (*DoctorDelete) Exec

func (dd *DoctorDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*DoctorDelete) ExecX

func (dd *DoctorDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*DoctorDelete) Where

func (dd *DoctorDelete) Where(ps ...predicate.Doctor) *DoctorDelete

Where adds a new predicate to the delete builder.

type DoctorDeleteOne

type DoctorDeleteOne struct {
	// contains filtered or unexported fields
}

DoctorDeleteOne is the builder for deleting a single Doctor entity.

func (*DoctorDeleteOne) Exec

func (ddo *DoctorDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DoctorDeleteOne) ExecX

func (ddo *DoctorDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type DoctorEdges

type DoctorEdges struct {
	// Notes holds the value of the notes edge.
	Notes []*MedicalNote
	// Responses holds the value of the responses edge.
	Responses []*TaskResponse
	// Tasks holds the value of the tasks edge.
	Tasks []*Task
	// contains filtered or unexported fields
}

DoctorEdges holds the relations/edges for other nodes in the graph.

func (DoctorEdges) NotesOrErr

func (e DoctorEdges) NotesOrErr() ([]*MedicalNote, error)

NotesOrErr returns the Notes value or an error if the edge was not loaded in eager-loading.

func (DoctorEdges) ResponsesOrErr

func (e DoctorEdges) ResponsesOrErr() ([]*TaskResponse, error)

ResponsesOrErr returns the Responses value or an error if the edge was not loaded in eager-loading.

func (DoctorEdges) TasksOrErr

func (e DoctorEdges) TasksOrErr() ([]*Task, error)

TasksOrErr returns the Tasks value or an error if the edge was not loaded in eager-loading.

type DoctorGroupBy

type DoctorGroupBy struct {
	// contains filtered or unexported fields
}

DoctorGroupBy is the builder for group-by Doctor entities.

func (*DoctorGroupBy) Aggregate

func (dgb *DoctorGroupBy) Aggregate(fns ...Aggregate) *DoctorGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*DoctorGroupBy) Bools

func (dgb *DoctorGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.

func (*DoctorGroupBy) BoolsX

func (dgb *DoctorGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DoctorGroupBy) Float64s

func (dgb *DoctorGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.

func (*DoctorGroupBy) Float64sX

func (dgb *DoctorGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DoctorGroupBy) Ints

func (dgb *DoctorGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.

func (*DoctorGroupBy) IntsX

func (dgb *DoctorGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DoctorGroupBy) Scan

func (dgb *DoctorGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scan the result into the given value.

func (*DoctorGroupBy) ScanX

func (dgb *DoctorGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*DoctorGroupBy) Strings

func (dgb *DoctorGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when querying group-by with one field.

func (*DoctorGroupBy) StringsX

func (dgb *DoctorGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DoctorQuery

type DoctorQuery struct {
	// contains filtered or unexported fields
}

DoctorQuery is the builder for querying Doctor entities.

func (*DoctorQuery) All

func (dq *DoctorQuery) All(ctx context.Context) ([]*Doctor, error)

All executes the query and returns a list of Doctors.

func (*DoctorQuery) AllX

func (dq *DoctorQuery) AllX(ctx context.Context) []*Doctor

AllX is like All, but panics if an error occurs.

func (*DoctorQuery) Clone

func (dq *DoctorQuery) Clone() *DoctorQuery

Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DoctorQuery) Count

func (dq *DoctorQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DoctorQuery) CountX

func (dq *DoctorQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DoctorQuery) Exist

func (dq *DoctorQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*DoctorQuery) ExistX

func (dq *DoctorQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DoctorQuery) First

func (dq *DoctorQuery) First(ctx context.Context) (*Doctor, error)

First returns the first Doctor entity in the query. Returns *NotFoundError when no doctor was found.

func (*DoctorQuery) FirstID

func (dq *DoctorQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Doctor id in the query. Returns *NotFoundError when no id was found.

func (*DoctorQuery) FirstX

func (dq *DoctorQuery) FirstX(ctx context.Context) *Doctor

FirstX is like First, but panics if an error occurs.

func (*DoctorQuery) FirstXID

func (dq *DoctorQuery) FirstXID(ctx context.Context) uuid.UUID

FirstXID is like FirstID, but panics if an error occurs.

func (*DoctorQuery) GroupBy

func (dq *DoctorQuery) GroupBy(field string, fields ...string) *DoctorGroupBy

GroupBy used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Name []string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Doctor.Query().
	GroupBy(doctor.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DoctorQuery) IDs

func (dq *DoctorQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of Doctor ids.

func (*DoctorQuery) IDsX

func (dq *DoctorQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*DoctorQuery) Limit

func (dq *DoctorQuery) Limit(limit int) *DoctorQuery

Limit adds a limit step to the query.

func (*DoctorQuery) Offset

func (dq *DoctorQuery) Offset(offset int) *DoctorQuery

Offset adds an offset step to the query.

func (*DoctorQuery) Only

func (dq *DoctorQuery) Only(ctx context.Context) (*Doctor, error)

Only returns the only Doctor entity in the query, returns an error if not exactly one entity was returned.

func (*DoctorQuery) OnlyID

func (dq *DoctorQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID returns the only Doctor id in the query, returns an error if not exactly one id was returned.

func (*DoctorQuery) OnlyX

func (dq *DoctorQuery) OnlyX(ctx context.Context) *Doctor

OnlyX is like Only, but panics if an error occurs.

func (*DoctorQuery) OnlyXID

func (dq *DoctorQuery) OnlyXID(ctx context.Context) uuid.UUID

OnlyXID is like OnlyID, but panics if an error occurs.

func (*DoctorQuery) Order

func (dq *DoctorQuery) Order(o ...Order) *DoctorQuery

Order adds an order step to the query.

func (*DoctorQuery) QueryNotes

func (dq *DoctorQuery) QueryNotes() *MedicalNoteQuery

QueryNotes chains the current query on the notes edge.

func (*DoctorQuery) QueryResponses

func (dq *DoctorQuery) QueryResponses() *TaskResponseQuery

QueryResponses chains the current query on the responses edge.

func (*DoctorQuery) QueryTasks

func (dq *DoctorQuery) QueryTasks() *TaskQuery

QueryTasks chains the current query on the tasks edge.

func (*DoctorQuery) Select

func (dq *DoctorQuery) Select(field string, fields ...string) *DoctorSelect

Select one or more fields from the given query.

Example:

var v []struct {
	Name []string `json:"name,omitempty"`
}

client.Doctor.Query().
	Select(doctor.FieldName).
	Scan(ctx, &v)

func (*DoctorQuery) Where

func (dq *DoctorQuery) Where(ps ...predicate.Doctor) *DoctorQuery

Where adds a new predicate for the builder.

func (*DoctorQuery) WithNotes

func (dq *DoctorQuery) WithNotes(opts ...func(*MedicalNoteQuery)) *DoctorQuery
WithNotes tells the query-builder to eager-loads the nodes that are connected to

the "notes" edge. The optional arguments used to configure the query builder of the edge.

func (*DoctorQuery) WithResponses

func (dq *DoctorQuery) WithResponses(opts ...func(*TaskResponseQuery)) *DoctorQuery
WithResponses tells the query-builder to eager-loads the nodes that are connected to

the "responses" edge. The optional arguments used to configure the query builder of the edge.

func (*DoctorQuery) WithTasks

func (dq *DoctorQuery) WithTasks(opts ...func(*TaskQuery)) *DoctorQuery
WithTasks tells the query-builder to eager-loads the nodes that are connected to

the "tasks" edge. The optional arguments used to configure the query builder of the edge.

type DoctorSelect

type DoctorSelect struct {
	// contains filtered or unexported fields
}

DoctorSelect is the builder for select fields of Doctor entities.

func (*DoctorSelect) Bools

func (ds *DoctorSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from selector. It is only allowed when selecting one field.

func (*DoctorSelect) BoolsX

func (ds *DoctorSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DoctorSelect) Float64s

func (ds *DoctorSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from selector. It is only allowed when selecting one field.

func (*DoctorSelect) Float64sX

func (ds *DoctorSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DoctorSelect) Ints

func (ds *DoctorSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from selector. It is only allowed when selecting one field.

func (*DoctorSelect) IntsX

func (ds *DoctorSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DoctorSelect) Scan

func (ds *DoctorSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scan the result into the given value.

func (*DoctorSelect) ScanX

func (ds *DoctorSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*DoctorSelect) Strings

func (ds *DoctorSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from selector. It is only allowed when selecting one field.

func (*DoctorSelect) StringsX

func (ds *DoctorSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DoctorUpdate

type DoctorUpdate struct {
	// contains filtered or unexported fields
}

DoctorUpdate is the builder for updating Doctor entities.

func (*DoctorUpdate) AddNoteIDs

func (du *DoctorUpdate) AddNoteIDs(ids ...uuid.UUID) *DoctorUpdate

AddNoteIDs adds the notes edge to MedicalNote by ids.

func (*DoctorUpdate) AddNotes

func (du *DoctorUpdate) AddNotes(m ...*MedicalNote) *DoctorUpdate

AddNotes adds the notes edges to MedicalNote.

func (*DoctorUpdate) AddResponseIDs

func (du *DoctorUpdate) AddResponseIDs(ids ...uuid.UUID) *DoctorUpdate

AddResponseIDs adds the responses edge to TaskResponse by ids.

func (*DoctorUpdate) AddResponses

func (du *DoctorUpdate) AddResponses(t ...*TaskResponse) *DoctorUpdate

AddResponses adds the responses edges to TaskResponse.

func (*DoctorUpdate) AddTaskIDs

func (du *DoctorUpdate) AddTaskIDs(ids ...uuid.UUID) *DoctorUpdate

AddTaskIDs adds the tasks edge to Task by ids.

func (*DoctorUpdate) AddTasks

func (du *DoctorUpdate) AddTasks(t ...*Task) *DoctorUpdate

AddTasks adds the tasks edges to Task.

func (*DoctorUpdate) ClearLastConnection

func (du *DoctorUpdate) ClearLastConnection() *DoctorUpdate

ClearLastConnection clears the value of lastConnection.

func (*DoctorUpdate) Exec

func (du *DoctorUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DoctorUpdate) ExecX

func (du *DoctorUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DoctorUpdate) RemoveNoteIDs

func (du *DoctorUpdate) RemoveNoteIDs(ids ...uuid.UUID) *DoctorUpdate

RemoveNoteIDs removes the notes edge to MedicalNote by ids.

func (*DoctorUpdate) RemoveNotes

func (du *DoctorUpdate) RemoveNotes(m ...*MedicalNote) *DoctorUpdate

RemoveNotes removes notes edges to MedicalNote.

func (*DoctorUpdate) RemoveResponseIDs

func (du *DoctorUpdate) RemoveResponseIDs(ids ...uuid.UUID) *DoctorUpdate

RemoveResponseIDs removes the responses edge to TaskResponse by ids.

func (*DoctorUpdate) RemoveResponses

func (du *DoctorUpdate) RemoveResponses(t ...*TaskResponse) *DoctorUpdate

RemoveResponses removes responses edges to TaskResponse.

func (*DoctorUpdate) RemoveTaskIDs

func (du *DoctorUpdate) RemoveTaskIDs(ids ...uuid.UUID) *DoctorUpdate

RemoveTaskIDs removes the tasks edge to Task by ids.

func (*DoctorUpdate) RemoveTasks

func (du *DoctorUpdate) RemoveTasks(t ...*Task) *DoctorUpdate

RemoveTasks removes tasks edges to Task.

func (*DoctorUpdate) Save

func (du *DoctorUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of rows/vertices matched by this operation.

func (*DoctorUpdate) SaveX

func (du *DoctorUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*DoctorUpdate) SetEmail

func (du *DoctorUpdate) SetEmail(s string) *DoctorUpdate

SetEmail sets the email field.

func (*DoctorUpdate) SetLastConnection

func (du *DoctorUpdate) SetLastConnection(t time.Time) *DoctorUpdate

SetLastConnection sets the lastConnection field.

func (*DoctorUpdate) SetName

func (du *DoctorUpdate) SetName(s []string) *DoctorUpdate

SetName sets the name field.

func (*DoctorUpdate) SetNillableLastConnection

func (du *DoctorUpdate) SetNillableLastConnection(t *time.Time) *DoctorUpdate

SetNillableLastConnection sets the lastConnection field if the given value is not nil.

func (*DoctorUpdate) SetNillableVolunteer

func (du *DoctorUpdate) SetNillableVolunteer(b *bool) *DoctorUpdate

SetNillableVolunteer sets the volunteer field if the given value is not nil.

func (*DoctorUpdate) SetPhone

func (du *DoctorUpdate) SetPhone(s string) *DoctorUpdate

SetPhone sets the phone field.

func (*DoctorUpdate) SetState

func (du *DoctorUpdate) SetState(d doctor.State) *DoctorUpdate

SetState sets the state field.

func (*DoctorUpdate) SetVolunteer

func (du *DoctorUpdate) SetVolunteer(b bool) *DoctorUpdate

SetVolunteer sets the volunteer field.

func (*DoctorUpdate) Where

func (du *DoctorUpdate) Where(ps ...predicate.Doctor) *DoctorUpdate

Where adds a new predicate for the builder.

type DoctorUpdateOne

type DoctorUpdateOne struct {
	// contains filtered or unexported fields
}

DoctorUpdateOne is the builder for updating a single Doctor entity.

func (*DoctorUpdateOne) AddNoteIDs

func (duo *DoctorUpdateOne) AddNoteIDs(ids ...uuid.UUID) *DoctorUpdateOne

AddNoteIDs adds the notes edge to MedicalNote by ids.

func (*DoctorUpdateOne) AddNotes

func (duo *DoctorUpdateOne) AddNotes(m ...*MedicalNote) *DoctorUpdateOne

AddNotes adds the notes edges to MedicalNote.

func (*DoctorUpdateOne) AddResponseIDs

func (duo *DoctorUpdateOne) AddResponseIDs(ids ...uuid.UUID) *DoctorUpdateOne

AddResponseIDs adds the responses edge to TaskResponse by ids.

func (*DoctorUpdateOne) AddResponses

func (duo *DoctorUpdateOne) AddResponses(t ...*TaskResponse) *DoctorUpdateOne

AddResponses adds the responses edges to TaskResponse.

func (*DoctorUpdateOne) AddTaskIDs

func (duo *DoctorUpdateOne) AddTaskIDs(ids ...uuid.UUID) *DoctorUpdateOne

AddTaskIDs adds the tasks edge to Task by ids.

func (*DoctorUpdateOne) AddTasks

func (duo *DoctorUpdateOne) AddTasks(t ...*Task) *DoctorUpdateOne

AddTasks adds the tasks edges to Task.

func (*DoctorUpdateOne) ClearLastConnection

func (duo *DoctorUpdateOne) ClearLastConnection() *DoctorUpdateOne

ClearLastConnection clears the value of lastConnection.

func (*DoctorUpdateOne) Exec

func (duo *DoctorUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DoctorUpdateOne) ExecX

func (duo *DoctorUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DoctorUpdateOne) RemoveNoteIDs

func (duo *DoctorUpdateOne) RemoveNoteIDs(ids ...uuid.UUID) *DoctorUpdateOne

RemoveNoteIDs removes the notes edge to MedicalNote by ids.

func (*DoctorUpdateOne) RemoveNotes

func (duo *DoctorUpdateOne) RemoveNotes(m ...*MedicalNote) *DoctorUpdateOne

RemoveNotes removes notes edges to MedicalNote.

func (*DoctorUpdateOne) RemoveResponseIDs

func (duo *DoctorUpdateOne) RemoveResponseIDs(ids ...uuid.UUID) *DoctorUpdateOne

RemoveResponseIDs removes the responses edge to TaskResponse by ids.

func (*DoctorUpdateOne) RemoveResponses

func (duo *DoctorUpdateOne) RemoveResponses(t ...*TaskResponse) *DoctorUpdateOne

RemoveResponses removes responses edges to TaskResponse.

func (*DoctorUpdateOne) RemoveTaskIDs

func (duo *DoctorUpdateOne) RemoveTaskIDs(ids ...uuid.UUID) *DoctorUpdateOne

RemoveTaskIDs removes the tasks edge to Task by ids.

func (*DoctorUpdateOne) RemoveTasks

func (duo *DoctorUpdateOne) RemoveTasks(t ...*Task) *DoctorUpdateOne

RemoveTasks removes tasks edges to Task.

func (*DoctorUpdateOne) Save

func (duo *DoctorUpdateOne) Save(ctx context.Context) (*Doctor, error)

Save executes the query and returns the updated entity.

func (*DoctorUpdateOne) SaveX

func (duo *DoctorUpdateOne) SaveX(ctx context.Context) *Doctor

SaveX is like Save, but panics if an error occurs.

func (*DoctorUpdateOne) SetEmail

func (duo *DoctorUpdateOne) SetEmail(s string) *DoctorUpdateOne

SetEmail sets the email field.

func (*DoctorUpdateOne) SetLastConnection

func (duo *DoctorUpdateOne) SetLastConnection(t time.Time) *DoctorUpdateOne

SetLastConnection sets the lastConnection field.

func (*DoctorUpdateOne) SetName

func (duo *DoctorUpdateOne) SetName(s []string) *DoctorUpdateOne

SetName sets the name field.

func (*DoctorUpdateOne) SetNillableLastConnection

func (duo *DoctorUpdateOne) SetNillableLastConnection(t *time.Time) *DoctorUpdateOne

SetNillableLastConnection sets the lastConnection field if the given value is not nil.

func (*DoctorUpdateOne) SetNillableVolunteer

func (duo *DoctorUpdateOne) SetNillableVolunteer(b *bool) *DoctorUpdateOne

SetNillableVolunteer sets the volunteer field if the given value is not nil.

func (*DoctorUpdateOne) SetPhone

func (duo *DoctorUpdateOne) SetPhone(s string) *DoctorUpdateOne

SetPhone sets the phone field.

func (*DoctorUpdateOne) SetState

func (duo *DoctorUpdateOne) SetState(d doctor.State) *DoctorUpdateOne

SetState sets the state field.

func (*DoctorUpdateOne) SetVolunteer

func (duo *DoctorUpdateOne) SetVolunteer(b bool) *DoctorUpdateOne

SetVolunteer sets the volunteer field.

type Doctors

type Doctors []*Doctor

Doctors is a parsable slice of Doctor.

type EpidemiologicResults

type EpidemiologicResults struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// VisitedPlaces holds the value of the "visitedPlaces" field.
	VisitedPlaces []string `json:"visitedPlaces,omitempty"`
	// InfectedFamily holds the value of the "infectedFamily" field.
	InfectedFamily bool `json:"infectedFamily,omitempty"`
	// FromInfectedPlace holds the value of the "fromInfectedPlace" field.
	FromInfectedPlace int `json:"fromInfectedPlace,omitempty"`
	// ToInfectedPlace holds the value of the "toInfectedPlace" field.
	ToInfectedPlace int `json:"toInfectedPlace,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the EpidemiologicResultsQuery when eager-loading is set.
	Edges EpidemiologicResultsEdges `json:"edges"`
	// contains filtered or unexported fields
}

EpidemiologicResults is the model entity for the EpidemiologicResults schema.

func (*EpidemiologicResults) QueryTest

func (er *EpidemiologicResults) QueryTest() *TestQuery

QueryTest queries the test edge of the EpidemiologicResults.

func (*EpidemiologicResults) String

func (er *EpidemiologicResults) String() string

String implements the fmt.Stringer.

func (*EpidemiologicResults) Unwrap

Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.

func (*EpidemiologicResults) Update

Update returns a builder for updating this EpidemiologicResults. Note that, you need to call EpidemiologicResults.Unwrap() before calling this method, if this EpidemiologicResults was returned from a transaction, and the transaction was committed or rolled back.

type EpidemiologicResultsClient

type EpidemiologicResultsClient struct {
	// contains filtered or unexported fields
}

EpidemiologicResultsClient is a client for the EpidemiologicResults schema.

func NewEpidemiologicResultsClient

func NewEpidemiologicResultsClient(c config) *EpidemiologicResultsClient

NewEpidemiologicResultsClient returns a client for the EpidemiologicResults from the given config.

func (*EpidemiologicResultsClient) Create

Create returns a create builder for EpidemiologicResults.

func (*EpidemiologicResultsClient) Delete

Delete returns a delete builder for EpidemiologicResults.

func (*EpidemiologicResultsClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*EpidemiologicResultsClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*EpidemiologicResultsClient) Get

Get returns a EpidemiologicResults entity by its id.

func (*EpidemiologicResultsClient) GetX

GetX is like Get, but panics if an error occurs.

func (*EpidemiologicResultsClient) Query

Create returns a query builder for EpidemiologicResults.

func (*EpidemiologicResultsClient) QueryTest

QueryTest queries the test edge of a EpidemiologicResults.

func (*EpidemiologicResultsClient) Update

Update returns an update builder for EpidemiologicResults.

func (*EpidemiologicResultsClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*EpidemiologicResultsClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

type EpidemiologicResultsCreate

type EpidemiologicResultsCreate struct {
	// contains filtered or unexported fields
}

EpidemiologicResultsCreate is the builder for creating a EpidemiologicResults entity.

func (*EpidemiologicResultsCreate) Save

Save creates the EpidemiologicResults in the database.

func (*EpidemiologicResultsCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*EpidemiologicResultsCreate) SetFromInfectedPlace

func (erc *EpidemiologicResultsCreate) SetFromInfectedPlace(i int) *EpidemiologicResultsCreate

SetFromInfectedPlace sets the fromInfectedPlace field.

func (*EpidemiologicResultsCreate) SetID

SetID sets the id field.

func (*EpidemiologicResultsCreate) SetInfectedFamily

func (erc *EpidemiologicResultsCreate) SetInfectedFamily(b bool) *EpidemiologicResultsCreate

SetInfectedFamily sets the infectedFamily field.

func (*EpidemiologicResultsCreate) SetNillableFromInfectedPlace

func (erc *EpidemiologicResultsCreate) SetNillableFromInfectedPlace(i *int) *EpidemiologicResultsCreate

SetNillableFromInfectedPlace sets the fromInfectedPlace field if the given value is not nil.

func (*EpidemiologicResultsCreate) SetNillableInfectedFamily

func (erc *EpidemiologicResultsCreate) SetNillableInfectedFamily(b *bool) *EpidemiologicResultsCreate

SetNillableInfectedFamily sets the infectedFamily field if the given value is not nil.

func (*EpidemiologicResultsCreate) SetNillableTestID

func (erc *EpidemiologicResultsCreate) SetNillableTestID(id *uuid.UUID) *EpidemiologicResultsCreate

SetNillableTestID sets the test edge to Test by id if the given value is not nil.

func (*EpidemiologicResultsCreate) SetNillableToInfectedPlace

func (erc *EpidemiologicResultsCreate) SetNillableToInfectedPlace(i *int) *EpidemiologicResultsCreate

SetNillableToInfectedPlace sets the toInfectedPlace field if the given value is not nil.

func (*EpidemiologicResultsCreate) SetTest

SetTest sets the test edge to Test.

func (*EpidemiologicResultsCreate) SetTestID

SetTestID sets the test edge to Test by id.

func (*EpidemiologicResultsCreate) SetToInfectedPlace

func (erc *EpidemiologicResultsCreate) SetToInfectedPlace(i int) *EpidemiologicResultsCreate

SetToInfectedPlace sets the toInfectedPlace field.

func (*EpidemiologicResultsCreate) SetVisitedPlaces

func (erc *EpidemiologicResultsCreate) SetVisitedPlaces(s []string) *EpidemiologicResultsCreate

SetVisitedPlaces sets the visitedPlaces field.

type EpidemiologicResultsDelete

type EpidemiologicResultsDelete struct {
	// contains filtered or unexported fields
}

EpidemiologicResultsDelete is the builder for deleting a EpidemiologicResults entity.

func (*EpidemiologicResultsDelete) Exec

Exec executes the deletion query and returns how many vertices were deleted.

func (*EpidemiologicResultsDelete) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*EpidemiologicResultsDelete) Where

Where adds a new predicate to the delete builder.

type EpidemiologicResultsDeleteOne

type EpidemiologicResultsDeleteOne struct {
	// contains filtered or unexported fields
}

EpidemiologicResultsDeleteOne is the builder for deleting a single EpidemiologicResults entity.

func (*EpidemiologicResultsDeleteOne) Exec

Exec executes the deletion query.

func (*EpidemiologicResultsDeleteOne) ExecX

ExecX is like Exec, but panics if an error occurs.

type EpidemiologicResultsEdges

type EpidemiologicResultsEdges struct {
	// Test holds the value of the test edge.
	Test *Test
	// contains filtered or unexported fields
}

EpidemiologicResultsEdges holds the relations/edges for other nodes in the graph.

func (EpidemiologicResultsEdges) TestOrErr

func (e EpidemiologicResultsEdges) TestOrErr() (*Test, error)

TestOrErr returns the Test value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type EpidemiologicResultsGroupBy

type EpidemiologicResultsGroupBy struct {
	// contains filtered or unexported fields
}

EpidemiologicResultsGroupBy is the builder for group-by EpidemiologicResults entities.

func (*EpidemiologicResultsGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*EpidemiologicResultsGroupBy) Bools

func (ergb *EpidemiologicResultsGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.

func (*EpidemiologicResultsGroupBy) BoolsX

func (ergb *EpidemiologicResultsGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*EpidemiologicResultsGroupBy) Float64s

func (ergb *EpidemiologicResultsGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.

func (*EpidemiologicResultsGroupBy) Float64sX

func (ergb *EpidemiologicResultsGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EpidemiologicResultsGroupBy) Ints

func (ergb *EpidemiologicResultsGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.

func (*EpidemiologicResultsGroupBy) IntsX

func (ergb *EpidemiologicResultsGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EpidemiologicResultsGroupBy) Scan

func (ergb *EpidemiologicResultsGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scan the result into the given value.

func (*EpidemiologicResultsGroupBy) ScanX

func (ergb *EpidemiologicResultsGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*EpidemiologicResultsGroupBy) Strings

func (ergb *EpidemiologicResultsGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when querying group-by with one field.

func (*EpidemiologicResultsGroupBy) StringsX

func (ergb *EpidemiologicResultsGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EpidemiologicResultsQuery

type EpidemiologicResultsQuery struct {
	// contains filtered or unexported fields
}

EpidemiologicResultsQuery is the builder for querying EpidemiologicResults entities.

func (*EpidemiologicResultsQuery) All

All executes the query and returns a list of EpidemiologicResultsSlice.

func (*EpidemiologicResultsQuery) AllX

AllX is like All, but panics if an error occurs.

func (*EpidemiologicResultsQuery) Clone

Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*EpidemiologicResultsQuery) Count

func (erq *EpidemiologicResultsQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*EpidemiologicResultsQuery) CountX

func (erq *EpidemiologicResultsQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*EpidemiologicResultsQuery) Exist

func (erq *EpidemiologicResultsQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*EpidemiologicResultsQuery) ExistX

func (erq *EpidemiologicResultsQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*EpidemiologicResultsQuery) First

First returns the first EpidemiologicResults entity in the query. Returns *NotFoundError when no epidemiologicresults was found.

func (*EpidemiologicResultsQuery) FirstID

func (erq *EpidemiologicResultsQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first EpidemiologicResults id in the query. Returns *NotFoundError when no id was found.

func (*EpidemiologicResultsQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*EpidemiologicResultsQuery) FirstXID

func (erq *EpidemiologicResultsQuery) FirstXID(ctx context.Context) uuid.UUID

FirstXID is like FirstID, but panics if an error occurs.

func (*EpidemiologicResultsQuery) GroupBy

func (erq *EpidemiologicResultsQuery) GroupBy(field string, fields ...string) *EpidemiologicResultsGroupBy

GroupBy used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	VisitedPlaces []string `json:"visitedPlaces,omitempty"`
	Count int `json:"count,omitempty"`
}

client.EpidemiologicResults.Query().
	GroupBy(epidemiologicresults.FieldVisitedPlaces).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*EpidemiologicResultsQuery) IDs

IDs executes the query and returns a list of EpidemiologicResults ids.

func (*EpidemiologicResultsQuery) IDsX

IDsX is like IDs, but panics if an error occurs.

func (*EpidemiologicResultsQuery) Limit

Limit adds a limit step to the query.

func (*EpidemiologicResultsQuery) Offset

Offset adds an offset step to the query.

func (*EpidemiologicResultsQuery) Only

Only returns the only EpidemiologicResults entity in the query, returns an error if not exactly one entity was returned.

func (*EpidemiologicResultsQuery) OnlyID

func (erq *EpidemiologicResultsQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID returns the only EpidemiologicResults id in the query, returns an error if not exactly one id was returned.

func (*EpidemiologicResultsQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*EpidemiologicResultsQuery) OnlyXID

OnlyXID is like OnlyID, but panics if an error occurs.

func (*EpidemiologicResultsQuery) Order

Order adds an order step to the query.

func (*EpidemiologicResultsQuery) QueryTest

func (erq *EpidemiologicResultsQuery) QueryTest() *TestQuery

QueryTest chains the current query on the test edge.

func (*EpidemiologicResultsQuery) Select

func (erq *EpidemiologicResultsQuery) Select(field string, fields ...string) *EpidemiologicResultsSelect

Select one or more fields from the given query.

Example:

var v []struct {
	VisitedPlaces []string `json:"visitedPlaces,omitempty"`
}

client.EpidemiologicResults.Query().
	Select(epidemiologicresults.FieldVisitedPlaces).
	Scan(ctx, &v)

func (*EpidemiologicResultsQuery) Where

Where adds a new predicate for the builder.

func (*EpidemiologicResultsQuery) WithTest

func (erq *EpidemiologicResultsQuery) WithTest(opts ...func(*TestQuery)) *EpidemiologicResultsQuery
WithTest tells the query-builder to eager-loads the nodes that are connected to

the "test" edge. The optional arguments used to configure the query builder of the edge.

type EpidemiologicResultsSelect

type EpidemiologicResultsSelect struct {
	// contains filtered or unexported fields
}

EpidemiologicResultsSelect is the builder for select fields of EpidemiologicResults entities.

func (*EpidemiologicResultsSelect) Bools

func (ers *EpidemiologicResultsSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from selector. It is only allowed when selecting one field.

func (*EpidemiologicResultsSelect) BoolsX

func (ers *EpidemiologicResultsSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*EpidemiologicResultsSelect) Float64s

func (ers *EpidemiologicResultsSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from selector. It is only allowed when selecting one field.

func (*EpidemiologicResultsSelect) Float64sX

func (ers *EpidemiologicResultsSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EpidemiologicResultsSelect) Ints

func (ers *EpidemiologicResultsSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from selector. It is only allowed when selecting one field.

func (*EpidemiologicResultsSelect) IntsX

func (ers *EpidemiologicResultsSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EpidemiologicResultsSelect) Scan

func (ers *EpidemiologicResultsSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scan the result into the given value.

func (*EpidemiologicResultsSelect) ScanX

func (ers *EpidemiologicResultsSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*EpidemiologicResultsSelect) Strings

func (ers *EpidemiologicResultsSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from selector. It is only allowed when selecting one field.

func (*EpidemiologicResultsSelect) StringsX

func (ers *EpidemiologicResultsSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EpidemiologicResultsSlice

type EpidemiologicResultsSlice []*EpidemiologicResults

EpidemiologicResultsSlice is a parsable slice of EpidemiologicResults.

type EpidemiologicResultsUpdate

type EpidemiologicResultsUpdate struct {
	// contains filtered or unexported fields
}

EpidemiologicResultsUpdate is the builder for updating EpidemiologicResults entities.

func (*EpidemiologicResultsUpdate) AddFromInfectedPlace

func (eru *EpidemiologicResultsUpdate) AddFromInfectedPlace(i int) *EpidemiologicResultsUpdate

AddFromInfectedPlace adds i to fromInfectedPlace.

func (*EpidemiologicResultsUpdate) AddToInfectedPlace

func (eru *EpidemiologicResultsUpdate) AddToInfectedPlace(i int) *EpidemiologicResultsUpdate

AddToInfectedPlace adds i to toInfectedPlace.

func (*EpidemiologicResultsUpdate) ClearFromInfectedPlace

func (eru *EpidemiologicResultsUpdate) ClearFromInfectedPlace() *EpidemiologicResultsUpdate

ClearFromInfectedPlace clears the value of fromInfectedPlace.

func (*EpidemiologicResultsUpdate) ClearInfectedFamily

func (eru *EpidemiologicResultsUpdate) ClearInfectedFamily() *EpidemiologicResultsUpdate

ClearInfectedFamily clears the value of infectedFamily.

func (*EpidemiologicResultsUpdate) ClearTest

ClearTest clears the test edge to Test.

func (*EpidemiologicResultsUpdate) ClearToInfectedPlace

func (eru *EpidemiologicResultsUpdate) ClearToInfectedPlace() *EpidemiologicResultsUpdate

ClearToInfectedPlace clears the value of toInfectedPlace.

func (*EpidemiologicResultsUpdate) ClearVisitedPlaces

func (eru *EpidemiologicResultsUpdate) ClearVisitedPlaces() *EpidemiologicResultsUpdate

ClearVisitedPlaces clears the value of visitedPlaces.

func (*EpidemiologicResultsUpdate) Exec

Exec executes the query.

func (*EpidemiologicResultsUpdate) ExecX

func (eru *EpidemiologicResultsUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EpidemiologicResultsUpdate) Save

Save executes the query and returns the number of rows/vertices matched by this operation.

func (*EpidemiologicResultsUpdate) SaveX

SaveX is like Save, but panics if an error occurs.

func (*EpidemiologicResultsUpdate) SetFromInfectedPlace

func (eru *EpidemiologicResultsUpdate) SetFromInfectedPlace(i int) *EpidemiologicResultsUpdate

SetFromInfectedPlace sets the fromInfectedPlace field.

func (*EpidemiologicResultsUpdate) SetInfectedFamily

func (eru *EpidemiologicResultsUpdate) SetInfectedFamily(b bool) *EpidemiologicResultsUpdate

SetInfectedFamily sets the infectedFamily field.

func (*EpidemiologicResultsUpdate) SetNillableFromInfectedPlace

func (eru *EpidemiologicResultsUpdate) SetNillableFromInfectedPlace(i *int) *EpidemiologicResultsUpdate

SetNillableFromInfectedPlace sets the fromInfectedPlace field if the given value is not nil.

func (*EpidemiologicResultsUpdate) SetNillableInfectedFamily

func (eru *EpidemiologicResultsUpdate) SetNillableInfectedFamily(b *bool) *EpidemiologicResultsUpdate

SetNillableInfectedFamily sets the infectedFamily field if the given value is not nil.

func (*EpidemiologicResultsUpdate) SetNillableTestID

func (eru *EpidemiologicResultsUpdate) SetNillableTestID(id *uuid.UUID) *EpidemiologicResultsUpdate

SetNillableTestID sets the test edge to Test by id if the given value is not nil.

func (*EpidemiologicResultsUpdate) SetNillableToInfectedPlace

func (eru *EpidemiologicResultsUpdate) SetNillableToInfectedPlace(i *int) *EpidemiologicResultsUpdate

SetNillableToInfectedPlace sets the toInfectedPlace field if the given value is not nil.

func (*EpidemiologicResultsUpdate) SetTest

SetTest sets the test edge to Test.

func (*EpidemiologicResultsUpdate) SetTestID

SetTestID sets the test edge to Test by id.

func (*EpidemiologicResultsUpdate) SetToInfectedPlace

func (eru *EpidemiologicResultsUpdate) SetToInfectedPlace(i int) *EpidemiologicResultsUpdate

SetToInfectedPlace sets the toInfectedPlace field.

func (*EpidemiologicResultsUpdate) SetVisitedPlaces

func (eru *EpidemiologicResultsUpdate) SetVisitedPlaces(s []string) *EpidemiologicResultsUpdate

SetVisitedPlaces sets the visitedPlaces field.

func (*EpidemiologicResultsUpdate) Where

Where adds a new predicate for the builder.

type EpidemiologicResultsUpdateOne

type EpidemiologicResultsUpdateOne struct {
	// contains filtered or unexported fields
}

EpidemiologicResultsUpdateOne is the builder for updating a single EpidemiologicResults entity.

func (*EpidemiologicResultsUpdateOne) AddFromInfectedPlace

func (eruo *EpidemiologicResultsUpdateOne) AddFromInfectedPlace(i int) *EpidemiologicResultsUpdateOne

AddFromInfectedPlace adds i to fromInfectedPlace.

func (*EpidemiologicResultsUpdateOne) AddToInfectedPlace

AddToInfectedPlace adds i to toInfectedPlace.

func (*EpidemiologicResultsUpdateOne) ClearFromInfectedPlace

func (eruo *EpidemiologicResultsUpdateOne) ClearFromInfectedPlace() *EpidemiologicResultsUpdateOne

ClearFromInfectedPlace clears the value of fromInfectedPlace.

func (*EpidemiologicResultsUpdateOne) ClearInfectedFamily

func (eruo *EpidemiologicResultsUpdateOne) ClearInfectedFamily() *EpidemiologicResultsUpdateOne

ClearInfectedFamily clears the value of infectedFamily.

func (*EpidemiologicResultsUpdateOne) ClearTest

ClearTest clears the test edge to Test.

func (*EpidemiologicResultsUpdateOne) ClearToInfectedPlace

func (eruo *EpidemiologicResultsUpdateOne) ClearToInfectedPlace() *EpidemiologicResultsUpdateOne

ClearToInfectedPlace clears the value of toInfectedPlace.

func (*EpidemiologicResultsUpdateOne) ClearVisitedPlaces

ClearVisitedPlaces clears the value of visitedPlaces.

func (*EpidemiologicResultsUpdateOne) Exec

Exec executes the query on the entity.

func (*EpidemiologicResultsUpdateOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*EpidemiologicResultsUpdateOne) Save

Save executes the query and returns the updated entity.

func (*EpidemiologicResultsUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*EpidemiologicResultsUpdateOne) SetFromInfectedPlace

func (eruo *EpidemiologicResultsUpdateOne) SetFromInfectedPlace(i int) *EpidemiologicResultsUpdateOne

SetFromInfectedPlace sets the fromInfectedPlace field.

func (*EpidemiologicResultsUpdateOne) SetInfectedFamily

SetInfectedFamily sets the infectedFamily field.

func (*EpidemiologicResultsUpdateOne) SetNillableFromInfectedPlace

func (eruo *EpidemiologicResultsUpdateOne) SetNillableFromInfectedPlace(i *int) *EpidemiologicResultsUpdateOne

SetNillableFromInfectedPlace sets the fromInfectedPlace field if the given value is not nil.

func (*EpidemiologicResultsUpdateOne) SetNillableInfectedFamily

func (eruo *EpidemiologicResultsUpdateOne) SetNillableInfectedFamily(b *bool) *EpidemiologicResultsUpdateOne

SetNillableInfectedFamily sets the infectedFamily field if the given value is not nil.

func (*EpidemiologicResultsUpdateOne) SetNillableTestID

SetNillableTestID sets the test edge to Test by id if the given value is not nil.

func (*EpidemiologicResultsUpdateOne) SetNillableToInfectedPlace

func (eruo *EpidemiologicResultsUpdateOne) SetNillableToInfectedPlace(i *int) *EpidemiologicResultsUpdateOne

SetNillableToInfectedPlace sets the toInfectedPlace field if the given value is not nil.

func (*EpidemiologicResultsUpdateOne) SetTest

SetTest sets the test edge to Test.

func (*EpidemiologicResultsUpdateOne) SetTestID

SetTestID sets the test edge to Test by id.

func (*EpidemiologicResultsUpdateOne) SetToInfectedPlace

SetToInfectedPlace sets the toInfectedPlace field.

func (*EpidemiologicResultsUpdateOne) SetVisitedPlaces

SetVisitedPlaces sets the visitedPlaces field.

type Histories

type Histories []*History

Histories is a parsable slice of History.

type History

type History struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the HistoryQuery when eager-loading is set.
	Edges HistoryEdges `json:"edges"`
	// contains filtered or unexported fields
}

History is the model entity for the History schema.

func (*History) QueryNotes

func (h *History) QueryNotes() *MedicalNoteQuery

QueryNotes queries the notes edge of the History.

func (*History) QueryPatient

func (h *History) QueryPatient() *PatientQuery

QueryPatient queries the patient edge of the History.

func (*History) QueryTests

func (h *History) QueryTests() *TestQuery

QueryTests queries the tests edge of the History.

func (*History) String

func (h *History) String() string

String implements the fmt.Stringer.

func (*History) Unwrap

func (h *History) Unwrap() *History

Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.

func (*History) Update

func (h *History) Update() *HistoryUpdateOne

Update returns a builder for updating this History. Note that, you need to call History.Unwrap() before calling this method, if this History was returned from a transaction, and the transaction was committed or rolled back.

type HistoryClient

type HistoryClient struct {
	// contains filtered or unexported fields
}

HistoryClient is a client for the History schema.

func NewHistoryClient

func NewHistoryClient(c config) *HistoryClient

NewHistoryClient returns a client for the History from the given config.

func (*HistoryClient) Create

func (c *HistoryClient) Create() *HistoryCreate

Create returns a create builder for History.

func (*HistoryClient) Delete

func (c *HistoryClient) Delete() *HistoryDelete

Delete returns a delete builder for History.

func (*HistoryClient) DeleteOne

func (c *HistoryClient) DeleteOne(h *History) *HistoryDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*HistoryClient) DeleteOneID

func (c *HistoryClient) DeleteOneID(id uuid.UUID) *HistoryDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*HistoryClient) Get

func (c *HistoryClient) Get(ctx context.Context, id uuid.UUID) (*History, error)

Get returns a History entity by its id.

func (*HistoryClient) GetX

func (c *HistoryClient) GetX(ctx context.Context, id uuid.UUID) *History

GetX is like Get, but panics if an error occurs.

func (*HistoryClient) Query

func (c *HistoryClient) Query() *HistoryQuery

Create returns a query builder for History.

func (*HistoryClient) QueryNotes

func (c *HistoryClient) QueryNotes(h *History) *MedicalNoteQuery

QueryNotes queries the notes edge of a History.

func (*HistoryClient) QueryPatient

func (c *HistoryClient) QueryPatient(h *History) *PatientQuery

QueryPatient queries the patient edge of a History.

func (*HistoryClient) QueryTests

func (c *HistoryClient) QueryTests(h *History) *TestQuery

QueryTests queries the tests edge of a History.

func (*HistoryClient) Update

func (c *HistoryClient) Update() *HistoryUpdate

Update returns an update builder for History.

func (*HistoryClient) UpdateOne

func (c *HistoryClient) UpdateOne(h *History) *HistoryUpdateOne

UpdateOne returns an update builder for the given entity.

func (*HistoryClient) UpdateOneID

func (c *HistoryClient) UpdateOneID(id uuid.UUID) *HistoryUpdateOne

UpdateOneID returns an update builder for the given id.

type HistoryCreate

type HistoryCreate struct {
	// contains filtered or unexported fields
}

HistoryCreate is the builder for creating a History entity.

func (*HistoryCreate) AddNoteIDs

func (hc *HistoryCreate) AddNoteIDs(ids ...uuid.UUID) *HistoryCreate

AddNoteIDs adds the notes edge to MedicalNote by ids.

func (*HistoryCreate) AddNotes

func (hc *HistoryCreate) AddNotes(m ...*MedicalNote) *HistoryCreate

AddNotes adds the notes edges to MedicalNote.

func (*HistoryCreate) AddTestIDs

func (hc *HistoryCreate) AddTestIDs(ids ...uuid.UUID) *HistoryCreate

AddTestIDs adds the tests edge to Test by ids.

func (*HistoryCreate) AddTests

func (hc *HistoryCreate) AddTests(t ...*Test) *HistoryCreate

AddTests adds the tests edges to Test.

func (*HistoryCreate) Save

func (hc *HistoryCreate) Save(ctx context.Context) (*History, error)

Save creates the History in the database.

func (*HistoryCreate) SaveX

func (hc *HistoryCreate) SaveX(ctx context.Context) *History

SaveX calls Save and panics if Save returns an error.

func (*HistoryCreate) SetID

func (hc *HistoryCreate) SetID(u uuid.UUID) *HistoryCreate

SetID sets the id field.

func (*HistoryCreate) SetNillablePatientID

func (hc *HistoryCreate) SetNillablePatientID(id *uuid.UUID) *HistoryCreate

SetNillablePatientID sets the patient edge to Patient by id if the given value is not nil.

func (*HistoryCreate) SetPatient

func (hc *HistoryCreate) SetPatient(p *Patient) *HistoryCreate

SetPatient sets the patient edge to Patient.

func (*HistoryCreate) SetPatientID

func (hc *HistoryCreate) SetPatientID(id uuid.UUID) *HistoryCreate

SetPatientID sets the patient edge to Patient by id.

type HistoryDelete

type HistoryDelete struct {
	// contains filtered or unexported fields
}

HistoryDelete is the builder for deleting a History entity.

func (*HistoryDelete) Exec

func (hd *HistoryDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*HistoryDelete) ExecX

func (hd *HistoryDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*HistoryDelete) Where

func (hd *HistoryDelete) Where(ps ...predicate.History) *HistoryDelete

Where adds a new predicate to the delete builder.

type HistoryDeleteOne

type HistoryDeleteOne struct {
	// contains filtered or unexported fields
}

HistoryDeleteOne is the builder for deleting a single History entity.

func (*HistoryDeleteOne) Exec

func (hdo *HistoryDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*HistoryDeleteOne) ExecX

func (hdo *HistoryDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type HistoryEdges

type HistoryEdges struct {
	// Patient holds the value of the patient edge.
	Patient *Patient
	// Tests holds the value of the tests edge.
	Tests []*Test
	// Notes holds the value of the notes edge.
	Notes []*MedicalNote
	// contains filtered or unexported fields
}

HistoryEdges holds the relations/edges for other nodes in the graph.

func (HistoryEdges) NotesOrErr

func (e HistoryEdges) NotesOrErr() ([]*MedicalNote, error)

NotesOrErr returns the Notes value or an error if the edge was not loaded in eager-loading.

func (HistoryEdges) PatientOrErr

func (e HistoryEdges) PatientOrErr() (*Patient, error)

PatientOrErr returns the Patient value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (HistoryEdges) TestsOrErr

func (e HistoryEdges) TestsOrErr() ([]*Test, error)

TestsOrErr returns the Tests value or an error if the edge was not loaded in eager-loading.

type HistoryGroupBy

type HistoryGroupBy struct {
	// contains filtered or unexported fields
}

HistoryGroupBy is the builder for group-by History entities.

func (*HistoryGroupBy) Aggregate

func (hgb *HistoryGroupBy) Aggregate(fns ...Aggregate) *HistoryGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*HistoryGroupBy) Bools

func (hgb *HistoryGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.

func (*HistoryGroupBy) BoolsX

func (hgb *HistoryGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*HistoryGroupBy) Float64s

func (hgb *HistoryGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.

func (*HistoryGroupBy) Float64sX

func (hgb *HistoryGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*HistoryGroupBy) Ints

func (hgb *HistoryGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.

func (*HistoryGroupBy) IntsX

func (hgb *HistoryGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*HistoryGroupBy) Scan

func (hgb *HistoryGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scan the result into the given value.

func (*HistoryGroupBy) ScanX

func (hgb *HistoryGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*HistoryGroupBy) Strings

func (hgb *HistoryGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when querying group-by with one field.

func (*HistoryGroupBy) StringsX

func (hgb *HistoryGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type HistoryQuery

type HistoryQuery struct {
	// contains filtered or unexported fields
}

HistoryQuery is the builder for querying History entities.

func (*HistoryQuery) All

func (hq *HistoryQuery) All(ctx context.Context) ([]*History, error)

All executes the query and returns a list of Histories.

func (*HistoryQuery) AllX

func (hq *HistoryQuery) AllX(ctx context.Context) []*History

AllX is like All, but panics if an error occurs.

func (*HistoryQuery) Clone

func (hq *HistoryQuery) Clone() *HistoryQuery

Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*HistoryQuery) Count

func (hq *HistoryQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*HistoryQuery) CountX

func (hq *HistoryQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*HistoryQuery) Exist

func (hq *HistoryQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*HistoryQuery) ExistX

func (hq *HistoryQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*HistoryQuery) First

func (hq *HistoryQuery) First(ctx context.Context) (*History, error)

First returns the first History entity in the query. Returns *NotFoundError when no history was found.

func (*HistoryQuery) FirstID

func (hq *HistoryQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first History id in the query. Returns *NotFoundError when no id was found.

func (*HistoryQuery) FirstX

func (hq *HistoryQuery) FirstX(ctx context.Context) *History

FirstX is like First, but panics if an error occurs.

func (*HistoryQuery) FirstXID

func (hq *HistoryQuery) FirstXID(ctx context.Context) uuid.UUID

FirstXID is like FirstID, but panics if an error occurs.

func (*HistoryQuery) GroupBy

func (hq *HistoryQuery) GroupBy(field string, fields ...string) *HistoryGroupBy

GroupBy used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

func (*HistoryQuery) IDs

func (hq *HistoryQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of History ids.

func (*HistoryQuery) IDsX

func (hq *HistoryQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*HistoryQuery) Limit

func (hq *HistoryQuery) Limit(limit int) *HistoryQuery

Limit adds a limit step to the query.

func (*HistoryQuery) Offset

func (hq *HistoryQuery) Offset(offset int) *HistoryQuery

Offset adds an offset step to the query.

func (*HistoryQuery) Only

func (hq *HistoryQuery) Only(ctx context.Context) (*History, error)

Only returns the only History entity in the query, returns an error if not exactly one entity was returned.

func (*HistoryQuery) OnlyID

func (hq *HistoryQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID returns the only History id in the query, returns an error if not exactly one id was returned.

func (*HistoryQuery) OnlyX

func (hq *HistoryQuery) OnlyX(ctx context.Context) *History

OnlyX is like Only, but panics if an error occurs.

func (*HistoryQuery) OnlyXID

func (hq *HistoryQuery) OnlyXID(ctx context.Context) uuid.UUID

OnlyXID is like OnlyID, but panics if an error occurs.

func (*HistoryQuery) Order

func (hq *HistoryQuery) Order(o ...Order) *HistoryQuery

Order adds an order step to the query.

func (*HistoryQuery) QueryNotes

func (hq *HistoryQuery) QueryNotes() *MedicalNoteQuery

QueryNotes chains the current query on the notes edge.

func (*HistoryQuery) QueryPatient

func (hq *HistoryQuery) QueryPatient() *PatientQuery

QueryPatient chains the current query on the patient edge.

func (*HistoryQuery) QueryTests

func (hq *HistoryQuery) QueryTests() *TestQuery

QueryTests chains the current query on the tests edge.

func (*HistoryQuery) Select

func (hq *HistoryQuery) Select(field string, fields ...string) *HistorySelect

Select one or more fields from the given query.

func (*HistoryQuery) Where

func (hq *HistoryQuery) Where(ps ...predicate.History) *HistoryQuery

Where adds a new predicate for the builder.

func (*HistoryQuery) WithNotes

func (hq *HistoryQuery) WithNotes(opts ...func(*MedicalNoteQuery)) *HistoryQuery
WithNotes tells the query-builder to eager-loads the nodes that are connected to

the "notes" edge. The optional arguments used to configure the query builder of the edge.

func (*HistoryQuery) WithPatient

func (hq *HistoryQuery) WithPatient(opts ...func(*PatientQuery)) *HistoryQuery
WithPatient tells the query-builder to eager-loads the nodes that are connected to

the "patient" edge. The optional arguments used to configure the query builder of the edge.

func (*HistoryQuery) WithTests

func (hq *HistoryQuery) WithTests(opts ...func(*TestQuery)) *HistoryQuery
WithTests tells the query-builder to eager-loads the nodes that are connected to

the "tests" edge. The optional arguments used to configure the query builder of the edge.

type HistorySelect

type HistorySelect struct {
	// contains filtered or unexported fields
}

HistorySelect is the builder for select fields of History entities.

func (*HistorySelect) Bools

func (hs *HistorySelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from selector. It is only allowed when selecting one field.

func (*HistorySelect) BoolsX

func (hs *HistorySelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*HistorySelect) Float64s

func (hs *HistorySelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from selector. It is only allowed when selecting one field.

func (*HistorySelect) Float64sX

func (hs *HistorySelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*HistorySelect) Ints

func (hs *HistorySelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from selector. It is only allowed when selecting one field.

func (*HistorySelect) IntsX

func (hs *HistorySelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*HistorySelect) Scan

func (hs *HistorySelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scan the result into the given value.

func (*HistorySelect) ScanX

func (hs *HistorySelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*HistorySelect) Strings

func (hs *HistorySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from selector. It is only allowed when selecting one field.

func (*HistorySelect) StringsX

func (hs *HistorySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type HistoryUpdate

type HistoryUpdate struct {
	// contains filtered or unexported fields
}

HistoryUpdate is the builder for updating History entities.

func (*HistoryUpdate) AddNoteIDs

func (hu *HistoryUpdate) AddNoteIDs(ids ...uuid.UUID) *HistoryUpdate

AddNoteIDs adds the notes edge to MedicalNote by ids.

func (*HistoryUpdate) AddNotes

func (hu *HistoryUpdate) AddNotes(m ...*MedicalNote) *HistoryUpdate

AddNotes adds the notes edges to MedicalNote.

func (*HistoryUpdate) AddTestIDs

func (hu *HistoryUpdate) AddTestIDs(ids ...uuid.UUID) *HistoryUpdate

AddTestIDs adds the tests edge to Test by ids.

func (*HistoryUpdate) AddTests

func (hu *HistoryUpdate) AddTests(t ...*Test) *HistoryUpdate

AddTests adds the tests edges to Test.

func (*HistoryUpdate) ClearPatient

func (hu *HistoryUpdate) ClearPatient() *HistoryUpdate

ClearPatient clears the patient edge to Patient.

func (*HistoryUpdate) Exec

func (hu *HistoryUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*HistoryUpdate) ExecX

func (hu *HistoryUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HistoryUpdate) RemoveNoteIDs

func (hu *HistoryUpdate) RemoveNoteIDs(ids ...uuid.UUID) *HistoryUpdate

RemoveNoteIDs removes the notes edge to MedicalNote by ids.

func (*HistoryUpdate) RemoveNotes

func (hu *HistoryUpdate) RemoveNotes(m ...*MedicalNote) *HistoryUpdate

RemoveNotes removes notes edges to MedicalNote.

func (*HistoryUpdate) RemoveTestIDs

func (hu *HistoryUpdate) RemoveTestIDs(ids ...uuid.UUID) *HistoryUpdate

RemoveTestIDs removes the tests edge to Test by ids.

func (*HistoryUpdate) RemoveTests

func (hu *HistoryUpdate) RemoveTests(t ...*Test) *HistoryUpdate

RemoveTests removes tests edges to Test.

func (*HistoryUpdate) Save

func (hu *HistoryUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of rows/vertices matched by this operation.

func (*HistoryUpdate) SaveX

func (hu *HistoryUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*HistoryUpdate) SetNillablePatientID

func (hu *HistoryUpdate) SetNillablePatientID(id *uuid.UUID) *HistoryUpdate

SetNillablePatientID sets the patient edge to Patient by id if the given value is not nil.

func (*HistoryUpdate) SetPatient

func (hu *HistoryUpdate) SetPatient(p *Patient) *HistoryUpdate

SetPatient sets the patient edge to Patient.

func (*HistoryUpdate) SetPatientID

func (hu *HistoryUpdate) SetPatientID(id uuid.UUID) *HistoryUpdate

SetPatientID sets the patient edge to Patient by id.

func (*HistoryUpdate) Where

func (hu *HistoryUpdate) Where(ps ...predicate.History) *HistoryUpdate

Where adds a new predicate for the builder.

type HistoryUpdateOne

type HistoryUpdateOne struct {
	// contains filtered or unexported fields
}

HistoryUpdateOne is the builder for updating a single History entity.

func (*HistoryUpdateOne) AddNoteIDs

func (huo *HistoryUpdateOne) AddNoteIDs(ids ...uuid.UUID) *HistoryUpdateOne

AddNoteIDs adds the notes edge to MedicalNote by ids.

func (*HistoryUpdateOne) AddNotes

func (huo *HistoryUpdateOne) AddNotes(m ...*MedicalNote) *HistoryUpdateOne

AddNotes adds the notes edges to MedicalNote.

func (*HistoryUpdateOne) AddTestIDs

func (huo *HistoryUpdateOne) AddTestIDs(ids ...uuid.UUID) *HistoryUpdateOne

AddTestIDs adds the tests edge to Test by ids.

func (*HistoryUpdateOne) AddTests

func (huo *HistoryUpdateOne) AddTests(t ...*Test) *HistoryUpdateOne

AddTests adds the tests edges to Test.

func (*HistoryUpdateOne) ClearPatient

func (huo *HistoryUpdateOne) ClearPatient() *HistoryUpdateOne

ClearPatient clears the patient edge to Patient.

func (*HistoryUpdateOne) Exec

func (huo *HistoryUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*HistoryUpdateOne) ExecX

func (huo *HistoryUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*HistoryUpdateOne) RemoveNoteIDs

func (huo *HistoryUpdateOne) RemoveNoteIDs(ids ...uuid.UUID) *HistoryUpdateOne

RemoveNoteIDs removes the notes edge to MedicalNote by ids.

func (*HistoryUpdateOne) RemoveNotes

func (huo *HistoryUpdateOne) RemoveNotes(m ...*MedicalNote) *HistoryUpdateOne

RemoveNotes removes notes edges to MedicalNote.

func (*HistoryUpdateOne) RemoveTestIDs

func (huo *HistoryUpdateOne) RemoveTestIDs(ids ...uuid.UUID) *HistoryUpdateOne

RemoveTestIDs removes the tests edge to Test by ids.

func (*HistoryUpdateOne) RemoveTests

func (huo *HistoryUpdateOne) RemoveTests(t ...*Test) *HistoryUpdateOne

RemoveTests removes tests edges to Test.

func (*HistoryUpdateOne) Save

func (huo *HistoryUpdateOne) Save(ctx context.Context) (*History, error)

Save executes the query and returns the updated entity.

func (*HistoryUpdateOne) SaveX

func (huo *HistoryUpdateOne) SaveX(ctx context.Context) *History

SaveX is like Save, but panics if an error occurs.

func (*HistoryUpdateOne) SetNillablePatientID

func (huo *HistoryUpdateOne) SetNillablePatientID(id *uuid.UUID) *HistoryUpdateOne

SetNillablePatientID sets the patient edge to Patient by id if the given value is not nil.

func (*HistoryUpdateOne) SetPatient

func (huo *HistoryUpdateOne) SetPatient(p *Patient) *HistoryUpdateOne

SetPatient sets the patient edge to Patient.

func (*HistoryUpdateOne) SetPatientID

func (huo *HistoryUpdateOne) SetPatientID(id uuid.UUID) *HistoryUpdateOne

SetPatientID sets the patient edge to Patient by id.

type MedicalNote

type MedicalNote struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// At holds the value of the "at" field.
	At time.Time `json:"at,omitempty"`
	// LastChange holds the value of the "lastChange" field.
	LastChange time.Time `json:"lastChange,omitempty"`
	// Observations holds the value of the "observations" field.
	Observations []string `json:"observations,omitempty"`
	// Meta holds the value of the "meta" field.
	Meta []string `json:"meta,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MedicalNoteQuery when eager-loading is set.
	Edges MedicalNoteEdges `json:"edges"`
	// contains filtered or unexported fields
}

MedicalNote is the model entity for the MedicalNote schema.

func (*MedicalNote) QueryHistory

func (mn *MedicalNote) QueryHistory() *HistoryQuery

QueryHistory queries the history edge of the MedicalNote.

func (*MedicalNote) QueryOwner

func (mn *MedicalNote) QueryOwner() *DoctorQuery

QueryOwner queries the owner edge of the MedicalNote.

func (*MedicalNote) String

func (mn *MedicalNote) String() string

String implements the fmt.Stringer.

func (*MedicalNote) Unwrap

func (mn *MedicalNote) Unwrap() *MedicalNote

Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.

func (*MedicalNote) Update

func (mn *MedicalNote) Update() *MedicalNoteUpdateOne

Update returns a builder for updating this MedicalNote. Note that, you need to call MedicalNote.Unwrap() before calling this method, if this MedicalNote was returned from a transaction, and the transaction was committed or rolled back.

type MedicalNoteClient

type MedicalNoteClient struct {
	// contains filtered or unexported fields
}

MedicalNoteClient is a client for the MedicalNote schema.

func NewMedicalNoteClient

func NewMedicalNoteClient(c config) *MedicalNoteClient

NewMedicalNoteClient returns a client for the MedicalNote from the given config.

func (*MedicalNoteClient) Create

func (c *MedicalNoteClient) Create() *MedicalNoteCreate

Create returns a create builder for MedicalNote.

func (*MedicalNoteClient) Delete

func (c *MedicalNoteClient) Delete() *MedicalNoteDelete

Delete returns a delete builder for MedicalNote.

func (*MedicalNoteClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*MedicalNoteClient) DeleteOneID

func (c *MedicalNoteClient) DeleteOneID(id uuid.UUID) *MedicalNoteDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*MedicalNoteClient) Get

Get returns a MedicalNote entity by its id.

func (*MedicalNoteClient) GetX

GetX is like Get, but panics if an error occurs.

func (*MedicalNoteClient) Query

func (c *MedicalNoteClient) Query() *MedicalNoteQuery

Create returns a query builder for MedicalNote.

func (*MedicalNoteClient) QueryHistory

func (c *MedicalNoteClient) QueryHistory(mn *MedicalNote) *HistoryQuery

QueryHistory queries the history edge of a MedicalNote.

func (*MedicalNoteClient) QueryOwner

func (c *MedicalNoteClient) QueryOwner(mn *MedicalNote) *DoctorQuery

QueryOwner queries the owner edge of a MedicalNote.

func (*MedicalNoteClient) Update

func (c *MedicalNoteClient) Update() *MedicalNoteUpdate

Update returns an update builder for MedicalNote.

func (*MedicalNoteClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*MedicalNoteClient) UpdateOneID

func (c *MedicalNoteClient) UpdateOneID(id uuid.UUID) *MedicalNoteUpdateOne

UpdateOneID returns an update builder for the given id.

type MedicalNoteCreate

type MedicalNoteCreate struct {
	// contains filtered or unexported fields
}

MedicalNoteCreate is the builder for creating a MedicalNote entity.

func (*MedicalNoteCreate) Save

func (mnc *MedicalNoteCreate) Save(ctx context.Context) (*MedicalNote, error)

Save creates the MedicalNote in the database.

func (*MedicalNoteCreate) SaveX

func (mnc *MedicalNoteCreate) SaveX(ctx context.Context) *MedicalNote

SaveX calls Save and panics if Save returns an error.

func (*MedicalNoteCreate) SetAt

SetAt sets the at field.

func (*MedicalNoteCreate) SetHistory

func (mnc *MedicalNoteCreate) SetHistory(h *History) *MedicalNoteCreate

SetHistory sets the history edge to History.

func (*MedicalNoteCreate) SetHistoryID

func (mnc *MedicalNoteCreate) SetHistoryID(id uuid.UUID) *MedicalNoteCreate

SetHistoryID sets the history edge to History by id.

func (*MedicalNoteCreate) SetID

SetID sets the id field.

func (*MedicalNoteCreate) SetLastChange

func (mnc *MedicalNoteCreate) SetLastChange(t time.Time) *MedicalNoteCreate

SetLastChange sets the lastChange field.

func (*MedicalNoteCreate) SetMeta

func (mnc *MedicalNoteCreate) SetMeta(s []string) *MedicalNoteCreate

SetMeta sets the meta field.

func (*MedicalNoteCreate) SetNillableAt

func (mnc *MedicalNoteCreate) SetNillableAt(t *time.Time) *MedicalNoteCreate

SetNillableAt sets the at field if the given value is not nil.

func (*MedicalNoteCreate) SetNillableHistoryID

func (mnc *MedicalNoteCreate) SetNillableHistoryID(id *uuid.UUID) *MedicalNoteCreate

SetNillableHistoryID sets the history edge to History by id if the given value is not nil.

func (*MedicalNoteCreate) SetNillableLastChange

func (mnc *MedicalNoteCreate) SetNillableLastChange(t *time.Time) *MedicalNoteCreate

SetNillableLastChange sets the lastChange field if the given value is not nil.

func (*MedicalNoteCreate) SetNillableOwnerID

func (mnc *MedicalNoteCreate) SetNillableOwnerID(id *uuid.UUID) *MedicalNoteCreate

SetNillableOwnerID sets the owner edge to Doctor by id if the given value is not nil.

func (*MedicalNoteCreate) SetObservations

func (mnc *MedicalNoteCreate) SetObservations(s []string) *MedicalNoteCreate

SetObservations sets the observations field.

func (*MedicalNoteCreate) SetOwner

func (mnc *MedicalNoteCreate) SetOwner(d *Doctor) *MedicalNoteCreate

SetOwner sets the owner edge to Doctor.

func (*MedicalNoteCreate) SetOwnerID

func (mnc *MedicalNoteCreate) SetOwnerID(id uuid.UUID) *MedicalNoteCreate

SetOwnerID sets the owner edge to Doctor by id.

type MedicalNoteDelete

type MedicalNoteDelete struct {
	// contains filtered or unexported fields
}

MedicalNoteDelete is the builder for deleting a MedicalNote entity.

func (*MedicalNoteDelete) Exec

func (mnd *MedicalNoteDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*MedicalNoteDelete) ExecX

func (mnd *MedicalNoteDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*MedicalNoteDelete) Where

Where adds a new predicate to the delete builder.

type MedicalNoteDeleteOne

type MedicalNoteDeleteOne struct {
	// contains filtered or unexported fields
}

MedicalNoteDeleteOne is the builder for deleting a single MedicalNote entity.

func (*MedicalNoteDeleteOne) Exec

func (mndo *MedicalNoteDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MedicalNoteDeleteOne) ExecX

func (mndo *MedicalNoteDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type MedicalNoteEdges

type MedicalNoteEdges struct {
	// History holds the value of the history edge.
	History *History
	// Owner holds the value of the owner edge.
	Owner *Doctor
	// contains filtered or unexported fields
}

MedicalNoteEdges holds the relations/edges for other nodes in the graph.

func (MedicalNoteEdges) HistoryOrErr

func (e MedicalNoteEdges) HistoryOrErr() (*History, error)

HistoryOrErr returns the History value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (MedicalNoteEdges) OwnerOrErr

func (e MedicalNoteEdges) OwnerOrErr() (*Doctor, error)

OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type MedicalNoteGroupBy

type MedicalNoteGroupBy struct {
	// contains filtered or unexported fields
}

MedicalNoteGroupBy is the builder for group-by MedicalNote entities.

func (*MedicalNoteGroupBy) Aggregate

func (mngb *MedicalNoteGroupBy) Aggregate(fns ...Aggregate) *MedicalNoteGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*MedicalNoteGroupBy) Bools

func (mngb *MedicalNoteGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.

func (*MedicalNoteGroupBy) BoolsX

func (mngb *MedicalNoteGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MedicalNoteGroupBy) Float64s

func (mngb *MedicalNoteGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.

func (*MedicalNoteGroupBy) Float64sX

func (mngb *MedicalNoteGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MedicalNoteGroupBy) Ints

func (mngb *MedicalNoteGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.

func (*MedicalNoteGroupBy) IntsX

func (mngb *MedicalNoteGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MedicalNoteGroupBy) Scan

func (mngb *MedicalNoteGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scan the result into the given value.

func (*MedicalNoteGroupBy) ScanX

func (mngb *MedicalNoteGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*MedicalNoteGroupBy) Strings

func (mngb *MedicalNoteGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when querying group-by with one field.

func (*MedicalNoteGroupBy) StringsX

func (mngb *MedicalNoteGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MedicalNoteQuery

type MedicalNoteQuery struct {
	// contains filtered or unexported fields
}

MedicalNoteQuery is the builder for querying MedicalNote entities.

func (*MedicalNoteQuery) All

func (mnq *MedicalNoteQuery) All(ctx context.Context) ([]*MedicalNote, error)

All executes the query and returns a list of MedicalNotes.

func (*MedicalNoteQuery) AllX

func (mnq *MedicalNoteQuery) AllX(ctx context.Context) []*MedicalNote

AllX is like All, but panics if an error occurs.

func (*MedicalNoteQuery) Clone

func (mnq *MedicalNoteQuery) Clone() *MedicalNoteQuery

Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*MedicalNoteQuery) Count

func (mnq *MedicalNoteQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MedicalNoteQuery) CountX

func (mnq *MedicalNoteQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*MedicalNoteQuery) Exist

func (mnq *MedicalNoteQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*MedicalNoteQuery) ExistX

func (mnq *MedicalNoteQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*MedicalNoteQuery) First

func (mnq *MedicalNoteQuery) First(ctx context.Context) (*MedicalNote, error)

First returns the first MedicalNote entity in the query. Returns *NotFoundError when no medicalnote was found.

func (*MedicalNoteQuery) FirstID

func (mnq *MedicalNoteQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first MedicalNote id in the query. Returns *NotFoundError when no id was found.

func (*MedicalNoteQuery) FirstX

func (mnq *MedicalNoteQuery) FirstX(ctx context.Context) *MedicalNote

FirstX is like First, but panics if an error occurs.

func (*MedicalNoteQuery) FirstXID

func (mnq *MedicalNoteQuery) FirstXID(ctx context.Context) uuid.UUID

FirstXID is like FirstID, but panics if an error occurs.

func (*MedicalNoteQuery) GroupBy

func (mnq *MedicalNoteQuery) GroupBy(field string, fields ...string) *MedicalNoteGroupBy

GroupBy used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	At time.Time `json:"at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.MedicalNote.Query().
	GroupBy(medicalnote.FieldAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MedicalNoteQuery) IDs

func (mnq *MedicalNoteQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of MedicalNote ids.

func (*MedicalNoteQuery) IDsX

func (mnq *MedicalNoteQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*MedicalNoteQuery) Limit

func (mnq *MedicalNoteQuery) Limit(limit int) *MedicalNoteQuery

Limit adds a limit step to the query.

func (*MedicalNoteQuery) Offset

func (mnq *MedicalNoteQuery) Offset(offset int) *MedicalNoteQuery

Offset adds an offset step to the query.

func (*MedicalNoteQuery) Only

func (mnq *MedicalNoteQuery) Only(ctx context.Context) (*MedicalNote, error)

Only returns the only MedicalNote entity in the query, returns an error if not exactly one entity was returned.

func (*MedicalNoteQuery) OnlyID

func (mnq *MedicalNoteQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID returns the only MedicalNote id in the query, returns an error if not exactly one id was returned.

func (*MedicalNoteQuery) OnlyX

func (mnq *MedicalNoteQuery) OnlyX(ctx context.Context) *MedicalNote

OnlyX is like Only, but panics if an error occurs.

func (*MedicalNoteQuery) OnlyXID

func (mnq *MedicalNoteQuery) OnlyXID(ctx context.Context) uuid.UUID

OnlyXID is like OnlyID, but panics if an error occurs.

func (*MedicalNoteQuery) Order

func (mnq *MedicalNoteQuery) Order(o ...Order) *MedicalNoteQuery

Order adds an order step to the query.

func (*MedicalNoteQuery) QueryHistory

func (mnq *MedicalNoteQuery) QueryHistory() *HistoryQuery

QueryHistory chains the current query on the history edge.

func (*MedicalNoteQuery) QueryOwner

func (mnq *MedicalNoteQuery) QueryOwner() *DoctorQuery

QueryOwner chains the current query on the owner edge.

func (*MedicalNoteQuery) Select

func (mnq *MedicalNoteQuery) Select(field string, fields ...string) *MedicalNoteSelect

Select one or more fields from the given query.

Example:

var v []struct {
	At time.Time `json:"at,omitempty"`
}

client.MedicalNote.Query().
	Select(medicalnote.FieldAt).
	Scan(ctx, &v)

func (*MedicalNoteQuery) Where

Where adds a new predicate for the builder.

func (*MedicalNoteQuery) WithHistory

func (mnq *MedicalNoteQuery) WithHistory(opts ...func(*HistoryQuery)) *MedicalNoteQuery
WithHistory tells the query-builder to eager-loads the nodes that are connected to

the "history" edge. The optional arguments used to configure the query builder of the edge.

func (*MedicalNoteQuery) WithOwner

func (mnq *MedicalNoteQuery) WithOwner(opts ...func(*DoctorQuery)) *MedicalNoteQuery
WithOwner tells the query-builder to eager-loads the nodes that are connected to

the "owner" edge. The optional arguments used to configure the query builder of the edge.

type MedicalNoteSelect

type MedicalNoteSelect struct {
	// contains filtered or unexported fields
}

MedicalNoteSelect is the builder for select fields of MedicalNote entities.

func (*MedicalNoteSelect) Bools

func (mns *MedicalNoteSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from selector. It is only allowed when selecting one field.

func (*MedicalNoteSelect) BoolsX

func (mns *MedicalNoteSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MedicalNoteSelect) Float64s

func (mns *MedicalNoteSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from selector. It is only allowed when selecting one field.

func (*MedicalNoteSelect) Float64sX

func (mns *MedicalNoteSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MedicalNoteSelect) Ints

func (mns *MedicalNoteSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from selector. It is only allowed when selecting one field.

func (*MedicalNoteSelect) IntsX

func (mns *MedicalNoteSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MedicalNoteSelect) Scan

func (mns *MedicalNoteSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scan the result into the given value.

func (*MedicalNoteSelect) ScanX

func (mns *MedicalNoteSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*MedicalNoteSelect) Strings

func (mns *MedicalNoteSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from selector. It is only allowed when selecting one field.

func (*MedicalNoteSelect) StringsX

func (mns *MedicalNoteSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MedicalNoteUpdate

type MedicalNoteUpdate struct {
	// contains filtered or unexported fields
}

MedicalNoteUpdate is the builder for updating MedicalNote entities.

func (*MedicalNoteUpdate) ClearHistory

func (mnu *MedicalNoteUpdate) ClearHistory() *MedicalNoteUpdate

ClearHistory clears the history edge to History.

func (*MedicalNoteUpdate) ClearMeta

func (mnu *MedicalNoteUpdate) ClearMeta() *MedicalNoteUpdate

ClearMeta clears the value of meta.

func (*MedicalNoteUpdate) ClearOwner

func (mnu *MedicalNoteUpdate) ClearOwner() *MedicalNoteUpdate

ClearOwner clears the owner edge to Doctor.

func (*MedicalNoteUpdate) Exec

func (mnu *MedicalNoteUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MedicalNoteUpdate) ExecX

func (mnu *MedicalNoteUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MedicalNoteUpdate) Save

func (mnu *MedicalNoteUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of rows/vertices matched by this operation.

func (*MedicalNoteUpdate) SaveX

func (mnu *MedicalNoteUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MedicalNoteUpdate) SetAt

SetAt sets the at field.

func (*MedicalNoteUpdate) SetHistory

func (mnu *MedicalNoteUpdate) SetHistory(h *History) *MedicalNoteUpdate

SetHistory sets the history edge to History.

func (*MedicalNoteUpdate) SetHistoryID

func (mnu *MedicalNoteUpdate) SetHistoryID(id uuid.UUID) *MedicalNoteUpdate

SetHistoryID sets the history edge to History by id.

func (*MedicalNoteUpdate) SetLastChange

func (mnu *MedicalNoteUpdate) SetLastChange(t time.Time) *MedicalNoteUpdate

SetLastChange sets the lastChange field.

func (*MedicalNoteUpdate) SetMeta

func (mnu *MedicalNoteUpdate) SetMeta(s []string) *MedicalNoteUpdate

SetMeta sets the meta field.

func (*MedicalNoteUpdate) SetNillableAt

func (mnu *MedicalNoteUpdate) SetNillableAt(t *time.Time) *MedicalNoteUpdate

SetNillableAt sets the at field if the given value is not nil.

func (*MedicalNoteUpdate) SetNillableHistoryID

func (mnu *MedicalNoteUpdate) SetNillableHistoryID(id *uuid.UUID) *MedicalNoteUpdate

SetNillableHistoryID sets the history edge to History by id if the given value is not nil.

func (*MedicalNoteUpdate) SetNillableLastChange

func (mnu *MedicalNoteUpdate) SetNillableLastChange(t *time.Time) *MedicalNoteUpdate

SetNillableLastChange sets the lastChange field if the given value is not nil.

func (*MedicalNoteUpdate) SetNillableOwnerID

func (mnu *MedicalNoteUpdate) SetNillableOwnerID(id *uuid.UUID) *MedicalNoteUpdate

SetNillableOwnerID sets the owner edge to Doctor by id if the given value is not nil.

func (*MedicalNoteUpdate) SetObservations

func (mnu *MedicalNoteUpdate) SetObservations(s []string) *MedicalNoteUpdate

SetObservations sets the observations field.

func (*MedicalNoteUpdate) SetOwner

func (mnu *MedicalNoteUpdate) SetOwner(d *Doctor) *MedicalNoteUpdate

SetOwner sets the owner edge to Doctor.

func (*MedicalNoteUpdate) SetOwnerID

func (mnu *MedicalNoteUpdate) SetOwnerID(id uuid.UUID) *MedicalNoteUpdate

SetOwnerID sets the owner edge to Doctor by id.

func (*MedicalNoteUpdate) Where

Where adds a new predicate for the builder.

type MedicalNoteUpdateOne

type MedicalNoteUpdateOne struct {
	// contains filtered or unexported fields
}

MedicalNoteUpdateOne is the builder for updating a single MedicalNote entity.

func (*MedicalNoteUpdateOne) ClearHistory

func (mnuo *MedicalNoteUpdateOne) ClearHistory() *MedicalNoteUpdateOne

ClearHistory clears the history edge to History.

func (*MedicalNoteUpdateOne) ClearMeta

func (mnuo *MedicalNoteUpdateOne) ClearMeta() *MedicalNoteUpdateOne

ClearMeta clears the value of meta.

func (*MedicalNoteUpdateOne) ClearOwner

func (mnuo *MedicalNoteUpdateOne) ClearOwner() *MedicalNoteUpdateOne

ClearOwner clears the owner edge to Doctor.

func (*MedicalNoteUpdateOne) Exec

func (mnuo *MedicalNoteUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MedicalNoteUpdateOne) ExecX

func (mnuo *MedicalNoteUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MedicalNoteUpdateOne) Save

Save executes the query and returns the updated entity.

func (*MedicalNoteUpdateOne) SaveX

func (mnuo *MedicalNoteUpdateOne) SaveX(ctx context.Context) *MedicalNote

SaveX is like Save, but panics if an error occurs.

func (*MedicalNoteUpdateOne) SetAt

SetAt sets the at field.

func (*MedicalNoteUpdateOne) SetHistory

func (mnuo *MedicalNoteUpdateOne) SetHistory(h *History) *MedicalNoteUpdateOne

SetHistory sets the history edge to History.

func (*MedicalNoteUpdateOne) SetHistoryID

func (mnuo *MedicalNoteUpdateOne) SetHistoryID(id uuid.UUID) *MedicalNoteUpdateOne

SetHistoryID sets the history edge to History by id.

func (*MedicalNoteUpdateOne) SetLastChange

func (mnuo *MedicalNoteUpdateOne) SetLastChange(t time.Time) *MedicalNoteUpdateOne

SetLastChange sets the lastChange field.

func (*MedicalNoteUpdateOne) SetMeta

func (mnuo *MedicalNoteUpdateOne) SetMeta(s []string) *MedicalNoteUpdateOne

SetMeta sets the meta field.

func (*MedicalNoteUpdateOne) SetNillableAt

func (mnuo *MedicalNoteUpdateOne) SetNillableAt(t *time.Time) *MedicalNoteUpdateOne

SetNillableAt sets the at field if the given value is not nil.

func (*MedicalNoteUpdateOne) SetNillableHistoryID

func (mnuo *MedicalNoteUpdateOne) SetNillableHistoryID(id *uuid.UUID) *MedicalNoteUpdateOne

SetNillableHistoryID sets the history edge to History by id if the given value is not nil.

func (*MedicalNoteUpdateOne) SetNillableLastChange

func (mnuo *MedicalNoteUpdateOne) SetNillableLastChange(t *time.Time) *MedicalNoteUpdateOne

SetNillableLastChange sets the lastChange field if the given value is not nil.

func (*MedicalNoteUpdateOne) SetNillableOwnerID

func (mnuo *MedicalNoteUpdateOne) SetNillableOwnerID(id *uuid.UUID) *MedicalNoteUpdateOne

SetNillableOwnerID sets the owner edge to Doctor by id if the given value is not nil.

func (*MedicalNoteUpdateOne) SetObservations

func (mnuo *MedicalNoteUpdateOne) SetObservations(s []string) *MedicalNoteUpdateOne

SetObservations sets the observations field.

func (*MedicalNoteUpdateOne) SetOwner

func (mnuo *MedicalNoteUpdateOne) SetOwner(d *Doctor) *MedicalNoteUpdateOne

SetOwner sets the owner edge to Doctor.

func (*MedicalNoteUpdateOne) SetOwnerID

func (mnuo *MedicalNoteUpdateOne) SetOwnerID(id uuid.UUID) *MedicalNoteUpdateOne

SetOwnerID sets the owner edge to Doctor by id.

type MedicalNotes

type MedicalNotes []*MedicalNote

MedicalNotes is a parsable slice of MedicalNote.

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 Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...interface{})) Option

Log sets the logging function for debug mode.

type Order

type Order func(*sql.Selector)

Order applies an ordering on either graph traversal or sql selector.

func Asc

func Asc(fields ...string) Order

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) Order

Desc applies the given fields in DESC order.

type Patient

type Patient struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Phone holds the value of the "phone" field.
	Phone string `json:"phone,omitempty"`
	// Age holds the value of the "age" field.
	Age int `json:"age,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// Password holds the value of the "password" field.
	Password string `json:"-"`
	// FacebookID holds the value of the "facebookID" field.
	FacebookID string `json:"facebookID,omitempty"`
	// WatsonID holds the value of the "watsonID" field.
	WatsonID string `json:"watsonID,omitempty"`
	// FirstContact holds the value of the "first_contact" field.
	FirstContact time.Time `json:"first_contact,omitempty"`
	// Conditions holds the value of the "conditions" field.
	Conditions []string `json:"conditions,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the PatientQuery when eager-loading is set.
	Edges PatientEdges `json:"edges"`
	// contains filtered or unexported fields
}

Patient is the model entity for the Patient schema.

func (*Patient) QueryHistory

func (pa *Patient) QueryHistory() *HistoryQuery

QueryHistory queries the history edge of the Patient.

func (*Patient) QuerySchedule

func (pa *Patient) QuerySchedule() *ScheduleQuery

QuerySchedule queries the schedule edge of the Patient.

func (*Patient) String

func (pa *Patient) String() string

String implements the fmt.Stringer.

func (*Patient) Unwrap

func (pa *Patient) Unwrap() *Patient

Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.

func (*Patient) Update

func (pa *Patient) Update() *PatientUpdateOne

Update returns a builder for updating this Patient. Note that, you need to call Patient.Unwrap() before calling this method, if this Patient was returned from a transaction, and the transaction was committed or rolled back.

type PatientClient

type PatientClient struct {
	// contains filtered or unexported fields
}

PatientClient is a client for the Patient schema.

func NewPatientClient

func NewPatientClient(c config) *PatientClient

NewPatientClient returns a client for the Patient from the given config.

func (*PatientClient) Create

func (c *PatientClient) Create() *PatientCreate

Create returns a create builder for Patient.

func (*PatientClient) Delete

func (c *PatientClient) Delete() *PatientDelete

Delete returns a delete builder for Patient.

func (*PatientClient) DeleteOne

func (c *PatientClient) DeleteOne(pa *Patient) *PatientDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*PatientClient) DeleteOneID

func (c *PatientClient) DeleteOneID(id uuid.UUID) *PatientDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*PatientClient) Get

func (c *PatientClient) Get(ctx context.Context, id uuid.UUID) (*Patient, error)

Get returns a Patient entity by its id.

func (*PatientClient) GetX

func (c *PatientClient) GetX(ctx context.Context, id uuid.UUID) *Patient

GetX is like Get, but panics if an error occurs.

func (*PatientClient) Query

func (c *PatientClient) Query() *PatientQuery

Create returns a query builder for Patient.

func (*PatientClient) QueryHistory

func (c *PatientClient) QueryHistory(pa *Patient) *HistoryQuery

QueryHistory queries the history edge of a Patient.

func (*PatientClient) QuerySchedule

func (c *PatientClient) QuerySchedule(pa *Patient) *ScheduleQuery

QuerySchedule queries the schedule edge of a Patient.

func (*PatientClient) Update

func (c *PatientClient) Update() *PatientUpdate

Update returns an update builder for Patient.

func (*PatientClient) UpdateOne

func (c *PatientClient) UpdateOne(pa *Patient) *PatientUpdateOne

UpdateOne returns an update builder for the given entity.

func (*PatientClient) UpdateOneID

func (c *PatientClient) UpdateOneID(id uuid.UUID) *PatientUpdateOne

UpdateOneID returns an update builder for the given id.

type PatientCreate

type PatientCreate struct {
	// contains filtered or unexported fields
}

PatientCreate is the builder for creating a Patient entity.

func (*PatientCreate) Save

func (pc *PatientCreate) Save(ctx context.Context) (*Patient, error)

Save creates the Patient in the database.

func (*PatientCreate) SaveX

func (pc *PatientCreate) SaveX(ctx context.Context) *Patient

SaveX calls Save and panics if Save returns an error.

func (*PatientCreate) SetAge

func (pc *PatientCreate) SetAge(i int) *PatientCreate

SetAge sets the age field.

func (*PatientCreate) SetConditions

func (pc *PatientCreate) SetConditions(s []string) *PatientCreate

SetConditions sets the conditions field.

func (*PatientCreate) SetEmail

func (pc *PatientCreate) SetEmail(s string) *PatientCreate

SetEmail sets the email field.

func (*PatientCreate) SetFacebookID

func (pc *PatientCreate) SetFacebookID(s string) *PatientCreate

SetFacebookID sets the facebookID field.

func (*PatientCreate) SetFirstContact

func (pc *PatientCreate) SetFirstContact(t time.Time) *PatientCreate

SetFirstContact sets the first_contact field.

func (*PatientCreate) SetHistory

func (pc *PatientCreate) SetHistory(h *History) *PatientCreate

SetHistory sets the history edge to History.

func (*PatientCreate) SetHistoryID

func (pc *PatientCreate) SetHistoryID(id uuid.UUID) *PatientCreate

SetHistoryID sets the history edge to History by id.

func (*PatientCreate) SetID

func (pc *PatientCreate) SetID(u uuid.UUID) *PatientCreate

SetID sets the id field.

func (*PatientCreate) SetName

func (pc *PatientCreate) SetName(s string) *PatientCreate

SetName sets the name field.

func (*PatientCreate) SetNillableAge

func (pc *PatientCreate) SetNillableAge(i *int) *PatientCreate

SetNillableAge sets the age field if the given value is not nil.

func (*PatientCreate) SetNillableEmail

func (pc *PatientCreate) SetNillableEmail(s *string) *PatientCreate

SetNillableEmail sets the email field if the given value is not nil.

func (*PatientCreate) SetNillableFacebookID

func (pc *PatientCreate) SetNillableFacebookID(s *string) *PatientCreate

SetNillableFacebookID sets the facebookID field if the given value is not nil.

func (*PatientCreate) SetNillableFirstContact

func (pc *PatientCreate) SetNillableFirstContact(t *time.Time) *PatientCreate

SetNillableFirstContact sets the first_contact field if the given value is not nil.

func (*PatientCreate) SetNillablePassword

func (pc *PatientCreate) SetNillablePassword(s *string) *PatientCreate

SetNillablePassword sets the password field if the given value is not nil.

func (*PatientCreate) SetNillableWatsonID

func (pc *PatientCreate) SetNillableWatsonID(s *string) *PatientCreate

SetNillableWatsonID sets the watsonID field if the given value is not nil.

func (*PatientCreate) SetPassword

func (pc *PatientCreate) SetPassword(s string) *PatientCreate

SetPassword sets the password field.

func (*PatientCreate) SetPhone

func (pc *PatientCreate) SetPhone(s string) *PatientCreate

SetPhone sets the phone field.

func (*PatientCreate) SetSchedule

func (pc *PatientCreate) SetSchedule(s *Schedule) *PatientCreate

SetSchedule sets the schedule edge to Schedule.

func (*PatientCreate) SetScheduleID

func (pc *PatientCreate) SetScheduleID(id uuid.UUID) *PatientCreate

SetScheduleID sets the schedule edge to Schedule by id.

func (*PatientCreate) SetWatsonID

func (pc *PatientCreate) SetWatsonID(s string) *PatientCreate

SetWatsonID sets the watsonID field.

type PatientDelete

type PatientDelete struct {
	// contains filtered or unexported fields
}

PatientDelete is the builder for deleting a Patient entity.

func (*PatientDelete) Exec

func (pd *PatientDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PatientDelete) ExecX

func (pd *PatientDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PatientDelete) Where

func (pd *PatientDelete) Where(ps ...predicate.Patient) *PatientDelete

Where adds a new predicate to the delete builder.

type PatientDeleteOne

type PatientDeleteOne struct {
	// contains filtered or unexported fields
}

PatientDeleteOne is the builder for deleting a single Patient entity.

func (*PatientDeleteOne) Exec

func (pdo *PatientDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PatientDeleteOne) ExecX

func (pdo *PatientDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type PatientEdges

type PatientEdges struct {
	// History holds the value of the history edge.
	History *History
	// Schedule holds the value of the schedule edge.
	Schedule *Schedule
	// contains filtered or unexported fields
}

PatientEdges holds the relations/edges for other nodes in the graph.

func (PatientEdges) HistoryOrErr

func (e PatientEdges) HistoryOrErr() (*History, error)

HistoryOrErr returns the History value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (PatientEdges) ScheduleOrErr

func (e PatientEdges) ScheduleOrErr() (*Schedule, error)

ScheduleOrErr returns the Schedule value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type PatientGroupBy

type PatientGroupBy struct {
	// contains filtered or unexported fields
}

PatientGroupBy is the builder for group-by Patient entities.

func (*PatientGroupBy) Aggregate

func (pgb *PatientGroupBy) Aggregate(fns ...Aggregate) *PatientGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*PatientGroupBy) Bools

func (pgb *PatientGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.

func (*PatientGroupBy) BoolsX

func (pgb *PatientGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PatientGroupBy) Float64s

func (pgb *PatientGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.

func (*PatientGroupBy) Float64sX

func (pgb *PatientGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PatientGroupBy) Ints

func (pgb *PatientGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.

func (*PatientGroupBy) IntsX

func (pgb *PatientGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PatientGroupBy) Scan

func (pgb *PatientGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scan the result into the given value.

func (*PatientGroupBy) ScanX

func (pgb *PatientGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*PatientGroupBy) Strings

func (pgb *PatientGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when querying group-by with one field.

func (*PatientGroupBy) StringsX

func (pgb *PatientGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PatientQuery

type PatientQuery struct {
	// contains filtered or unexported fields
}

PatientQuery is the builder for querying Patient entities.

func (*PatientQuery) All

func (pq *PatientQuery) All(ctx context.Context) ([]*Patient, error)

All executes the query and returns a list of Patients.

func (*PatientQuery) AllX

func (pq *PatientQuery) AllX(ctx context.Context) []*Patient

AllX is like All, but panics if an error occurs.

func (*PatientQuery) Clone

func (pq *PatientQuery) Clone() *PatientQuery

Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PatientQuery) Count

func (pq *PatientQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PatientQuery) CountX

func (pq *PatientQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PatientQuery) Exist

func (pq *PatientQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PatientQuery) ExistX

func (pq *PatientQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PatientQuery) First

func (pq *PatientQuery) First(ctx context.Context) (*Patient, error)

First returns the first Patient entity in the query. Returns *NotFoundError when no patient was found.

func (*PatientQuery) FirstID

func (pq *PatientQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Patient id in the query. Returns *NotFoundError when no id was found.

func (*PatientQuery) FirstX

func (pq *PatientQuery) FirstX(ctx context.Context) *Patient

FirstX is like First, but panics if an error occurs.

func (*PatientQuery) FirstXID

func (pq *PatientQuery) FirstXID(ctx context.Context) uuid.UUID

FirstXID is like FirstID, but panics if an error occurs.

func (*PatientQuery) GroupBy

func (pq *PatientQuery) GroupBy(field string, fields ...string) *PatientGroupBy

GroupBy used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Patient.Query().
	GroupBy(patient.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PatientQuery) IDs

func (pq *PatientQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of Patient ids.

func (*PatientQuery) IDsX

func (pq *PatientQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*PatientQuery) Limit

func (pq *PatientQuery) Limit(limit int) *PatientQuery

Limit adds a limit step to the query.

func (*PatientQuery) Offset

func (pq *PatientQuery) Offset(offset int) *PatientQuery

Offset adds an offset step to the query.

func (*PatientQuery) Only

func (pq *PatientQuery) Only(ctx context.Context) (*Patient, error)

Only returns the only Patient entity in the query, returns an error if not exactly one entity was returned.

func (*PatientQuery) OnlyID

func (pq *PatientQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID returns the only Patient id in the query, returns an error if not exactly one id was returned.

func (*PatientQuery) OnlyX

func (pq *PatientQuery) OnlyX(ctx context.Context) *Patient

OnlyX is like Only, but panics if an error occurs.

func (*PatientQuery) OnlyXID

func (pq *PatientQuery) OnlyXID(ctx context.Context) uuid.UUID

OnlyXID is like OnlyID, but panics if an error occurs.

func (*PatientQuery) Order

func (pq *PatientQuery) Order(o ...Order) *PatientQuery

Order adds an order step to the query.

func (*PatientQuery) QueryHistory

func (pq *PatientQuery) QueryHistory() *HistoryQuery

QueryHistory chains the current query on the history edge.

func (*PatientQuery) QuerySchedule

func (pq *PatientQuery) QuerySchedule() *ScheduleQuery

QuerySchedule chains the current query on the schedule edge.

func (*PatientQuery) Select

func (pq *PatientQuery) Select(field string, fields ...string) *PatientSelect

Select one or more fields from the given query.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
}

client.Patient.Query().
	Select(patient.FieldName).
	Scan(ctx, &v)

func (*PatientQuery) Where

func (pq *PatientQuery) Where(ps ...predicate.Patient) *PatientQuery

Where adds a new predicate for the builder.

func (*PatientQuery) WithHistory

func (pq *PatientQuery) WithHistory(opts ...func(*HistoryQuery)) *PatientQuery
WithHistory tells the query-builder to eager-loads the nodes that are connected to

the "history" edge. The optional arguments used to configure the query builder of the edge.

func (*PatientQuery) WithSchedule

func (pq *PatientQuery) WithSchedule(opts ...func(*ScheduleQuery)) *PatientQuery
WithSchedule tells the query-builder to eager-loads the nodes that are connected to

the "schedule" edge. The optional arguments used to configure the query builder of the edge.

type PatientSelect

type PatientSelect struct {
	// contains filtered or unexported fields
}

PatientSelect is the builder for select fields of Patient entities.

func (*PatientSelect) Bools

func (ps *PatientSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from selector. It is only allowed when selecting one field.

func (*PatientSelect) BoolsX

func (ps *PatientSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PatientSelect) Float64s

func (ps *PatientSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from selector. It is only allowed when selecting one field.

func (*PatientSelect) Float64sX

func (ps *PatientSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PatientSelect) Ints

func (ps *PatientSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from selector. It is only allowed when selecting one field.

func (*PatientSelect) IntsX

func (ps *PatientSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PatientSelect) Scan

func (ps *PatientSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scan the result into the given value.

func (*PatientSelect) ScanX

func (ps *PatientSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*PatientSelect) Strings

func (ps *PatientSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from selector. It is only allowed when selecting one field.

func (*PatientSelect) StringsX

func (ps *PatientSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PatientUpdate

type PatientUpdate struct {
	// contains filtered or unexported fields
}

PatientUpdate is the builder for updating Patient entities.

func (*PatientUpdate) AddAge

func (pu *PatientUpdate) AddAge(i int) *PatientUpdate

AddAge adds i to age.

func (*PatientUpdate) ClearAge

func (pu *PatientUpdate) ClearAge() *PatientUpdate

ClearAge clears the value of age.

func (*PatientUpdate) ClearConditions

func (pu *PatientUpdate) ClearConditions() *PatientUpdate

ClearConditions clears the value of conditions.

func (*PatientUpdate) ClearEmail

func (pu *PatientUpdate) ClearEmail() *PatientUpdate

ClearEmail clears the value of email.

func (*PatientUpdate) ClearFacebookID

func (pu *PatientUpdate) ClearFacebookID() *PatientUpdate

ClearFacebookID clears the value of facebookID.

func (*PatientUpdate) ClearHistory

func (pu *PatientUpdate) ClearHistory() *PatientUpdate

ClearHistory clears the history edge to History.

func (*PatientUpdate) ClearPassword

func (pu *PatientUpdate) ClearPassword() *PatientUpdate

ClearPassword clears the value of password.

func (*PatientUpdate) ClearSchedule

func (pu *PatientUpdate) ClearSchedule() *PatientUpdate

ClearSchedule clears the schedule edge to Schedule.

func (*PatientUpdate) ClearWatsonID

func (pu *PatientUpdate) ClearWatsonID() *PatientUpdate

ClearWatsonID clears the value of watsonID.

func (*PatientUpdate) Exec

func (pu *PatientUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PatientUpdate) ExecX

func (pu *PatientUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PatientUpdate) Save

func (pu *PatientUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of rows/vertices matched by this operation.

func (*PatientUpdate) SaveX

func (pu *PatientUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PatientUpdate) SetAge

func (pu *PatientUpdate) SetAge(i int) *PatientUpdate

SetAge sets the age field.

func (*PatientUpdate) SetConditions

func (pu *PatientUpdate) SetConditions(s []string) *PatientUpdate

SetConditions sets the conditions field.

func (*PatientUpdate) SetEmail

func (pu *PatientUpdate) SetEmail(s string) *PatientUpdate

SetEmail sets the email field.

func (*PatientUpdate) SetFacebookID

func (pu *PatientUpdate) SetFacebookID(s string) *PatientUpdate

SetFacebookID sets the facebookID field.

func (*PatientUpdate) SetFirstContact

func (pu *PatientUpdate) SetFirstContact(t time.Time) *PatientUpdate

SetFirstContact sets the first_contact field.

func (*PatientUpdate) SetHistory

func (pu *PatientUpdate) SetHistory(h *History) *PatientUpdate

SetHistory sets the history edge to History.

func (*PatientUpdate) SetHistoryID

func (pu *PatientUpdate) SetHistoryID(id uuid.UUID) *PatientUpdate

SetHistoryID sets the history edge to History by id.

func (*PatientUpdate) SetName

func (pu *PatientUpdate) SetName(s string) *PatientUpdate

SetName sets the name field.

func (*PatientUpdate) SetNillableAge

func (pu *PatientUpdate) SetNillableAge(i *int) *PatientUpdate

SetNillableAge sets the age field if the given value is not nil.

func (*PatientUpdate) SetNillableEmail

func (pu *PatientUpdate) SetNillableEmail(s *string) *PatientUpdate

SetNillableEmail sets the email field if the given value is not nil.

func (*PatientUpdate) SetNillableFacebookID

func (pu *PatientUpdate) SetNillableFacebookID(s *string) *PatientUpdate

SetNillableFacebookID sets the facebookID field if the given value is not nil.

func (*PatientUpdate) SetNillableFirstContact

func (pu *PatientUpdate) SetNillableFirstContact(t *time.Time) *PatientUpdate

SetNillableFirstContact sets the first_contact field if the given value is not nil.

func (*PatientUpdate) SetNillablePassword

func (pu *PatientUpdate) SetNillablePassword(s *string) *PatientUpdate

SetNillablePassword sets the password field if the given value is not nil.

func (*PatientUpdate) SetNillableWatsonID

func (pu *PatientUpdate) SetNillableWatsonID(s *string) *PatientUpdate

SetNillableWatsonID sets the watsonID field if the given value is not nil.

func (*PatientUpdate) SetPassword

func (pu *PatientUpdate) SetPassword(s string) *PatientUpdate

SetPassword sets the password field.

func (*PatientUpdate) SetPhone

func (pu *PatientUpdate) SetPhone(s string) *PatientUpdate

SetPhone sets the phone field.

func (*PatientUpdate) SetSchedule

func (pu *PatientUpdate) SetSchedule(s *Schedule) *PatientUpdate

SetSchedule sets the schedule edge to Schedule.

func (*PatientUpdate) SetScheduleID

func (pu *PatientUpdate) SetScheduleID(id uuid.UUID) *PatientUpdate

SetScheduleID sets the schedule edge to Schedule by id.

func (*PatientUpdate) SetWatsonID

func (pu *PatientUpdate) SetWatsonID(s string) *PatientUpdate

SetWatsonID sets the watsonID field.

func (*PatientUpdate) Where

func (pu *PatientUpdate) Where(ps ...predicate.Patient) *PatientUpdate

Where adds a new predicate for the builder.

type PatientUpdateOne

type PatientUpdateOne struct {
	// contains filtered or unexported fields
}

PatientUpdateOne is the builder for updating a single Patient entity.

func (*PatientUpdateOne) AddAge

func (puo *PatientUpdateOne) AddAge(i int) *PatientUpdateOne

AddAge adds i to age.

func (*PatientUpdateOne) ClearAge

func (puo *PatientUpdateOne) ClearAge() *PatientUpdateOne

ClearAge clears the value of age.

func (*PatientUpdateOne) ClearConditions

func (puo *PatientUpdateOne) ClearConditions() *PatientUpdateOne

ClearConditions clears the value of conditions.

func (*PatientUpdateOne) ClearEmail

func (puo *PatientUpdateOne) ClearEmail() *PatientUpdateOne

ClearEmail clears the value of email.

func (*PatientUpdateOne) ClearFacebookID

func (puo *PatientUpdateOne) ClearFacebookID() *PatientUpdateOne

ClearFacebookID clears the value of facebookID.

func (*PatientUpdateOne) ClearHistory

func (puo *PatientUpdateOne) ClearHistory() *PatientUpdateOne

ClearHistory clears the history edge to History.

func (*PatientUpdateOne) ClearPassword

func (puo *PatientUpdateOne) ClearPassword() *PatientUpdateOne

ClearPassword clears the value of password.

func (*PatientUpdateOne) ClearSchedule

func (puo *PatientUpdateOne) ClearSchedule() *PatientUpdateOne

ClearSchedule clears the schedule edge to Schedule.

func (*PatientUpdateOne) ClearWatsonID

func (puo *PatientUpdateOne) ClearWatsonID() *PatientUpdateOne

ClearWatsonID clears the value of watsonID.

func (*PatientUpdateOne) Exec

func (puo *PatientUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PatientUpdateOne) ExecX

func (puo *PatientUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PatientUpdateOne) Save

func (puo *PatientUpdateOne) Save(ctx context.Context) (*Patient, error)

Save executes the query and returns the updated entity.

func (*PatientUpdateOne) SaveX

func (puo *PatientUpdateOne) SaveX(ctx context.Context) *Patient

SaveX is like Save, but panics if an error occurs.

func (*PatientUpdateOne) SetAge

func (puo *PatientUpdateOne) SetAge(i int) *PatientUpdateOne

SetAge sets the age field.

func (*PatientUpdateOne) SetConditions

func (puo *PatientUpdateOne) SetConditions(s []string) *PatientUpdateOne

SetConditions sets the conditions field.

func (*PatientUpdateOne) SetEmail

func (puo *PatientUpdateOne) SetEmail(s string) *PatientUpdateOne

SetEmail sets the email field.

func (*PatientUpdateOne) SetFacebookID

func (puo *PatientUpdateOne) SetFacebookID(s string) *PatientUpdateOne

SetFacebookID sets the facebookID field.

func (*PatientUpdateOne) SetFirstContact

func (puo *PatientUpdateOne) SetFirstContact(t time.Time) *PatientUpdateOne

SetFirstContact sets the first_contact field.

func (*PatientUpdateOne) SetHistory

func (puo *PatientUpdateOne) SetHistory(h *History) *PatientUpdateOne

SetHistory sets the history edge to History.

func (*PatientUpdateOne) SetHistoryID

func (puo *PatientUpdateOne) SetHistoryID(id uuid.UUID) *PatientUpdateOne

SetHistoryID sets the history edge to History by id.

func (*PatientUpdateOne) SetName

func (puo *PatientUpdateOne) SetName(s string) *PatientUpdateOne

SetName sets the name field.

func (*PatientUpdateOne) SetNillableAge

func (puo *PatientUpdateOne) SetNillableAge(i *int) *PatientUpdateOne

SetNillableAge sets the age field if the given value is not nil.

func (*PatientUpdateOne) SetNillableEmail

func (puo *PatientUpdateOne) SetNillableEmail(s *string) *PatientUpdateOne

SetNillableEmail sets the email field if the given value is not nil.

func (*PatientUpdateOne) SetNillableFacebookID

func (puo *PatientUpdateOne) SetNillableFacebookID(s *string) *PatientUpdateOne

SetNillableFacebookID sets the facebookID field if the given value is not nil.

func (*PatientUpdateOne) SetNillableFirstContact

func (puo *PatientUpdateOne) SetNillableFirstContact(t *time.Time) *PatientUpdateOne

SetNillableFirstContact sets the first_contact field if the given value is not nil.

func (*PatientUpdateOne) SetNillablePassword

func (puo *PatientUpdateOne) SetNillablePassword(s *string) *PatientUpdateOne

SetNillablePassword sets the password field if the given value is not nil.

func (*PatientUpdateOne) SetNillableWatsonID

func (puo *PatientUpdateOne) SetNillableWatsonID(s *string) *PatientUpdateOne

SetNillableWatsonID sets the watsonID field if the given value is not nil.

func (*PatientUpdateOne) SetPassword

func (puo *PatientUpdateOne) SetPassword(s string) *PatientUpdateOne

SetPassword sets the password field.

func (*PatientUpdateOne) SetPhone

func (puo *PatientUpdateOne) SetPhone(s string) *PatientUpdateOne

SetPhone sets the phone field.

func (*PatientUpdateOne) SetSchedule

func (puo *PatientUpdateOne) SetSchedule(s *Schedule) *PatientUpdateOne

SetSchedule sets the schedule edge to Schedule.

func (*PatientUpdateOne) SetScheduleID

func (puo *PatientUpdateOne) SetScheduleID(id uuid.UUID) *PatientUpdateOne

SetScheduleID sets the schedule edge to Schedule by id.

func (*PatientUpdateOne) SetWatsonID

func (puo *PatientUpdateOne) SetWatsonID(s string) *PatientUpdateOne

SetWatsonID sets the watsonID field.

type Patients

type Patients []*Patient

Patients is a parsable slice of Patient.

type Schedule

type Schedule struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ScheduleQuery when eager-loading is set.
	Edges ScheduleEdges `json:"edges"`
	// contains filtered or unexported fields
}

Schedule is the model entity for the Schedule schema.

func (*Schedule) QueryPatient

func (s *Schedule) QueryPatient() *PatientQuery

QueryPatient queries the patient edge of the Schedule.

func (*Schedule) QueryTasks

func (s *Schedule) QueryTasks() *TaskQuery

QueryTasks queries the tasks edge of the Schedule.

func (*Schedule) String

func (s *Schedule) String() string

String implements the fmt.Stringer.

func (*Schedule) Unwrap

func (s *Schedule) Unwrap() *Schedule

Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.

func (*Schedule) Update

func (s *Schedule) Update() *ScheduleUpdateOne

Update returns a builder for updating this Schedule. Note that, you need to call Schedule.Unwrap() before calling this method, if this Schedule was returned from a transaction, and the transaction was committed or rolled back.

type ScheduleClient

type ScheduleClient struct {
	// contains filtered or unexported fields
}

ScheduleClient is a client for the Schedule schema.

func NewScheduleClient

func NewScheduleClient(c config) *ScheduleClient

NewScheduleClient returns a client for the Schedule from the given config.

func (*ScheduleClient) Create

func (c *ScheduleClient) Create() *ScheduleCreate

Create returns a create builder for Schedule.

func (*ScheduleClient) Delete

func (c *ScheduleClient) Delete() *ScheduleDelete

Delete returns a delete builder for Schedule.

func (*ScheduleClient) DeleteOne

func (c *ScheduleClient) DeleteOne(s *Schedule) *ScheduleDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*ScheduleClient) DeleteOneID

func (c *ScheduleClient) DeleteOneID(id uuid.UUID) *ScheduleDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*ScheduleClient) Get

func (c *ScheduleClient) Get(ctx context.Context, id uuid.UUID) (*Schedule, error)

Get returns a Schedule entity by its id.

func (*ScheduleClient) GetX

func (c *ScheduleClient) GetX(ctx context.Context, id uuid.UUID) *Schedule

GetX is like Get, but panics if an error occurs.

func (*ScheduleClient) Query

func (c *ScheduleClient) Query() *ScheduleQuery

Create returns a query builder for Schedule.

func (*ScheduleClient) QueryPatient

func (c *ScheduleClient) QueryPatient(s *Schedule) *PatientQuery

QueryPatient queries the patient edge of a Schedule.

func (*ScheduleClient) QueryTasks

func (c *ScheduleClient) QueryTasks(s *Schedule) *TaskQuery

QueryTasks queries the tasks edge of a Schedule.

func (*ScheduleClient) Update

func (c *ScheduleClient) Update() *ScheduleUpdate

Update returns an update builder for Schedule.

func (*ScheduleClient) UpdateOne

func (c *ScheduleClient) UpdateOne(s *Schedule) *ScheduleUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ScheduleClient) UpdateOneID

func (c *ScheduleClient) UpdateOneID(id uuid.UUID) *ScheduleUpdateOne

UpdateOneID returns an update builder for the given id.

type ScheduleCreate

type ScheduleCreate struct {
	// contains filtered or unexported fields
}

ScheduleCreate is the builder for creating a Schedule entity.

func (*ScheduleCreate) AddTaskIDs

func (sc *ScheduleCreate) AddTaskIDs(ids ...uuid.UUID) *ScheduleCreate

AddTaskIDs adds the tasks edge to Task by ids.

func (*ScheduleCreate) AddTasks

func (sc *ScheduleCreate) AddTasks(t ...*Task) *ScheduleCreate

AddTasks adds the tasks edges to Task.

func (*ScheduleCreate) Save

func (sc *ScheduleCreate) Save(ctx context.Context) (*Schedule, error)

Save creates the Schedule in the database.

func (*ScheduleCreate) SaveX

func (sc *ScheduleCreate) SaveX(ctx context.Context) *Schedule

SaveX calls Save and panics if Save returns an error.

func (*ScheduleCreate) SetID

func (sc *ScheduleCreate) SetID(u uuid.UUID) *ScheduleCreate

SetID sets the id field.

func (*ScheduleCreate) SetNillablePatientID

func (sc *ScheduleCreate) SetNillablePatientID(id *uuid.UUID) *ScheduleCreate

SetNillablePatientID sets the patient edge to Patient by id if the given value is not nil.

func (*ScheduleCreate) SetPatient

func (sc *ScheduleCreate) SetPatient(p *Patient) *ScheduleCreate

SetPatient sets the patient edge to Patient.

func (*ScheduleCreate) SetPatientID

func (sc *ScheduleCreate) SetPatientID(id uuid.UUID) *ScheduleCreate

SetPatientID sets the patient edge to Patient by id.

type ScheduleDelete

type ScheduleDelete struct {
	// contains filtered or unexported fields
}

ScheduleDelete is the builder for deleting a Schedule entity.

func (*ScheduleDelete) Exec

func (sd *ScheduleDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ScheduleDelete) ExecX

func (sd *ScheduleDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ScheduleDelete) Where

func (sd *ScheduleDelete) Where(ps ...predicate.Schedule) *ScheduleDelete

Where adds a new predicate to the delete builder.

type ScheduleDeleteOne

type ScheduleDeleteOne struct {
	// contains filtered or unexported fields
}

ScheduleDeleteOne is the builder for deleting a single Schedule entity.

func (*ScheduleDeleteOne) Exec

func (sdo *ScheduleDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ScheduleDeleteOne) ExecX

func (sdo *ScheduleDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type ScheduleEdges

type ScheduleEdges struct {
	// Tasks holds the value of the tasks edge.
	Tasks []*Task
	// Patient holds the value of the patient edge.
	Patient *Patient
	// contains filtered or unexported fields
}

ScheduleEdges holds the relations/edges for other nodes in the graph.

func (ScheduleEdges) PatientOrErr

func (e ScheduleEdges) PatientOrErr() (*Patient, error)

PatientOrErr returns the Patient value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ScheduleEdges) TasksOrErr

func (e ScheduleEdges) TasksOrErr() ([]*Task, error)

TasksOrErr returns the Tasks value or an error if the edge was not loaded in eager-loading.

type ScheduleGroupBy

type ScheduleGroupBy struct {
	// contains filtered or unexported fields
}

ScheduleGroupBy is the builder for group-by Schedule entities.

func (*ScheduleGroupBy) Aggregate

func (sgb *ScheduleGroupBy) Aggregate(fns ...Aggregate) *ScheduleGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ScheduleGroupBy) Bools

func (sgb *ScheduleGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.

func (*ScheduleGroupBy) BoolsX

func (sgb *ScheduleGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ScheduleGroupBy) Float64s

func (sgb *ScheduleGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.

func (*ScheduleGroupBy) Float64sX

func (sgb *ScheduleGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ScheduleGroupBy) Ints

func (sgb *ScheduleGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.

func (*ScheduleGroupBy) IntsX

func (sgb *ScheduleGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ScheduleGroupBy) Scan

func (sgb *ScheduleGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scan the result into the given value.

func (*ScheduleGroupBy) ScanX

func (sgb *ScheduleGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*ScheduleGroupBy) Strings

func (sgb *ScheduleGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when querying group-by with one field.

func (*ScheduleGroupBy) StringsX

func (sgb *ScheduleGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ScheduleQuery

type ScheduleQuery struct {
	// contains filtered or unexported fields
}

ScheduleQuery is the builder for querying Schedule entities.

func (*ScheduleQuery) All

func (sq *ScheduleQuery) All(ctx context.Context) ([]*Schedule, error)

All executes the query and returns a list of Schedules.

func (*ScheduleQuery) AllX

func (sq *ScheduleQuery) AllX(ctx context.Context) []*Schedule

AllX is like All, but panics if an error occurs.

func (*ScheduleQuery) Clone

func (sq *ScheduleQuery) Clone() *ScheduleQuery

Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ScheduleQuery) Count

func (sq *ScheduleQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ScheduleQuery) CountX

func (sq *ScheduleQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ScheduleQuery) Exist

func (sq *ScheduleQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ScheduleQuery) ExistX

func (sq *ScheduleQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ScheduleQuery) First

func (sq *ScheduleQuery) First(ctx context.Context) (*Schedule, error)

First returns the first Schedule entity in the query. Returns *NotFoundError when no schedule was found.

func (*ScheduleQuery) FirstID

func (sq *ScheduleQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Schedule id in the query. Returns *NotFoundError when no id was found.

func (*ScheduleQuery) FirstX

func (sq *ScheduleQuery) FirstX(ctx context.Context) *Schedule

FirstX is like First, but panics if an error occurs.

func (*ScheduleQuery) FirstXID

func (sq *ScheduleQuery) FirstXID(ctx context.Context) uuid.UUID

FirstXID is like FirstID, but panics if an error occurs.

func (*ScheduleQuery) GroupBy

func (sq *ScheduleQuery) GroupBy(field string, fields ...string) *ScheduleGroupBy

GroupBy used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

func (*ScheduleQuery) IDs

func (sq *ScheduleQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of Schedule ids.

func (*ScheduleQuery) IDsX

func (sq *ScheduleQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*ScheduleQuery) Limit

func (sq *ScheduleQuery) Limit(limit int) *ScheduleQuery

Limit adds a limit step to the query.

func (*ScheduleQuery) Offset

func (sq *ScheduleQuery) Offset(offset int) *ScheduleQuery

Offset adds an offset step to the query.

func (*ScheduleQuery) Only

func (sq *ScheduleQuery) Only(ctx context.Context) (*Schedule, error)

Only returns the only Schedule entity in the query, returns an error if not exactly one entity was returned.

func (*ScheduleQuery) OnlyID

func (sq *ScheduleQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID returns the only Schedule id in the query, returns an error if not exactly one id was returned.

func (*ScheduleQuery) OnlyX

func (sq *ScheduleQuery) OnlyX(ctx context.Context) *Schedule

OnlyX is like Only, but panics if an error occurs.

func (*ScheduleQuery) OnlyXID

func (sq *ScheduleQuery) OnlyXID(ctx context.Context) uuid.UUID

OnlyXID is like OnlyID, but panics if an error occurs.

func (*ScheduleQuery) Order

func (sq *ScheduleQuery) Order(o ...Order) *ScheduleQuery

Order adds an order step to the query.

func (*ScheduleQuery) QueryPatient

func (sq *ScheduleQuery) QueryPatient() *PatientQuery

QueryPatient chains the current query on the patient edge.

func (*ScheduleQuery) QueryTasks

func (sq *ScheduleQuery) QueryTasks() *TaskQuery

QueryTasks chains the current query on the tasks edge.

func (*ScheduleQuery) Select

func (sq *ScheduleQuery) Select(field string, fields ...string) *ScheduleSelect

Select one or more fields from the given query.

func (*ScheduleQuery) Where

func (sq *ScheduleQuery) Where(ps ...predicate.Schedule) *ScheduleQuery

Where adds a new predicate for the builder.

func (*ScheduleQuery) WithPatient

func (sq *ScheduleQuery) WithPatient(opts ...func(*PatientQuery)) *ScheduleQuery
WithPatient tells the query-builder to eager-loads the nodes that are connected to

the "patient" edge. The optional arguments used to configure the query builder of the edge.

func (*ScheduleQuery) WithTasks

func (sq *ScheduleQuery) WithTasks(opts ...func(*TaskQuery)) *ScheduleQuery
WithTasks tells the query-builder to eager-loads the nodes that are connected to

the "tasks" edge. The optional arguments used to configure the query builder of the edge.

type ScheduleSelect

type ScheduleSelect struct {
	// contains filtered or unexported fields
}

ScheduleSelect is the builder for select fields of Schedule entities.

func (*ScheduleSelect) Bools

func (ss *ScheduleSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from selector. It is only allowed when selecting one field.

func (*ScheduleSelect) BoolsX

func (ss *ScheduleSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ScheduleSelect) Float64s

func (ss *ScheduleSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from selector. It is only allowed when selecting one field.

func (*ScheduleSelect) Float64sX

func (ss *ScheduleSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ScheduleSelect) Ints

func (ss *ScheduleSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from selector. It is only allowed when selecting one field.

func (*ScheduleSelect) IntsX

func (ss *ScheduleSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ScheduleSelect) Scan

func (ss *ScheduleSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scan the result into the given value.

func (*ScheduleSelect) ScanX

func (ss *ScheduleSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*ScheduleSelect) Strings

func (ss *ScheduleSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from selector. It is only allowed when selecting one field.

func (*ScheduleSelect) StringsX

func (ss *ScheduleSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ScheduleUpdate

type ScheduleUpdate struct {
	// contains filtered or unexported fields
}

ScheduleUpdate is the builder for updating Schedule entities.

func (*ScheduleUpdate) AddTaskIDs

func (su *ScheduleUpdate) AddTaskIDs(ids ...uuid.UUID) *ScheduleUpdate

AddTaskIDs adds the tasks edge to Task by ids.

func (*ScheduleUpdate) AddTasks

func (su *ScheduleUpdate) AddTasks(t ...*Task) *ScheduleUpdate

AddTasks adds the tasks edges to Task.

func (*ScheduleUpdate) ClearPatient

func (su *ScheduleUpdate) ClearPatient() *ScheduleUpdate

ClearPatient clears the patient edge to Patient.

func (*ScheduleUpdate) Exec

func (su *ScheduleUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ScheduleUpdate) ExecX

func (su *ScheduleUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ScheduleUpdate) RemoveTaskIDs

func (su *ScheduleUpdate) RemoveTaskIDs(ids ...uuid.UUID) *ScheduleUpdate

RemoveTaskIDs removes the tasks edge to Task by ids.

func (*ScheduleUpdate) RemoveTasks

func (su *ScheduleUpdate) RemoveTasks(t ...*Task) *ScheduleUpdate

RemoveTasks removes tasks edges to Task.

func (*ScheduleUpdate) Save

func (su *ScheduleUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of rows/vertices matched by this operation.

func (*ScheduleUpdate) SaveX

func (su *ScheduleUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ScheduleUpdate) SetNillablePatientID

func (su *ScheduleUpdate) SetNillablePatientID(id *uuid.UUID) *ScheduleUpdate

SetNillablePatientID sets the patient edge to Patient by id if the given value is not nil.

func (*ScheduleUpdate) SetPatient

func (su *ScheduleUpdate) SetPatient(p *Patient) *ScheduleUpdate

SetPatient sets the patient edge to Patient.

func (*ScheduleUpdate) SetPatientID

func (su *ScheduleUpdate) SetPatientID(id uuid.UUID) *ScheduleUpdate

SetPatientID sets the patient edge to Patient by id.

func (*ScheduleUpdate) Where

func (su *ScheduleUpdate) Where(ps ...predicate.Schedule) *ScheduleUpdate

Where adds a new predicate for the builder.

type ScheduleUpdateOne

type ScheduleUpdateOne struct {
	// contains filtered or unexported fields
}

ScheduleUpdateOne is the builder for updating a single Schedule entity.

func (*ScheduleUpdateOne) AddTaskIDs

func (suo *ScheduleUpdateOne) AddTaskIDs(ids ...uuid.UUID) *ScheduleUpdateOne

AddTaskIDs adds the tasks edge to Task by ids.

func (*ScheduleUpdateOne) AddTasks

func (suo *ScheduleUpdateOne) AddTasks(t ...*Task) *ScheduleUpdateOne

AddTasks adds the tasks edges to Task.

func (*ScheduleUpdateOne) ClearPatient

func (suo *ScheduleUpdateOne) ClearPatient() *ScheduleUpdateOne

ClearPatient clears the patient edge to Patient.

func (*ScheduleUpdateOne) Exec

func (suo *ScheduleUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ScheduleUpdateOne) ExecX

func (suo *ScheduleUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ScheduleUpdateOne) RemoveTaskIDs

func (suo *ScheduleUpdateOne) RemoveTaskIDs(ids ...uuid.UUID) *ScheduleUpdateOne

RemoveTaskIDs removes the tasks edge to Task by ids.

func (*ScheduleUpdateOne) RemoveTasks

func (suo *ScheduleUpdateOne) RemoveTasks(t ...*Task) *ScheduleUpdateOne

RemoveTasks removes tasks edges to Task.

func (*ScheduleUpdateOne) Save

func (suo *ScheduleUpdateOne) Save(ctx context.Context) (*Schedule, error)

Save executes the query and returns the updated entity.

func (*ScheduleUpdateOne) SaveX

func (suo *ScheduleUpdateOne) SaveX(ctx context.Context) *Schedule

SaveX is like Save, but panics if an error occurs.

func (*ScheduleUpdateOne) SetNillablePatientID

func (suo *ScheduleUpdateOne) SetNillablePatientID(id *uuid.UUID) *ScheduleUpdateOne

SetNillablePatientID sets the patient edge to Patient by id if the given value is not nil.

func (*ScheduleUpdateOne) SetPatient

func (suo *ScheduleUpdateOne) SetPatient(p *Patient) *ScheduleUpdateOne

SetPatient sets the patient edge to Patient.

func (*ScheduleUpdateOne) SetPatientID

func (suo *ScheduleUpdateOne) SetPatientID(id uuid.UUID) *ScheduleUpdateOne

SetPatientID sets the patient edge to Patient by id.

type Schedules

type Schedules []*Schedule

Schedules is a parsable slice of Schedule.

type Task

type Task struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Title holds the value of the "title" field.
	Title string `json:"title,omitempty"`
	// StartAt holds the value of the "startAt" field.
	StartAt time.Time `json:"startAt,omitempty"`
	// EndsAt holds the value of the "endsAt" field.
	EndsAt time.Time `json:"endsAt,omitempty"`
	// Description holds the value of the "description" field.
	Description []string `json:"description,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TaskQuery when eager-loading is set.
	Edges TaskEdges `json:"edges"`
	// contains filtered or unexported fields
}

Task is the model entity for the Task schema.

func (*Task) QueryResponses

func (t *Task) QueryResponses() *TaskResponseQuery

QueryResponses queries the responses edge of the Task.

func (*Task) QueryResponsible

func (t *Task) QueryResponsible() *DoctorQuery

QueryResponsible queries the responsible edge of the Task.

func (*Task) QuerySchedule

func (t *Task) QuerySchedule() *ScheduleQuery

QuerySchedule queries the schedule edge of the Task.

func (*Task) String

func (t *Task) String() string

String implements the fmt.Stringer.

func (*Task) Unwrap

func (t *Task) Unwrap() *Task

Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.

func (*Task) Update

func (t *Task) Update() *TaskUpdateOne

Update returns a builder for updating this Task. Note that, you need to call Task.Unwrap() before calling this method, if this Task was returned from a transaction, and the transaction was committed or rolled back.

type TaskClient

type TaskClient struct {
	// contains filtered or unexported fields
}

TaskClient is a client for the Task schema.

func NewTaskClient

func NewTaskClient(c config) *TaskClient

NewTaskClient returns a client for the Task from the given config.

func (*TaskClient) Create

func (c *TaskClient) Create() *TaskCreate

Create returns a create builder for Task.

func (*TaskClient) Delete

func (c *TaskClient) Delete() *TaskDelete

Delete returns a delete builder for Task.

func (*TaskClient) DeleteOne

func (c *TaskClient) DeleteOne(t *Task) *TaskDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*TaskClient) DeleteOneID

func (c *TaskClient) DeleteOneID(id uuid.UUID) *TaskDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*TaskClient) Get

func (c *TaskClient) Get(ctx context.Context, id uuid.UUID) (*Task, error)

Get returns a Task entity by its id.

func (*TaskClient) GetX

func (c *TaskClient) GetX(ctx context.Context, id uuid.UUID) *Task

GetX is like Get, but panics if an error occurs.

func (*TaskClient) Query

func (c *TaskClient) Query() *TaskQuery

Create returns a query builder for Task.

func (*TaskClient) QueryResponses

func (c *TaskClient) QueryResponses(t *Task) *TaskResponseQuery

QueryResponses queries the responses edge of a Task.

func (*TaskClient) QueryResponsible

func (c *TaskClient) QueryResponsible(t *Task) *DoctorQuery

QueryResponsible queries the responsible edge of a Task.

func (*TaskClient) QuerySchedule

func (c *TaskClient) QuerySchedule(t *Task) *ScheduleQuery

QuerySchedule queries the schedule edge of a Task.

func (*TaskClient) Update

func (c *TaskClient) Update() *TaskUpdate

Update returns an update builder for Task.

func (*TaskClient) UpdateOne

func (c *TaskClient) UpdateOne(t *Task) *TaskUpdateOne

UpdateOne returns an update builder for the given entity.

func (*TaskClient) UpdateOneID

func (c *TaskClient) UpdateOneID(id uuid.UUID) *TaskUpdateOne

UpdateOneID returns an update builder for the given id.

type TaskCreate

type TaskCreate struct {
	// contains filtered or unexported fields
}

TaskCreate is the builder for creating a Task entity.

func (*TaskCreate) AddResponseIDs

func (tc *TaskCreate) AddResponseIDs(ids ...uuid.UUID) *TaskCreate

AddResponseIDs adds the responses edge to TaskResponse by ids.

func (*TaskCreate) AddResponses

func (tc *TaskCreate) AddResponses(t ...*TaskResponse) *TaskCreate

AddResponses adds the responses edges to TaskResponse.

func (*TaskCreate) AddResponsible

func (tc *TaskCreate) AddResponsible(d ...*Doctor) *TaskCreate

AddResponsible adds the responsible edges to Doctor.

func (*TaskCreate) AddResponsibleIDs

func (tc *TaskCreate) AddResponsibleIDs(ids ...uuid.UUID) *TaskCreate

AddResponsibleIDs adds the responsible edge to Doctor by ids.

func (*TaskCreate) Save

func (tc *TaskCreate) Save(ctx context.Context) (*Task, error)

Save creates the Task in the database.

func (*TaskCreate) SaveX

func (tc *TaskCreate) SaveX(ctx context.Context) *Task

SaveX calls Save and panics if Save returns an error.

func (*TaskCreate) SetDescription

func (tc *TaskCreate) SetDescription(s []string) *TaskCreate

SetDescription sets the description field.

func (*TaskCreate) SetEndsAt

func (tc *TaskCreate) SetEndsAt(t time.Time) *TaskCreate

SetEndsAt sets the endsAt field.

func (*TaskCreate) SetID

func (tc *TaskCreate) SetID(u uuid.UUID) *TaskCreate

SetID sets the id field.

func (*TaskCreate) SetNillableEndsAt

func (tc *TaskCreate) SetNillableEndsAt(t *time.Time) *TaskCreate

SetNillableEndsAt sets the endsAt field if the given value is not nil.

func (*TaskCreate) SetNillableScheduleID

func (tc *TaskCreate) SetNillableScheduleID(id *uuid.UUID) *TaskCreate

SetNillableScheduleID sets the schedule edge to Schedule by id if the given value is not nil.

func (*TaskCreate) SetNillableStartAt

func (tc *TaskCreate) SetNillableStartAt(t *time.Time) *TaskCreate

SetNillableStartAt sets the startAt field if the given value is not nil.

func (*TaskCreate) SetSchedule

func (tc *TaskCreate) SetSchedule(s *Schedule) *TaskCreate

SetSchedule sets the schedule edge to Schedule.

func (*TaskCreate) SetScheduleID

func (tc *TaskCreate) SetScheduleID(id uuid.UUID) *TaskCreate

SetScheduleID sets the schedule edge to Schedule by id.

func (*TaskCreate) SetStartAt

func (tc *TaskCreate) SetStartAt(t time.Time) *TaskCreate

SetStartAt sets the startAt field.

func (*TaskCreate) SetTitle

func (tc *TaskCreate) SetTitle(s string) *TaskCreate

SetTitle sets the title field.

type TaskDelete

type TaskDelete struct {
	// contains filtered or unexported fields
}

TaskDelete is the builder for deleting a Task entity.

func (*TaskDelete) Exec

func (td *TaskDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TaskDelete) ExecX

func (td *TaskDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TaskDelete) Where

func (td *TaskDelete) Where(ps ...predicate.Task) *TaskDelete

Where adds a new predicate to the delete builder.

type TaskDeleteOne

type TaskDeleteOne struct {
	// contains filtered or unexported fields
}

TaskDeleteOne is the builder for deleting a single Task entity.

func (*TaskDeleteOne) Exec

func (tdo *TaskDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TaskDeleteOne) ExecX

func (tdo *TaskDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type TaskEdges

type TaskEdges struct {
	// Responsible holds the value of the responsible edge.
	Responsible []*Doctor
	// Responses holds the value of the responses edge.
	Responses []*TaskResponse
	// Schedule holds the value of the schedule edge.
	Schedule *Schedule
	// contains filtered or unexported fields
}

TaskEdges holds the relations/edges for other nodes in the graph.

func (TaskEdges) ResponsesOrErr

func (e TaskEdges) ResponsesOrErr() ([]*TaskResponse, error)

ResponsesOrErr returns the Responses value or an error if the edge was not loaded in eager-loading.

func (TaskEdges) ResponsibleOrErr

func (e TaskEdges) ResponsibleOrErr() ([]*Doctor, error)

ResponsibleOrErr returns the Responsible value or an error if the edge was not loaded in eager-loading.

func (TaskEdges) ScheduleOrErr

func (e TaskEdges) ScheduleOrErr() (*Schedule, error)

ScheduleOrErr returns the Schedule value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type TaskGroupBy

type TaskGroupBy struct {
	// contains filtered or unexported fields
}

TaskGroupBy is the builder for group-by Task entities.

func (*TaskGroupBy) Aggregate

func (tgb *TaskGroupBy) Aggregate(fns ...Aggregate) *TaskGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*TaskGroupBy) Bools

func (tgb *TaskGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.

func (*TaskGroupBy) BoolsX

func (tgb *TaskGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TaskGroupBy) Float64s

func (tgb *TaskGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.

func (*TaskGroupBy) Float64sX

func (tgb *TaskGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TaskGroupBy) Ints

func (tgb *TaskGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.

func (*TaskGroupBy) IntsX

func (tgb *TaskGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TaskGroupBy) Scan

func (tgb *TaskGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scan the result into the given value.

func (*TaskGroupBy) ScanX

func (tgb *TaskGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*TaskGroupBy) Strings

func (tgb *TaskGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when querying group-by with one field.

func (*TaskGroupBy) StringsX

func (tgb *TaskGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TaskQuery

type TaskQuery struct {
	// contains filtered or unexported fields
}

TaskQuery is the builder for querying Task entities.

func (*TaskQuery) All

func (tq *TaskQuery) All(ctx context.Context) ([]*Task, error)

All executes the query and returns a list of Tasks.

func (*TaskQuery) AllX

func (tq *TaskQuery) AllX(ctx context.Context) []*Task

AllX is like All, but panics if an error occurs.

func (*TaskQuery) Clone

func (tq *TaskQuery) Clone() *TaskQuery

Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TaskQuery) Count

func (tq *TaskQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TaskQuery) CountX

func (tq *TaskQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TaskQuery) Exist

func (tq *TaskQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TaskQuery) ExistX

func (tq *TaskQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TaskQuery) First

func (tq *TaskQuery) First(ctx context.Context) (*Task, error)

First returns the first Task entity in the query. Returns *NotFoundError when no task was found.

func (*TaskQuery) FirstID

func (tq *TaskQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Task id in the query. Returns *NotFoundError when no id was found.

func (*TaskQuery) FirstX

func (tq *TaskQuery) FirstX(ctx context.Context) *Task

FirstX is like First, but panics if an error occurs.

func (*TaskQuery) FirstXID

func (tq *TaskQuery) FirstXID(ctx context.Context) uuid.UUID

FirstXID is like FirstID, but panics if an error occurs.

func (*TaskQuery) GroupBy

func (tq *TaskQuery) GroupBy(field string, fields ...string) *TaskGroupBy

GroupBy used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Title string `json:"title,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Task.Query().
	GroupBy(task.FieldTitle).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TaskQuery) IDs

func (tq *TaskQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of Task ids.

func (*TaskQuery) IDsX

func (tq *TaskQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*TaskQuery) Limit

func (tq *TaskQuery) Limit(limit int) *TaskQuery

Limit adds a limit step to the query.

func (*TaskQuery) Offset

func (tq *TaskQuery) Offset(offset int) *TaskQuery

Offset adds an offset step to the query.

func (*TaskQuery) Only

func (tq *TaskQuery) Only(ctx context.Context) (*Task, error)

Only returns the only Task entity in the query, returns an error if not exactly one entity was returned.

func (*TaskQuery) OnlyID

func (tq *TaskQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID returns the only Task id in the query, returns an error if not exactly one id was returned.

func (*TaskQuery) OnlyX

func (tq *TaskQuery) OnlyX(ctx context.Context) *Task

OnlyX is like Only, but panics if an error occurs.

func (*TaskQuery) OnlyXID

func (tq *TaskQuery) OnlyXID(ctx context.Context) uuid.UUID

OnlyXID is like OnlyID, but panics if an error occurs.

func (*TaskQuery) Order

func (tq *TaskQuery) Order(o ...Order) *TaskQuery

Order adds an order step to the query.

func (*TaskQuery) QueryResponses

func (tq *TaskQuery) QueryResponses() *TaskResponseQuery

QueryResponses chains the current query on the responses edge.

func (*TaskQuery) QueryResponsible

func (tq *TaskQuery) QueryResponsible() *DoctorQuery

QueryResponsible chains the current query on the responsible edge.

func (*TaskQuery) QuerySchedule

func (tq *TaskQuery) QuerySchedule() *ScheduleQuery

QuerySchedule chains the current query on the schedule edge.

func (*TaskQuery) Select

func (tq *TaskQuery) Select(field string, fields ...string) *TaskSelect

Select one or more fields from the given query.

Example:

var v []struct {
	Title string `json:"title,omitempty"`
}

client.Task.Query().
	Select(task.FieldTitle).
	Scan(ctx, &v)

func (*TaskQuery) Where

func (tq *TaskQuery) Where(ps ...predicate.Task) *TaskQuery

Where adds a new predicate for the builder.

func (*TaskQuery) WithResponses

func (tq *TaskQuery) WithResponses(opts ...func(*TaskResponseQuery)) *TaskQuery
WithResponses tells the query-builder to eager-loads the nodes that are connected to

the "responses" edge. The optional arguments used to configure the query builder of the edge.

func (*TaskQuery) WithResponsible

func (tq *TaskQuery) WithResponsible(opts ...func(*DoctorQuery)) *TaskQuery
WithResponsible tells the query-builder to eager-loads the nodes that are connected to

the "responsible" edge. The optional arguments used to configure the query builder of the edge.

func (*TaskQuery) WithSchedule

func (tq *TaskQuery) WithSchedule(opts ...func(*ScheduleQuery)) *TaskQuery
WithSchedule tells the query-builder to eager-loads the nodes that are connected to

the "schedule" edge. The optional arguments used to configure the query builder of the edge.

type TaskResponse

type TaskResponse struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// At holds the value of the "at" field.
	At time.Time `json:"at,omitempty"`
	// LastChange holds the value of the "lastChange" field.
	LastChange time.Time `json:"lastChange,omitempty"`
	// Observations holds the value of the "observations" field.
	Observations []string `json:"observations,omitempty"`
	// Meta holds the value of the "meta" field.
	Meta []string `json:"meta,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TaskResponseQuery when eager-loading is set.
	Edges TaskResponseEdges `json:"edges"`
	// contains filtered or unexported fields
}

TaskResponse is the model entity for the TaskResponse schema.

func (*TaskResponse) QueryAuthor

func (tr *TaskResponse) QueryAuthor() *DoctorQuery

QueryAuthor queries the author edge of the TaskResponse.

func (*TaskResponse) QueryTask

func (tr *TaskResponse) QueryTask() *TaskQuery

QueryTask queries the task edge of the TaskResponse.

func (*TaskResponse) String

func (tr *TaskResponse) String() string

String implements the fmt.Stringer.

func (*TaskResponse) Unwrap

func (tr *TaskResponse) Unwrap() *TaskResponse

Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.

func (*TaskResponse) Update

func (tr *TaskResponse) Update() *TaskResponseUpdateOne

Update returns a builder for updating this TaskResponse. Note that, you need to call TaskResponse.Unwrap() before calling this method, if this TaskResponse was returned from a transaction, and the transaction was committed or rolled back.

type TaskResponseClient

type TaskResponseClient struct {
	// contains filtered or unexported fields
}

TaskResponseClient is a client for the TaskResponse schema.

func NewTaskResponseClient

func NewTaskResponseClient(c config) *TaskResponseClient

NewTaskResponseClient returns a client for the TaskResponse from the given config.

func (*TaskResponseClient) Create

Create returns a create builder for TaskResponse.

func (*TaskResponseClient) Delete

Delete returns a delete builder for TaskResponse.

func (*TaskResponseClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*TaskResponseClient) DeleteOneID

func (c *TaskResponseClient) DeleteOneID(id uuid.UUID) *TaskResponseDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*TaskResponseClient) Get

Get returns a TaskResponse entity by its id.

func (*TaskResponseClient) GetX

GetX is like Get, but panics if an error occurs.

func (*TaskResponseClient) Query

Create returns a query builder for TaskResponse.

func (*TaskResponseClient) QueryAuthor

func (c *TaskResponseClient) QueryAuthor(tr *TaskResponse) *DoctorQuery

QueryAuthor queries the author edge of a TaskResponse.

func (*TaskResponseClient) QueryTask

func (c *TaskResponseClient) QueryTask(tr *TaskResponse) *TaskQuery

QueryTask queries the task edge of a TaskResponse.

func (*TaskResponseClient) Update

Update returns an update builder for TaskResponse.

func (*TaskResponseClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*TaskResponseClient) UpdateOneID

func (c *TaskResponseClient) UpdateOneID(id uuid.UUID) *TaskResponseUpdateOne

UpdateOneID returns an update builder for the given id.

type TaskResponseCreate

type TaskResponseCreate struct {
	// contains filtered or unexported fields
}

TaskResponseCreate is the builder for creating a TaskResponse entity.

func (*TaskResponseCreate) Save

Save creates the TaskResponse in the database.

func (*TaskResponseCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*TaskResponseCreate) SetAt

SetAt sets the at field.

func (*TaskResponseCreate) SetAuthor

func (trc *TaskResponseCreate) SetAuthor(d *Doctor) *TaskResponseCreate

SetAuthor sets the author edge to Doctor.

func (*TaskResponseCreate) SetAuthorID

func (trc *TaskResponseCreate) SetAuthorID(id uuid.UUID) *TaskResponseCreate

SetAuthorID sets the author edge to Doctor by id.

func (*TaskResponseCreate) SetID

SetID sets the id field.

func (*TaskResponseCreate) SetLastChange

func (trc *TaskResponseCreate) SetLastChange(t time.Time) *TaskResponseCreate

SetLastChange sets the lastChange field.

func (*TaskResponseCreate) SetMeta

func (trc *TaskResponseCreate) SetMeta(s []string) *TaskResponseCreate

SetMeta sets the meta field.

func (*TaskResponseCreate) SetNillableAt

func (trc *TaskResponseCreate) SetNillableAt(t *time.Time) *TaskResponseCreate

SetNillableAt sets the at field if the given value is not nil.

func (*TaskResponseCreate) SetNillableLastChange

func (trc *TaskResponseCreate) SetNillableLastChange(t *time.Time) *TaskResponseCreate

SetNillableLastChange sets the lastChange field if the given value is not nil.

func (*TaskResponseCreate) SetObservations

func (trc *TaskResponseCreate) SetObservations(s []string) *TaskResponseCreate

SetObservations sets the observations field.

func (*TaskResponseCreate) SetTask

func (trc *TaskResponseCreate) SetTask(t *Task) *TaskResponseCreate

SetTask sets the task edge to Task.

func (*TaskResponseCreate) SetTaskID

func (trc *TaskResponseCreate) SetTaskID(id uuid.UUID) *TaskResponseCreate

SetTaskID sets the task edge to Task by id.

type TaskResponseDelete

type TaskResponseDelete struct {
	// contains filtered or unexported fields
}

TaskResponseDelete is the builder for deleting a TaskResponse entity.

func (*TaskResponseDelete) Exec

func (trd *TaskResponseDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TaskResponseDelete) ExecX

func (trd *TaskResponseDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TaskResponseDelete) Where

Where adds a new predicate to the delete builder.

type TaskResponseDeleteOne

type TaskResponseDeleteOne struct {
	// contains filtered or unexported fields
}

TaskResponseDeleteOne is the builder for deleting a single TaskResponse entity.

func (*TaskResponseDeleteOne) Exec

func (trdo *TaskResponseDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TaskResponseDeleteOne) ExecX

func (trdo *TaskResponseDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type TaskResponseEdges

type TaskResponseEdges struct {
	// Author holds the value of the author edge.
	Author *Doctor
	// Task holds the value of the task edge.
	Task *Task
	// contains filtered or unexported fields
}

TaskResponseEdges holds the relations/edges for other nodes in the graph.

func (TaskResponseEdges) AuthorOrErr

func (e TaskResponseEdges) AuthorOrErr() (*Doctor, error)

AuthorOrErr returns the Author value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (TaskResponseEdges) TaskOrErr

func (e TaskResponseEdges) TaskOrErr() (*Task, error)

TaskOrErr returns the Task value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type TaskResponseGroupBy

type TaskResponseGroupBy struct {
	// contains filtered or unexported fields
}

TaskResponseGroupBy is the builder for group-by TaskResponse entities.

func (*TaskResponseGroupBy) Aggregate

func (trgb *TaskResponseGroupBy) Aggregate(fns ...Aggregate) *TaskResponseGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*TaskResponseGroupBy) Bools

func (trgb *TaskResponseGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.

func (*TaskResponseGroupBy) BoolsX

func (trgb *TaskResponseGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TaskResponseGroupBy) Float64s

func (trgb *TaskResponseGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.

func (*TaskResponseGroupBy) Float64sX

func (trgb *TaskResponseGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TaskResponseGroupBy) Ints

func (trgb *TaskResponseGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.

func (*TaskResponseGroupBy) IntsX

func (trgb *TaskResponseGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TaskResponseGroupBy) Scan

func (trgb *TaskResponseGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scan the result into the given value.

func (*TaskResponseGroupBy) ScanX

func (trgb *TaskResponseGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*TaskResponseGroupBy) Strings

func (trgb *TaskResponseGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when querying group-by with one field.

func (*TaskResponseGroupBy) StringsX

func (trgb *TaskResponseGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TaskResponseQuery

type TaskResponseQuery struct {
	// contains filtered or unexported fields
}

TaskResponseQuery is the builder for querying TaskResponse entities.

func (*TaskResponseQuery) All

func (trq *TaskResponseQuery) All(ctx context.Context) ([]*TaskResponse, error)

All executes the query and returns a list of TaskResponses.

func (*TaskResponseQuery) AllX

func (trq *TaskResponseQuery) AllX(ctx context.Context) []*TaskResponse

AllX is like All, but panics if an error occurs.

func (*TaskResponseQuery) Clone

func (trq *TaskResponseQuery) Clone() *TaskResponseQuery

Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TaskResponseQuery) Count

func (trq *TaskResponseQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TaskResponseQuery) CountX

func (trq *TaskResponseQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TaskResponseQuery) Exist

func (trq *TaskResponseQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TaskResponseQuery) ExistX

func (trq *TaskResponseQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TaskResponseQuery) First

func (trq *TaskResponseQuery) First(ctx context.Context) (*TaskResponse, error)

First returns the first TaskResponse entity in the query. Returns *NotFoundError when no taskresponse was found.

func (*TaskResponseQuery) FirstID

func (trq *TaskResponseQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first TaskResponse id in the query. Returns *NotFoundError when no id was found.

func (*TaskResponseQuery) FirstX

func (trq *TaskResponseQuery) FirstX(ctx context.Context) *TaskResponse

FirstX is like First, but panics if an error occurs.

func (*TaskResponseQuery) FirstXID

func (trq *TaskResponseQuery) FirstXID(ctx context.Context) uuid.UUID

FirstXID is like FirstID, but panics if an error occurs.

func (*TaskResponseQuery) GroupBy

func (trq *TaskResponseQuery) GroupBy(field string, fields ...string) *TaskResponseGroupBy

GroupBy used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	At time.Time `json:"at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.TaskResponse.Query().
	GroupBy(taskresponse.FieldAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TaskResponseQuery) IDs

func (trq *TaskResponseQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of TaskResponse ids.

func (*TaskResponseQuery) IDsX

func (trq *TaskResponseQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*TaskResponseQuery) Limit

func (trq *TaskResponseQuery) Limit(limit int) *TaskResponseQuery

Limit adds a limit step to the query.

func (*TaskResponseQuery) Offset

func (trq *TaskResponseQuery) Offset(offset int) *TaskResponseQuery

Offset adds an offset step to the query.

func (*TaskResponseQuery) Only

func (trq *TaskResponseQuery) Only(ctx context.Context) (*TaskResponse, error)

Only returns the only TaskResponse entity in the query, returns an error if not exactly one entity was returned.

func (*TaskResponseQuery) OnlyID

func (trq *TaskResponseQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID returns the only TaskResponse id in the query, returns an error if not exactly one id was returned.

func (*TaskResponseQuery) OnlyX

func (trq *TaskResponseQuery) OnlyX(ctx context.Context) *TaskResponse

OnlyX is like Only, but panics if an error occurs.

func (*TaskResponseQuery) OnlyXID

func (trq *TaskResponseQuery) OnlyXID(ctx context.Context) uuid.UUID

OnlyXID is like OnlyID, but panics if an error occurs.

func (*TaskResponseQuery) Order

func (trq *TaskResponseQuery) Order(o ...Order) *TaskResponseQuery

Order adds an order step to the query.

func (*TaskResponseQuery) QueryAuthor

func (trq *TaskResponseQuery) QueryAuthor() *DoctorQuery

QueryAuthor chains the current query on the author edge.

func (*TaskResponseQuery) QueryTask

func (trq *TaskResponseQuery) QueryTask() *TaskQuery

QueryTask chains the current query on the task edge.

func (*TaskResponseQuery) Select

func (trq *TaskResponseQuery) Select(field string, fields ...string) *TaskResponseSelect

Select one or more fields from the given query.

Example:

var v []struct {
	At time.Time `json:"at,omitempty"`
}

client.TaskResponse.Query().
	Select(taskresponse.FieldAt).
	Scan(ctx, &v)

func (*TaskResponseQuery) Where

Where adds a new predicate for the builder.

func (*TaskResponseQuery) WithAuthor

func (trq *TaskResponseQuery) WithAuthor(opts ...func(*DoctorQuery)) *TaskResponseQuery
WithAuthor tells the query-builder to eager-loads the nodes that are connected to

the "author" edge. The optional arguments used to configure the query builder of the edge.

func (*TaskResponseQuery) WithTask

func (trq *TaskResponseQuery) WithTask(opts ...func(*TaskQuery)) *TaskResponseQuery
WithTask tells the query-builder to eager-loads the nodes that are connected to

the "task" edge. The optional arguments used to configure the query builder of the edge.

type TaskResponseSelect

type TaskResponseSelect struct {
	// contains filtered or unexported fields
}

TaskResponseSelect is the builder for select fields of TaskResponse entities.

func (*TaskResponseSelect) Bools

func (trs *TaskResponseSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from selector. It is only allowed when selecting one field.

func (*TaskResponseSelect) BoolsX

func (trs *TaskResponseSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TaskResponseSelect) Float64s

func (trs *TaskResponseSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from selector. It is only allowed when selecting one field.

func (*TaskResponseSelect) Float64sX

func (trs *TaskResponseSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TaskResponseSelect) Ints

func (trs *TaskResponseSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from selector. It is only allowed when selecting one field.

func (*TaskResponseSelect) IntsX

func (trs *TaskResponseSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TaskResponseSelect) Scan

func (trs *TaskResponseSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scan the result into the given value.

func (*TaskResponseSelect) ScanX

func (trs *TaskResponseSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*TaskResponseSelect) Strings

func (trs *TaskResponseSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from selector. It is only allowed when selecting one field.

func (*TaskResponseSelect) StringsX

func (trs *TaskResponseSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TaskResponseUpdate

type TaskResponseUpdate struct {
	// contains filtered or unexported fields
}

TaskResponseUpdate is the builder for updating TaskResponse entities.

func (*TaskResponseUpdate) ClearAuthor

func (tru *TaskResponseUpdate) ClearAuthor() *TaskResponseUpdate

ClearAuthor clears the author edge to Doctor.

func (*TaskResponseUpdate) ClearMeta

func (tru *TaskResponseUpdate) ClearMeta() *TaskResponseUpdate

ClearMeta clears the value of meta.

func (*TaskResponseUpdate) ClearTask

func (tru *TaskResponseUpdate) ClearTask() *TaskResponseUpdate

ClearTask clears the task edge to Task.

func (*TaskResponseUpdate) Exec

func (tru *TaskResponseUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TaskResponseUpdate) ExecX

func (tru *TaskResponseUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TaskResponseUpdate) Save

func (tru *TaskResponseUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of rows/vertices matched by this operation.

func (*TaskResponseUpdate) SaveX

func (tru *TaskResponseUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TaskResponseUpdate) SetAt

SetAt sets the at field.

func (*TaskResponseUpdate) SetAuthor

func (tru *TaskResponseUpdate) SetAuthor(d *Doctor) *TaskResponseUpdate

SetAuthor sets the author edge to Doctor.

func (*TaskResponseUpdate) SetAuthorID

func (tru *TaskResponseUpdate) SetAuthorID(id uuid.UUID) *TaskResponseUpdate

SetAuthorID sets the author edge to Doctor by id.

func (*TaskResponseUpdate) SetLastChange

func (tru *TaskResponseUpdate) SetLastChange(t time.Time) *TaskResponseUpdate

SetLastChange sets the lastChange field.

func (*TaskResponseUpdate) SetMeta

func (tru *TaskResponseUpdate) SetMeta(s []string) *TaskResponseUpdate

SetMeta sets the meta field.

func (*TaskResponseUpdate) SetNillableAt

func (tru *TaskResponseUpdate) SetNillableAt(t *time.Time) *TaskResponseUpdate

SetNillableAt sets the at field if the given value is not nil.

func (*TaskResponseUpdate) SetNillableLastChange

func (tru *TaskResponseUpdate) SetNillableLastChange(t *time.Time) *TaskResponseUpdate

SetNillableLastChange sets the lastChange field if the given value is not nil.

func (*TaskResponseUpdate) SetObservations

func (tru *TaskResponseUpdate) SetObservations(s []string) *TaskResponseUpdate

SetObservations sets the observations field.

func (*TaskResponseUpdate) SetTask

func (tru *TaskResponseUpdate) SetTask(t *Task) *TaskResponseUpdate

SetTask sets the task edge to Task.

func (*TaskResponseUpdate) SetTaskID

func (tru *TaskResponseUpdate) SetTaskID(id uuid.UUID) *TaskResponseUpdate

SetTaskID sets the task edge to Task by id.

func (*TaskResponseUpdate) Where

Where adds a new predicate for the builder.

type TaskResponseUpdateOne

type TaskResponseUpdateOne struct {
	// contains filtered or unexported fields
}

TaskResponseUpdateOne is the builder for updating a single TaskResponse entity.

func (*TaskResponseUpdateOne) ClearAuthor

func (truo *TaskResponseUpdateOne) ClearAuthor() *TaskResponseUpdateOne

ClearAuthor clears the author edge to Doctor.

func (*TaskResponseUpdateOne) ClearMeta

func (truo *TaskResponseUpdateOne) ClearMeta() *TaskResponseUpdateOne

ClearMeta clears the value of meta.

func (*TaskResponseUpdateOne) ClearTask

func (truo *TaskResponseUpdateOne) ClearTask() *TaskResponseUpdateOne

ClearTask clears the task edge to Task.

func (*TaskResponseUpdateOne) Exec

func (truo *TaskResponseUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TaskResponseUpdateOne) ExecX

func (truo *TaskResponseUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TaskResponseUpdateOne) Save

Save executes the query and returns the updated entity.

func (*TaskResponseUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*TaskResponseUpdateOne) SetAt

SetAt sets the at field.

func (*TaskResponseUpdateOne) SetAuthor

func (truo *TaskResponseUpdateOne) SetAuthor(d *Doctor) *TaskResponseUpdateOne

SetAuthor sets the author edge to Doctor.

func (*TaskResponseUpdateOne) SetAuthorID

func (truo *TaskResponseUpdateOne) SetAuthorID(id uuid.UUID) *TaskResponseUpdateOne

SetAuthorID sets the author edge to Doctor by id.

func (*TaskResponseUpdateOne) SetLastChange

func (truo *TaskResponseUpdateOne) SetLastChange(t time.Time) *TaskResponseUpdateOne

SetLastChange sets the lastChange field.

func (*TaskResponseUpdateOne) SetMeta

SetMeta sets the meta field.

func (*TaskResponseUpdateOne) SetNillableAt

func (truo *TaskResponseUpdateOne) SetNillableAt(t *time.Time) *TaskResponseUpdateOne

SetNillableAt sets the at field if the given value is not nil.

func (*TaskResponseUpdateOne) SetNillableLastChange

func (truo *TaskResponseUpdateOne) SetNillableLastChange(t *time.Time) *TaskResponseUpdateOne

SetNillableLastChange sets the lastChange field if the given value is not nil.

func (*TaskResponseUpdateOne) SetObservations

func (truo *TaskResponseUpdateOne) SetObservations(s []string) *TaskResponseUpdateOne

SetObservations sets the observations field.

func (*TaskResponseUpdateOne) SetTask

SetTask sets the task edge to Task.

func (*TaskResponseUpdateOne) SetTaskID

SetTaskID sets the task edge to Task by id.

type TaskResponses

type TaskResponses []*TaskResponse

TaskResponses is a parsable slice of TaskResponse.

type TaskSelect

type TaskSelect struct {
	// contains filtered or unexported fields
}

TaskSelect is the builder for select fields of Task entities.

func (*TaskSelect) Bools

func (ts *TaskSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from selector. It is only allowed when selecting one field.

func (*TaskSelect) BoolsX

func (ts *TaskSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TaskSelect) Float64s

func (ts *TaskSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from selector. It is only allowed when selecting one field.

func (*TaskSelect) Float64sX

func (ts *TaskSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TaskSelect) Ints

func (ts *TaskSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from selector. It is only allowed when selecting one field.

func (*TaskSelect) IntsX

func (ts *TaskSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TaskSelect) Scan

func (ts *TaskSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scan the result into the given value.

func (*TaskSelect) ScanX

func (ts *TaskSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*TaskSelect) Strings

func (ts *TaskSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from selector. It is only allowed when selecting one field.

func (*TaskSelect) StringsX

func (ts *TaskSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TaskUpdate

type TaskUpdate struct {
	// contains filtered or unexported fields
}

TaskUpdate is the builder for updating Task entities.

func (*TaskUpdate) AddResponseIDs

func (tu *TaskUpdate) AddResponseIDs(ids ...uuid.UUID) *TaskUpdate

AddResponseIDs adds the responses edge to TaskResponse by ids.

func (*TaskUpdate) AddResponses

func (tu *TaskUpdate) AddResponses(t ...*TaskResponse) *TaskUpdate

AddResponses adds the responses edges to TaskResponse.

func (*TaskUpdate) AddResponsible

func (tu *TaskUpdate) AddResponsible(d ...*Doctor) *TaskUpdate

AddResponsible adds the responsible edges to Doctor.

func (*TaskUpdate) AddResponsibleIDs

func (tu *TaskUpdate) AddResponsibleIDs(ids ...uuid.UUID) *TaskUpdate

AddResponsibleIDs adds the responsible edge to Doctor by ids.

func (*TaskUpdate) ClearDescription

func (tu *TaskUpdate) ClearDescription() *TaskUpdate

ClearDescription clears the value of description.

func (*TaskUpdate) ClearSchedule

func (tu *TaskUpdate) ClearSchedule() *TaskUpdate

ClearSchedule clears the schedule edge to Schedule.

func (*TaskUpdate) Exec

func (tu *TaskUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TaskUpdate) ExecX

func (tu *TaskUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TaskUpdate) RemoveResponseIDs

func (tu *TaskUpdate) RemoveResponseIDs(ids ...uuid.UUID) *TaskUpdate

RemoveResponseIDs removes the responses edge to TaskResponse by ids.

func (*TaskUpdate) RemoveResponses

func (tu *TaskUpdate) RemoveResponses(t ...*TaskResponse) *TaskUpdate

RemoveResponses removes responses edges to TaskResponse.

func (*TaskUpdate) RemoveResponsible

func (tu *TaskUpdate) RemoveResponsible(d ...*Doctor) *TaskUpdate

RemoveResponsible removes responsible edges to Doctor.

func (*TaskUpdate) RemoveResponsibleIDs

func (tu *TaskUpdate) RemoveResponsibleIDs(ids ...uuid.UUID) *TaskUpdate

RemoveResponsibleIDs removes the responsible edge to Doctor by ids.

func (*TaskUpdate) Save

func (tu *TaskUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of rows/vertices matched by this operation.

func (*TaskUpdate) SaveX

func (tu *TaskUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TaskUpdate) SetDescription

func (tu *TaskUpdate) SetDescription(s []string) *TaskUpdate

SetDescription sets the description field.

func (*TaskUpdate) SetEndsAt

func (tu *TaskUpdate) SetEndsAt(t time.Time) *TaskUpdate

SetEndsAt sets the endsAt field.

func (*TaskUpdate) SetNillableEndsAt

func (tu *TaskUpdate) SetNillableEndsAt(t *time.Time) *TaskUpdate

SetNillableEndsAt sets the endsAt field if the given value is not nil.

func (*TaskUpdate) SetNillableScheduleID

func (tu *TaskUpdate) SetNillableScheduleID(id *uuid.UUID) *TaskUpdate

SetNillableScheduleID sets the schedule edge to Schedule by id if the given value is not nil.

func (*TaskUpdate) SetNillableStartAt

func (tu *TaskUpdate) SetNillableStartAt(t *time.Time) *TaskUpdate

SetNillableStartAt sets the startAt field if the given value is not nil.

func (*TaskUpdate) SetSchedule

func (tu *TaskUpdate) SetSchedule(s *Schedule) *TaskUpdate

SetSchedule sets the schedule edge to Schedule.

func (*TaskUpdate) SetScheduleID

func (tu *TaskUpdate) SetScheduleID(id uuid.UUID) *TaskUpdate

SetScheduleID sets the schedule edge to Schedule by id.

func (*TaskUpdate) SetStartAt

func (tu *TaskUpdate) SetStartAt(t time.Time) *TaskUpdate

SetStartAt sets the startAt field.

func (*TaskUpdate) Where

func (tu *TaskUpdate) Where(ps ...predicate.Task) *TaskUpdate

Where adds a new predicate for the builder.

type TaskUpdateOne

type TaskUpdateOne struct {
	// contains filtered or unexported fields
}

TaskUpdateOne is the builder for updating a single Task entity.

func (*TaskUpdateOne) AddResponseIDs

func (tuo *TaskUpdateOne) AddResponseIDs(ids ...uuid.UUID) *TaskUpdateOne

AddResponseIDs adds the responses edge to TaskResponse by ids.

func (*TaskUpdateOne) AddResponses

func (tuo *TaskUpdateOne) AddResponses(t ...*TaskResponse) *TaskUpdateOne

AddResponses adds the responses edges to TaskResponse.

func (*TaskUpdateOne) AddResponsible

func (tuo *TaskUpdateOne) AddResponsible(d ...*Doctor) *TaskUpdateOne

AddResponsible adds the responsible edges to Doctor.

func (*TaskUpdateOne) AddResponsibleIDs

func (tuo *TaskUpdateOne) AddResponsibleIDs(ids ...uuid.UUID) *TaskUpdateOne

AddResponsibleIDs adds the responsible edge to Doctor by ids.

func (*TaskUpdateOne) ClearDescription

func (tuo *TaskUpdateOne) ClearDescription() *TaskUpdateOne

ClearDescription clears the value of description.

func (*TaskUpdateOne) ClearSchedule

func (tuo *TaskUpdateOne) ClearSchedule() *TaskUpdateOne

ClearSchedule clears the schedule edge to Schedule.

func (*TaskUpdateOne) Exec

func (tuo *TaskUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TaskUpdateOne) ExecX

func (tuo *TaskUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TaskUpdateOne) RemoveResponseIDs

func (tuo *TaskUpdateOne) RemoveResponseIDs(ids ...uuid.UUID) *TaskUpdateOne

RemoveResponseIDs removes the responses edge to TaskResponse by ids.

func (*TaskUpdateOne) RemoveResponses

func (tuo *TaskUpdateOne) RemoveResponses(t ...*TaskResponse) *TaskUpdateOne

RemoveResponses removes responses edges to TaskResponse.

func (*TaskUpdateOne) RemoveResponsible

func (tuo *TaskUpdateOne) RemoveResponsible(d ...*Doctor) *TaskUpdateOne

RemoveResponsible removes responsible edges to Doctor.

func (*TaskUpdateOne) RemoveResponsibleIDs

func (tuo *TaskUpdateOne) RemoveResponsibleIDs(ids ...uuid.UUID) *TaskUpdateOne

RemoveResponsibleIDs removes the responsible edge to Doctor by ids.

func (*TaskUpdateOne) Save

func (tuo *TaskUpdateOne) Save(ctx context.Context) (*Task, error)

Save executes the query and returns the updated entity.

func (*TaskUpdateOne) SaveX

func (tuo *TaskUpdateOne) SaveX(ctx context.Context) *Task

SaveX is like Save, but panics if an error occurs.

func (*TaskUpdateOne) SetDescription

func (tuo *TaskUpdateOne) SetDescription(s []string) *TaskUpdateOne

SetDescription sets the description field.

func (*TaskUpdateOne) SetEndsAt

func (tuo *TaskUpdateOne) SetEndsAt(t time.Time) *TaskUpdateOne

SetEndsAt sets the endsAt field.

func (*TaskUpdateOne) SetNillableEndsAt

func (tuo *TaskUpdateOne) SetNillableEndsAt(t *time.Time) *TaskUpdateOne

SetNillableEndsAt sets the endsAt field if the given value is not nil.

func (*TaskUpdateOne) SetNillableScheduleID

func (tuo *TaskUpdateOne) SetNillableScheduleID(id *uuid.UUID) *TaskUpdateOne

SetNillableScheduleID sets the schedule edge to Schedule by id if the given value is not nil.

func (*TaskUpdateOne) SetNillableStartAt

func (tuo *TaskUpdateOne) SetNillableStartAt(t *time.Time) *TaskUpdateOne

SetNillableStartAt sets the startAt field if the given value is not nil.

func (*TaskUpdateOne) SetSchedule

func (tuo *TaskUpdateOne) SetSchedule(s *Schedule) *TaskUpdateOne

SetSchedule sets the schedule edge to Schedule.

func (*TaskUpdateOne) SetScheduleID

func (tuo *TaskUpdateOne) SetScheduleID(id uuid.UUID) *TaskUpdateOne

SetScheduleID sets the schedule edge to Schedule by id.

func (*TaskUpdateOne) SetStartAt

func (tuo *TaskUpdateOne) SetStartAt(t time.Time) *TaskUpdateOne

SetStartAt sets the startAt field.

type Tasks

type Tasks []*Task

Tasks is a parsable slice of Task.

type Test

type Test struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Notes holds the value of the "notes" field.
	Notes []string `json:"notes,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TestQuery when eager-loading is set.
	Edges TestEdges `json:"edges"`
	// contains filtered or unexported fields
}

Test is the model entity for the Test schema.

func (*Test) QueryClinical

func (t *Test) QueryClinical() *ClinicalResultsQuery

QueryClinical queries the clinical edge of the Test.

func (*Test) QueryEpidemiologic

func (t *Test) QueryEpidemiologic() *EpidemiologicResultsQuery

QueryEpidemiologic queries the epidemiologic edge of the Test.

func (*Test) QueryHistory

func (t *Test) QueryHistory() *HistoryQuery

QueryHistory queries the history edge of the Test.

func (*Test) String

func (t *Test) String() string

String implements the fmt.Stringer.

func (*Test) Unwrap

func (t *Test) Unwrap() *Test

Unwrap unwraps the entity that was returned from a transaction after it was closed, so that all next queries will be executed through the driver which created the transaction.

func (*Test) Update

func (t *Test) Update() *TestUpdateOne

Update returns a builder for updating this Test. Note that, you need to call Test.Unwrap() before calling this method, if this Test was returned from a transaction, and the transaction was committed or rolled back.

type TestClient

type TestClient struct {
	// contains filtered or unexported fields
}

TestClient is a client for the Test schema.

func NewTestClient

func NewTestClient(c config) *TestClient

NewTestClient returns a client for the Test from the given config.

func (*TestClient) Create

func (c *TestClient) Create() *TestCreate

Create returns a create builder for Test.

func (*TestClient) Delete

func (c *TestClient) Delete() *TestDelete

Delete returns a delete builder for Test.

func (*TestClient) DeleteOne

func (c *TestClient) DeleteOne(t *Test) *TestDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*TestClient) DeleteOneID

func (c *TestClient) DeleteOneID(id uuid.UUID) *TestDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*TestClient) Get

func (c *TestClient) Get(ctx context.Context, id uuid.UUID) (*Test, error)

Get returns a Test entity by its id.

func (*TestClient) GetX

func (c *TestClient) GetX(ctx context.Context, id uuid.UUID) *Test

GetX is like Get, but panics if an error occurs.

func (*TestClient) Query

func (c *TestClient) Query() *TestQuery

Create returns a query builder for Test.

func (*TestClient) QueryClinical

func (c *TestClient) QueryClinical(t *Test) *ClinicalResultsQuery

QueryClinical queries the clinical edge of a Test.

func (*TestClient) QueryEpidemiologic

func (c *TestClient) QueryEpidemiologic(t *Test) *EpidemiologicResultsQuery

QueryEpidemiologic queries the epidemiologic edge of a Test.

func (*TestClient) QueryHistory

func (c *TestClient) QueryHistory(t *Test) *HistoryQuery

QueryHistory queries the history edge of a Test.

func (*TestClient) Update

func (c *TestClient) Update() *TestUpdate

Update returns an update builder for Test.

func (*TestClient) UpdateOne

func (c *TestClient) UpdateOne(t *Test) *TestUpdateOne

UpdateOne returns an update builder for the given entity.

func (*TestClient) UpdateOneID

func (c *TestClient) UpdateOneID(id uuid.UUID) *TestUpdateOne

UpdateOneID returns an update builder for the given id.

type TestCreate

type TestCreate struct {
	// contains filtered or unexported fields
}

TestCreate is the builder for creating a Test entity.

func (*TestCreate) AddClinical

func (tc *TestCreate) AddClinical(c ...*ClinicalResults) *TestCreate

AddClinical adds the clinical edges to ClinicalResults.

func (*TestCreate) AddClinicalIDs

func (tc *TestCreate) AddClinicalIDs(ids ...uuid.UUID) *TestCreate

AddClinicalIDs adds the clinical edge to ClinicalResults by ids.

func (*TestCreate) AddEpidemiologic

func (tc *TestCreate) AddEpidemiologic(e ...*EpidemiologicResults) *TestCreate

AddEpidemiologic adds the epidemiologic edges to EpidemiologicResults.

func (*TestCreate) AddEpidemiologicIDs

func (tc *TestCreate) AddEpidemiologicIDs(ids ...uuid.UUID) *TestCreate

AddEpidemiologicIDs adds the epidemiologic edge to EpidemiologicResults by ids.

func (*TestCreate) Save

func (tc *TestCreate) Save(ctx context.Context) (*Test, error)

Save creates the Test in the database.

func (*TestCreate) SaveX

func (tc *TestCreate) SaveX(ctx context.Context) *Test

SaveX calls Save and panics if Save returns an error.

func (*TestCreate) SetHistory

func (tc *TestCreate) SetHistory(h *History) *TestCreate

SetHistory sets the history edge to History.

func (*TestCreate) SetHistoryID

func (tc *TestCreate) SetHistoryID(id uuid.UUID) *TestCreate

SetHistoryID sets the history edge to History by id.

func (*TestCreate) SetID

func (tc *TestCreate) SetID(u uuid.UUID) *TestCreate

SetID sets the id field.

func (*TestCreate) SetNillableHistoryID

func (tc *TestCreate) SetNillableHistoryID(id *uuid.UUID) *TestCreate

SetNillableHistoryID sets the history edge to History by id if the given value is not nil.

func (*TestCreate) SetNotes

func (tc *TestCreate) SetNotes(s []string) *TestCreate

SetNotes sets the notes field.

type TestDelete

type TestDelete struct {
	// contains filtered or unexported fields
}

TestDelete is the builder for deleting a Test entity.

func (*TestDelete) Exec

func (td *TestDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TestDelete) ExecX

func (td *TestDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TestDelete) Where

func (td *TestDelete) Where(ps ...predicate.Test) *TestDelete

Where adds a new predicate to the delete builder.

type TestDeleteOne

type TestDeleteOne struct {
	// contains filtered or unexported fields
}

TestDeleteOne is the builder for deleting a single Test entity.

func (*TestDeleteOne) Exec

func (tdo *TestDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TestDeleteOne) ExecX

func (tdo *TestDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type TestEdges

type TestEdges struct {
	// History holds the value of the history edge.
	History *History
	// Clinical holds the value of the clinical edge.
	Clinical []*ClinicalResults
	// Epidemiologic holds the value of the epidemiologic edge.
	Epidemiologic []*EpidemiologicResults
	// contains filtered or unexported fields
}

TestEdges holds the relations/edges for other nodes in the graph.

func (TestEdges) ClinicalOrErr

func (e TestEdges) ClinicalOrErr() ([]*ClinicalResults, error)

ClinicalOrErr returns the Clinical value or an error if the edge was not loaded in eager-loading.

func (TestEdges) EpidemiologicOrErr

func (e TestEdges) EpidemiologicOrErr() ([]*EpidemiologicResults, error)

EpidemiologicOrErr returns the Epidemiologic value or an error if the edge was not loaded in eager-loading.

func (TestEdges) HistoryOrErr

func (e TestEdges) HistoryOrErr() (*History, error)

HistoryOrErr returns the History value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type TestGroupBy

type TestGroupBy struct {
	// contains filtered or unexported fields
}

TestGroupBy is the builder for group-by Test entities.

func (*TestGroupBy) Aggregate

func (tgb *TestGroupBy) Aggregate(fns ...Aggregate) *TestGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*TestGroupBy) Bools

func (tgb *TestGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when querying group-by with one field.

func (*TestGroupBy) BoolsX

func (tgb *TestGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TestGroupBy) Float64s

func (tgb *TestGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when querying group-by with one field.

func (*TestGroupBy) Float64sX

func (tgb *TestGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TestGroupBy) Ints

func (tgb *TestGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when querying group-by with one field.

func (*TestGroupBy) IntsX

func (tgb *TestGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TestGroupBy) Scan

func (tgb *TestGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scan the result into the given value.

func (*TestGroupBy) ScanX

func (tgb *TestGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*TestGroupBy) Strings

func (tgb *TestGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when querying group-by with one field.

func (*TestGroupBy) StringsX

func (tgb *TestGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TestQuery

type TestQuery struct {
	// contains filtered or unexported fields
}

TestQuery is the builder for querying Test entities.

func (*TestQuery) All

func (tq *TestQuery) All(ctx context.Context) ([]*Test, error)

All executes the query and returns a list of Tests.

func (*TestQuery) AllX

func (tq *TestQuery) AllX(ctx context.Context) []*Test

AllX is like All, but panics if an error occurs.

func (*TestQuery) Clone

func (tq *TestQuery) Clone() *TestQuery

Clone returns a duplicate of the query builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TestQuery) Count

func (tq *TestQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TestQuery) CountX

func (tq *TestQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TestQuery) Exist

func (tq *TestQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TestQuery) ExistX

func (tq *TestQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TestQuery) First

func (tq *TestQuery) First(ctx context.Context) (*Test, error)

First returns the first Test entity in the query. Returns *NotFoundError when no test was found.

func (*TestQuery) FirstID

func (tq *TestQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Test id in the query. Returns *NotFoundError when no id was found.

func (*TestQuery) FirstX

func (tq *TestQuery) FirstX(ctx context.Context) *Test

FirstX is like First, but panics if an error occurs.

func (*TestQuery) FirstXID

func (tq *TestQuery) FirstXID(ctx context.Context) uuid.UUID

FirstXID is like FirstID, but panics if an error occurs.

func (*TestQuery) GroupBy

func (tq *TestQuery) GroupBy(field string, fields ...string) *TestGroupBy

GroupBy used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Notes []string `json:"notes,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Test.Query().
	GroupBy(test.FieldNotes).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TestQuery) IDs

func (tq *TestQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of Test ids.

func (*TestQuery) IDsX

func (tq *TestQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*TestQuery) Limit

func (tq *TestQuery) Limit(limit int) *TestQuery

Limit adds a limit step to the query.

func (*TestQuery) Offset

func (tq *TestQuery) Offset(offset int) *TestQuery

Offset adds an offset step to the query.

func (*TestQuery) Only

func (tq *TestQuery) Only(ctx context.Context) (*Test, error)

Only returns the only Test entity in the query, returns an error if not exactly one entity was returned.

func (*TestQuery) OnlyID

func (tq *TestQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID returns the only Test id in the query, returns an error if not exactly one id was returned.

func (*TestQuery) OnlyX

func (tq *TestQuery) OnlyX(ctx context.Context) *Test

OnlyX is like Only, but panics if an error occurs.

func (*TestQuery) OnlyXID

func (tq *TestQuery) OnlyXID(ctx context.Context) uuid.UUID

OnlyXID is like OnlyID, but panics if an error occurs.

func (*TestQuery) Order

func (tq *TestQuery) Order(o ...Order) *TestQuery

Order adds an order step to the query.

func (*TestQuery) QueryClinical

func (tq *TestQuery) QueryClinical() *ClinicalResultsQuery

QueryClinical chains the current query on the clinical edge.

func (*TestQuery) QueryEpidemiologic

func (tq *TestQuery) QueryEpidemiologic() *EpidemiologicResultsQuery

QueryEpidemiologic chains the current query on the epidemiologic edge.

func (*TestQuery) QueryHistory

func (tq *TestQuery) QueryHistory() *HistoryQuery

QueryHistory chains the current query on the history edge.

func (*TestQuery) Select

func (tq *TestQuery) Select(field string, fields ...string) *TestSelect

Select one or more fields from the given query.

Example:

var v []struct {
	Notes []string `json:"notes,omitempty"`
}

client.Test.Query().
	Select(test.FieldNotes).
	Scan(ctx, &v)

func (*TestQuery) Where

func (tq *TestQuery) Where(ps ...predicate.Test) *TestQuery

Where adds a new predicate for the builder.

func (*TestQuery) WithClinical

func (tq *TestQuery) WithClinical(opts ...func(*ClinicalResultsQuery)) *TestQuery
WithClinical tells the query-builder to eager-loads the nodes that are connected to

the "clinical" edge. The optional arguments used to configure the query builder of the edge.

func (*TestQuery) WithEpidemiologic

func (tq *TestQuery) WithEpidemiologic(opts ...func(*EpidemiologicResultsQuery)) *TestQuery
WithEpidemiologic tells the query-builder to eager-loads the nodes that are connected to

the "epidemiologic" edge. The optional arguments used to configure the query builder of the edge.

func (*TestQuery) WithHistory

func (tq *TestQuery) WithHistory(opts ...func(*HistoryQuery)) *TestQuery
WithHistory tells the query-builder to eager-loads the nodes that are connected to

the "history" edge. The optional arguments used to configure the query builder of the edge.

type TestSelect

type TestSelect struct {
	// contains filtered or unexported fields
}

TestSelect is the builder for select fields of Test entities.

func (*TestSelect) Bools

func (ts *TestSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from selector. It is only allowed when selecting one field.

func (*TestSelect) BoolsX

func (ts *TestSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TestSelect) Float64s

func (ts *TestSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from selector. It is only allowed when selecting one field.

func (*TestSelect) Float64sX

func (ts *TestSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TestSelect) Ints

func (ts *TestSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from selector. It is only allowed when selecting one field.

func (*TestSelect) IntsX

func (ts *TestSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TestSelect) Scan

func (ts *TestSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scan the result into the given value.

func (*TestSelect) ScanX

func (ts *TestSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*TestSelect) Strings

func (ts *TestSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from selector. It is only allowed when selecting one field.

func (*TestSelect) StringsX

func (ts *TestSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TestUpdate

type TestUpdate struct {
	// contains filtered or unexported fields
}

TestUpdate is the builder for updating Test entities.

func (*TestUpdate) AddClinical

func (tu *TestUpdate) AddClinical(c ...*ClinicalResults) *TestUpdate

AddClinical adds the clinical edges to ClinicalResults.

func (*TestUpdate) AddClinicalIDs

func (tu *TestUpdate) AddClinicalIDs(ids ...uuid.UUID) *TestUpdate

AddClinicalIDs adds the clinical edge to ClinicalResults by ids.

func (*TestUpdate) AddEpidemiologic

func (tu *TestUpdate) AddEpidemiologic(e ...*EpidemiologicResults) *TestUpdate

AddEpidemiologic adds the epidemiologic edges to EpidemiologicResults.

func (*TestUpdate) AddEpidemiologicIDs

func (tu *TestUpdate) AddEpidemiologicIDs(ids ...uuid.UUID) *TestUpdate

AddEpidemiologicIDs adds the epidemiologic edge to EpidemiologicResults by ids.

func (*TestUpdate) ClearHistory

func (tu *TestUpdate) ClearHistory() *TestUpdate

ClearHistory clears the history edge to History.

func (*TestUpdate) ClearNotes

func (tu *TestUpdate) ClearNotes() *TestUpdate

ClearNotes clears the value of notes.

func (*TestUpdate) Exec

func (tu *TestUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TestUpdate) ExecX

func (tu *TestUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TestUpdate) RemoveClinical

func (tu *TestUpdate) RemoveClinical(c ...*ClinicalResults) *TestUpdate

RemoveClinical removes clinical edges to ClinicalResults.

func (*TestUpdate) RemoveClinicalIDs

func (tu *TestUpdate) RemoveClinicalIDs(ids ...uuid.UUID) *TestUpdate

RemoveClinicalIDs removes the clinical edge to ClinicalResults by ids.

func (*TestUpdate) RemoveEpidemiologic

func (tu *TestUpdate) RemoveEpidemiologic(e ...*EpidemiologicResults) *TestUpdate

RemoveEpidemiologic removes epidemiologic edges to EpidemiologicResults.

func (*TestUpdate) RemoveEpidemiologicIDs

func (tu *TestUpdate) RemoveEpidemiologicIDs(ids ...uuid.UUID) *TestUpdate

RemoveEpidemiologicIDs removes the epidemiologic edge to EpidemiologicResults by ids.

func (*TestUpdate) Save

func (tu *TestUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of rows/vertices matched by this operation.

func (*TestUpdate) SaveX

func (tu *TestUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TestUpdate) SetHistory

func (tu *TestUpdate) SetHistory(h *History) *TestUpdate

SetHistory sets the history edge to History.

func (*TestUpdate) SetHistoryID

func (tu *TestUpdate) SetHistoryID(id uuid.UUID) *TestUpdate

SetHistoryID sets the history edge to History by id.

func (*TestUpdate) SetNillableHistoryID

func (tu *TestUpdate) SetNillableHistoryID(id *uuid.UUID) *TestUpdate

SetNillableHistoryID sets the history edge to History by id if the given value is not nil.

func (*TestUpdate) SetNotes

func (tu *TestUpdate) SetNotes(s []string) *TestUpdate

SetNotes sets the notes field.

func (*TestUpdate) Where

func (tu *TestUpdate) Where(ps ...predicate.Test) *TestUpdate

Where adds a new predicate for the builder.

type TestUpdateOne

type TestUpdateOne struct {
	// contains filtered or unexported fields
}

TestUpdateOne is the builder for updating a single Test entity.

func (*TestUpdateOne) AddClinical

func (tuo *TestUpdateOne) AddClinical(c ...*ClinicalResults) *TestUpdateOne

AddClinical adds the clinical edges to ClinicalResults.

func (*TestUpdateOne) AddClinicalIDs

func (tuo *TestUpdateOne) AddClinicalIDs(ids ...uuid.UUID) *TestUpdateOne

AddClinicalIDs adds the clinical edge to ClinicalResults by ids.

func (*TestUpdateOne) AddEpidemiologic

func (tuo *TestUpdateOne) AddEpidemiologic(e ...*EpidemiologicResults) *TestUpdateOne

AddEpidemiologic adds the epidemiologic edges to EpidemiologicResults.

func (*TestUpdateOne) AddEpidemiologicIDs

func (tuo *TestUpdateOne) AddEpidemiologicIDs(ids ...uuid.UUID) *TestUpdateOne

AddEpidemiologicIDs adds the epidemiologic edge to EpidemiologicResults by ids.

func (*TestUpdateOne) ClearHistory

func (tuo *TestUpdateOne) ClearHistory() *TestUpdateOne

ClearHistory clears the history edge to History.

func (*TestUpdateOne) ClearNotes

func (tuo *TestUpdateOne) ClearNotes() *TestUpdateOne

ClearNotes clears the value of notes.

func (*TestUpdateOne) Exec

func (tuo *TestUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TestUpdateOne) ExecX

func (tuo *TestUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TestUpdateOne) RemoveClinical

func (tuo *TestUpdateOne) RemoveClinical(c ...*ClinicalResults) *TestUpdateOne

RemoveClinical removes clinical edges to ClinicalResults.

func (*TestUpdateOne) RemoveClinicalIDs

func (tuo *TestUpdateOne) RemoveClinicalIDs(ids ...uuid.UUID) *TestUpdateOne

RemoveClinicalIDs removes the clinical edge to ClinicalResults by ids.

func (*TestUpdateOne) RemoveEpidemiologic

func (tuo *TestUpdateOne) RemoveEpidemiologic(e ...*EpidemiologicResults) *TestUpdateOne

RemoveEpidemiologic removes epidemiologic edges to EpidemiologicResults.

func (*TestUpdateOne) RemoveEpidemiologicIDs

func (tuo *TestUpdateOne) RemoveEpidemiologicIDs(ids ...uuid.UUID) *TestUpdateOne

RemoveEpidemiologicIDs removes the epidemiologic edge to EpidemiologicResults by ids.

func (*TestUpdateOne) Save

func (tuo *TestUpdateOne) Save(ctx context.Context) (*Test, error)

Save executes the query and returns the updated entity.

func (*TestUpdateOne) SaveX

func (tuo *TestUpdateOne) SaveX(ctx context.Context) *Test

SaveX is like Save, but panics if an error occurs.

func (*TestUpdateOne) SetHistory

func (tuo *TestUpdateOne) SetHistory(h *History) *TestUpdateOne

SetHistory sets the history edge to History.

func (*TestUpdateOne) SetHistoryID

func (tuo *TestUpdateOne) SetHistoryID(id uuid.UUID) *TestUpdateOne

SetHistoryID sets the history edge to History by id.

func (*TestUpdateOne) SetNillableHistoryID

func (tuo *TestUpdateOne) SetNillableHistoryID(id *uuid.UUID) *TestUpdateOne

SetNillableHistoryID sets the history edge to History by id if the given value is not nil.

func (*TestUpdateOne) SetNotes

func (tuo *TestUpdateOne) SetNotes(s []string) *TestUpdateOne

SetNotes sets the notes field.

type Tests

type Tests []*Test

Tests is a parsable slice of Test.

type Tx

type Tx struct {

	// Alert is the client for interacting with the Alert builders.
	Alert *AlertClient
	// ClinicalResults is the client for interacting with the ClinicalResults builders.
	ClinicalResults *ClinicalResultsClient
	// Doctor is the client for interacting with the Doctor builders.
	Doctor *DoctorClient
	// EpidemiologicResults is the client for interacting with the EpidemiologicResults builders.
	EpidemiologicResults *EpidemiologicResultsClient
	// History is the client for interacting with the History builders.
	History *HistoryClient
	// MedicalNote is the client for interacting with the MedicalNote builders.
	MedicalNote *MedicalNoteClient
	// Patient is the client for interacting with the Patient builders.
	Patient *PatientClient
	// Schedule is the client for interacting with the Schedule builders.
	Schedule *ScheduleClient
	// Task is the client for interacting with the Task builders.
	Task *TaskClient
	// TaskResponse is the client for interacting with the TaskResponse builders.
	TaskResponse *TaskResponseClient
	// Test is the client for interacting with the Test builders.
	Test *TestClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL