text stringlengths 11 6.3k | embedding listlengths 768 768 |
|---|---|
func (g GeoReplication) MarshalXML(enc *xml.Encoder, start xml.StartElement) error {
type alias GeoReplication
aux := &struct {
*alias
LastSyncTime *timeRFC1123 `xml:"LastSyncTime"`
}{
alias: (*alias)(&g),
LastSyncTime: (*timeRFC1123)(g.LastSyncTime),
}
return enc.EncodeElement(aux, start)
} | [
0.587341845035553,
0.8723259568214417,
0.23447804152965546,
-0.23761522769927979,
-0.4650583267211914,
0.030395934358239174,
0.37559711933135986,
1.3110482692718506,
0.4219169020652771,
0.2832277715206146,
0.10969661921262741,
0.5555042624473572,
0.6328288316726685,
0.26451563835144043,
... |
func (g *GeoReplication) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) error {
type alias GeoReplication
aux := &struct {
*alias
LastSyncTime *timeRFC1123 `xml:"LastSyncTime"`
}{
alias: (*alias)(g),
}
if err := dec.DecodeElement(aux, &start); err != nil {
return err
}
g.LastSyncTime = (*time.Tim... | [
0.1040247306227684,
1.406879186630249,
0.40541237592697144,
-1.3001564741134644,
-0.46129587292671204,
-0.39207926392555237,
0.4635651409626007,
1.3985629081726074,
-0.3628924489021301,
0.5089915990829468,
-0.018495524302124977,
0.344972163438797,
0.3081423044204712,
-0.14147360622882843,
... |
func (l ListContainersSegmentResponse) MarshalXML(enc *xml.Encoder, start xml.StartElement) error {
type alias ListContainersSegmentResponse
aux := &struct {
*alias
ContainerItems *[]*ContainerItem `xml:"Containers>Container"`
}{
alias: (*alias)(&l),
}
if l.ContainerItems != nil {
aux.ContainerItems = &l.C... | [
0.4209759533405304,
-0.7819899320602417,
0.0738157108426094,
-0.3920528292655945,
0.22512060403823853,
-0.6026153564453125,
0.08433198928833008,
-0.2827991843223572,
1.374897837638855,
-0.9206792116165161,
-0.23049676418304443,
-0.5500723123550415,
0.5699107646942139,
0.4362735450267792,
... |
func (p PageList) MarshalXML(enc *xml.Encoder, start xml.StartElement) error {
type alias PageList
aux := &struct {
*alias
ClearRange *[]*ClearRange `xml:"ClearRange"`
PageRange *[]*PageRange `xml:"PageRange"`
}{
alias: (*alias)(&p),
}
if p.ClearRange != nil {
aux.ClearRange = &p.ClearRange
}
if p.Pa... | [
0.041315529495477676,
-0.18261484801769257,
0.20410902798175812,
0.17730073630809784,
-0.8472641110420227,
0.7237713932991028,
-1.2542973756790161,
0.762670636177063,
0.8588879108428955,
0.4776957333087921,
-0.25536730885505676,
0.22525379061698914,
0.4214397966861725,
0.5211601853370667,
... |
func (q QueryRequest) MarshalXML(enc *xml.Encoder, start xml.StartElement) error {
start.Name.Local = "QueryRequest"
type alias QueryRequest
aux := &struct {
*alias
}{
alias: (*alias)(&q),
}
return enc.EncodeElement(aux, start)
} | [
0.15767978131771088,
0.38902124762535095,
-0.0069038476794958115,
-0.18917323648929596,
-0.9666524529457092,
0.7270250916481018,
-0.4845699667930603,
0.7609420418739319,
0.3909052014350891,
-0.2223459631204605,
0.33691680431365967,
0.567536473274231,
0.39617547392845154,
0.2184492796659469... |
func (s StorageServiceProperties) MarshalXML(enc *xml.Encoder, start xml.StartElement) error {
type alias StorageServiceProperties
aux := &struct {
*alias
CORS *[]*CORSRule `xml:"Cors>CorsRule"`
}{
alias: (*alias)(&s),
}
if s.CORS != nil {
aux.CORS = &s.CORS
}
return enc.EncodeElement(aux, start)
} | [
0.5667771100997925,
-0.13192397356033325,
0.08772629499435425,
0.22269585728645325,
-0.2871226966381073,
0.42736533284187317,
-0.6480072140693665,
1.1049209833145142,
0.16421721875667572,
0.07351698726415634,
0.9843568801879883,
0.649742066860199,
0.18665233254432678,
-0.34248456358909607,... |
func (u UserDelegationKey) MarshalXML(enc *xml.Encoder, start xml.StartElement) error {
type alias UserDelegationKey
aux := &struct {
*alias
SignedExpiry *timeRFC3339 `xml:"SignedExpiry"`
SignedStart *timeRFC3339 `xml:"SignedStart"`
}{
alias: (*alias)(&u),
SignedExpiry: (*timeRFC3339)(u.SignedExpir... | [
0.4286547899246216,
0.3640536367893219,
0.07217951118946075,
-0.0838664323091507,
-0.7047525644302368,
0.5391818284988403,
-0.3074079155921936,
0.9015648365020752,
0.861663818359375,
0.13119176030158997,
-0.29972314834594727,
0.5794997215270996,
0.418096125125885,
0.7474550604820251,
-0.... |
func (u *UserDelegationKey) UnmarshalXML(dec *xml.Decoder, start xml.StartElement) error {
type alias UserDelegationKey
aux := &struct {
*alias
SignedExpiry *timeRFC3339 `xml:"SignedExpiry"`
SignedStart *timeRFC3339 `xml:"SignedStart"`
}{
alias: (*alias)(u),
}
if err := dec.DecodeElement(aux, &start); err... | [
0.018901681527495384,
0.5086026191711426,
0.4109402596950531,
-1.046724557876587,
-0.8849487900733948,
0.2596040666103363,
-0.27138617634773254,
0.8010832071304321,
0.16840441524982452,
0.44390547275543213,
-0.3467833995819092,
0.5525364875793457,
0.3638945519924164,
0.4678807258605957,
... |
func (g *Group) Cancel() {
g.initOnce.Do(g.init)
g.cancel()
} | [
0.536217987537384,
-0.03650764003396034,
0.42733505368232727,
0.6387502551078796,
-0.4445313811302185,
0.0038628545589745045,
0.8743060827255249,
0.12816844880580902,
-1.4163087606430054,
0.3487607538700104,
0.22137363255023956,
0.28803762793540955,
-0.2362731397151947,
1.225808024406433,
... |
func (g *Group) Wait() {
g.wg.Wait()
} | [
-0.26402512192726135,
0.15648582577705383,
-0.022350002080202103,
-0.35372060537338257,
0.7892012596130371,
0.6984987854957581,
0.8770281672477722,
-0.5776193141937256,
-1.7712488174438477,
-0.5872179865837097,
-0.03293025121092796,
0.9402591586112976,
-0.2925839126110077,
1.10401141643524... |
func (i *BlockchainIterator) Next() *Block {
var block *Block
err := i.db.View(func(tx *bolt.Tx) error {
b := tx.Bucket([]byte(blocksBucket))
data := b.Get(i.nextHash)
block = DeserializeBlock(data)
return nil
})
if err != nil {
log.Panicf("迭代时,无法取出 %x : %s", i.nextHash, err)
}
i.nextHash = block.Pre... | [
0.31980469822883606,
0.7443830966949463,
0.5870574116706848,
0.22398453950881958,
-1.0446580648422241,
0.00467583118006587,
0.11924287676811218,
-0.528765857219696,
-0.1551285833120346,
-0.21307460963726044,
-0.20750471949577332,
0.5460716485977173,
-1.1511873006820679,
-0.4184373319149017... |
func (bc *Blockchain) Iterator() *BlockchainIterator {
bci := &BlockchainIterator{bc.tip, bc.db}
return bci
} | [
-0.2473648339509964,
-0.4012221395969391,
0.06971456855535507,
-0.4444417357444763,
-0.37362098693847656,
0.16077731549739838,
0.06127503514289856,
0.23863503336906433,
0.36474817991256714,
0.08323141932487488,
0.20383453369140625,
-0.09256163984537125,
-1.0127631425857544,
-0.249257698655... |
func main() {
var num string
fmt.Print("Enter number: ")
fmt.Scanln(&num)
collatz(num)
} | [
0.617039144039154,
-0.0020388395059853792,
0.31657612323760986,
1.2894405126571655,
-0.7755258083343506,
0.4957161843776703,
1.7320222854614258,
-0.08598381280899048,
0.22085346281528473,
-0.9421780109405518,
-0.10925843566656113,
0.6323584318161011,
-0.39232945442199707,
0.020671892911195... |
func (c *ULBClient) NewBindSSLRequest() *BindSSLRequest {
req := &BindSSLRequest{}
// setup request with client config
c.Client.SetupRequest(req)
// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
} | [
0.4773954451084137,
-0.6928375363349915,
0.3319382667541504,
1.0437966585159302,
-1.0292998552322388,
-0.17585402727127075,
-0.2655450701713562,
0.16234764456748962,
0.3527185320854187,
-0.5948630571365356,
0.171371728181839,
1.0364803075790405,
-0.021865660324692726,
0.36780962347984314,
... |
func NewApplyCmd() *cobra.Command {
cmd := &cobra.Command{
Use: gotext.Get("apply <workflow-name>"),
Short: gotext.Get("Execute a Lyra workflow"),
Long: gotext.Get("Execute a Lyra workflow"),
Example: gotext.Get("\n # Execute a workflow\n lyra apply sample\n\n # Execute a workflow using external va... | [
0.4860016107559204,
-1.107424020767212,
0.5252850651741028,
-0.3240695893764496,
-0.6818025708198547,
-0.08399976044893265,
-0.14934603869915009,
0.5511155724525452,
-0.1486545205116272,
-0.6546697616577148,
0.5297015309333801,
1.003827691078186,
-0.427432656288147,
1.4110826253890991,
0... |
func transformFromEpoch(args []string) {
if nil == args || len(args) == 0 {
fmt.Printf("error: No timestamp given in parameter\n")
return
}
for _, ts := range args {
result, err := msToTime(ts)
if nil != err {
fmt.Printf("error: on %s: %s\n", ts, err)
} else {
fmt.Printf("%s ==> %s\n", ts, result)
... | [
0.42495715618133545,
-0.295285701751709,
0.8481795191764832,
-0.26998457312583923,
0.6641170978546143,
0.2618504762649536,
-0.07163256406784058,
0.17971429228782654,
-0.24188601970672607,
0.5605642199516296,
-0.5517444610595703,
-0.04146170616149902,
-0.07275019586086273,
0.945251762866973... |
func transformFromIsoDateTime(args []string) {
if nil == args || len(args) == 0 {
fmt.Printf("error: No RFC3339-compatible date/time given in parameter\n")
return
}
for _, ts := range args {
result, err := time.Parse(time.RFC3339, ts)
if err != nil {
fmt.Printf("error: on %s: %s\n", ts, err)
} else {
... | [
-0.20931792259216309,
0.5690763592720032,
0.6551135778427124,
-0.028025569394230843,
0.5156328082084656,
0.20225095748901367,
-0.43458086252212524,
0.5097339153289795,
0.07018696516752243,
0.6049939393997192,
-0.012608244083821774,
-0.10583039373159409,
0.2402307540178299,
0.99553918838500... |
func InjectsValidOption(injects ...interface{}) InjectOption {
return Option(func(r *rush) interface{} {
funk.ForEach(injects, func(item interface{}) {
assert1(!r.injects.Has(item), ErrWith(ErrInject, fmt.Sprintf("inject %v has existed", reflect.TypeOf(item))))
})
return injects
})
} | [
-0.31466516852378845,
-0.262848436832428,
0.5311655402183533,
0.5226603746414185,
0.5815389156341553,
0.7467065453529358,
0.2190767079591751,
-0.837973952293396,
0.9812118411064148,
-0.32768553495407104,
0.008647593669593334,
-0.7336353063583374,
-0.9480690956115723,
-0.6035776734352112,
... |
func InjectsOption(injects ...interface{}) InjectOption {
return Option(func(r *rush) interface{} {
r.lock.Acquire("injects", func(async sync.Async) {
funk.ForEach(injects, func(item interface{}) {
r.injects.Put(item)
})
})
return r
})
} | [
-0.12620535492897034,
0.34435948729515076,
0.5347521901130676,
0.34558793902397156,
0.5752604603767395,
-0.12535303831100464,
0.25506487488746643,
-0.7209329009056091,
0.6659082770347595,
0.10919822752475739,
-0.40508410334587097,
-0.23407594859600067,
-0.8642271161079407,
-0.8308234810829... |
func (src *Injects) Wire(target interface{}) (err error) {
// tv := (*interface{})(unsafe.Pointer(targetValue.Pointer()))
// va := reflect.ValueOf(&a).Elem()
// va.Set(reflect.New(va.Type().Elem()))
tv := reflect.ValueOf(target)
if tv.Kind() != reflect.Ptr && !tv.IsNil() {
err = ErrWith(ErrUnaddressable, fmt.Spr... | [
-1.5070642232894897,
0.20217394828796387,
0.7557209134101868,
-0.3137601315975189,
0.3329591453075409,
0.3283219635486603,
0.1169053390622139,
-1.1524280309677124,
0.2543022632598877,
0.46345552802085876,
0.7109741568565369,
1.6523420810699463,
-0.5352889895439148,
0.6774113178253174,
0.... |
func (src *Injects) Acquire(ty reflect.Type) interface{} {
ele := typeMatcher(ty, *src)
if ele == nil {
ele = duckMatcher(ty, *src)
}
if ele != nil {
ele = ele.(reflect.Value).Interface()
}
return ele
} | [
-1.0917950868606567,
-0.5810742378234863,
0.7323225140571594,
-0.5189215540885925,
0.6257242560386658,
-0.5179216265678406,
-0.3621675968170166,
-1.2049365043640137,
0.9702166318893433,
-0.7511510848999023,
0.6314845681190491,
1.268417477607727,
-0.26374462246894836,
1.1166504621505737,
... |
func (src *Injects) Append(target *Injects) *Injects {
injects := append(*src, *target...)
return &injects
} | [
-0.9908620715141296,
-0.0996231883764267,
0.2784178853034973,
-0.6323786973953247,
-0.6380317807197571,
-0.552802562713623,
-1.5343751907348633,
-0.5386156439781189,
0.5914532542228699,
-0.6447010040283203,
0.4519574046134949,
1.182884693145752,
-0.12478002160787582,
0.17946121096611023,
... |
func (src *Injects) Put(target interface{}) *Injects {
*src = append(*src, target)
return src
} | [
-1.487205147743225,
0.49886929988861084,
0.22253325581550598,
-1.6233655214309692,
-0.08190805464982986,
0.058219194412231445,
-0.5617448091506958,
-0.6010668873786926,
0.23581866919994354,
-0.1036057099699974,
0.08062608540058136,
1.1859198808670044,
-0.8014902472496033,
-0.34811970591545... |
func (src *Injects) Has(item interface{}) bool {
return typeExists(*src, item)
} | [
-1.1411187648773193,
0.19242125749588013,
0.5022562146186829,
-0.4122852087020874,
0.8180102705955505,
0.12098214030265808,
-0.16721200942993164,
-0.21888911724090576,
0.2906566858291626,
-0.0786517858505249,
-0.9673025608062744,
0.40655919909477234,
-0.28380289673805237,
0.475362926721572... |
func (src *Injects) Size() int {
return len(*src)
} | [
-1.0596444606781006,
0.8573917746543884,
0.28349068760871887,
-1.497661828994751,
-0.12571340799331665,
-0.13368891179561615,
0.5248075127601624,
-0.2167832851409912,
0.48051056265830994,
-0.41953882575035095,
-0.5500138401985168,
0.5969730019569397,
-1.0369516611099243,
0.5757433176040649... |
func (src *Injects) Get(pos int) interface{} {
return (*src)[pos]
} | [
-1.273100733757019,
-0.3650883734226227,
0.48694634437561035,
-1.264403223991394,
-0.34219858050346375,
-0.8381779193878174,
-0.875222384929657,
-1.1285014152526855,
-0.06059803441166878,
-0.25609472393989563,
-0.19991345703601837,
0.6871669888496399,
-0.23703528940677643,
-0.7435606718063... |
func (src *Injects) Swap(i, j int) {
(*src)[i], (*src)[j] = (*src)[j], (*src)[i]
} | [
-1.7300482988357544,
0.07579286396503448,
0.3455762267112732,
-1.2908388376235962,
-0.006542226765304804,
-0.04058565944433212,
-0.13881878554821014,
-0.017218535766005516,
-0.41926148533821106,
-0.13752032816410065,
-0.3043498992919922,
1.2250068187713623,
-0.1989167183637619,
-0.65272480... |
func tcEscape(input string) string {
var buf bytes.Buffer
for {
nextSpecial := strings.IndexAny(input, "'\n\r|[]")
switch nextSpecial {
case -1:
if buf.Len() == 0 {
return input
}
return buf.String() + input
case 0:
default:
buf.WriteString(input[:nextSpecial])
}
switch input[nextSpecial... | [
0.29330146312713623,
-0.09429440647363663,
0.8025767803192139,
-0.15068645775318146,
-0.6778529286384583,
-0.4047984778881073,
-0.39448869228363037,
-0.7085838317871094,
-0.754231870174408,
0.8607005476951599,
-0.36673402786254883,
-0.5055419206619263,
0.26542899012565613,
-0.3603873848915... |
func (d *Directory) IsEmpty(dir string) bool {
name := d.Join(dir)
f, err := os.Open(name)
if err != nil {
return false
}
defer f.Close()
_, err = f.Readdirnames(1) // Or f.Readdir(1)
if err == io.EOF {
return true
}
return false
} | [
-1.7188966274261475,
0.15424229204654694,
0.8882670402526855,
0.10628841817378998,
0.3568735718727112,
-0.09064409136772156,
0.39640602469444275,
0.032001908868551254,
0.4849977195262909,
0.16465501487255096,
0.25489258766174316,
0.09924593567848206,
0.27267923951148987,
0.1573049426078796... |
func (d *Directory) Ls(w io.Writer) error {
if w == nil {
w = os.Stdout
}
path := d.Path()
return filepath.Walk(path, showVisible(w, path))
} | [
-0.026057634502649307,
0.22345733642578125,
0.5510042309761047,
-0.6441481113433838,
-0.8192050457000732,
-0.455752432346344,
1.1770657300949097,
-0.7365062832832336,
0.34293630719184875,
-0.3964085876941681,
1.2629250288009644,
0.4675956666469574,
0.894801676273346,
0.7464970946311951,
... |
func (d *Directory) Temporary() error {
tmp, err := ioutil.TempDir("", "workdir")
if err != nil {
return err
}
d.SetPath(tmp)
return nil
} | [
-0.2871497571468353,
0.7010034322738647,
0.2479202002286911,
-0.9462094306945801,
0.9009360074996948,
-0.39988377690315247,
0.9027289152145386,
-0.048602163791656494,
-0.04940013587474823,
-0.4651448428630829,
-0.7311517000198364,
0.18952558934688568,
-0.10882284492254257,
0.01310983765870... |
func (d *Directory) WriteFile(file string, data []byte) error {
return ioutil.WriteFile(d.Join(file), data, 0644)
} | [
0.3882046043872833,
0.46185848116874695,
0.11761553585529327,
0.37670233845710754,
0.5595687031745911,
0.6751063466072083,
-0.06255188584327698,
0.5068252682685852,
-0.5259475708007812,
-1.0567264556884766,
-0.11162551492452621,
-0.48530688881874084,
-0.2615712285041809,
0.4022683799266815... |
func (d *Directory) Load(file string) ([]byte, error) {
fh, err := os.Open(d.Join(file))
if err != nil {
return nil, err
}
defer fh.Close()
return ioutil.ReadAll(fh)
} | [
-0.5289105772972107,
0.42437857389450073,
0.7360523343086243,
-0.3873877227306366,
-0.6163482666015625,
0.17124278843402863,
-0.32180142402648926,
0.1637650579214096,
-0.3142072260379791,
-0.16944274306297302,
-0.27347075939178467,
-0.5717257857322693,
-0.40566486120224,
-0.172476127743721... |
func (d *Directory) Copy(dest, src string) (err error) {
in, err := os.Open(d.Join(src))
if err != nil {
return
}
defer in.Close()
out, err := os.Create(d.Join(dest))
if err != nil {
return
}
defer out.Close()
_, err = io.Copy(out, in)
return
} | [
-0.4370626211166382,
0.1333143413066864,
0.5019537210464478,
0.07492441684007645,
-0.8370466828346252,
0.862585723400116,
-0.16469785571098328,
-0.19165866076946259,
-0.15671288967132568,
0.24529269337654114,
0.30810481309890747,
0.28205132484436035,
0.716249942779541,
0.05584383383393288,... |
func Open(path string) *File {
return store.Open(path)
} | [
-0.17243464291095734,
0.057935383170843124,
0.11803439259529114,
-0.3477042019367218,
-1.47934889793396,
0.8443613648414612,
0.8098981976509094,
1.1724870204925537,
-0.26036596298217773,
-1.0581929683685303,
0.2028980553150177,
-0.028538653627038002,
0.10642398148775101,
-1.174403905868530... |
func PathSlice(files ...*File) []string {
ret := make([]string, 0, len(files))
for i := range files {
if files[i] != nil {
ret = append(ret, files[i].String())
}
}
if len(ret) == 0 {
return nil
}
return ret
} | [
-0.021213285624980927,
-0.8616009950637817,
0.7346441149711609,
1.272188425064087,
0.7777950167655945,
-0.2010316401720047,
-0.5886428356170654,
-0.035747773945331573,
-1.0911506414413452,
1.0178357362747192,
0.616288423538208,
-0.7774133086204529,
-0.8030864000320435,
0.7652715444564819,
... |
func PrintLicenseList() error {
keys, err := GetLicenseKeys()
if err != nil {
return err
}
println("key : id : name")
for _, key := range keys {
fmt.Printf("%s : %s : %s\n", key.Key, key.SpdxID, key.Name)
}
return nil
} | [
0.45263803005218506,
-0.7645801901817322,
0.5975924134254456,
-0.18054825067520142,
0.0447721853852272,
0.11018974334001541,
-1.0597702264785767,
0.7276410460472107,
0.07454592734575272,
0.8754267692565918,
-0.9997362494468689,
1.4392874240875244,
-0.24796725809574127,
1.0535893440246582,
... |
func PrintLicenseBody(key string) error {
l, err := GetLicenseInfo(strings.ToLower(key))
// TODO:: err type
if err != nil {
return err
}
println(l.Body)
return nil
} | [
0.7903035879135132,
-0.7990060448646545,
0.7474569082260132,
-0.2807789146900177,
0.14311565458774567,
0.25361350178718567,
-0.7230165600776672,
-0.2266874760389328,
0.5118907690048218,
0.4540289044380188,
-0.2731310725212097,
1.1908122301101685,
-0.9955171942710876,
1.6747311353683472,
... |
func PrintLicenseInfo(key string) error {
l, err := GetLicenseInfo(strings.ToLower(key))
// TODO:: err type
if err != nil {
return err
}
fmt.Printf("key: %s\n", l.Key)
fmt.Printf("id: %s\n", l.SpdxID)
fmt.Printf("url: %s\n", l.LicenseURL)
fmt.Printf("\ndescription:\n%s\n", l.Description)
fmt.Printf("\ni... | [
0.6540785431861877,
-0.610988199710846,
1.1669279336929321,
-0.8851476907730103,
-0.2078590989112854,
0.3430941700935364,
-0.41262057423591614,
-0.06303638964891434,
-0.31644704937934875,
-0.18599238991737366,
-0.4659821391105652,
0.974510908126831,
-0.34539708495140076,
0.5333155393600464... |
func WriteLicenseBody(key string, w io.Writer, year string, owner string) error {
l, err := GetLicenseInfo(strings.ToLower(key))
ret := l.Body
// TODO:: err type
if err != nil {
return err
}
if year != "" {
ret = strings.Replace(ret, "[year]", year, 1)
}
if owner != "" {
ret = strings.Replace(ret, "[owne... | [
-0.43284541368484497,
-0.5705894231796265,
0.9529364705085754,
-0.08493360131978989,
0.2839757204055786,
-0.14652937650680542,
-0.3752315640449524,
0.2366696298122406,
0.5584752559661865,
0.4900238811969757,
-0.6893995404243469,
0.44571414589881897,
-0.27259472012519836,
0.9090927243232727... |
func WriteLicenseBodyToPath(key string, path string, year string, owner string) error {
abs_path, err := filepath.Abs(path)
if err != nil {
return err
}
f, err := os.Create(abs_path)
if err != nil {
return err
}
defer f.Close()
WriteLicenseBody(key, f, year, owner)
return nil
} | [
0.3060799241065979,
-0.8460410833358765,
0.8182054758071899,
0.04567112773656845,
0.8408640623092651,
1.263386845588684,
0.26036059856414795,
0.22053641080856323,
0.022872304543852806,
0.5261539220809937,
-0.5251041054725647,
-0.06350290775299072,
-0.2603425979614258,
0.534838855266571,
... |
func NewGetLTENetworkIDPolicyQosProfilesParams() *GetLTENetworkIDPolicyQosProfilesParams {
var ()
return &GetLTENetworkIDPolicyQosProfilesParams{
timeout: cr.DefaultTimeout,
}
} | [
1.3693443536758423,
0.24020706117153168,
0.011269268579781055,
-0.1855171173810959,
0.3985893130302429,
0.2861248850822449,
-0.936720609664917,
-1.2192542552947998,
0.1705826222896576,
-0.5097349882125854,
-1.1181877851486206,
-0.12470607459545135,
-1.2183499336242676,
0.14865517616271973,... |
func NewGetLTENetworkIDPolicyQosProfilesParamsWithTimeout(timeout time.Duration) *GetLTENetworkIDPolicyQosProfilesParams {
var ()
return &GetLTENetworkIDPolicyQosProfilesParams{
timeout: timeout,
}
} | [
1.721134066581726,
0.06372954696416855,
0.21966888010501862,
-0.44917720556259155,
0.13740253448486328,
1.0259904861450195,
-1.258642315864563,
-1.016692876815796,
0.049509674310684204,
0.4050881862640381,
-0.6878262162208557,
0.20204930007457733,
-1.119600534439087,
0.15081271529197693,
... |
func NewGetLTENetworkIDPolicyQosProfilesParamsWithContext(ctx context.Context) *GetLTENetworkIDPolicyQosProfilesParams {
var ()
return &GetLTENetworkIDPolicyQosProfilesParams{
Context: ctx,
}
} | [
0.9853547811508179,
0.31787970662117004,
0.4239625632762909,
-0.5963170528411865,
0.3746512830257416,
0.9252070784568787,
-1.1094826459884644,
-1.764129638671875,
0.453921377658844,
0.03057245723903179,
-0.6414258480072021,
-0.04061351343989372,
-1.2472654581069946,
-0.6321269273757935,
... |
func NewGetLTENetworkIDPolicyQosProfilesParamsWithHTTPClient(client *http.Client) *GetLTENetworkIDPolicyQosProfilesParams {
var ()
return &GetLTENetworkIDPolicyQosProfilesParams{
HTTPClient: client,
}
} | [
1.0563400983810425,
0.3048591613769531,
0.21209149062633514,
-0.4599459767341614,
0.7303430438041687,
0.6727570295333862,
-0.7465701699256897,
-1.163633108139038,
-0.15634804964065552,
-0.46492335200309753,
-0.9573242664337158,
-0.05748037248849869,
-0.7148309946060181,
-0.3060168623924255... |
func (o *GetLTENetworkIDPolicyQosProfilesParams) WithTimeout(timeout time.Duration) *GetLTENetworkIDPolicyQosProfilesParams {
o.SetTimeout(timeout)
return o
} | [
1.6691508293151855,
0.7574745416641235,
0.17650939524173737,
-1.004796028137207,
0.0663139596581459,
0.5244773626327515,
-1.009779930114746,
-1.3527703285217285,
0.9397722482681274,
0.547080397605896,
-0.5667332410812378,
-0.3915371000766754,
-0.7631775736808777,
0.22878673672676086,
-0.... |
func (o *GetLTENetworkIDPolicyQosProfilesParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
} | [
1.7696443796157837,
0.8715472221374512,
0.06803926825523376,
-1.167096734046936,
0.6955050826072693,
0.7344685792922974,
-1.0779541730880737,
-0.8778776526451111,
0.5057568550109863,
0.5999886989593506,
-0.7136317491531372,
-0.03114260546863079,
-1.1523102521896362,
0.09783797711133957,
... |
func (o *GetLTENetworkIDPolicyQosProfilesParams) WithContext(ctx context.Context) *GetLTENetworkIDPolicyQosProfilesParams {
o.SetContext(ctx)
return o
} | [
0.8786251544952393,
0.6072899103164673,
0.2625940144062042,
-0.9709567427635193,
0.17696715891361237,
0.6133172512054443,
-1.1549686193466187,
-1.8209720849990845,
1.1970185041427612,
0.08320479840040207,
-0.46707627177238464,
-0.5199339985847473,
-1.3150278329849243,
-0.37164032459259033,... |
func (o *GetLTENetworkIDPolicyQosProfilesParams) SetContext(ctx context.Context) {
o.Context = ctx
} | [
1.0604873895645142,
0.6493886113166809,
0.15894316136837006,
-1.012205719947815,
0.8273858428001404,
0.7130821347236633,
-1.0718179941177368,
-1.5010746717453003,
1.1082689762115479,
0.16487054526805878,
-0.7506641745567322,
-0.20924411714076996,
-1.3988088369369507,
-0.2571549415588379,
... |
func (o *GetLTENetworkIDPolicyQosProfilesParams) WithHTTPClient(client *http.Client) *GetLTENetworkIDPolicyQosProfilesParams {
o.SetHTTPClient(client)
return o
} | [
1.1599937677383423,
-0.041252221912145615,
0.21626359224319458,
-1.0331577062606812,
0.45929041504859924,
0.34888800978660583,
-0.5573192834854126,
-1.4973888397216797,
0.38251322507858276,
-0.5056984424591064,
-0.5506525635719299,
-0.41020792722702026,
-0.5653517842292786,
-0.357979625463... |
func (o *GetLTENetworkIDPolicyQosProfilesParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
} | [
1.7108005285263062,
0.21312400698661804,
0.04104117304086685,
-1.533326506614685,
0.3790374994277954,
0.026895489543676376,
-0.5478168725967407,
-1.4866201877593994,
0.04788171872496605,
-0.09534046798944473,
-0.8115696907043457,
0.002333726268261671,
-0.9459109902381897,
-0.53296273946762... |
func (o *GetLTENetworkIDPolicyQosProfilesParams) WithNetworkID(networkID string) *GetLTENetworkIDPolicyQosProfilesParams {
o.SetNetworkID(networkID)
return o
} | [
1.3416926860809326,
0.11807567626237869,
0.10093588382005692,
-0.21691036224365234,
0.5210502743721008,
0.7452904582023621,
-0.5741279721260071,
-1.2940289974212646,
1.4746559858322144,
0.5460067987442017,
-0.20114609599113464,
-1.1437557935714722,
-0.6034009456634521,
0.5346325039863586,
... |
func (o *GetLTENetworkIDPolicyQosProfilesParams) SetNetworkID(networkID string) {
o.NetworkID = networkID
} | [
0.9755423069000244,
0.03500576317310333,
0.017100680619478226,
-0.16284674406051636,
0.7711811661720276,
0.8050777912139893,
-0.4537835717201233,
-0.9612358212471008,
0.9992156624794006,
0.3145081400871277,
-0.7530108094215393,
-0.3858778476715088,
-1.107969880104065,
0.669090986251831,
... |
func (o *GetLTENetworkIDPolicyQosProfilesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// path param network_id
if err := r.SetPathParam("network_id", o.NetworkID); err != nil {
return err
}
if len(... | [
0.21555200219154358,
0.34277209639549255,
0.48904135823249817,
-1.1449546813964844,
1.522992730140686,
-0.1398535668849945,
0.35348716378211975,
-0.7475817203521729,
0.25997593998908997,
0.08004922419786453,
0.10472283512353897,
-0.4090052545070648,
-1.2894350290298462,
-0.0060694958083331... |
func (o *Vote) doBeforeInsertHooks(exec boil.Executor) (err error) {
for _, hook := range voteBeforeInsertHooks {
if err := hook(exec, o); err != nil {
return err
}
}
return nil
} | [
-0.2653086185455322,
0.36373916268348694,
0.5690804719924927,
0.7769899964332581,
1.39742910861969,
0.15812553465366364,
0.8178965449333191,
-0.14661221206188202,
-0.8514605164527893,
0.33167171478271484,
0.41635894775390625,
-0.15230537950992584,
-1.2999601364135742,
0.7710309624671936,
... |
func (o *Vote) doBeforeUpdateHooks(exec boil.Executor) (err error) {
for _, hook := range voteBeforeUpdateHooks {
if err := hook(exec, o); err != nil {
return err
}
}
return nil
} | [
-0.9019806981086731,
-0.4640781879425049,
0.6798529028892517,
0.709547758102417,
1.3919165134429932,
0.22212053835391998,
0.2218419313430786,
-0.7547929286956787,
-0.3304203152656555,
0.8930601477622986,
0.5794071555137634,
-0.2672172486782074,
-0.6879882216453552,
0.3674525320529938,
-0... |
func (o *Vote) doBeforeDeleteHooks(exec boil.Executor) (err error) {
for _, hook := range voteBeforeDeleteHooks {
if err := hook(exec, o); err != nil {
return err
}
}
return nil
} | [
-0.34914153814315796,
-0.007237283978611231,
0.7050864696502686,
0.8800556063652039,
1.3836572170257568,
0.20427292585372925,
0.2342528998851776,
-0.7953109741210938,
-0.017438311129808426,
0.7645164728164673,
0.662248432636261,
-0.2177608460187912,
-0.5809302926063538,
0.313450425863266,
... |
func (o *Vote) doBeforeUpsertHooks(exec boil.Executor) (err error) {
for _, hook := range voteBeforeUpsertHooks {
if err := hook(exec, o); err != nil {
return err
}
}
return nil
} | [
-0.42292383313179016,
0.43968501687049866,
0.7457185387611389,
0.34045639634132385,
1.3288590908050537,
0.19366885721683502,
0.7190457582473755,
-0.48984459042549133,
-0.2686139643192291,
0.6118668913841248,
0.6822611093521118,
-0.3997621536254883,
-0.7809355854988098,
0.7837053537368774,
... |
func (o *Vote) doAfterInsertHooks(exec boil.Executor) (err error) {
for _, hook := range voteAfterInsertHooks {
if err := hook(exec, o); err != nil {
return err
}
}
return nil
} | [
-0.377476304769516,
0.07379680126905441,
0.3794230818748474,
0.8994733095169067,
1.357235312461853,
0.48821359872817993,
0.6112841963768005,
-0.4242492616176605,
-0.7982685565948486,
0.9177007079124451,
0.030971897765994072,
-0.7233320474624634,
-1.1356087923049927,
0.2899860739707947,
-... |
func (o *Vote) doAfterSelectHooks(exec boil.Executor) (err error) {
for _, hook := range voteAfterSelectHooks {
if err := hook(exec, o); err != nil {
return err
}
}
return nil
} | [
-0.4315444529056549,
-0.8402441143989563,
0.24756211042404175,
0.9818344116210938,
0.684764564037323,
0.1984226107597351,
0.4437335133552551,
-1.0117217302322388,
0.06953466683626175,
0.8438645601272583,
0.39116647839546204,
-0.23488591611385345,
-0.28450217843055725,
0.05159217491745949,
... |
func (o *Vote) doAfterUpdateHooks(exec boil.Executor) (err error) {
for _, hook := range voteAfterUpdateHooks {
if err := hook(exec, o); err != nil {
return err
}
}
return nil
} | [
-0.8425921201705933,
-1.0182721614837646,
0.49564045667648315,
1.2139992713928223,
0.7985512614250183,
0.7404511570930481,
0.10408312827348709,
-0.43541887402534485,
-0.425368070602417,
0.914747953414917,
0.2124238759279251,
-0.5375382304191589,
-0.5027587413787842,
0.2329190969467163,
-... |
func (o *Vote) doAfterDeleteHooks(exec boil.Executor) (err error) {
for _, hook := range voteAfterDeleteHooks {
if err := hook(exec, o); err != nil {
return err
}
}
return nil
} | [
-0.2773418426513672,
-0.5079398155212402,
0.45612606406211853,
1.1530482769012451,
0.9171968698501587,
0.5430806875228882,
0.3675726056098938,
-0.537053644657135,
-0.13058555126190186,
0.8123504519462585,
0.4429338276386261,
-0.2859528958797455,
-0.4511515498161316,
0.4333524703979492,
0... |
func (o *Vote) doAfterUpsertHooks(exec boil.Executor) (err error) {
for _, hook := range voteAfterUpsertHooks {
if err := hook(exec, o); err != nil {
return err
}
}
return nil
} | [
-0.6918903589248657,
-0.2056843787431717,
0.5558297038078308,
0.9255445599555969,
1.1354113817214966,
0.5289053916931152,
0.6990117430686951,
-0.40454453229904175,
-0.43687349557876587,
1.0262668132781982,
-0.13134975731372833,
-0.14353522658348083,
-0.5447107553482056,
0.5093786716461182,... |
func AddVoteHook(hookPoint boil.HookPoint, voteHook VoteHook) {
switch hookPoint {
case boil.BeforeInsertHook:
voteBeforeInsertHooks = append(voteBeforeInsertHooks, voteHook)
case boil.BeforeUpdateHook:
voteBeforeUpdateHooks = append(voteBeforeUpdateHooks, voteHook)
case boil.BeforeDeleteHook:
voteBeforeDelet... | [
-0.16704963147640228,
-0.5103617310523987,
0.6876083016395569,
0.5627641081809998,
0.6970395445823669,
0.47342541813850403,
-0.2559439241886139,
0.490427166223526,
0.37598708271980286,
-0.0581057071685791,
0.22713227570056915,
-0.0976753905415535,
-0.75628262758255,
0.3212448060512543,
0... |
func (q voteQuery) OneP() *Vote {
o, err := q.One()
if err != nil {
panic(boil.WrapErr(err))
}
return o
} | [
0.7099570035934448,
0.14167550206184387,
0.22406722605228424,
0.6147019863128662,
0.23635728657245636,
0.5819016098976135,
-0.8318801522254944,
-0.9186652898788452,
0.4954221546649933,
0.09442424774169922,
1.2440694570541382,
-0.9161338806152344,
-0.6906886696815491,
0.3274480104446411,
... |
func (q voteQuery) One() (*Vote, error) {
o := &Vote{}
queries.SetLimit(q.Query, 1)
err := q.Bind(o)
if err != nil {
if errors.Cause(err) == sql.ErrNoRows {
return nil, sql.ErrNoRows
}
return nil, errors.Wrap(err, "models: failed to execute a one query for vote")
}
if err := o.doAfterSelectHooks(queri... | [
-0.791461169719696,
-0.09539398550987244,
0.4459831118583679,
0.7541809678077698,
1.1206482648849487,
0.37229183316230774,
-0.26393768191337585,
0.08082254230976105,
-0.11108194291591644,
0.453422486782074,
0.3711305260658264,
-0.18100479245185852,
-0.15464544296264648,
0.16543935239315033... |
func (q voteQuery) AllP() VoteSlice {
o, err := q.All()
if err != nil {
panic(boil.WrapErr(err))
}
return o
} | [
0.8439387083053589,
-0.3258298933506012,
0.36835983395576477,
0.8847112655639648,
-0.04490447789430618,
0.728374183177948,
-1.8301045894622803,
-0.17989268898963928,
0.8885705471038818,
0.7412074208259583,
1.3130956888198853,
-0.41541048884391785,
-0.17158794403076172,
0.5049485564231873,
... |
func (q voteQuery) All() (VoteSlice, error) {
var o []*Vote
err := q.Bind(&o)
if err != nil {
return nil, errors.Wrap(err, "models: failed to assign all query results to Vote slice")
}
if len(voteAfterSelectHooks) != 0 {
for _, obj := range o {
if err := obj.doAfterSelectHooks(queries.GetExecutor(q.Query)... | [
-0.2090214043855667,
-0.9314061999320984,
0.32812824845314026,
1.0817370414733887,
0.8569307923316956,
0.5601193308830261,
-0.3892757296562195,
-0.14284712076187134,
-0.21725834906101227,
0.6186814904212952,
0.7530273795127869,
0.48735180497169495,
-0.3062038719654083,
1.0405604839324951,
... |
func (q voteQuery) CountP() int64 {
c, err := q.Count()
if err != nil {
panic(boil.WrapErr(err))
}
return c
} | [
0.8997467756271362,
-0.11948331445455551,
0.361328661441803,
0.40682452917099,
0.0721014216542244,
1.052052617073059,
-0.8278225660324097,
-0.05148272216320038,
0.23737071454524994,
0.6793058514595032,
0.3444226086139679,
-1.0772122144699097,
-0.6307493448257446,
0.4555503726005554,
0.19... |
func (q voteQuery) Count() (int64, error) {
var count int64
queries.SetSelect(q.Query, nil)
queries.SetCount(q.Query)
err := q.Query.QueryRow().Scan(&count)
if err != nil {
return 0, errors.Wrap(err, "models: failed to count vote rows")
}
return count, nil
} | [
-0.13244520127773285,
0.06589522212743759,
0.23881492018699646,
0.33994314074516296,
0.3177184462547302,
-0.4550634026527405,
-0.08427024632692337,
-0.38157302141189575,
-0.2532445788383484,
0.48964881896972656,
0.26820677518844604,
-0.23363608121871948,
0.21572886407375336,
1.089932680130... |
func (q voteQuery) ExistsP() bool {
e, err := q.Exists()
if err != nil {
panic(boil.WrapErr(err))
}
return e
} | [
0.3060303330421448,
0.4979410767555237,
0.36191511154174805,
0.13370180130004883,
0.20381377637386322,
0.7980448603630066,
-1.3188756704330444,
-0.028613124042749405,
0.5526896119117737,
0.5637070536613464,
0.3504486680030823,
-0.7408760786056519,
-0.713680624961853,
-0.11130201071500778,
... |
func (q voteQuery) Exists() (bool, error) {
var count int64
queries.SetCount(q.Query)
queries.SetLimit(q.Query, 1)
err := q.Query.QueryRow().Scan(&count)
if err != nil {
return false, errors.Wrap(err, "models: failed to check if vote exists")
}
return count > 0, nil
} | [
-1.184653639793396,
0.02793527953326702,
0.37335169315338135,
0.10549049824476242,
0.7320018410682678,
0.08990056067705154,
-1.3523198366165161,
0.022246189415454865,
-0.029316304251551628,
0.16596686840057373,
0.417439728975296,
-0.2675752639770508,
-0.024533072486519814,
0.61406093835830... |
func (o *Vote) OptionG(mods ...qm.QueryMod) optionQuery {
return o.Option(boil.GetDB(), mods...)
} | [
-0.8220282793045044,
0.6273065805435181,
0.19335229694843292,
0.061463579535484314,
-0.08251816034317017,
0.5743379592895508,
-0.6888716220855713,
0.6065563559532166,
0.13675498962402344,
0.9802792072296143,
0.6291371583938599,
0.3593296706676483,
0.08696669340133667,
0.5621797442436218,
... |
func (o *Vote) Option(exec boil.Executor, mods ...qm.QueryMod) optionQuery {
queryMods := []qm.QueryMod{
qm.Where("id=?", o.OptionID),
}
queryMods = append(queryMods, mods...)
query := Options(exec, queryMods...)
queries.SetFrom(query.Query, "`option`")
return query
} | [
0.20797863602638245,
0.07290518283843994,
0.21962356567382812,
0.8760057687759399,
0.5500442385673523,
-0.6168855428695679,
-0.27943116426467896,
0.047732893377542496,
0.7437441349029541,
0.6870700120925903,
0.5506019592285156,
0.09163952618837357,
0.019055696204304695,
0.1879245638847351,... |
func (voteL) LoadOption(e boil.Executor, singular bool, maybeVote interface{}) error {
var slice []*Vote
var object *Vote
count := 1
if singular {
object = maybeVote.(*Vote)
} else {
slice = *maybeVote.(*[]*Vote)
count = len(slice)
}
args := make([]interface{}, count)
if singular {
if object.R == nil ... | [
0.06931869685649872,
-0.17482811212539673,
0.9209070205688477,
0.22657255828380585,
0.547524094581604,
-0.8289508819580078,
0.27200353145599365,
0.0952717512845993,
0.7155802845954895,
1.3488155603408813,
0.11062067747116089,
-0.5030868649482727,
-0.13003844022750854,
0.8614256381988525,
... |
func (o *Vote) SetOptionG(insert bool, related *Option) error {
return o.SetOption(boil.GetDB(), insert, related)
} | [
-0.6706801652908325,
1.0132858753204346,
0.2950134575366974,
0.1540842354297638,
0.30936574935913086,
0.6387488842010498,
0.10674487799406052,
0.904023289680481,
-0.3524893522262573,
1.6482114791870117,
-0.46300169825553894,
-0.7116627097129822,
-0.1939253956079483,
1.1967438459396362,
-... |
func (o *Vote) SetOptionP(exec boil.Executor, insert bool, related *Option) {
if err := o.SetOption(exec, insert, related); err != nil {
panic(boil.WrapErr(err))
}
} | [
0.5433944463729858,
0.30402418971061707,
0.5052134990692139,
0.6194448471069336,
0.5294367074966431,
0.6092109084129333,
0.161255344748497,
0.04298657923936844,
0.21280205249786377,
1.353664755821228,
-0.16098979115486145,
-0.7791516780853271,
-0.6714023351669312,
0.27839672565460205,
0.... |
func (o *Vote) SetOptionGP(insert bool, related *Option) {
if err := o.SetOption(boil.GetDB(), insert, related); err != nil {
panic(boil.WrapErr(err))
}
} | [
-0.45890116691589355,
0.6515082716941833,
0.429476797580719,
0.3266395926475525,
0.4344167411327362,
0.6709475517272949,
-0.38690367341041565,
0.1963573396205902,
-0.19738250970840454,
2.0030667781829834,
0.1632559448480606,
-0.39626047015190125,
-1.0581187009811401,
0.7124440670013428,
... |
func (o *Vote) SetOption(exec boil.Executor, insert bool, related *Option) 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 `vote` SET %s WHERE %s",
strmangle.SetParamNames... | [
0.35220566391944885,
-0.09143626689910889,
0.8302661776542664,
0.3347720801830292,
0.42953190207481384,
-0.3746189475059509,
0.15173448622226715,
0.4994318187236786,
0.47758594155311584,
1.311188817024231,
0.014367206953465939,
-0.08571043610572815,
-0.3011816442012787,
0.7760756015777588,... |
func VotesG(mods ...qm.QueryMod) voteQuery {
return Votes(boil.GetDB(), mods...)
} | [
-0.7975694537162781,
0.798621654510498,
0.23064936697483063,
0.5384306311607361,
-0.11763793975114822,
0.7428176403045654,
-1.3276032209396362,
0.7589435577392578,
-0.5314764976501465,
0.3317326605319977,
0.3242487907409668,
0.664659321308136,
-0.07040181010961533,
1.0373643636703491,
-0... |
func Votes(exec boil.Executor, mods ...qm.QueryMod) voteQuery {
mods = append(mods, qm.From("`vote`"))
return voteQuery{NewQuery(exec, mods...)}
} | [
0.2953779995441437,
0.02950066141784191,
0.35142582654953003,
0.43502166867256165,
0.18430794775485992,
-0.26574423909187317,
-1.4001575708389282,
-0.14945700764656067,
-0.0674869641661644,
-0.7784963250160217,
0.4429696202278137,
0.8940721750259399,
-0.1210399940609932,
0.2486409395933151... |
func FindVoteG(id int, selectCols ...string) (*Vote, error) {
return FindVote(boil.GetDB(), id, selectCols...)
} | [
-0.2674011290073395,
0.8100611567497253,
0.21471762657165527,
0.6866186261177063,
0.03304138034582138,
0.12174289673566818,
-0.47697412967681885,
-0.6184985041618347,
-0.980770468711853,
0.8074910044670105,
0.08550532907247543,
-0.008693628944456577,
-0.6871494054794312,
0.8209927082061768... |
func FindVoteGP(id int, selectCols ...string) *Vote {
retobj, err := FindVote(boil.GetDB(), id, selectCols...)
if err != nil {
panic(boil.WrapErr(err))
}
return retobj
} | [
0.12580092251300812,
0.40955814719200134,
0.40439343452453613,
0.6254777908325195,
0.1367512047290802,
0.3109845221042633,
-0.667404294013977,
-1.1107083559036255,
-0.5287501811981201,
1.194286823272705,
0.573063313961029,
-0.8767801523208618,
-1.2930585145950317,
-0.08369468152523041,
0... |
func FindVote(exec boil.Executor, id int, selectCols ...string) (*Vote, error) {
voteObj := &Vote{}
sel := "*"
if len(selectCols) > 0 {
sel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), ",")
}
query := fmt.Sprintf(
"select %s from `vote` where `id`=?", sel,
)
q := queries.Ra... | [
-0.12348706275224686,
-0.22119975090026855,
0.4587724804878235,
0.7183852791786194,
0.22921694815158844,
-0.4466436207294464,
-0.4826657176017761,
-0.8752476572990417,
-0.4415373206138611,
0.23305711150169373,
0.4518097937107086,
-0.18806102871894836,
-0.8643407225608826,
-0.03600142523646... |
func FindVoteP(exec boil.Executor, id int, selectCols ...string) *Vote {
retobj, err := FindVote(exec, id, selectCols...)
if err != nil {
panic(boil.WrapErr(err))
}
return retobj
} | [
-0.10544946789741516,
-0.12998250126838684,
0.4476255178451538,
1.3133758306503296,
0.0022744338493794203,
-0.24505890905857086,
-0.46606793999671936,
-1.1079065799713135,
-0.20595066249370575,
0.5622151494026184,
0.3579191267490387,
-0.30832621455192566,
-0.7466955184936523,
-0.1537335515... |
func (o *Vote) InsertG(whitelist ...string) error {
return o.Insert(boil.GetDB(), whitelist...)
} | [
-1.7443526983261108,
1.8035556077957153,
0.49046972393989563,
0.43938761949539185,
0.7628625631332397,
1.318968653678894,
-0.2690688371658325,
0.9318667054176331,
-0.9470921754837036,
1.2324504852294922,
-0.44450780749320984,
-0.1411505490541458,
-1.2713239192962646,
1.0967276096343994,
... |
func (o *Vote) InsertGP(whitelist ...string) {
if err := o.Insert(boil.GetDB(), whitelist...); err != nil {
panic(boil.WrapErr(err))
}
} | [
-1.434685230255127,
1.5507926940917969,
0.742287278175354,
0.2720462381839752,
0.7524645328521729,
0.9673582315444946,
-0.6220307350158691,
0.27758124470710754,
-0.7180731892585754,
1.6956920623779297,
0.10112878680229187,
-0.4121391475200653,
-2.057224750518799,
0.5674258470535278,
-0.1... |
func (o *Vote) InsertP(exec boil.Executor, whitelist ...string) {
if err := o.Insert(exec, whitelist...); err != nil {
panic(boil.WrapErr(err))
}
} | [
-0.37144240736961365,
1.1329439878463745,
0.5777199268341064,
0.3965832591056824,
0.5893546342849731,
0.830301821231842,
-0.629348635673523,
0.27362075448036194,
-0.18041115999221802,
1.2322664260864258,
-0.05726919323205948,
-0.6113494634628296,
-1.5215240716934204,
0.07283682376146317,
... |
func (o *Vote) Insert(exec boil.Executor, whitelist ...string) error {
if o == nil {
return errors.New("models: no vote provided for insertion")
}
var err error
currTime := time.Now().In(boil.GetLocation())
if o.CreatedAt.IsZero() {
o.CreatedAt = currTime
}
if o.UpdatedAt.IsZero() {
o.UpdatedAt = currTim... | [
-1.336973786354065,
0.8371495008468628,
0.7431169748306274,
0.36324286460876465,
0.5903962254524231,
-0.20217911899089813,
0.02133999764919281,
-0.005877368152141571,
-0.022389575839042664,
0.8587434887886047,
-0.330061137676239,
-0.07177551835775375,
-0.7548838257789612,
0.450416624546051... |
func (o *Vote) UpdateG(whitelist ...string) error {
return o.Update(boil.GetDB(), whitelist...)
} | [
-1.9936716556549072,
0.7062140703201294,
0.39826151728630066,
0.5498236417770386,
-0.031986307352781296,
0.910918116569519,
-0.5879775285720825,
0.9415962100028992,
-0.4926852285861969,
1.6124738454818726,
0.2469785362482071,
0.37525489926338196,
-0.6967071890830994,
0.9331179261207581,
... |
func (o *Vote) UpdateGP(whitelist ...string) {
if err := o.Update(boil.GetDB(), whitelist...); err != nil {
panic(boil.WrapErr(err))
}
} | [
-1.859341025352478,
0.011118688620626926,
0.3920690417289734,
0.2307186871767044,
-0.31023067235946655,
0.5115483999252319,
-1.1280653476715088,
0.12978334724903107,
-0.31889525055885315,
2.0397446155548096,
0.9007436633110046,
0.48482227325439453,
-1.4467923641204834,
0.43750354647636414,... |
func (o *Vote) UpdateP(exec boil.Executor, whitelist ...string) {
err := o.Update(exec, whitelist...)
if err != nil {
panic(boil.WrapErr(err))
}
} | [
-0.6040022373199463,
-0.13422049582004547,
0.5900933146476746,
0.5358126163482666,
-0.2298886775970459,
0.5918996334075928,
-0.9792497158050537,
0.05647619813680649,
0.28836899995803833,
1.4860652685165405,
0.4056384563446045,
-0.1729295402765274,
-0.947169840335846,
-0.040143318474292755,... |
func (o *Vote) Update(exec boil.Executor, whitelist ...string) error {
currTime := time.Now().In(boil.GetLocation())
o.UpdatedAt = currTime
var err error
if err = o.doBeforeUpdateHooks(exec); err != nil {
return err
}
key := makeCacheKey(whitelist, nil)
voteUpdateCacheMut.RLock()
cache, cached := voteUpdate... | [
-1.4257885217666626,
-0.1175391748547554,
0.6850939393043518,
0.4109404683113098,
-0.0790412575006485,
-0.2580893337726593,
-0.45014581084251404,
-0.1978902518749237,
0.129249706864357,
1.2935532331466675,
0.09034723043441772,
0.4073323905467987,
0.18915319442749023,
0.6286561489105225,
... |
func (q voteQuery) UpdateAllP(cols M) {
if err := q.UpdateAll(cols); err != nil {
panic(boil.WrapErr(err))
}
} | [
-0.04786818102002144,
-0.37105581164360046,
0.404496431350708,
0.4928275942802429,
-0.8479620218276978,
0.6681634783744812,
-1.380431890487671,
0.15988023579120636,
0.5330079197883606,
1.1278661489486694,
0.6012436747550964,
-0.365000456571579,
-0.7219710350036621,
-0.368872731924057,
-0... |
func (q voteQuery) 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 vote")
}
return nil
} | [
-0.4516763687133789,
-0.5763885974884033,
0.4022116959095001,
0.924591064453125,
-0.012349490076303482,
0.6226328015327454,
-1.384641408920288,
0.09829147160053253,
-0.5409784913063049,
0.4700489044189453,
0.25347504019737244,
0.23526881635189056,
0.2812791168689728,
0.34706801176071167,
... |
func (o VoteSlice) UpdateAllG(cols M) error {
return o.UpdateAll(boil.GetDB(), cols)
} | [
-1.6031707525253296,
0.06876666098833084,
0.34681135416030884,
0.4521617889404297,
-0.9335430860519409,
0.1068226769566536,
-1.2145131826400757,
0.7308744788169861,
-0.39315345883369446,
1.3781474828720093,
0.0719703808426857,
0.003609892213717103,
-0.35789990425109863,
0.9281384944915771,... |
func (o VoteSlice) UpdateAllGP(cols M) {
if err := o.UpdateAll(boil.GetDB(), cols); err != nil {
panic(boil.WrapErr(err))
}
} | [
-1.4037930965423584,
-0.3947758972644806,
0.29473641514778137,
0.5930891633033752,
-0.8406302332878113,
-0.07811559736728668,
-1.3409497737884521,
0.07830487936735153,
-0.3449854552745819,
1.3280904293060303,
0.612531304359436,
0.24559356272220612,
-0.7422371506690979,
0.4585047960281372,
... |
func (o VoteSlice) UpdateAllP(exec boil.Executor, cols M) {
if err := o.UpdateAll(exec, cols); err != nil {
panic(boil.WrapErr(err))
}
} | [
-0.3269166648387909,
-0.5877816677093506,
0.4727845788002014,
0.5867708921432495,
-0.7563334107398987,
0.09158740192651749,
-1.10869300365448,
0.3974497616291046,
0.33742251992225647,
1.359905481338501,
0.5321869850158691,
0.03337550908327103,
-0.5165119767189026,
-0.03643547743558884,
0... |
func (o VoteSlice) 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
for name,... | [
-0.9137915372848511,
-0.3929295539855957,
0.9162144660949707,
0.7694650888442993,
-0.17644622921943665,
-0.17182257771492004,
-0.7436233758926392,
0.10433292388916016,
-0.5875120759010315,
0.8675464391708374,
-0.04737267270684242,
0.19866536557674408,
0.16944658756256104,
0.532006442546844... |
func (o *Vote) UpsertG(updateColumns []string, whitelist ...string) error {
return o.Upsert(boil.GetDB(), updateColumns, whitelist...)
} | [
-1.7167502641677856,
1.1407493352890015,
0.534505307674408,
0.46952202916145325,
0.2256646454334259,
0.33912020921707153,
-0.5338772535324097,
0.48496413230895996,
-0.6577602624893188,
1.4996788501739502,
-0.0557367242872715,
-0.3997049331665039,
-0.5530015826225281,
0.5861071348190308,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.