text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (o *DMessageEmbed) SetMessageP(exec boil.Executor, insert bool, related *DMessage) {
if err := o.SetMessage(exec, insert, related); err != nil {
panic(boil.WrapErr(err))
}
} | [
0.2805618345737457,
0.5741831660270691,
0.6626569032669067,
0.08731576055288315,
-0.0022582279052585363,
0.6220473647117615,
0.39232608675956726,
-0.44595256447792053,
0.29677504301071167,
0.9267936944961548,
0.21136267483234406,
-0.3936869204044342,
-0.8717776536941528,
0.7677634358406067... |
func (o *DMessageEmbed) SetMessageGP(insert bool, related *DMessage) {
if err := o.SetMessage(boil.GetDB(), insert, related); err != nil {
panic(boil.WrapErr(err))
}
} | [
-0.47423055768013,
0.8943977355957031,
0.7199059128761292,
-0.2709105908870697,
-0.22472824156284332,
0.808815598487854,
0.003932566847652197,
-0.26195013523101807,
-0.4373290538787842,
1.3285521268844604,
0.4540284276008606,
0.054362375289201736,
-1.5397323369979858,
1.226166844367981,
... |
func (o *DMessageEmbed) SetMessage(exec boil.Executor, insert bool, related *DMessage) error {
var err error
if insert {
if err = related.Insert(exec); err != nil {
return errors.Wrap(err, "failed to insert into foreign table")
}
}
updateQuery := fmt.Sprintf(
"UPDATE \"d_message_embeds\" SET %s WHERE %s",... | [
-0.11603406816720963,
0.5513806343078613,
0.8832794427871704,
-0.17784161865711212,
0.03090732917189598,
-0.04567175731062889,
0.7815186977386475,
0.21334201097488403,
-0.032295383512973785,
0.3389783501625061,
0.20521028339862823,
0.4123460054397583,
-1.0713093280792236,
1.12312912940979,... |
func DMessageEmbedsG(mods ...qm.QueryMod) dMessageEmbedQuery {
return DMessageEmbeds(boil.GetDB(), mods...)
} | [
-0.7461193799972534,
1.7064608335494995,
0.3487584888935089,
-0.40113118290901184,
-0.9836673736572266,
0.7147251963615417,
-0.2628137767314911,
0.11204129457473755,
0.2531077265739441,
0.029515350237488747,
0.10187242925167084,
0.1775057166814804,
-0.843992292881012,
1.318386197090149,
... |
func DMessageEmbeds(exec boil.Executor, mods ...qm.QueryMod) dMessageEmbedQuery {
mods = append(mods, qm.From("\"d_message_embeds\""))
return dMessageEmbedQuery{NewQuery(exec, mods...)}
} | [
-0.1743128001689911,
0.8320049047470093,
0.3707408308982849,
-0.03870021924376488,
-0.6376269459724426,
0.5410414338111877,
0.025725074112415314,
-0.24154789745807648,
0.5555568933486938,
-0.24282217025756836,
0.24665799736976624,
0.6063292026519775,
-0.7005209922790527,
0.8228504657745361... |
func FindDMessageEmbedG(id int64, selectCols ...string) (*DMessageEmbed, error) {
return FindDMessageEmbed(boil.GetDB(), id, selectCols...)
} | [
-0.7934095859527588,
1.2140783071517944,
0.4798302948474884,
-0.17674481868743896,
-0.7248148918151855,
0.44248247146606445,
-0.09644296020269394,
-0.2715831398963928,
-0.28648802638053894,
0.6110714673995972,
0.16466252505779266,
-0.06917444616556168,
-0.9951972365379333,
1.50924956798553... |
func FindDMessageEmbedGP(id int64, selectCols ...string) *DMessageEmbed {
retobj, err := FindDMessageEmbed(boil.GetDB(), id, selectCols...)
if err != nil {
panic(boil.WrapErr(err))
}
return retobj
} | [
-0.4255785644054413,
0.6627649664878845,
0.5336861610412598,
-0.3343004286289215,
-0.697656512260437,
0.43060603737831116,
-0.1562991440296173,
-1.0751488208770752,
-0.2994944453239441,
1.0221723318099976,
0.7499710321426392,
0.08555720746517181,
-1.7590581178665161,
0.9504883289337158,
... |
func FindDMessageEmbed(exec boil.Executor, id int64, selectCols ...string) (*DMessageEmbed, error) {
dMessageEmbedObj := &DMessageEmbed{}
sel := "*"
if len(selectCols) > 0 {
sel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), ",")
}
query := fmt.Sprintf(
"select %s from \"d_messa... | [
-0.4259444773197174,
0.2536630630493164,
0.7218490242958069,
-0.1440807729959488,
-0.4742712080478668,
0.054409850388765335,
0.20089340209960938,
-1.1494232416152954,
-0.028433779254555702,
0.216343492269516,
0.09714848548173904,
-0.03900611028075218,
-0.8121618032455444,
0.726208925247192... |
func FindDMessageEmbedP(exec boil.Executor, id int64, selectCols ...string) *DMessageEmbed {
retobj, err := FindDMessageEmbed(exec, id, selectCols...)
if err != nil {
panic(boil.WrapErr(err))
}
return retobj
} | [
-0.21322768926620483,
0.3392070531845093,
0.5848029851913452,
0.15442027151584625,
-0.6251238584518433,
0.49944746494293213,
0.14480425417423248,
-1.1530357599258423,
-0.0050748190842568874,
0.898561418056488,
0.36057478189468384,
0.02072126977145672,
-1.4930510520935059,
0.245911166071891... |
func (o *DMessageEmbed) InsertG(whitelist ...string) error {
return o.Insert(boil.GetDB(), whitelist...)
} | [
-1.6121073961257935,
2.0050618648529053,
0.5469395518302917,
-0.08581987768411636,
0.47616514563560486,
1.3770767450332642,
0.48958417773246765,
0.380746454000473,
-0.8110841512680054,
0.7559354901313782,
-0.3250080943107605,
0.1484251469373703,
-1.5001060962677002,
1.303821325302124,
-0... |
func (o *DMessageEmbed) InsertGP(whitelist ...string) {
if err := o.Insert(boil.GetDB(), whitelist...); err != nil {
panic(boil.WrapErr(err))
}
} | [
-1.2414941787719727,
1.729886770248413,
0.8066309094429016,
-0.18060043454170227,
0.43362119793891907,
1.0617095232009888,
0.13705173134803772,
-0.1307084709405899,
-0.6402180194854736,
1.2878623008728027,
0.24579215049743652,
-0.1101088598370552,
-2.2765727043151855,
0.6944191455841064,
... |
func (o *DMessageEmbed) InsertP(exec boil.Executor, whitelist ...string) {
if err := o.Insert(exec, whitelist...); err != nil {
panic(boil.WrapErr(err))
}
} | [
-0.14742733538150787,
1.4821385145187378,
0.6380987167358398,
-0.0536600798368454,
0.1952931433916092,
0.8746903538703918,
0.1785658299922943,
-0.1233038529753685,
-0.04998335987329483,
0.8671938180923462,
-0.028437422588467598,
-0.2226392924785614,
-1.6225935220718384,
0.36306440830230713... |
func (o *DMessageEmbed) Insert(exec boil.Executor, whitelist ...string) error {
if o == nil {
return errors.New("models: no d_message_embeds provided for insertion")
}
var err error
nzDefaults := queries.NonZeroDefaultSet(dMessageEmbedColumnsWithDefault, o)
key := makeCacheKey(whitelist, nzDefaults)
dMessage... | [
-1.11000657081604,
1.043426513671875,
0.9068183302879333,
-0.3532269299030304,
-0.31977197527885437,
0.0654309093952179,
1.0101161003112793,
-0.22448089718818665,
-0.03807663545012474,
0.4369475841522217,
-0.62372225522995,
0.11662653833627701,
-0.627422034740448,
0.8476830124855042,
-0.... |
func (o *DMessageEmbed) UpdateG(whitelist ...string) error {
return o.Update(boil.GetDB(), whitelist...)
} | [
-1.8131688833236694,
1.0190225839614868,
0.49964967370033264,
0.006849297322332859,
-0.3953065574169159,
1.0553367137908936,
0.2741030752658844,
0.2704147398471832,
-0.40539270639419556,
1.165554165840149,
0.289758563041687,
0.7399330735206604,
-1.0690889358520508,
1.1514109373092651,
-0... |
func (o *DMessageEmbed) UpdateGP(whitelist ...string) {
if err := o.Update(boil.GetDB(), whitelist...); err != nil {
panic(boil.WrapErr(err))
}
} | [
-1.474673867225647,
0.3433241844177246,
0.5681531429290771,
-0.21293006837368011,
-0.631105899810791,
0.6363251209259033,
-0.20219121873378754,
-0.40571489930152893,
-0.2368464320898056,
1.7154755592346191,
0.9428541660308838,
0.7873870134353638,
-1.7491999864578247,
0.5713604092597961,
... |
func (o *DMessageEmbed) UpdateP(exec boil.Executor, whitelist ...string) {
err := o.Update(exec, whitelist...)
if err != nil {
panic(boil.WrapErr(err))
}
} | [
-0.27024713158607483,
0.3880251944065094,
0.6474804878234863,
0.08004821091890335,
-0.6189174056053162,
0.6605868339538574,
-0.04395303502678871,
-0.4513644874095917,
0.39440295100212097,
1.215583086013794,
0.3921939730644226,
0.18973608314990997,
-1.126064658164978,
0.10372447967529297,
... |
func (o *DMessageEmbed) Update(exec boil.Executor, whitelist ...string) error {
var err error
key := makeCacheKey(whitelist, nil)
dMessageEmbedUpdateCacheMut.RLock()
cache, cached := dMessageEmbedUpdateCache[key]
dMessageEmbedUpdateCacheMut.RUnlock()
if !cached {
wl := strmangle.UpdateColumnSet(dMessageEmbedCo... | [
-1.4759081602096558,
0.2846898138523102,
0.8754733800888062,
-0.060421235859394073,
-0.6110579371452332,
0.08968056738376617,
0.512982964515686,
-0.3029286861419678,
-0.1256701648235321,
0.8399336934089661,
-0.20606841146945953,
0.4280596077442169,
-0.18914207816123962,
0.7023181319236755,... |
func (q dMessageEmbedQuery) UpdateAllP(cols M) {
if err := q.UpdateAll(cols); err != nil {
panic(boil.WrapErr(err))
}
} | [
0.48884549736976624,
0.05954520031809807,
0.4920762777328491,
0.10160795599222183,
-1.1806005239486694,
0.7431046366691589,
-0.500060498714447,
-0.39628270268440247,
0.6068496704101562,
1.1546721458435059,
0.5037785768508911,
-0.11532535403966904,
-0.7341831922531128,
-0.29989486932754517,... |
func (q dMessageEmbedQuery) UpdateAll(cols M) error {
queries.SetUpdate(q.Query, cols)
_, err := q.Query.Exec()
if err != nil {
return errors.Wrap(err, "models: unable to update all for d_message_embeds")
}
return nil
} | [
-0.38294488191604614,
-0.2256271094083786,
0.5973845720291138,
0.5421804189682007,
-0.34047195315361023,
0.746727705001831,
-0.13827981054782867,
-0.23719856142997742,
-0.49169227480888367,
0.3089662492275238,
0.018600981682538986,
0.44948333501815796,
-0.09183802455663681,
0.6023407578468... |
func (o DMessageEmbedSlice) UpdateAllG(cols M) error {
return o.UpdateAll(boil.GetDB(), cols)
} | [
-1.165668249130249,
0.3529936373233795,
0.4303015172481537,
-0.030905580148100853,
-1.2975401878356934,
0.1908882111310959,
-0.4108199179172516,
-0.06301776319742203,
-0.28416526317596436,
1.2875884771347046,
-0.12003915756940842,
0.24582679569721222,
-0.7785378694534302,
0.990045487880706... |
func (o DMessageEmbedSlice) UpdateAllGP(cols M) {
if err := o.UpdateAll(boil.GetDB(), cols); err != nil {
panic(boil.WrapErr(err))
}
} | [
-0.9816210865974426,
-0.23427529633045197,
0.40802499651908875,
0.20908449590206146,
-1.08647620677948,
0.0005099120899103582,
-0.5802319645881653,
-0.5335997343063354,
-0.4047633707523346,
1.2977911233901978,
0.42251837253570557,
0.5032961964607239,
-1.016819715499878,
0.4260343909263611,... |
func (o DMessageEmbedSlice) UpdateAllP(exec boil.Executor, cols M) {
if err := o.UpdateAll(exec, cols); err != nil {
panic(boil.WrapErr(err))
}
} | [
0.1571422964334488,
-0.17110218107700348,
0.5063226222991943,
0.23100729286670685,
-1.0339219570159912,
0.09773238748311996,
-0.2865612804889679,
-0.26697927713394165,
0.3617086410522461,
1.3110476732254028,
0.2702316343784332,
0.31805893778800964,
-0.7247275114059448,
-0.09787329286336899... |
func (o DMessageEmbedSlice) UpdateAll(exec boil.Executor, cols M) error {
ln := int64(len(o))
if ln == 0 {
return nil
}
if len(cols) == 0 {
return errors.New("models: update all requires at least one column argument")
}
colNames := make([]string, len(cols))
args := make([]interface{}, len(cols))
i := 0
... | [
-0.6912772059440613,
-0.11787819117307663,
0.921089231967926,
0.3217253088951111,
-0.46041351556777954,
0.19454534351825714,
0.3022659122943878,
-0.17230825126171112,
-0.8967889547348022,
0.7230404615402222,
-0.3429921567440033,
0.39865028858184814,
-0.5540012717247009,
0.7010214924812317,... |
func (o *DMessageEmbed) UpsertG(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error {
return o.Upsert(boil.GetDB(), updateOnConflict, conflictColumns, updateColumns, whitelist...)
} | [
-1.3581962585449219,
1.359035611152649,
0.7727622389793396,
-0.013095016591250896,
-0.17693795263767242,
0.3438999652862549,
-0.021177509799599648,
-0.008661898784339428,
-0.3987495005130768,
1.1438199281692505,
0.13673512637615204,
-0.4153764843940735,
-0.8010603189468384,
0.6666556000709... |
func (o *DMessageEmbed) UpsertGP(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) {
if err := o.Upsert(boil.GetDB(), updateOnConflict, conflictColumns, updateColumns, whitelist...); err != nil {
panic(boil.WrapErr(err))
}
} | [
-1.340018391609192,
0.6895207166671753,
0.9035801291465759,
-0.14221884310245514,
-0.26402729749679565,
0.30445390939712524,
-0.21297509968280792,
-0.3656350076198578,
-0.32912009954452515,
1.423351526260376,
0.4621412754058838,
-0.2981469929218292,
-1.704196572303772,
-0.02609592117369175... |
func (o *DMessageEmbed) UpsertP(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) {
if err := o.Upsert(exec, updateOnConflict, conflictColumns, updateColumns, whitelist...); err != nil {
panic(boil.WrapErr(err))
}
} | [
-0.4871197044849396,
0.6427415609359741,
0.826564610004425,
0.10094579309225082,
-0.15799826383590698,
0.271445631980896,
-0.045130807906389236,
-0.30343979597091675,
0.3714442849159241,
1.2274689674377441,
0.2550613582134247,
-0.608768105506897,
-1.2358810901641846,
-0.3633837103843689,
... |
func (o *DMessageEmbed) Upsert(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error {
if o == nil {
return errors.New("models: no d_message_embeds provided for upsert")
}
nzDefaults := queries.NonZeroDefaultSet(dMessageEmbedColumnsWithDefault, o)
... | [
-0.990373969078064,
0.4863748550415039,
1.006621241569519,
-0.18863193690776825,
0.0788387656211853,
-0.16707444190979004,
0.29387062788009644,
-0.16134808957576752,
-0.2070835679769516,
0.6502591371536255,
-0.5136693716049194,
-0.22306330502033234,
-0.7884085774421692,
0.5066161155700684,... |
func (o *DMessageEmbed) DeleteP(exec boil.Executor) {
if err := o.Delete(exec); err != nil {
panic(boil.WrapErr(err))
}
} | [
0.9728522896766663,
0.5659478902816772,
0.4300721287727356,
0.29628556966781616,
-0.2684061825275421,
0.513096034526825,
0.44280049204826355,
-0.3850536048412323,
0.5653642416000366,
0.07214068621397018,
0.5925837159156799,
-0.129633828997612,
-0.953645646572113,
0.29622435569763184,
0.7... |
func (o *DMessageEmbed) DeleteG() error {
if o == nil {
return errors.New("models: no DMessageEmbed provided for deletion")
}
return o.Delete(boil.GetDB())
} | [
-0.4400572180747986,
1.3928552865982056,
0.3437497317790985,
0.48026251792907715,
-0.21661365032196045,
1.061123013496399,
0.8352667689323425,
0.2711244821548462,
-0.16218188405036926,
0.1737474948167801,
-0.1278667449951172,
-0.3381124436855316,
-0.41898736357688904,
1.563044548034668,
... |
func (o *DMessageEmbed) DeleteGP() {
if err := o.DeleteG(); err != nil {
panic(boil.WrapErr(err))
}
} | [
0.5062763690948486,
0.7797077298164368,
0.3658621311187744,
0.25377175211906433,
-0.5582836866378784,
0.32787948846817017,
0.4664822518825531,
-0.2716261148452759,
0.09978198260068893,
0.20994359254837036,
0.8149406909942627,
0.6284087300300598,
-1.1541056632995605,
0.9332107901573181,
1... |
func (o *DMessageEmbed) Delete(exec boil.Executor) error {
if o == nil {
return errors.New("models: no DMessageEmbed provided for delete")
}
args := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), dMessageEmbedPrimaryKeyMapping)
sql := "DELETE FROM \"d_message_embeds\" WHERE \"id\"=$1"
if boil.... | [
-0.11198939383029938,
0.7094610929489136,
0.714354395866394,
0.28565579652786255,
0.11685765534639359,
0.20929238200187683,
0.9639798998832703,
-0.04771753028035164,
-0.09065891057252884,
0.2986609637737274,
0.05527065694332123,
0.005451487842947245,
-0.5177488327026367,
0.8051522374153137... |
func (q dMessageEmbedQuery) DeleteAllP() {
if err := q.DeleteAll(); err != nil {
panic(boil.WrapErr(err))
}
} | [
1.8668348789215088,
0.09539378434419632,
0.38157957792282104,
0.17899943888187408,
-0.5784331560134888,
0.7500280737876892,
-0.36318594217300415,
-0.23745925724506378,
1.1148664951324463,
0.41867679357528687,
0.7067657709121704,
-0.04428594186902046,
-0.623803973197937,
0.569756805896759,
... |
func (q dMessageEmbedQuery) DeleteAll() error {
if q.Query == nil {
return errors.New("models: no dMessageEmbedQuery provided for delete all")
}
queries.SetDelete(q.Query)
_, err := q.Query.Exec()
if err != nil {
return errors.Wrap(err, "models: unable to delete all from d_message_embeds")
}
return nil
} | [
0.5213965773582458,
-0.021828727796673775,
0.38988351821899414,
0.19945193827152252,
0.06536807119846344,
0.7571941614151001,
0.3507179319858551,
-0.20463140308856964,
0.12485206872224808,
-0.23904922604560852,
0.5244133472442627,
0.6717595458030701,
-0.09177232533693314,
1.597383022308349... |
func (o DMessageEmbedSlice) DeleteAllGP() {
if err := o.DeleteAllG(); err != nil {
panic(boil.WrapErr(err))
}
} | [
0.32338520884513855,
-0.03610558807849884,
0.2893466353416443,
0.7234713435173035,
-0.6037234663963318,
-0.18120631575584412,
-0.3481728732585907,
-0.2109351009130478,
0.2683637738227844,
0.6350893378257751,
0.4798690378665924,
0.5642719268798828,
-0.8724877238273621,
1.5260258913040161,
... |
func (o DMessageEmbedSlice) DeleteAllG() error {
if o == nil {
return errors.New("models: no DMessageEmbed slice provided for delete all")
}
return o.DeleteAll(boil.GetDB())
} | [
0.11376907676458359,
0.8395176529884338,
0.45618438720703125,
0.5127406716346741,
-0.7854874730110168,
0.31747356057167053,
-0.2733568847179413,
0.47998395562171936,
0.47822850942611694,
0.3749203681945801,
-0.020426472648978233,
-0.2906769812107086,
-0.29185959696769714,
2.100210666656494... |
func (o DMessageEmbedSlice) DeleteAllP(exec boil.Executor) {
if err := o.DeleteAll(exec); err != nil {
panic(boil.WrapErr(err))
}
} | [
1.292791724205017,
-0.11119318008422852,
0.42522040009498596,
0.4153057932853699,
-0.4974759817123413,
0.07177561521530151,
0.022824222221970558,
-0.17085857689380646,
0.9140439629554749,
0.6779187321662903,
0.38635262846946716,
0.1701669842004776,
-0.6675109267234802,
0.5497389435768127,
... |
func (o DMessageEmbedSlice) DeleteAll(exec boil.Executor) error {
if o == nil {
return errors.New("models: no DMessageEmbed slice provided for delete all")
}
if len(o) == 0 {
return nil
}
var args []interface{}
for _, obj := range o {
pkeyArgs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(... | [
-0.28254252672195435,
-0.12321645766496658,
0.765028178691864,
0.31072473526000977,
-0.4278772473335266,
0.26225247979164124,
0.5784934759140015,
-0.12464584410190582,
-0.3607357442378998,
0.2675682604312897,
0.18244189023971558,
0.22556546330451965,
-0.3235962390899658,
1.2786614894866943... |
func (o *DMessageEmbed) ReloadGP() {
if err := o.ReloadG(); err != nil {
panic(boil.WrapErr(err))
}
} | [
-0.030814893543720245,
0.5288708806037903,
0.39198023080825806,
0.5279883742332458,
-0.6885707974433899,
-0.04377467557787895,
0.1804029494524002,
-0.7391796112060547,
-0.38922739028930664,
0.44663965702056885,
0.7777175903320312,
1.3258106708526611,
-1.0091253519058228,
0.4699849486351013... |
func (o *DMessageEmbed) ReloadP(exec boil.Executor) {
if err := o.Reload(exec); err != nil {
panic(boil.WrapErr(err))
}
} | [
0.48821496963500977,
0.43425115942955017,
0.48015835881233215,
0.5201637148857117,
-0.5927125215530396,
0.185299813747406,
0.19915613532066345,
-0.682479202747345,
0.22999291121959686,
0.2715221643447876,
0.5586792826652527,
0.3034161925315857,
-0.9172860383987427,
-0.07981164008378983,
... |
func (o *DMessageEmbed) ReloadG() error {
if o == nil {
return errors.New("models: no DMessageEmbed provided for reload")
}
return o.Reload(boil.GetDB())
} | [
-0.7186670303344727,
1.3728506565093994,
0.4929876923561096,
0.7394484281539917,
-0.4277168810367584,
0.6112183332443237,
0.31184330582618713,
-0.06495536118745804,
-0.4584479331970215,
0.4201122224330902,
0.09454067051410675,
0.2682505249977112,
-0.2962326407432556,
1.4213950634002686,
... |
func (o *DMessageEmbed) Reload(exec boil.Executor) error {
ret, err := FindDMessageEmbed(exec, o.ID)
if err != nil {
return err
}
*o = *ret
return nil
} | [
-0.08045867085456848,
0.5913081765174866,
0.70936119556427,
0.48015010356903076,
0.05271550640463829,
0.10285450518131256,
0.7568037509918213,
-0.5264288187026978,
-0.11086936295032501,
0.10557105392217636,
0.11452457308769226,
0.564733624458313,
-0.49288421869277954,
0.30605509877204895,
... |
func (o *DMessageEmbedSlice) ReloadAllGP() {
if err := o.ReloadAllG(); err != nil {
panic(boil.WrapErr(err))
}
} | [
-0.26644590497016907,
0.03740892559289932,
0.34204384684562683,
0.7936452627182007,
-0.8374878168106079,
-0.43811124563217163,
-0.5535715222358704,
-0.48682209849357605,
-0.007581628393381834,
0.7248039245605469,
0.6555434465408325,
1.125640630722046,
-0.8571308255195618,
0.965974807739257... |
func (o *DMessageEmbedSlice) ReloadAllP(exec boil.Executor) {
if err := o.ReloadAll(exec); err != nil {
panic(boil.WrapErr(err))
}
} | [
0.575554609298706,
0.0752657800912857,
0.5126221179962158,
0.7491710186004639,
-0.7756830453872681,
-0.08449533581733704,
-0.04079856723546982,
-0.4039876461029053,
0.6310122013092041,
0.8159263134002686,
0.5106980204582214,
0.7532739639282227,
-0.7656623721122742,
0.09311400353908539,
0... |
func (o *DMessageEmbedSlice) ReloadAllG() error {
if o == nil {
return errors.New("models: empty DMessageEmbedSlice provided for reload all")
}
return o.ReloadAll(boil.GetDB())
} | [
-0.06988164782524109,
1.0795501470565796,
0.5573444962501526,
0.7212912440299988,
-0.963810920715332,
-0.13737408816814423,
-0.6054514646530151,
0.2631685435771942,
0.2835787236690521,
0.6047148704528809,
-0.007625190075486898,
0.18731936812400818,
-0.3659849464893341,
1.782724142074585,
... |
func (o *DMessageEmbedSlice) ReloadAll(exec boil.Executor) error {
if o == nil || len(*o) == 0 {
return nil
}
dMessageEmbeds := DMessageEmbedSlice{}
var args []interface{}
for _, obj := range *o {
pkeyArgs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(obj)), dMessageEmbedPrimaryKeyMapping)
a... | [
-0.41362252831459045,
0.0026112438645213842,
0.7798817157745361,
0.5730769038200378,
-0.5107425451278687,
0.06691660732030869,
0.39526352286338806,
-0.36184635758399963,
-0.24055929481983185,
0.44610849022865295,
-0.24660511314868927,
0.366319864988327,
-0.6210020184516907,
1.1370956897735... |
func DMessageEmbedExists(exec boil.Executor, id int64) (bool, error) {
var exists bool
sql := "select exists(select 1 from \"d_message_embeds\" where \"id\"=$1 limit 1)"
if boil.DebugMode {
fmt.Fprintln(boil.DebugWriter, sql)
fmt.Fprintln(boil.DebugWriter, id)
}
row := exec.QueryRow(sql, id)
err := row.Sc... | [
-1.0904717445373535,
0.3983505666255951,
0.8388736248016357,
-0.6678044199943542,
0.3531247675418854,
0.282844603061676,
0.17816030979156494,
0.003195050870999694,
-0.17651847004890442,
0.276877224445343,
-0.3610793352127075,
0.09340014308691025,
-0.5407319068908691,
0.9643188118934631,
... |
func DMessageEmbedExistsG(id int64) (bool, error) {
return DMessageEmbedExists(boil.GetDB(), id)
} | [
-1.1135914325714111,
0.8187047243118286,
0.4642646610736847,
-0.7018114328384399,
0.3114809989929199,
0.8385629057884216,
0.11007865518331528,
0.2558952271938324,
-0.24776117503643036,
0.7993093132972717,
-0.20380693674087524,
-0.48305293917655945,
-0.350639671087265,
1.533347725868225,
... |
func DMessageEmbedExistsGP(id int64) bool {
e, err := DMessageEmbedExists(boil.GetDB(), id)
if err != nil {
panic(boil.WrapErr(err))
}
return e
} | [
-0.5340579152107239,
0.7159373760223389,
0.6095146536827087,
-0.6325476169586182,
0.27686581015586853,
0.7238059043884277,
-0.322648286819458,
-0.34615087509155273,
-0.354768842458725,
0.9971939325332642,
0.44619467854499817,
-0.25295740365982056,
-0.9629772305488586,
1.182616949081421,
... |
func DMessageEmbedExistsP(exec boil.Executor, id int64) bool {
e, err := DMessageEmbedExists(exec, id)
if err != nil {
panic(boil.WrapErr(err))
}
return e
} | [
0.10623384267091751,
0.4692254662513733,
0.4873445928096771,
-0.19190526008605957,
0.2051120102405548,
0.6026132702827454,
-0.24486973881721497,
-0.3450486660003662,
0.32179561257362366,
0.5452518463134766,
-0.009378115646541119,
-0.21739350259304047,
-0.9500007629394531,
0.596514821052551... |
func AddOrUpdateStatusConditions(conditions []toolchainv1alpha1.Condition, newConditions ...toolchainv1alpha1.Condition) ([]toolchainv1alpha1.Condition, bool) {
var atLeastOneUpdated bool
var updated bool
for _, cond := range newConditions {
conditions, updated = addOrUpdateStatusCondition(conditions, cond)
atLe... | [
-0.9866874814033508,
-0.815253496170044,
0.6148467063903809,
0.6137058734893799,
0.016756027936935425,
0.1788235902786255,
-0.3769467771053314,
0.022181564942002296,
0.4811413586139679,
0.6957058310508728,
0.11777686327695847,
-0.4794521629810333,
-0.13210922479629517,
1.1633808612823486,
... |
func FindConditionByType(conditions []toolchainv1alpha1.Condition, conditionType toolchainv1alpha1.ConditionType) (toolchainv1alpha1.Condition, bool) {
for _, condition := range conditions {
if condition.Type == conditionType {
return condition, true
}
}
return toolchainv1alpha1.Condition{}, false
} | [
0.3370975852012634,
-1.116348147392273,
0.22575239837169647,
-0.1600310057401657,
-0.10832513123750687,
-0.4985429048538208,
0.6121035814285278,
-1.205156922340393,
-0.6302148699760437,
1.3634305000305176,
0.42382800579071045,
0.06257647275924683,
-0.6788491606712341,
1.4254953861236572,
... |
func IsTrue(conditions []toolchainv1alpha1.Condition, conditionType toolchainv1alpha1.ConditionType) bool {
c, found := FindConditionByType(conditions, conditionType)
return found && c.Status == apiv1.ConditionTrue
} | [
-0.07417291402816772,
-0.04637407511472702,
0.44180360436439514,
0.5855061411857605,
0.7781237363815308,
-0.38632044196128845,
-0.11110340058803558,
-0.4099920690059662,
-0.5661576986312866,
0.9809938669204712,
-0.10592854768037796,
0.02690470963716507,
-0.9095388650894165,
0.5099307298660... |
func IsNotTrue(conditions []toolchainv1alpha1.Condition, conditionType toolchainv1alpha1.ConditionType) bool {
c, found := FindConditionByType(conditions, conditionType)
return !found || c.Status != apiv1.ConditionTrue
} | [
-0.3323163092136383,
-0.1873731017112732,
0.19391821324825287,
0.3834852874279022,
0.6365097165107727,
-0.23166905343532562,
-0.21556517481803894,
-0.9310944676399231,
-0.6703392863273621,
1.1526556015014648,
0.19455167651176453,
-0.12061093002557755,
-1.4987074136734009,
0.777420759201049... |
func IsFalseWithReason(conditions []toolchainv1alpha1.Condition, conditionType toolchainv1alpha1.ConditionType, reason string) bool {
c, found := FindConditionByType(conditions, conditionType)
return found && c.Status == apiv1.ConditionFalse && c.Reason == reason
} | [
0.24789711833000183,
-1.1525928974151611,
0.09487345814704895,
0.18368087708950043,
0.28749707341194153,
-0.15947748720645905,
-1.0409581661224365,
-0.8700532913208008,
0.5836268663406372,
0.6294335722923279,
0.20422276854515076,
0.9128496050834656,
-0.9424381852149963,
1.530072808265686,
... |
func HasConditionReason(conditions []toolchainv1alpha1.Condition, conditionType toolchainv1alpha1.ConditionType, reason string) bool {
con, found := FindConditionByType(conditions, conditionType)
return found && con.Reason == reason
} | [
1.0264965295791626,
-1.023325800895691,
0.03195371478796005,
0.10932077467441559,
0.3746053874492645,
-0.5491036772727966,
-0.2174621820449829,
-0.11076086014509201,
0.21135690808296204,
0.46124565601348877,
0.0795571431517601,
0.8570110201835632,
-0.40153244137763977,
1.0084812641143799,
... |
func GetHashedValue(w http.ResponseWriter, r *http.Request) {
numberString := strings.Replace(r.URL.String(), "/hash/", "", -1)
number, err := strconv.Atoi(numberString)
if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
returnJSON := "There is no recordId with value " + numberString
... | [
-0.19452093541622162,
-0.11201970279216766,
0.862382173538208,
0.5080662965774536,
-0.17266276478767395,
0.2010302096605301,
0.05508354678750038,
-0.499657541513443,
-0.07387689501047134,
-0.3858162462711334,
0.30263978242874146,
0.80898118019104,
-0.23438206315040588,
0.7221593856811523,
... |
func SetHashedValue(w http.ResponseWriter, r *http.Request) {
if (!serverRunning) {
isShutdown(w, r)
return
}
body, err := ioutil.ReadAll(r.Body)
if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
const passwordPrefix = "password"
//checking POST Body
//TODO: ask if I need to ... | [
-0.45614150166511536,
-0.4174618721008301,
0.9047542214393616,
0.5103188753128052,
0.3208147883415222,
0.55924391746521,
-0.24583767354488373,
0.6418322324752808,
-0.2762845754623413,
0.1660182923078537,
-0.436996191740036,
0.47819262742996216,
0.7916511297225952,
1.0207326412200928,
-0.... |
func HashPassword(newKey int, hashedValuesMap *sync.Map) {
time.Sleep(hashThreadSleepTime * time.Second)
mapObject, statusOk := hashedValuesMap.Load(newKey)
if (statusOk) {
passwordObject, ok := mapObject.(DTOs.HashedPasswordObject)
if (!ok) {
fmt.Println("Unable to cast object when retrieving from Map")
}
... | [
0.0830608382821083,
-0.8006858825683594,
0.5283070802688599,
0.6946274638175964,
0.38067126274108887,
0.28725606203079224,
-0.1812240332365036,
0.6538848280906677,
0.5594499111175537,
0.26272091269493103,
-0.40300118923187256,
0.5689046382904053,
0.003631841391324997,
0.2754996418952942,
... |
func getMapValue(keyNumber int, w http.ResponseWriter) DTOs.HashedPasswordObject {
storedObject := DTOs.HashedPasswordObject{}
returnObject, statusOk := hashedValuesMap.Load(keyNumber)
anyError := false
if (statusOk) {
storedObject, statusOk = returnObject.(DTOs.HashedPasswordObject)
if (!statusOk) {
anyErro... | [
-0.6686657071113586,
-0.6800920367240906,
0.9683824777603149,
0.5847348570823669,
-0.5036532282829285,
1.010909914970398,
-0.3353559970855713,
-0.19529131054878235,
1.0190749168395996,
-0.2517508566379547,
0.2635732889175415,
0.0909772738814354,
0.1667363941669464,
0.21417467296123505,
0... |
func NewBitbucketBuildTriggerFieldGroup(fullConfig map[string]interface{}) (*BitbucketBuildTriggerFieldGroup, error) {
newBitbucketBuildTriggerFieldGroup := &BitbucketBuildTriggerFieldGroup{}
defaults.Set(newBitbucketBuildTriggerFieldGroup)
if value, ok := fullConfig["BITBUCKET_TRIGGER_CONFIG"]; ok {
var err erro... | [
-0.1870627999305725,
-0.2067292183637619,
0.21344539523124695,
-0.13397428393363953,
-0.21654336154460907,
-0.09156304597854614,
0.2757333219051361,
-0.16368763148784637,
-0.7866697311401367,
-0.5238668322563171,
-1.1801118850708008,
0.033561065793037415,
-0.4648531675338745,
0.28320840001... |
func NewBitbucketTriggerConfigStruct(fullConfig map[string]interface{}) (*BitbucketTriggerConfigStruct, error) {
newBitbucketTriggerConfigStruct := &BitbucketTriggerConfigStruct{}
defaults.Set(newBitbucketTriggerConfigStruct)
if value, ok := fullConfig["CONSUMER_KEY"]; ok {
newBitbucketTriggerConfigStruct.Consume... | [
-0.21291810274124146,
-0.4433736801147461,
0.34579265117645264,
-0.03368847444653511,
-0.8615278601646423,
-0.6980932950973511,
-0.49683794379234314,
0.2420864999294281,
-0.7813471555709839,
0.13231804966926575,
-1.2655619382858276,
-0.2310277223587036,
-0.5146714448928833,
-0.429874837398... |
func (receiver Type) At(x, y int) color.Color {
const black = 0
const white = 255
if x < minX || maxX < x || y < minY || maxY < y {
return color.Gray{black}
}
result := receiver[y] & (0x01 << byte(x))
if 0 == result {
return color.Gray{black}
}
return color.Gray{white}
} | [
-1.3407461643218994,
-0.3423749506473541,
0.4276353418827057,
-1.7661640644073486,
-0.3108057677745819,
0.010148735716938972,
-0.8539419174194336,
-1.2845550775527954,
0.8938435316085815,
0.5323565602302551,
0.3873921036720276,
1.6702063083648682,
0.4776659905910492,
0.26271700859069824,
... |
func (receiver Type) Bounds() image.Rectangle {
return image.Rect(minX,minY, maxX,maxY)
} | [
-0.7147505879402161,
-0.8003916144371033,
0.42171451449394226,
-0.8869317770004272,
-0.38054323196411133,
0.2561759352684021,
-0.8015607595443726,
-0.7998154759407043,
1.3350683450698853,
-0.7317600250244141,
0.3660735487937927,
0.33160507678985596,
0.04351215809583664,
0.5116409063339233,... |
func DefaultArgs() Args {
currentDir, _ := os.Getwd()
return Args{
Domain: "",
AccessToken: "",
Directory: currentDir,
Environment: themekit.DefaultEnvironment,
BucketSize: themekit.DefaultBucketSize,
RefillRate: themekit.DefaultRefillRate,
Timeout: theme... | [
0.06394324451684952,
0.30697157979011536,
0.27281975746154785,
-0.6933175921440125,
0.4761010408401489,
0.47312721610069275,
0.4944365322589874,
-0.15728238224983215,
-0.5800772905349731,
-0.29904597997665405,
0.2248096615076065,
-0.109500452876091,
-0.9018445014953613,
0.8192410469055176,... |
func (args Args) DefaultConfigurationOptions() themekit.Configuration {
accessToken := args.AccessToken
if args.AccessToken == "" {
accessToken = args.Password
}
return themekit.Configuration{
Domain: args.Domain,
AccessToken: accessToken,
Password: accessToken,
BucketSize: args.BucketSize,
Re... | [
-0.22760571539402008,
0.47020548582077026,
0.32573172450065613,
-0.14492273330688477,
0.8365042209625244,
-0.4214821457862854,
0.30009540915489197,
-0.10001186281442642,
-0.47915709018707275,
-0.06094587221741676,
0.26385241746902466,
-1.046470284461975,
-0.33463773131370544,
0.82683217525... |
func ConvertPackEntries(packFile string) ([]snd.Entry, error) {
packBytes, err := ioutil.ReadFile(packFile)
if err != nil {
return nil, err
}
packLines := strings.Split(string(packBytes), "\n")
var entries []snd.Entry
for i := range packLines {
if len(packLines[i]) <= 2 {
continue
}
pack := PackEntr... | [
0.010267185978591442,
-1.1389663219451904,
0.7144308090209961,
-0.00255802134051919,
0.08593077957630157,
-0.3474900424480438,
-0.8196079134941101,
0.575836718082428,
-0.06998208165168762,
0.7459843158721924,
-1.5578397512435913,
0.2502976357936859,
0.23899607360363007,
0.33785831928253174... |
func ConvertDataSources(moduleFile string) ([]snd.DataSource, [][]snd.Entry, error) {
moduleBytes, err := ioutil.ReadFile(moduleFile)
if err != nil {
return nil, nil, err
}
mod := Module{}
if err := json.Unmarshal(moduleBytes, &mod); err != nil {
return nil, nil, err
}
author := ""
switch mod.Author.(typ... | [
-0.06424106657505035,
-0.747552752494812,
0.41940438747406006,
-1.276058316230774,
-0.3125947117805481,
-0.4204142987728119,
-0.08065668493509293,
0.6598184704780579,
0.321045458316803,
0.4705987870693207,
-1.0256427526474,
0.39572516083717346,
-0.05971815437078476,
0.9021872282028198,
0... |
func NewOperations(
executor interfaces.CommandExecutor,
lc logger.LoggingClient,
executorPath string) *operations {
return &operations{
executor: executor,
loggingClient: lc,
executorPath: executorPath,
}
} | [
0.4932146966457367,
0.3282115161418915,
0.2855415940284729,
-0.3115236163139343,
-0.3067816197872162,
-1.2390507459640503,
0.19739356637001038,
-0.49232423305511475,
0.11536571383476257,
-0.3912160098552704,
0.09139414131641388,
-0.8403815627098083,
-0.39304429292678833,
0.6253759860992432... |
func (e operations) delegateToExecutor(serviceName, operation string) interface{} {
r, err := e.executor(e.executorPath, serviceName, operation)
if err != nil {
return system.Failure(serviceName, operation, UnknownExecutorType, err.Error())
}
return response.Process(r, e.loggingClient)
} | [
0.5012326240539551,
0.5454639196395874,
0.9232028722763062,
-0.295097678899765,
0.25557389855384827,
-0.016739843413233757,
0.16630013287067413,
-0.27496519684791565,
1.0330685377120972,
0.09554018825292587,
0.9711129069328308,
0.5563971996307373,
0.8845564723014832,
0.3230457901954651,
... |
func (e operations) Do(services []string, operation string) []interface{} {
var closures []concurrent.Closure
for index := range services {
closures = append(
closures,
func(serviceName string) concurrent.Closure {
return func() interface{} {
return e.delegateToExecutor(serviceName, operation)
}
... | [
-0.7732751965522766,
1.3758621215820312,
1.0445189476013184,
-0.12905627489089966,
0.4373653531074524,
-0.21911486983299255,
0.22506700456142426,
-0.8366895914077759,
0.03002792038023472,
0.7155299782752991,
0.503233015537262,
-0.2274237424135208,
0.12432356178760529,
0.3583183288574219,
... |
func (r *Replay) Execute() error {
socket, err := connect(r.Endpoint)
if err != nil {
return err
}
defer socket.Close()
f, err := os.Open(r.In)
if err != nil {
return err
}
defer f.Close()
hdr := make([]byte, len(signature))
if err := readFull(f, hdr); err != nil {
return err
}
if string(hdr) != sig... | [
0.0428382083773613,
-0.1410256326198578,
1.0733741521835327,
-0.06324224174022675,
0.7027047872543335,
-0.3832811415195465,
0.1547752469778061,
0.2284262329339981,
-1.0630240440368652,
1.2252198457717896,
-0.18625441193580627,
-0.24777039885520935,
-0.7919970154762268,
-0.5589560866355896,... |
func handshake(socket *os.File, version uint32) error {
hsOut := pb.Handshake{Version: version}
out, err := proto.Marshal(&hsOut)
if err != nil {
return err
}
if _, err := socket.Write(out); err != nil {
return fmt.Errorf("sending handshake message: %w", err)
}
in := make([]byte, 10240)
read, err := socket... | [
0.5765413641929626,
0.5158302187919617,
0.9628716111183167,
0.6830692291259766,
0.22030866146087646,
-0.4005025327205658,
0.38053515553474426,
0.3878744840621948,
-0.599886953830719,
-0.23001046478748322,
0.3987182676792145,
0.3161103129386902,
-0.6402940154075623,
-0.013218874111771584,
... |
func getUITargetPort(app *v1beta2.SparkApplication) (int32, error) {
portStr, ok := app.Spec.SparkConf[sparkUIPortConfigurationKey]
if ok {
port, err := strconv.Atoi(portStr)
return int32(port), err
}
return defaultSparkWebUIPort, nil
} | [
-0.14877565205097198,
0.03873302787542343,
0.7268557548522949,
0.20259176194667816,
0.9392824769020081,
-0.17921879887580872,
0.9987154006958008,
0.34722378849983215,
-0.3356584310531616,
-0.7322958111763,
0.12469131499528885,
0.07259820401668549,
-0.20378200709819794,
0.002680857898667454... |
func NewSection(title string, index int) *Section {
return &Section{
Title: title,
Index: index,
MaxExits: pickMaxExit(),
}
} | [
-0.1885392665863037,
-0.7748830318450928,
0.2860109210014343,
0.3569091558456421,
-0.7549008131027222,
0.08626364171504974,
-0.6943945288658142,
-0.8667460083961487,
-0.2974811792373657,
0.17426663637161255,
0.40518882870674133,
0.537285327911377,
0.18459415435791016,
-0.9123106598854065,
... |
func NewWidths() Widths {
return make(map[int]int)
} | [
-0.4820379614830017,
-0.5017176866531372,
0.24952425062656403,
-0.27888375520706177,
-1.1977816820144653,
-0.44500234723091125,
-0.40217360854148865,
-0.9100913405418396,
0.5201759338378906,
-1.0187369585037231,
0.001213124836795032,
-0.03669142350554466,
-0.5005912780761719,
0.47048351168... |
func (w Widths) Inc(level int) {
if _, ok := w[level]; !ok {
w[level] = 0
}
w[level]++
} | [
-0.46444863080978394,
0.05066442862153053,
0.4920685887336731,
-0.6484127044677734,
-0.9420246481895447,
0.8484615683555603,
0.7256051898002625,
0.547751247882843,
-0.17344294488430023,
0.03408513963222504,
0.06194428354501724,
0.30104678869247437,
-0.7555622458457947,
1.218883752822876,
... |
func (w Widths) Dec(level int) {
if _, ok := w[level]; !ok {
w[level] = 0
} else {
w[level]--
}
} | [
0.29501962661743164,
-0.5088877081871033,
0.5681272149085999,
-0.8827505111694336,
-0.18630476295948029,
0.5685027837753296,
0.5588169097900391,
0.49282073974609375,
-0.20602872967720032,
0.32238689064979553,
0.514910876750946,
-0.2627635896205902,
-0.5495566725730896,
0.9928319454193115,
... |
func (w Widths) Get(level int) int {
if _, ok := w[level]; !ok {
w[level] = 0
}
return w[level]
} | [
-0.8500680327415466,
-0.1546923965215683,
0.7228825688362122,
-0.7810444235801697,
-0.13697360455989838,
-0.6534923315048218,
0.2180705964565277,
-0.020677002146840096,
-0.0161774680018425,
0.085562564432621,
0.2274637669324875,
0.5644345879554749,
-1.4987046718597412,
0.7669881582260132,
... |
func (w Widths) MaxDepth() (maxDepth, deepWidth int) {
for depth, width := range w {
if depth > maxDepth {
maxDepth = depth
deepWidth = width
}
}
return
} | [
-0.13575364649295807,
0.21596065163612366,
0.4068697392940521,
-0.6667956113815308,
-0.35447928309440613,
0.08444003015756607,
0.898377001285553,
-0.03853195905685425,
1.2419134378433228,
-1.1151790618896484,
-0.203962042927742,
0.7340583205223083,
0.14749787747859955,
1.8594197034835815,
... |
func (w Widths) MaxWidth() (maxWidth, wideDepth int) {
for depth, width := range w {
if width > maxWidth {
maxWidth = width
wideDepth = depth
}
}
return
} | [
-0.17549294233322144,
0.21934130787849426,
0.5148767232894897,
0.1898813396692276,
-0.2573941946029663,
-0.19271886348724365,
0.4553363621234894,
0.25510668754577637,
1.03055739402771,
-0.6560174226760864,
0.02092098444700241,
0.47683587670326233,
-0.24120286107063293,
1.4578919410705566,
... |
func (service Service) GetUser(string) user.User {
return user.User{}
} | [
-0.20797255635261536,
-0.2603709101676941,
0.17624031007289886,
1.2119362354278564,
-0.7441220283508301,
0.046669621020555496,
0.3410458266735077,
-1.052724003791809,
0.4032110869884491,
-1.22408926486969,
-0.20383714139461517,
0.8368393778800964,
0.04166648909449577,
0.15424752235412598,
... |
func NewService() Service {
return Service{}
} | [
0.2593778371810913,
-0.9337978959083557,
-0.08643894642591476,
0.6979542970657349,
-0.7593969106674194,
0.003884542267769575,
-0.37859129905700684,
-1.1176719665527344,
-0.10191916674375534,
-0.923462986946106,
-0.4500425457954407,
0.9509606957435608,
-0.6377140283584595,
0.545854210853576... |
func mapRowsToUserAccount(rows *sql.Rows) (*UserAccount, error) {
var (
ua UserAccount
err error
)
err = rows.Scan(&ua.UserID, &ua.AccountID, &ua.Roles, &ua.Status, &ua.CreatedAt, &ua.UpdatedAt, &ua.ArchivedAt)
if err != nil {
return nil, errors.WithStack(err)
}
return &ua, nil
} | [
-0.3335678279399872,
-0.40301162004470825,
0.35789382457733154,
0.35684239864349365,
-0.6090657114982605,
-0.5482224822044373,
1.141005516052246,
0.2854909300804138,
1.7919526100158691,
0.06110122799873352,
0.08463731408119202,
0.06799069046974182,
0.8957878947257996,
-0.19847150146961212,... |
func (repo *Repository) CanReadAccount(ctx context.Context, claims auth.Claims, accountID string) error {
err := account.CanReadAccount(ctx, claims, repo.DbConn, accountID)
return mapAccountError(err)
} | [
0.3319285213947296,
-0.308022677898407,
0.12072546780109406,
-0.11217810213565826,
-0.26211312413215637,
0.4810968339443207,
0.21856006979942322,
0.05130448192358017,
0.72206050157547,
0.23565758764743805,
0.9582548141479492,
0.7966623306274414,
0.9112308025360107,
-0.11207738518714905,
... |
func (repo *Repository) CanModifyAccount(ctx context.Context, claims auth.Claims, accountID string) error {
err := account.CanModifyAccount(ctx, claims, repo.DbConn, accountID)
return mapAccountError(err)
} | [
-0.50911945104599,
-0.6471060514450073,
-0.01994696632027626,
-0.12844200432300568,
0.5334818363189697,
-0.08982306718826294,
0.6256477236747742,
0.32001766562461853,
0.8498489856719971,
-0.039206940680742264,
0.4120122790336609,
0.7697266936302185,
0.30113133788108826,
1.02657151222229,
... |
func applyClaimsSelect(ctx context.Context, claims auth.Claims, query *sqlbuilder.SelectBuilder) error {
if claims.Audience == "" && claims.Subject == "" {
return nil
}
// Build select statement for users_accounts table
subQuery := sqlbuilder.NewSelectBuilder().Select("id").From(userAccountTableName)
var or []... | [
0.825856626033783,
-0.504349946975708,
0.49853217601776123,
-0.4377732574939728,
-0.44515448808670044,
0.4005725383758545,
-0.6997202038764954,
-0.056370023638010025,
1.1092097759246826,
-0.7516975402832031,
1.3400838375091553,
0.696037232875824,
0.815085232257843,
0.37278997898101807,
-... |
func selectQuery() *sqlbuilder.SelectBuilder {
query := sqlbuilder.NewSelectBuilder()
query.Select(userAccountMapColumns)
query.From(userAccountTableName)
return query
} | [
1.0094860792160034,
-0.4496195912361145,
0.25274690985679626,
0.9243335127830505,
-0.4189259111881256,
-0.3374175727367401,
0.016753265634179115,
0.4580112397670746,
1.5157922506332397,
-0.7563961148262024,
0.8840277791023254,
0.507544755935669,
0.059104226529598236,
-0.48875799775123596,
... |
func findRequestQuery(req UserAccountFindRequest) (*sqlbuilder.SelectBuilder, []interface{}) {
query := selectQuery()
if req.Where != "" {
query.Where(query.And(req.Where))
}
if len(req.Order) > 0 {
query.OrderBy(req.Order...)
}
if req.Limit != nil {
query.Limit(int(*req.Limit))
}
if req.Offset != nil {
... | [
-0.5549818873405457,
-0.5471326112747192,
0.5208284258842468,
0.4317214787006378,
-0.26975443959236145,
-0.5076490640640259,
-0.479816734790802,
-0.4742973744869232,
0.391602486371994,
-0.12180735170841217,
1.2542232275009155,
0.037232402712106705,
-0.2117808312177658,
0.49094149470329285,... |
func (repo *Repository) Find(ctx context.Context, claims auth.Claims, req UserAccountFindRequest) (UserAccounts, error) {
query, args := findRequestQuery(req)
return find(ctx, claims, repo.DbConn, query, args, req.IncludeArchived)
} | [
0.14535051584243774,
-0.24034753441810608,
0.1782035082578659,
0.17685271799564362,
0.3834216594696045,
0.0642898678779602,
0.006547177210450172,
-0.26545727252960205,
0.2569907009601593,
0.1508239209651947,
0.8964737057685852,
0.16193166375160217,
-0.10750021040439606,
0.405595988035202,
... |
func find(ctx context.Context, claims auth.Claims, dbConn *sqlx.DB, query *sqlbuilder.SelectBuilder, args []interface{}, includedArchived bool) (UserAccounts, error) {
span, ctx := tracer.StartSpanFromContext(ctx, "internal.user_account.Find")
defer span.Finish()
query.Select(userAccountMapColumns)
query.From(user... | [
0.5018061399459839,
-0.1927555799484253,
0.5342918634414673,
0.4397270679473877,
-0.2950115203857422,
0.1609061360359192,
0.6451275944709778,
0.14623166620731354,
0.7636587023735046,
-0.013262245804071426,
1.102908968925476,
0.12150022387504578,
-0.06082123890519142,
0.376892626285553,
-... |
func (repo *Repository) FindByUserID(ctx context.Context, claims auth.Claims, userID string, includedArchived bool) (UserAccounts, error) {
span, ctx := tracer.StartSpanFromContext(ctx, "internal.user_account.FindByUserID")
defer span.Finish()
// Filter base select query by ID
query := sqlbuilder.NewSelectBuilder(... | [
0.7199223041534424,
-0.08861660212278366,
0.35825034976005554,
0.008696850389242172,
-0.21353261172771454,
0.024477778002619743,
0.8901811838150024,
-0.6213204264640808,
0.1536908596754074,
0.15766595304012299,
0.532157301902771,
0.3240964114665985,
-0.3783459961414337,
1.1482279300689697,... |
func (repo *Repository) Create(ctx context.Context, claims auth.Claims, req UserAccountCreateRequest, now time.Time) (*UserAccount, error) {
span, ctx := tracer.StartSpanFromContext(ctx, "internal.user_account.Create")
defer span.Finish()
// Validate the request.
v := webcontext.Validator()
err := v.Struct(req)
... | [
-0.10621327906847,
-0.08425932377576828,
0.6571598052978516,
0.5172680020332336,
0.763765275478363,
0.05468732491135597,
0.6550017595291138,
-0.04663803428411484,
0.06706899404525757,
0.3335987329483032,
0.29825347661972046,
-0.05933990702033043,
0.295489102602005,
0.31773218512535095,
-... |
func (repo *Repository) Read(ctx context.Context, claims auth.Claims, req UserAccountReadRequest) (*UserAccount, error) {
span, ctx := tracer.StartSpanFromContext(ctx, "internal.user_account.Read")
defer span.Finish()
// Validate the request.
v := webcontext.Validator()
err := v.Struct(req)
if err != nil {
ret... | [
0.2378031462430954,
-0.3982583284378052,
0.503989577293396,
0.15761373937129974,
0.051207128912210464,
0.09506718814373016,
0.8006780743598938,
-0.5002173781394958,
0.36800840497016907,
-0.18615365028381348,
1.3093844652175903,
1.1882367134094238,
0.09956784546375275,
-0.34021812677383423,... |
func (repo *Repository) Update(ctx context.Context, claims auth.Claims, req UserAccountUpdateRequest, now time.Time) error {
span, ctx := tracer.StartSpanFromContext(ctx, "internal.user_account.Update")
defer span.Finish()
// Validate the request.
v := webcontext.Validator()
err := v.Struct(req)
if err != nil {
... | [
-0.3752812147140503,
-0.5161786079406738,
0.5790326595306396,
0.2921615540981293,
-0.01856442727148533,
-0.09962935000658035,
0.06648913025856018,
-0.23590928316116333,
0.0309287142008543,
0.05382443964481354,
0.33859553933143616,
0.29657599329948425,
0.3914695084095001,
-0.148926421999931... |
func (repo *Repository) Archive(ctx context.Context, claims auth.Claims, req UserAccountArchiveRequest, now time.Time) error {
span, ctx := tracer.StartSpanFromContext(ctx, "internal.user_account.Archive")
defer span.Finish()
// Validate the request.
v := webcontext.Validator()
err := v.Struct(req)
if err != nil... | [
-0.20106001198291779,
-0.34336012601852417,
0.585555374622345,
0.34133315086364746,
-0.31570756435394287,
-0.26037275791168213,
0.4750297963619232,
-0.0412822850048542,
-0.49055349826812744,
0.16676490008831024,
0.21640470623970032,
1.2666409015655518,
0.40364301204681396,
0.04278793185949... |
func (repo *Repository) Delete(ctx context.Context, claims auth.Claims, req UserAccountDeleteRequest) error {
span, ctx := tracer.StartSpanFromContext(ctx, "internal.user_account.Delete")
defer span.Finish()
// Validate the request.
v := webcontext.Validator()
err := v.Struct(req)
if err != nil {
return err
}... | [
0.18186558783054352,
-0.08392227441072464,
0.47113147377967834,
0.5522564649581909,
0.5793036818504333,
0.12055474519729614,
0.7017775774002075,
-0.19037362933158875,
0.5820568203926086,
0.21751822531223297,
0.712316632270813,
0.7358766794204712,
0.2991786599159241,
-0.2224443405866623,
... |
func MockUserAccount(ctx context.Context, dbConn *sqlx.DB, now time.Time, roles ...UserAccountRole) (*MockUserAccountResponse, error) {
usr, err := user.MockUser(ctx, dbConn, now)
if err != nil {
return nil, err
}
acc, err := account.MockAccount(ctx, dbConn, now)
if err != nil {
return nil, err
}
repo := &... | [
-0.089877188205719,
-0.7782652974128723,
0.3362301290035248,
-0.1359693855047226,
0.2532130777835846,
0.12014007568359375,
1.464422345161438,
-0.27857017517089844,
0.7870783805847168,
-0.017321119084954262,
-0.6117766499519348,
-0.7771956920623779,
0.15497417747974396,
-0.22305725514888763... |
func CreateItem(spec ItemSpec) *Item {
return &Item{
id: GenerateID(),
spec: spec,
disposed: false,
}
} | [
0.4191652536392212,
-0.19506096839904785,
0.048321519047021866,
-0.28086569905281067,
0.46180909872055054,
1.3451491594314575,
-0.10666908323764801,
0.5938050150871277,
-0.13615261018276215,
-0.565475583076477,
0.03247378394007683,
-0.17118342220783234,
0.09075680375099182,
0.0686721503734... |
func BuildItem(id ID, spec ItemSpec, owner *Owner, disposed bool) *Item {
return &Item{
id: id,
spec: spec,
owner: owner,
disposed: disposed,
}
} | [
0.0423201248049736,
-0.34034672379493713,
0.2055642455816269,
0.5957019925117493,
0.017268462106585503,
0.7671347856521606,
-0.6107962727546692,
1.3121238946914673,
-0.4428628087043762,
-0.5744956731796265,
-0.0700937882065773,
0.724387526512146,
0.34161287546157837,
-0.925295352935791,
... |
func (i *Item) Transfer(owner *Owner) {
i.owner = owner
} | [
-0.7485350966453552,
-0.04962209612131119,
0.3654611110687256,
1.4482120275497437,
-0.03156804293394089,
1.0971753597259521,
0.5941333770751953,
-0.30631253123283386,
-0.11037301272153854,
-0.3368397653102875,
-1.2082394361495972,
0.6608659625053406,
0.19094552099704742,
-0.596707940101623... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.