text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (m *DiseaseMutation) EdgeCleared(name string) bool {
switch name {
case disease.EdgeEmployee:
return m.clearedemployee
case disease.EdgeSeverity:
return m.clearedseverity
case disease.EdgeDiseasetype:
return m.cleareddiseasetype
case disease.EdgeDiagnosis:
return m.cleareddiagnosis
}
return false
} | [
-1.2388335466384888,
-0.4462597668170929,
0.7377851605415344,
-0.7000663876533508,
-0.470876544713974,
0.018479550257325172,
-0.5218048691749573,
-0.0772583931684494,
0.4486536681652069,
0.6290817260742188,
0.12466324865818024,
0.3759170174598694,
-0.2156032770872116,
-0.2593480944633484,
... |
func (m *DiseaseMutation) ClearEdge(name string) error {
switch name {
case disease.EdgeEmployee:
m.ClearEmployee()
return nil
case disease.EdgeSeverity:
m.ClearSeverity()
return nil
case disease.EdgeDiseasetype:
m.ClearDiseasetype()
return nil
case disease.EdgeDiagnosis:
m.ClearDiagnosis()
return ... | [
-1.3799035549163818,
0.4716591536998749,
0.47978848218917847,
0.5667523145675659,
-0.09108708053827286,
-0.164356529712677,
-0.1553911715745926,
0.6407492756843567,
0.43180030584335327,
0.433819979429245,
0.32425788044929504,
0.1215810477733612,
0.3067108988761902,
0.49697446823120117,
0... |
func (m *DiseaseMutation) ResetEdge(name string) error {
switch name {
case disease.EdgeEmployee:
m.ResetEmployee()
return nil
case disease.EdgeSeverity:
m.ResetSeverity()
return nil
case disease.EdgeDiseasetype:
m.ResetDiseasetype()
return nil
case disease.EdgeArea:
m.ResetArea()
return nil
case ... | [
-1.425993800163269,
-0.02769956737756729,
0.5146574378013611,
0.26132732629776,
0.42404550313949585,
-0.7177280783653259,
-0.030124615877866745,
0.7241837978363037,
0.012014884501695633,
0.578862726688385,
-0.06666340678930283,
0.3917044401168823,
-0.1673184037208557,
-0.0903482660651207,
... |
func newDiseasetypeMutation(c config, op Op, opts ...diseasetypeOption) *DiseasetypeMutation {
m := &DiseasetypeMutation{
config: c,
op: op,
typ: TypeDiseasetype,
clearedFields: make(map[string]struct{}),
}
for _, opt := range opts {
opt(m)
}
return m
} | [
-1.7432447671890259,
0.0970381423830986,
0.45494359731674194,
0.739138126373291,
-0.2732933759689331,
-1.1716889142990112,
0.6736215353012085,
0.08410372585058212,
0.9700471758842468,
0.5623765587806702,
-0.8632504343986511,
-0.4466674327850342,
0.14562387764453888,
-0.5677728056907654,
... |
func withDiseasetypeID(id int) diseasetypeOption {
return func(m *DiseasetypeMutation) {
var (
err error
once sync.Once
value *Diseasetype
)
m.oldValue = func(ctx context.Context) (*Diseasetype, error) {
once.Do(func() {
if m.done {
err = fmt.Errorf("querying old values post mutation is n... | [
-0.645473301410675,
-0.3341822028160095,
0.4712981879711151,
-0.00781161617487669,
-0.09406574815511703,
-0.630568265914917,
-0.09969080239534378,
-0.1922571361064911,
1.0503063201904297,
0.5525177121162415,
-0.6327819228172302,
-0.056320060044527054,
0.6114738583564758,
0.8947154879570007... |
func withDiseasetype(node *Diseasetype) diseasetypeOption {
return func(m *DiseasetypeMutation) {
m.oldValue = func(context.Context) (*Diseasetype, error) {
return node, nil
}
m.id = &node.ID
}
} | [
-0.45639392733573914,
-0.19517529010772705,
0.3889544606208801,
-0.35663390159606934,
0.026162195950746536,
-0.7553842067718506,
0.19219514727592468,
0.309563547372818,
1.1768845319747925,
0.17350563406944275,
-0.29038572311401367,
-0.1628161519765854,
1.4692028760910034,
0.418199568986892... |
func (m DiseasetypeMutation) Client() *Client {
client := &Client{config: m.config}
client.init()
return client
} | [
-0.8942419290542603,
-0.1085544154047966,
0.07789512723684311,
0.002141615841537714,
-0.2530747056007385,
-0.14773598313331604,
1.08513605594635,
-0.29008904099464417,
0.5416375398635864,
-0.4844942092895508,
-0.6486648917198181,
0.6157809495925903,
0.22741155326366425,
-0.7253867387771606... |
func (m DiseasetypeMutation) Tx() (*Tx, error) {
if _, ok := m.driver.(*txDriver); !ok {
return nil, fmt.Errorf("ent: mutation is not running in a transaction")
}
tx := &Tx{config: m.config}
tx.init()
return tx, nil
} | [
-0.5812368988990784,
0.5575920343399048,
0.4353806674480438,
0.17714743316173553,
0.30152085423469543,
-0.4472283720970154,
0.14838430285453796,
0.3854096531867981,
0.6811913251876831,
0.0353337861597538,
-0.1994369626045227,
-0.21883206069469452,
-0.18515141308307648,
-0.6279069185256958,... |
func (m *DiseasetypeMutation) ID() (id int, exists bool) {
if m.id == nil {
return
}
return *m.id, true
} | [
-1.0684140920639038,
0.05570293590426445,
0.6642797589302063,
0.3919144868850708,
0.3984168767929077,
-0.21291778981685638,
0.3582303524017334,
0.28971219062805176,
1.036592721939087,
0.4728267788887024,
-0.5709841251373291,
-0.8172178268432617,
-0.6054831743240356,
0.5526468753814697,
-... |
func (m *DiseasetypeMutation) SetDiseaseTypeName(s string) {
m._DiseaseTypeName = &s
} | [
-1.781728744506836,
0.21933609247207642,
0.49769896268844604,
0.40748050808906555,
-0.2848246693611145,
-0.8257991075515747,
0.9670179486274719,
0.652877926826477,
0.018010536208748817,
0.12987299263477325,
-1.078123688697815,
-0.7418396472930908,
0.8804306983947754,
0.14391537010669708,
... |
func (m *DiseasetypeMutation) DiseaseTypeName() (r string, exists bool) {
v := m._DiseaseTypeName
if v == nil {
return
}
return *v, true
} | [
-2.2069499492645264,
0.7874354124069214,
0.6102777719497681,
0.22156672179698944,
-0.3515755534172058,
-0.9744518995285034,
0.21495668590068817,
0.2362586259841919,
0.25700652599334717,
0.5916740894317627,
-1.0106449127197266,
-1.1810121536254883,
0.03688501566648483,
-0.34881967306137085,... |
func (m *DiseasetypeMutation) OldDiseaseTypeName(ctx context.Context) (v string, err error) {
if !m.op.Is(OpUpdateOne) {
return v, fmt.Errorf("OldDiseaseTypeName is allowed only on UpdateOne operations")
}
if m.id == nil || m.oldValue == nil {
return v, fmt.Errorf("OldDiseaseTypeName requires an ID field in the ... | [
-1.6060161590576172,
0.110623799264431,
0.6096620559692383,
0.25066930055618286,
-0.46360182762145996,
-0.7993177175521851,
0.2557242810726166,
0.16035068035125732,
0.30403682589530945,
0.3919418156147003,
-0.3876138925552368,
-0.7327131032943726,
0.5296416878700256,
0.609062910079956,
-... |
func (m *DiseasetypeMutation) ResetDiseaseTypeName() {
m._DiseaseTypeName = nil
} | [
-1.163893461227417,
0.11670912802219391,
0.25694775581359863,
0.6725199818611145,
-0.2806336581707001,
-0.8969559669494629,
0.7888621687889099,
0.22986051440238953,
-0.4478777050971985,
0.17579059302806854,
-0.8988296389579773,
0.07424694299697876,
0.3776976764202118,
-0.25417235493659973,... |
func (m *DiseasetypeMutation) AddDiseaseIDs(ids ...int) {
if m.disease == nil {
m.disease = make(map[int]struct{})
}
for i := range ids {
m.disease[ids[i]] = struct{}{}
}
} | [
-1.7971322536468506,
-0.3362428545951843,
0.33542680740356445,
-0.35932278633117676,
-0.2594006061553955,
-0.32053038477897644,
-0.6759597063064575,
0.7449476718902588,
0.6336746215820312,
0.0366884209215641,
-0.5156432390213013,
-0.010698419995605946,
0.1694742739200592,
0.241567805409431... |
func (m *DiseasetypeMutation) RemoveDiseaseIDs(ids ...int) {
if m.removeddisease == nil {
m.removeddisease = make(map[int]struct{})
}
for i := range ids {
m.removeddisease[ids[i]] = struct{}{}
}
} | [
-1.1226557493209839,
-0.39569783210754395,
0.38538968563079834,
-0.039601508527994156,
-0.5627780556678772,
-0.8484819531440735,
0.15875419974327087,
1.2808773517608643,
0.5012503862380981,
0.5705095529556274,
-1.398925542831421,
-0.25002726912498474,
-0.4239766001701355,
-0.05369568243622... |
func (m *DiseasetypeMutation) RemovedDiseaseIDs() (ids []int) {
for id := range m.removeddisease {
ids = append(ids, id)
}
return
} | [
-0.25439220666885376,
-1.070504903793335,
0.3910873234272003,
-0.18046888709068298,
-0.8035514950752258,
-0.45384740829467773,
-0.33236318826675415,
0.8530263304710388,
1.0261244773864746,
-0.3066292405128479,
-1.031561017036438,
0.8018465638160706,
-0.23076897859573364,
0.4921571910381317... |
func (m *DiseasetypeMutation) DiseaseIDs() (ids []int) {
for id := range m.disease {
ids = append(ids, id)
}
return
} | [
-1.6091818809509277,
-0.6927048563957214,
0.016625748947262764,
-0.24863839149475098,
-0.21855373680591583,
-0.36068251729011536,
-0.4799457788467407,
0.7637087106704712,
0.8186344504356384,
0.41588151454925537,
0.17017322778701782,
1.014410376548767,
-0.5251163840293884,
0.265363156795501... |
func (m *DiseasetypeMutation) ResetDisease() {
m.disease = nil
m.removeddisease = nil
} | [
-0.06291554868221283,
0.03531784191727638,
0.21066372096538544,
0.7182744145393372,
0.3019125461578369,
-0.8932385444641113,
-0.2935997545719147,
0.5889774560928345,
-0.16159629821777344,
-0.721625030040741,
-0.14775727689266205,
0.3603137731552124,
-0.37759068608283997,
0.0627994611859321... |
func (m *DiseasetypeMutation) Op() Op {
return m.op
} | [
-1.5665737390518188,
0.2256719172000885,
0.152605801820755,
0.7593212127685547,
-0.1386502981185913,
0.1968367099761963,
0.9712305068969727,
0.4979505240917206,
0.6062983870506287,
0.3997524082660675,
0.3202274739742279,
-0.5074866414070129,
0.4614286422729492,
-0.7478152513504028,
0.310... |
func (m *DiseasetypeMutation) Type() string {
return m.typ
} | [
-1.096768856048584,
-0.5413323640823364,
0.03747499734163284,
0.5470547676086426,
0.36759915947914124,
-0.028047142550349236,
0.867387056350708,
-0.7729539275169373,
1.028786301612854,
0.02140270546078682,
0.5203267931938171,
-0.11914918571710587,
-0.023427091538906097,
0.09903427958488464... |
func (m *DiseasetypeMutation) Fields() []string {
fields := make([]string, 0, 1)
if m._DiseaseTypeName != nil {
fields = append(fields, diseasetype.FieldDiseaseTypeName)
}
return fields
} | [
-1.6370651721954346,
-0.07589211314916611,
0.16893929243087769,
-0.4930649995803833,
0.4827018678188324,
-0.2503807246685028,
-0.5042094588279724,
-0.07846718281507492,
0.7386398315429688,
-0.1249631866812706,
-0.5946890115737915,
-0.5203539729118347,
0.07364676147699356,
0.183087363839149... |
func (m *DiseasetypeMutation) Field(name string) (ent.Value, bool) {
switch name {
case diseasetype.FieldDiseaseTypeName:
return m.DiseaseTypeName()
}
return nil, false
} | [
-1.732725739479065,
0.23229900002479553,
0.610105574131012,
-0.31924447417259216,
-0.22512918710708618,
0.046022191643714905,
-0.8796814680099487,
-0.04659002646803856,
0.41991138458251953,
0.04571408033370972,
-0.3680698573589325,
-0.8036609888076782,
0.4121941030025482,
0.322323858737945... |
func (m *DiseasetypeMutation) OldField(ctx context.Context, name string) (ent.Value, error) {
switch name {
case diseasetype.FieldDiseaseTypeName:
return m.OldDiseaseTypeName(ctx)
}
return nil, fmt.Errorf("unknown Diseasetype field %s", name)
} | [
-0.7967098951339722,
0.39152297377586365,
0.289797842502594,
-0.7897360324859619,
0.10420483350753784,
-0.19633206725120544,
-0.09779024869203568,
-0.24640047550201416,
0.23564408719539642,
-0.2599978446960449,
-0.007026113569736481,
-0.23193848133087158,
0.3667854070663452,
0.001830711495... |
func (m *DiseasetypeMutation) SetField(name string, value ent.Value) error {
switch name {
case diseasetype.FieldDiseaseTypeName:
v, ok := value.(string)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.SetDiseaseTypeName(v)
return nil
}
return fmt.Errorf("unknown Diseaset... | [
-1.519340991973877,
0.444743275642395,
0.3996369540691376,
-0.20412547886371613,
-0.3686491847038269,
0.4711363911628723,
-0.48678383231163025,
-0.009663793258368969,
-0.07994452863931656,
0.1094902828335762,
-0.2686566114425659,
-0.5782844424247742,
0.46666473150253296,
0.6000075340270996... |
func (m *DiseasetypeMutation) AddedFields() []string {
return nil
} | [
-0.6767098903656006,
0.5146026611328125,
0.43171191215515137,
-0.16184847056865692,
0.35443615913391113,
0.3283291757106781,
0.37434419989585876,
0.01606977917253971,
0.9787644743919373,
-1.1910059452056885,
-0.5947316884994507,
-0.3308320939540863,
-0.9171815514564514,
0.11416394263505936... |
func (m *DiseasetypeMutation) AddedField(name string) (ent.Value, bool) {
return nil, false
} | [
-1.6929144859313965,
0.6445753574371338,
0.7276729345321655,
-0.5191451907157898,
-0.14303603768348694,
0.7437176704406738,
-0.23863434791564941,
0.12497173249721527,
0.5502197742462158,
-0.5135727524757385,
-0.752811074256897,
-1.053031325340271,
-1.1262439489364624,
-0.007036212831735611... |
func (m *DiseasetypeMutation) AddField(name string, value ent.Value) error {
switch name {
}
return fmt.Errorf("unknown Diseasetype numeric field %s", name)
} | [
-1.3060803413391113,
0.7130023837089539,
0.606950581073761,
0.06233643740415573,
-0.08560869097709656,
0.9199554324150085,
-0.8366081714630127,
-0.3501247763633728,
-0.25241488218307495,
-0.22889234125614166,
0.08498261123895645,
-1.0800578594207764,
0.28454825282096863,
0.3136034607887268... |
func (m *DiseasetypeMutation) ClearedFields() []string {
return nil
} | [
-0.595085859298706,
0.8438915014266968,
0.3385268747806549,
-0.0739876925945282,
-0.3494025766849518,
0.25784674286842346,
0.2939196228981018,
-0.5486047863960266,
0.7379531264305115,
0.28444144129753113,
-0.42851901054382324,
-0.2405589520931244,
-0.7023696303367615,
-0.6799548864364624,
... |
func (m *DiseasetypeMutation) FieldCleared(name string) bool {
_, ok := m.clearedFields[name]
return ok
} | [
-1.009586215019226,
0.31364119052886963,
0.7172908782958984,
-0.4348520338535309,
-0.18341794610023499,
0.1323707550764084,
-0.6874891519546509,
-0.001645379583351314,
-0.10731985419988632,
-0.1678965836763382,
-0.91231369972229,
-0.43373721837997437,
0.5164458751678467,
-0.452880978584289... |
func (m *DiseasetypeMutation) ClearField(name string) error {
return fmt.Errorf("unknown Diseasetype nullable field %s", name)
} | [
-0.5928627848625183,
0.9214853048324585,
0.46588826179504395,
-0.2839523255825043,
-0.4840068519115448,
0.3519912660121918,
-0.3513922691345215,
-0.6201255321502686,
0.14208877086639404,
0.7745180726051331,
-0.22634990513324738,
-0.6165388226509094,
0.2360147088766098,
0.10306346416473389,... |
func (m *DiseasetypeMutation) ResetField(name string) error {
switch name {
case diseasetype.FieldDiseaseTypeName:
m.ResetDiseaseTypeName()
return nil
}
return fmt.Errorf("unknown Diseasetype field %s", name)
} | [
-1.013215184211731,
0.8836349844932556,
0.20976878702640533,
-0.0036013165954500437,
0.2906624972820282,
-0.2743131220340729,
0.2497890293598175,
-0.07766551524400711,
-0.020833993330597878,
0.30959129333496094,
-0.22986771166324615,
-0.2193654477596283,
0.13076405227184296,
-0.26394847035... |
func (m *DiseasetypeMutation) AddedEdges() []string {
edges := make([]string, 0, 1)
if m.disease != nil {
edges = append(edges, diseasetype.EdgeDisease)
}
return edges
} | [
-1.0194448232650757,
-0.30567437410354614,
0.2486058920621872,
0.2990586757659912,
0.17329536378383636,
-0.25582438707351685,
-1.18001389503479,
0.1678198277950287,
1.5825363397598267,
0.22070325911045074,
0.605659008026123,
0.4235900938510895,
-0.5766602754592896,
0.6441564559936523,
-0... |
func (m *DiseasetypeMutation) AddedIDs(name string) []ent.Value {
switch name {
case diseasetype.EdgeDisease:
ids := make([]ent.Value, 0, len(m.disease))
for id := range m.disease {
ids = append(ids, id)
}
return ids
}
return nil
} | [
-1.280537724494934,
-0.5354512333869934,
0.3396788239479065,
-0.6566299796104431,
-0.015583156608045101,
-0.010418578051030636,
-0.9378780722618103,
0.15506741404533386,
0.9510354399681091,
0.19355523586273193,
0.40904757380485535,
0.4855831563472748,
-0.26842913031578064,
0.53988415002822... |
func (m *DiseasetypeMutation) RemovedEdges() []string {
edges := make([]string, 0, 1)
if m.removeddisease != nil {
edges = append(edges, diseasetype.EdgeDisease)
}
return edges
} | [
-0.5518067479133606,
-0.3380230665206909,
0.4005882143974304,
0.427394300699234,
-0.1306140124797821,
-0.743608295917511,
-0.6467928290367126,
0.7056818008422852,
1.2844771146774292,
0.2666540741920471,
-0.2684085965156555,
0.2206457108259201,
-0.8072489500045776,
0.44033679366111755,
0.... |
func (m *DiseasetypeMutation) RemovedIDs(name string) []ent.Value {
switch name {
case diseasetype.EdgeDisease:
ids := make([]ent.Value, 0, len(m.removeddisease))
for id := range m.removeddisease {
ids = append(ids, id)
}
return ids
}
return nil
} | [
-0.8453357219696045,
-0.6575730443000793,
0.5281366109848022,
-0.5727303624153137,
-0.19431279599666595,
-0.486335426568985,
-0.7973974347114563,
0.6805126667022705,
0.8670586943626404,
0.3197122812271118,
-0.5930300951004028,
0.2118855118751526,
-0.48602449893951416,
0.2485162615776062,
... |
func (m *DiseasetypeMutation) ClearedEdges() []string {
edges := make([]string, 0, 1)
return edges
} | [
-1.0619219541549683,
-0.1353278011083603,
0.38227158784866333,
0.46498343348503113,
-0.5840532779693604,
-0.0006819452391937375,
-0.7674033045768738,
-0.6901587843894958,
0.7900347709655762,
1.3974895477294922,
0.37153464555740356,
0.7615309357643127,
-0.6519116163253784,
-0.27847883105278... |
func (m *DiseasetypeMutation) EdgeCleared(name string) bool {
switch name {
}
return false
} | [
-1.4616447687149048,
-0.03588007390499115,
0.5261595249176025,
-0.39436811208724976,
-0.6349762678146362,
0.2934911847114563,
-0.6452993750572205,
-0.2905992269515991,
-0.08031884580850601,
0.4477434456348419,
-0.12862329185009003,
-0.3833913207054138,
-0.4728476107120514,
0.14776936173439... |
func (m *DiseasetypeMutation) ClearEdge(name string) error {
switch name {
}
return fmt.Errorf("unknown Diseasetype unique edge %s", name)
} | [
-1.4325917959213257,
1.0790973901748657,
0.3338235914707184,
0.7005919814109802,
-0.30687519907951355,
-0.13643424212932587,
-0.17066054046154022,
0.4424794018268585,
-0.066644586622715,
0.9034380316734314,
0.010992304421961308,
-0.0774446427822113,
-0.011762159876525402,
0.616493523120880... |
func (m *DiseasetypeMutation) ResetEdge(name string) error {
switch name {
case diseasetype.EdgeDisease:
m.ResetDisease()
return nil
}
return fmt.Errorf("unknown Diseasetype edge %s", name)
} | [
-1.571229338645935,
0.6071456670761108,
0.21222880482673645,
0.9398010969161987,
0.3504139482975006,
-0.945547878742218,
-0.1591113656759262,
0.7747018933296204,
-0.19258463382720947,
0.9571565389633179,
0.2956339418888092,
0.06670716404914856,
-0.42030444741249084,
0.03286101296544075,
... |
func newDrugMutation(c config, op Op, opts ...drugOption) *DrugMutation {
m := &DrugMutation{
config: c,
op: op,
typ: TypeDrug,
clearedFields: make(map[string]struct{}),
}
for _, opt := range opts {
opt(m)
}
return m
} | [
-1.042361855506897,
-0.27145665884017944,
0.4306062161922455,
0.30098992586135864,
0.1464349776506424,
-1.4694628715515137,
0.35283321142196655,
0.05016898736357689,
0.20846928656101227,
0.9051346778869629,
-0.978371798992157,
-0.021319890394806862,
-0.5461676716804504,
-1.015242576599121,... |
func withDrugID(id int) drugOption {
return func(m *DrugMutation) {
var (
err error
once sync.Once
value *Drug
)
m.oldValue = func(ctx context.Context) (*Drug, error) {
once.Do(func() {
if m.done {
err = fmt.Errorf("querying old values post mutation is not allowed")
} else {
valu... | [
0.22287608683109283,
-0.40954774618148804,
0.4927223324775696,
-0.3696528673171997,
0.46097373962402344,
-0.24261689186096191,
-0.1293393075466156,
-0.5153706073760986,
0.6446770429611206,
0.9020937085151672,
-0.07315824925899506,
0.2691227197647095,
0.07471445947885513,
0.0179413724690675... |
func withDrug(node *Drug) drugOption {
return func(m *DrugMutation) {
m.oldValue = func(context.Context) (*Drug, error) {
return node, nil
}
m.id = &node.ID
}
} | [
-0.27355343103408813,
-0.27094578742980957,
0.4516107141971588,
-0.2281332165002823,
0.474133163690567,
-0.548499584197998,
0.2148798406124115,
-0.09585744142532349,
0.19406892359256744,
-0.12598931789398193,
-0.13368074595928192,
0.23172837495803833,
0.9929995536804199,
-0.512322187423706... |
func (m DrugMutation) Client() *Client {
client := &Client{config: m.config}
client.init()
return client
} | [
-0.3275223970413208,
-0.32580170035362244,
0.05722428485751152,
-0.0002615299017634243,
-0.09040337800979614,
-0.23685184121131897,
0.730344831943512,
-0.2705416977405548,
0.011271298862993717,
-0.29400983452796936,
-0.5172732472419739,
0.7310805320739746,
-0.0827149823307991,
-1.025011181... |
func (m DrugMutation) Tx() (*Tx, error) {
if _, ok := m.driver.(*txDriver); !ok {
return nil, fmt.Errorf("ent: mutation is not running in a transaction")
}
tx := &Tx{config: m.config}
tx.init()
return tx, nil
} | [
-0.10064536333084106,
0.26491403579711914,
0.3925834000110626,
0.18337860703468323,
0.6087088584899902,
-0.44933560490608215,
-0.09585466980934143,
0.2896183729171753,
0.34844961762428284,
0.15269722044467926,
-0.06555613875389099,
-0.23532859981060028,
-0.5028802156448364,
-0.909812271595... |
func (m *DrugMutation) ID() (id int, exists bool) {
if m.id == nil {
return
}
return *m.id, true
} | [
-0.689690887928009,
-0.2666299045085907,
0.6300243735313416,
0.1856713742017746,
0.620903491973877,
-0.3333513140678406,
0.04010584577918053,
0.3003228008747101,
0.7014026045799255,
0.7086834907531738,
-0.2393021136522293,
-0.5171777606010437,
-0.9792397618293762,
0.40077027678489685,
-0... |
func (m *DrugMutation) SetDrugName(s string) {
m._DrugName = &s
} | [
-0.6165848970413208,
0.7906642556190491,
0.22386308014392853,
0.488443523645401,
0.04257836192846298,
-0.8353387117385864,
0.25239408016204834,
0.5409761667251587,
-0.7643794417381287,
-0.30864375829696655,
-0.6062828302383423,
-0.4892522096633911,
0.28911417722702026,
-0.16482724249362946... |
func (m *DrugMutation) DrugName() (r string, exists bool) {
v := m._DrugName
if v == nil {
return
}
return *v, true
} | [
-1.4227193593978882,
0.8729530572891235,
0.7790420651435852,
-0.3916773200035095,
-0.04007804021239281,
-1.0466889142990112,
-0.26868537068367004,
0.45140355825424194,
-0.6185712218284607,
1.0482219457626343,
-0.10096092522144318,
-0.7733268737792969,
-0.7174490094184875,
-0.65772020816802... |
func (m *DrugMutation) OldDrugName(ctx context.Context) (v string, err error) {
if !m.op.Is(OpUpdateOne) {
return v, fmt.Errorf("OldDrugName is allowed only on UpdateOne operations")
}
if m.id == nil || m.oldValue == nil {
return v, fmt.Errorf("OldDrugName requires an ID field in the mutation")
}
oldValue, err... | [
-0.9418392181396484,
-0.04873134568333626,
0.6776469945907593,
-0.16390016674995422,
0.02647986449301243,
-1.0771937370300293,
-0.2344239503145218,
0.1425701528787613,
-0.496170312166214,
0.8043352365493774,
0.3829648792743683,
-0.0673295184969902,
-0.06986667960882187,
-0.1470047831535339... |
func (m *DrugMutation) ResetDrugName() {
m._DrugName = nil
} | [
-0.3453301191329956,
0.4537818729877472,
0.14932377636432648,
0.4914540648460388,
0.3433639109134674,
-1.3903083801269531,
-0.0868615210056305,
0.6086891293525696,
-1.3301233053207397,
0.44793441891670227,
-0.1532752513885498,
0.42205825448036194,
-0.5464958548545837,
-0.9433611631393433,
... |
func (m *DrugMutation) SetHowto(s string) {
m._Howto = &s
} | [
-0.012896377593278885,
0.5741531252861023,
0.22856004536151886,
-1.0715776681900024,
0.19183135032653809,
-0.6228494644165039,
0.25125598907470703,
0.29520073533058167,
-1.0190246105194092,
-0.3294801712036133,
-0.4256424009799957,
0.7782495021820068,
0.7221372127532959,
-0.464695096015930... |
func (m *DrugMutation) Howto() (r string, exists bool) {
v := m._Howto
if v == nil {
return
}
return *v, true
} | [
-0.9615050554275513,
1.177695870399475,
0.5681154727935791,
-0.9878626465797424,
0.5325604677200317,
-0.5172789692878723,
0.24369023740291595,
0.08580097556114197,
-0.8173491954803467,
0.48462194204330444,
-0.21832655370235443,
-0.18614593148231506,
0.024191543459892273,
-0.712643802165985... |
func (m *DrugMutation) OldHowto(ctx context.Context) (v string, err error) {
if !m.op.Is(OpUpdateOne) {
return v, fmt.Errorf("OldHowto is allowed only on UpdateOne operations")
}
if m.id == nil || m.oldValue == nil {
return v, fmt.Errorf("OldHowto requires an ID field in the mutation")
}
oldValue, err := m.old... | [
-0.4102078378200531,
0.10950041562318802,
0.6015067100524902,
-1.1489907503128052,
-0.23222172260284424,
-0.9924556612968445,
0.4949754774570465,
-0.21375414729118347,
-0.15370066463947296,
0.5058726072311401,
0.34927186369895935,
0.5201709270477295,
0.26916348934173584,
0.4106954932212829... |
func (m *DrugMutation) ResetHowto() {
m._Howto = nil
} | [
-0.11772949993610382,
0.5852762460708618,
0.25977250933647156,
-0.26740479469299316,
0.2025321125984192,
-0.972695529460907,
1.0690959692001343,
0.5071329474449158,
-0.873564600944519,
-0.22215454280376434,
-0.23801526427268982,
1.101718544960022,
0.08822645246982574,
-0.014917622320353985... |
func (m *DrugMutation) SetProperty(s string) {
m._Property = &s
} | [
-0.033019810914993286,
0.30641767382621765,
0.1632353514432907,
0.37299081683158875,
0.19331125915050507,
-0.09993698447942734,
0.48426172137260437,
0.5545897483825684,
0.049476876854896545,
-0.21215875446796417,
-0.1859160214662552,
-0.19524717330932617,
-0.31968364119529724,
-0.419306635... |
func (m *DrugMutation) Property() (r string, exists bool) {
v := m._Property
if v == nil {
return
}
return *v, true
} | [
-1.1481088399887085,
0.20635050535202026,
0.6003432273864746,
0.6543596982955933,
0.5681458115577698,
-0.5535747408866882,
0.13342325389385223,
0.033024270087480545,
0.44127321243286133,
0.5153664946556091,
0.2679966390132904,
-0.5553547739982605,
-0.7464470267295837,
-0.8547945022583008,
... |
func (m *DrugMutation) OldProperty(ctx context.Context) (v string, err error) {
if !m.op.Is(OpUpdateOne) {
return v, fmt.Errorf("OldProperty is allowed only on UpdateOne operations")
}
if m.id == nil || m.oldValue == nil {
return v, fmt.Errorf("OldProperty requires an ID field in the mutation")
}
oldValue, err... | [
-0.13647614419460297,
-0.5856674909591675,
0.4240534007549286,
0.005414954386651516,
0.43360304832458496,
-0.34047549962997437,
0.08028106391429901,
-0.3123013377189636,
0.5171679258346558,
0.6756412982940674,
0.5713690519332886,
0.027609454467892647,
-0.7200983762741089,
-0.19571289420127... |
func (m *DrugMutation) ResetProperty() {
m._Property = nil
} | [
0.19614490866661072,
0.022216323763132095,
0.10095083713531494,
1.0087435245513916,
0.7036690711975098,
-0.9666951894760132,
0.7953566312789917,
0.12267234176397324,
-0.5140038728713989,
0.10357330739498138,
0.24705897271633148,
0.4079309403896332,
-0.7171057462692261,
-1.3059076070785522,... |
func (m *DrugMutation) SetEmployeeID(id int) {
m.employee = &id
} | [
-0.9936615228652954,
-0.28334206342697144,
0.1265583634376526,
-0.07455158978700638,
-0.06946807354688644,
0.7033278942108154,
-0.07442668825387955,
1.1891525983810425,
-0.3033686876296997,
0.5676517486572266,
-0.6262894868850708,
0.30747389793395996,
-0.6930244565010071,
1.599046826362609... |
func (m *DrugMutation) ClearEmployee() {
m.clearedemployee = true
} | [
-0.10016033798456192,
0.2548997402191162,
0.23030559718608856,
0.4994378387928009,
-0.5850225687026978,
0.8282559514045715,
0.14244794845581055,
0.22492341697216034,
-0.8991222977638245,
0.8055545687675476,
0.00972667895257473,
0.09428828209638596,
-0.6790857911109924,
0.1840299814939499,
... |
func (m *DrugMutation) EmployeeCleared() bool {
return m.clearedemployee
} | [
-0.38891351222991943,
-0.33224931359291077,
0.4445762634277344,
-0.14263632893562317,
-0.344070166349411,
0.6859830021858215,
-0.6775409579277039,
0.05066968873143196,
-0.6886290311813354,
0.44707608222961426,
-0.2597087621688843,
0.26728060841560364,
-0.7669169306755066,
-0.38088417053222... |
func (m *DrugMutation) EmployeeID() (id int, exists bool) {
if m.employee != nil {
return *m.employee, true
}
return
} | [
-0.7579281330108643,
-0.44705674052238464,
0.6093770265579224,
0.055698148906230927,
0.05538159981369972,
0.8095529675483704,
-0.10294704884290695,
0.6967428922653198,
0.37143105268478394,
1.250713586807251,
0.11331760138273239,
-0.1573154181241989,
-1.0400818586349487,
1.0095798969268799,... |
func (m *DrugMutation) EmployeeIDs() (ids []int) {
if id := m.employee; id != nil {
ids = append(ids, *id)
}
return
} | [
-1.2664728164672852,
-0.4140302836894989,
0.1835242062807083,
0.07991605252027512,
0.34153127670288086,
0.2159300148487091,
-0.6206196546554565,
0.7252820134162903,
0.21339276432991028,
0.6642932891845703,
-0.23817017674446106,
0.8564257621765137,
-1.1835334300994873,
0.7919672727584839,
... |
func (m *DrugMutation) ResetEmployee() {
m.employee = nil
m.clearedemployee = false
} | [
-0.1808091700077057,
0.08980134129524231,
0.20092390477657318,
0.3906377851963043,
0.17922426760196686,
-0.008200573734939098,
0.5663779377937317,
0.9473274350166321,
-1.4340312480926514,
0.10001084208488464,
-0.047747526317834854,
0.366144061088562,
-1.2859487533569336,
-0.220843642950057... |
func (m *DrugMutation) SetDrugtypeID(id int) {
m.drugtype = &id
} | [
-0.8593617081642151,
0.2896500825881958,
0.03321061283349991,
0.32385703921318054,
0.6907271146774292,
-1.1873979568481445,
-0.31248924136161804,
0.09457316994667053,
0.015280240215361118,
1.4103158712387085,
-1.2209694385528564,
-0.12337938696146011,
-0.66771399974823,
0.986550509929657,
... |
func (m *DrugMutation) ClearDrugtype() {
m.cleareddrugtype = true
} | [
-0.07866682857275009,
0.553425669670105,
0.19431063532829285,
0.7236851453781128,
0.7097404599189758,
-0.8800855278968811,
-0.045547109097242355,
-0.017366306856274605,
-0.4236222803592682,
1.2246615886688232,
-0.04781391844153404,
0.46901175379753113,
0.2507959008216858,
0.192597180604934... |
func (m *DrugMutation) DrugtypeCleared() bool {
return m.cleareddrugtype
} | [
-0.472918838262558,
0.43290987610816956,
0.24585790932178497,
-0.22059592604637146,
0.4211220145225525,
-1.1742067337036133,
-0.7547727823257446,
-0.22091391682624817,
-0.10833954066038132,
1.267175555229187,
-0.04441330209374428,
0.2543735206127167,
-0.597347617149353,
-0.1080416068434715... |
func (m *DrugMutation) DrugtypeID() (id int, exists bool) {
if m.drugtype != nil {
return *m.drugtype, true
}
return
} | [
-0.7410523295402527,
0.7137086987495422,
0.5605767369270325,
0.12973380088806152,
0.6656232476234436,
-1.0721355676651,
-0.5782594680786133,
0.37434136867523193,
0.4738967716693878,
2.1453096866607666,
-0.5281621813774109,
-0.43010425567626953,
-1.121172547340393,
0.8553101420402527,
-0.... |
func (m *DrugMutation) DrugtypeIDs() (ids []int) {
if id := m.drugtype; id != nil {
ids = append(ids, *id)
}
return
} | [
-1.2675350904464722,
0.6005995869636536,
0.20526371896266937,
0.45724016427993774,
1.0526667833328247,
-1.4366068840026855,
-0.48988527059555054,
0.24847620725631714,
0.3452528715133667,
1.4143027067184448,
-0.929053544998169,
0.20717719197273254,
-1.33060884475708,
0.60939621925354,
-0.... |
func (m *DrugMutation) ResetDrugtype() {
m.drugtype = nil
m.cleareddrugtype = false
} | [
0.057917285710573196,
0.6346579790115356,
0.01835952326655388,
0.6226481199264526,
1.362667441368103,
-1.7186834812164307,
0.07488512992858887,
0.5979088544845581,
-0.747117817401886,
0.9026916027069092,
-0.614525556564331,
0.597203254699707,
-0.5350402593612671,
0.01470857486128807,
0.0... |
func (m *DrugMutation) SetDiseaseID(id int) {
m.disease = &id
} | [
-0.36078178882598877,
-0.3833843469619751,
0.10310347378253937,
0.11965463310480118,
-0.6097030639648438,
0.06316079944372177,
-0.6669315695762634,
0.7455646991729736,
0.7759092450141907,
0.4711143672466278,
-0.25352707505226135,
0.2688443958759308,
0.20283368229866028,
0.912625253200531,
... |
func (m *DrugMutation) ClearDisease() {
m.cleareddisease = true
} | [
0.3470683693885803,
-0.07065855711698532,
0.33017948269844055,
0.7188063263893127,
-0.37760382890701294,
-0.08416838198900223,
-0.5381377935409546,
0.29888004064559937,
-0.052152350544929504,
-0.05741128325462341,
0.43839842081069946,
0.3761918544769287,
0.10427170246839523,
0.169732913374... |
func (m *DrugMutation) DiseaseCleared() bool {
return m.cleareddisease
} | [
-0.5403813719749451,
-0.17752397060394287,
0.5285201072692871,
-0.2911633849143982,
-0.707373321056366,
0.0330403596162796,
-0.662973165512085,
0.04868385195732117,
0.2928963899612427,
-0.26103660464286804,
0.19570250809192657,
0.6429525017738342,
0.19999879598617554,
-0.39293158054351807,... |
func (m *DrugMutation) DiseaseID() (id int, exists bool) {
if m.disease != nil {
return *m.disease, true
}
return
} | [
-0.5180210471153259,
-0.5974301099777222,
0.7246578335762024,
-0.2504490613937378,
-0.056301139295101166,
0.0479084812104702,
-0.31686240434646606,
0.9330662488937378,
1.0773258209228516,
0.8936883807182312,
0.5649337768554688,
-0.07199671864509583,
-0.6585959792137146,
0.7219628095626831,... |
func (m *DrugMutation) DiseaseIDs() (ids []int) {
if id := m.disease; id != nil {
ids = append(ids, *id)
}
return
} | [
-1.2348405122756958,
-0.6270576119422913,
0.23792274296283722,
-0.2572481036186218,
0.007485203444957733,
-0.5780749320983887,
-0.6947339177131653,
0.6982948184013367,
1.00613272190094,
0.3301849961280823,
0.31716153025627136,
0.9264042973518372,
-0.6916472315788269,
0.39783552289009094,
... |
func (m *DrugMutation) ResetDisease() {
m.disease = nil
m.cleareddisease = false
} | [
0.18275044858455658,
-0.17252448201179504,
0.19275853037834167,
0.5703266859054565,
0.08742863684892654,
-0.8155557513237,
-0.34687140583992004,
0.6368221640586853,
-0.31673958897590637,
-0.5015378594398499,
0.1756167709827423,
0.5716009736061096,
-0.4717150926589966,
-0.10904145985841751,... |
func (m *DrugMutation) Op() Op {
return m.op
} | [
-0.9503468871116638,
0.024800295010209084,
0.10149455815553665,
0.5482800006866455,
0.08724059909582138,
0.16645367443561554,
0.6510850787162781,
0.44826045632362366,
0.029246335849165916,
0.6950321793556213,
0.39152899384498596,
-0.5052966475486755,
-0.03763493150472641,
-1.02179253101348... |
func (m *DrugMutation) Type() string {
return m.typ
} | [
-0.42111140489578247,
-0.5584415197372437,
0.08383970707654953,
0.2794477641582489,
0.9905584454536438,
-0.05082022771239281,
0.4046110212802887,
-0.8734025359153748,
0.36803874373435974,
0.5204690098762512,
0.5323864817619324,
0.12376872450113297,
-0.6521672606468201,
-0.00028060525073669... |
func (m *DrugMutation) Fields() []string {
fields := make([]string, 0, 3)
if m._DrugName != nil {
fields = append(fields, drug.FieldDrugName)
}
if m._Howto != nil {
fields = append(fields, drug.FieldHowto)
}
if m._Property != nil {
fields = append(fields, drug.FieldProperty)
}
return fields
} | [
-0.9577282071113586,
-0.32335782051086426,
0.29393914341926575,
-1.0403892993927002,
0.6630585789680481,
-0.25510162115097046,
-1.3364057540893555,
-0.2573160231113434,
0.22044192254543304,
0.18961192667484283,
-0.3401651084423065,
-0.4393676519393921,
-0.3798360526561737,
-0.5006225705146... |
func (m *DrugMutation) Field(name string) (ent.Value, bool) {
switch name {
case drug.FieldDrugName:
return m.DrugName()
case drug.FieldHowto:
return m.Howto()
case drug.FieldProperty:
return m.Property()
}
return nil, false
} | [
-1.453484058380127,
-0.2119314819574356,
0.648065447807312,
-0.8401519060134888,
0.0010963663225993514,
-0.10660014301538467,
-1.3859050273895264,
-0.09516351670026779,
-0.2409093976020813,
0.17093399167060852,
-0.48680442571640015,
-0.46852514147758484,
-0.011605804786086082,
0.2222909778... |
func (m *DrugMutation) OldField(ctx context.Context, name string) (ent.Value, error) {
switch name {
case drug.FieldDrugName:
return m.OldDrugName(ctx)
case drug.FieldHowto:
return m.OldHowto(ctx)
case drug.FieldProperty:
return m.OldProperty(ctx)
}
return nil, fmt.Errorf("unknown Drug field %s", name)
} | [
-0.5629916191101074,
-0.14899997413158417,
0.5388289093971252,
-1.2809377908706665,
0.3912513554096222,
-0.19414561986923218,
-0.3244839012622833,
-0.5772861838340759,
-0.10706435143947601,
0.10577818751335144,
-0.08752913028001785,
0.34754928946495056,
0.031919945031404495,
-0.37805792689... |
func (m *DrugMutation) SetField(name string, value ent.Value) error {
switch name {
case drug.FieldDrugName:
v, ok := value.(string)
if !ok {
return fmt.Errorf("unexpected type %T for field %s", value, name)
}
m.SetDrugName(v)
return nil
case drug.FieldHowto:
v, ok := value.(string)
if !ok {
retu... | [
-1.1732611656188965,
0.1880129873752594,
0.4938764274120331,
-0.5400149822235107,
0.04955301061272621,
0.17554344236850739,
-0.7017800807952881,
-0.09810840338468552,
-0.5782778263092041,
0.15799009799957275,
-0.15591749548912048,
0.015562277287244797,
0.04559803754091263,
0.43665370345115... |
func (m *DrugMutation) AddedFields() []string {
return nil
} | [
-0.19144365191459656,
0.2934413552284241,
0.48861032724380493,
-0.3996918499469757,
0.5317004323005676,
0.4751468002796173,
0.04382328689098358,
0.0795467272400856,
0.6982898116111755,
-0.9069092273712158,
-0.42684972286224365,
-0.23717688024044037,
-1.5284125804901123,
-0.0346571505069732... |
func (m *DrugMutation) AddedField(name string) (ent.Value, bool) {
return nil, false
} | [
-1.4006034135818481,
0.4946330785751343,
0.7721174955368042,
-0.5860414505004883,
0.005395723972469568,
0.8076798319816589,
-0.5994111895561218,
0.21533402800559998,
0.19798758625984192,
-0.3064417839050293,
-0.8282355666160583,
-1.0803197622299194,
-1.554234266281128,
-0.04368022456765175... |
func (m *DrugMutation) AddField(name string, value ent.Value) error {
switch name {
}
return fmt.Errorf("unknown Drug numeric field %s", name)
} | [
-0.9003628492355347,
0.5210239291191101,
0.5466352105140686,
-0.1632557511329651,
0.22891956567764282,
0.9464202523231506,
-1.2348921298980713,
-0.32461100816726685,
-0.6453050971031189,
0.04314102977514267,
0.09909401088953018,
-0.8779135942459106,
-0.09437743574380875,
0.1042623296380043... |
func (m *DrugMutation) ClearedFields() []string {
return nil
} | [
-0.1698654145002365,
0.6354643106460571,
0.4448731243610382,
-0.2959256172180176,
-0.260682612657547,
0.36155787110328674,
0.03998977690935135,
-0.3896488547325134,
0.5656681060791016,
0.6128731966018677,
-0.25283682346343994,
-0.09644564986228943,
-1.0968142747879028,
-0.9003978967666626,... |
func (m *DrugMutation) FieldCleared(name string) bool {
_, ok := m.clearedFields[name]
return ok
} | [
-0.6966217160224915,
0.22992782294750214,
0.7579065561294556,
-0.506862998008728,
-0.11670665442943573,
0.13829033076763153,
-0.9573732614517212,
0.06211356446146965,
-0.41497939825057983,
-0.03640002757310867,
-0.822842001914978,
-0.44207513332366943,
0.20517247915267944,
-0.4350080788135... |
func (m *DrugMutation) ClearField(name string) error {
return fmt.Errorf("unknown Drug nullable field %s", name)
} | [
-0.04634109139442444,
0.6407861709594727,
0.5035921931266785,
-0.4933767318725586,
-0.2139022797346115,
0.36007004976272583,
-0.8423761129379272,
-0.4679645895957947,
-0.13048718869686127,
1.0646570920944214,
-0.24442720413208008,
-0.44934821128845215,
-0.11223375797271729,
-0.113979935646... |
func (m *DrugMutation) ResetField(name string) error {
switch name {
case drug.FieldDrugName:
m.ResetDrugName()
return nil
case drug.FieldHowto:
m.ResetHowto()
return nil
case drug.FieldProperty:
m.ResetProperty()
return nil
}
return fmt.Errorf("unknown Drug field %s", name)
} | [
-0.8670272827148438,
0.46014899015426636,
0.36653366684913635,
-0.37839093804359436,
0.5495579242706299,
-0.3648272752761841,
0.004587475210428238,
-0.21114879846572876,
-0.30273693799972534,
0.38031548261642456,
-0.4463336765766144,
-0.17719697952270508,
-0.41551628708839417,
-0.582156121... |
func (m *DrugMutation) AddedEdges() []string {
edges := make([]string, 0, 3)
if m.employee != nil {
edges = append(edges, drug.EdgeEmployee)
}
if m.drugtype != nil {
edges = append(edges, drug.EdgeDrugtype)
}
if m.disease != nil {
edges = append(edges, drug.EdgeDisease)
}
return edges
} | [
-0.48441725969314575,
-0.6224603652954102,
0.2774079740047455,
-0.24901209771633148,
0.5143594145774841,
0.04803136736154556,
-1.6212371587753296,
0.07853467017412186,
0.8029520511627197,
0.5524514317512512,
0.7315778136253357,
0.45380520820617676,
-0.8515912294387817,
0.21120823919773102,... |
func (m *DrugMutation) AddedIDs(name string) []ent.Value {
switch name {
case drug.EdgeEmployee:
if id := m.employee; id != nil {
return []ent.Value{*id}
}
case drug.EdgeDrugtype:
if id := m.drugtype; id != nil {
return []ent.Value{*id}
}
case drug.EdgeDisease:
if id := m.disease; id != nil {
ret... | [
-0.785527229309082,
-0.8945029377937317,
0.328928142786026,
-1.0068612098693848,
0.21651014685630798,
-0.1443127989768982,
-1.3342260122299194,
-0.06330002844333649,
0.6001931428909302,
0.4681788980960846,
0.30721035599708557,
0.5773933529853821,
-0.5134153366088867,
0.47218894958496094,
... |
func (m *DrugMutation) RemovedEdges() []string {
edges := make([]string, 0, 3)
return edges
} | [
-0.2991959750652313,
-0.2481452375650406,
0.5393471121788025,
0.009467615745961666,
0.026568707078695297,
-0.17742513120174408,
-0.5566112399101257,
0.4495534896850586,
0.7433419227600098,
0.3781428039073944,
-0.5915079712867737,
-0.016161778941750526,
-1.4011985063552856,
-0.4337514936923... |
func (m *DrugMutation) RemovedIDs(name string) []ent.Value {
switch name {
}
return nil
} | [
-0.8766889572143555,
-0.36863523721694946,
0.46625927090644836,
-0.7629900574684143,
0.08813212811946869,
-0.08764812350273132,
-0.593298614025116,
0.5964792966842651,
0.47173476219177246,
0.15199188888072968,
-1.5471817255020142,
-0.2779305875301361,
-1.014184832572937,
0.3184202611446380... |
func (m *DrugMutation) ClearedEdges() []string {
edges := make([]string, 0, 3)
if m.clearedemployee {
edges = append(edges, drug.EdgeEmployee)
}
if m.cleareddrugtype {
edges = append(edges, drug.EdgeDrugtype)
}
if m.cleareddisease {
edges = append(edges, drug.EdgeDisease)
}
return edges
} | [
-0.978535532951355,
-0.39340394735336304,
0.3910118639469147,
0.14239171147346497,
-0.3829386830329895,
-0.2485324740409851,
-1.3056719303131104,
-0.4650529623031616,
0.48739567399024963,
1.731213927268982,
0.6154909133911133,
0.9686946272850037,
-0.4936627447605133,
-0.5214378237724304,
... |
func (m *DrugMutation) EdgeCleared(name string) bool {
switch name {
case drug.EdgeEmployee:
return m.clearedemployee
case drug.EdgeDrugtype:
return m.cleareddrugtype
case drug.EdgeDisease:
return m.cleareddisease
}
return false
} | [
-1.0245981216430664,
-0.6832799911499023,
0.6574224233627319,
-0.6856757998466492,
-0.12716959416866302,
-0.031333062797784805,
-0.88698810338974,
-0.22174179553985596,
-0.013686289079487324,
0.9935609698295593,
0.16759471595287323,
0.25611209869384766,
-0.534997284412384,
-0.1969084143638... |
func (m *DrugMutation) ClearEdge(name string) error {
switch name {
case drug.EdgeEmployee:
m.ClearEmployee()
return nil
case drug.EdgeDrugtype:
m.ClearDrugtype()
return nil
case drug.EdgeDisease:
m.ClearDisease()
return nil
}
return fmt.Errorf("unknown Drug unique edge %s", name)
} | [
-1.126456618309021,
0.3645544946193695,
0.3820265233516693,
0.46890878677368164,
0.3224957585334778,
-0.4057568311691284,
-0.36634621024131775,
0.39222902059555054,
-0.09829962253570557,
0.9983153343200684,
0.2682810425758362,
0.0800066664814949,
-0.20018427073955536,
0.4080885350704193,
... |
func (m *DrugMutation) ResetEdge(name string) error {
switch name {
case drug.EdgeEmployee:
m.ResetEmployee()
return nil
case drug.EdgeDrugtype:
m.ResetDrugtype()
return nil
case drug.EdgeDisease:
m.ResetDisease()
return nil
}
return fmt.Errorf("unknown Drug edge %s", name)
} | [
-1.1736011505126953,
0.0008611278026364744,
0.3270673453807831,
0.27998730540275574,
0.9273643493652344,
-1.0062087774276733,
-0.29592153429985046,
0.7750226259231567,
-0.5798724889755249,
1.0971633195877075,
-0.09217555820941925,
0.29891297221183777,
-0.7834744453430176,
-0.21423581242561... |
func newDrugTypeMutation(c config, op Op, opts ...drugtypeOption) *DrugTypeMutation {
m := &DrugTypeMutation{
config: c,
op: op,
typ: TypeDrugType,
clearedFields: make(map[string]struct{}),
}
for _, opt := range opts {
opt(m)
}
return m
} | [
-1.2159172296524048,
0.37095940113067627,
0.20705847442150116,
0.3451247811317444,
0.362226277589798,
-1.9009966850280762,
0.41622278094291687,
-0.27548015117645264,
0.17880386114120483,
1.2888230085372925,
-1.0938007831573486,
-0.4795178174972534,
-1.0227551460266113,
-0.7276472449302673,... |
func withDrugTypeID(id int) drugtypeOption {
return func(m *DrugTypeMutation) {
var (
err error
once sync.Once
value *DrugType
)
m.oldValue = func(ctx context.Context) (*DrugType, error) {
once.Do(func() {
if m.done {
err = fmt.Errorf("querying old values post mutation is not allowed")
... | [
-0.355008602142334,
0.05907342582941055,
0.21425414085388184,
-0.10529063642024994,
0.3932555019855499,
-1.1948643922805786,
-0.29373982548713684,
-0.7309213876724243,
0.5779154896736145,
1.2948105335235596,
-0.5645760297775269,
-0.06514542549848557,
-0.21610668301582336,
0.750911176204681... |
func withDrugType(node *DrugType) drugtypeOption {
return func(m *DrugTypeMutation) {
m.oldValue = func(context.Context) (*DrugType, error) {
return node, nil
}
m.id = &node.ID
}
} | [
-0.1758175641298294,
0.09960658848285675,
0.3169604539871216,
-0.488899827003479,
0.9086289405822754,
-1.3946716785430908,
-0.14771494269371033,
-0.18776550889015198,
0.6116424798965454,
0.7949604988098145,
-0.17807619273662567,
-0.13310040533542633,
0.6392176151275635,
0.277985543012619,
... |
func (m DrugTypeMutation) Client() *Client {
client := &Client{config: m.config}
client.init()
return client
} | [
-0.5282249450683594,
-0.001206828630529344,
-0.0034020841121673584,
-0.1796833574771881,
0.13237418234348297,
-0.558112382888794,
0.7336971163749695,
-0.38067641854286194,
0.09524693340063095,
0.07382375001907349,
-0.7197754979133606,
0.6007950901985168,
-0.3660791516304016,
-0.71257632970... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.