text
stringlengths
11
6.3k
embedding
listlengths
768
768
func (k Keeper) BeginBlock(ctx sdk.Context) { defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) ethHeight := k.ethBridgeKeeper.GetLastObservedEthereumBlockHeight(ctx).EthereumBlockHeight if ethHeight == 0 { k.Logger(ctx).Debug("tracked ethereum height is 0") retur...
[ 0.28095585107803345, 0.6179346442222595, 0.9347328543663025, 0.2917638123035431, 0.45480889081954956, 0.8020473718643188, 0.5601775050163269, -0.4835957884788513, 0.06038687378168106, 0.6573459506034851, 0.37302884459495544, -0.14183439314365387, 0.010076531209051609, 1.5415961742401123, ...
func (k Keeper) EndBlocker(ctx sdk.Context) { defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyEndBlocker) // check if the latest eth block height ethHeight := k.ethBridgeKeeper.GetLastObservedEthereumBlockHeight(ctx).EthereumBlockHeight if ethHeight == 0 { k.Logger(ctx).Debug(...
[ -0.4949013888835907, 0.29202744364738464, 0.9558383822441101, -0.31595027446746826, 0.16418126225471497, 0.2213577777147293, 0.22245368361473083, 0.4083445370197296, 0.019902098923921585, 0.6391891837120056, -0.2885446846485138, -0.7844594717025757, -0.5078152418136597, 1.1813527345657349,...
func (o OSS) Store(path string, option *media.Option, reader io.Reader) error { return DefaultStoreHandler(o, path, option, reader) }
[ -0.09275652468204498, -0.2972755432128906, -0.03984072431921959, 0.4035451114177704, 0.07666531205177307, 0.43444743752479553, 0.5786844491958618, -0.37077027559280396, 0.2520967423915863, -1.0081197023391724, 0.4560666084289551, -0.764081597328186, -0.04652249813079834, 0.0772660076618194...
func (o OSS) Retrieve(path string) (media.FileInterface, error) { return DefaultRetrieveHandler(o, path) }
[ 0.418276846408844, -0.24144679307937622, 0.29639390110969543, 0.12270128726959229, 0.37720707058906555, -0.633686900138855, 0.8814852833747864, -0.642200767993927, 0.15661968290805817, -1.697556734085083, 0.4799283444881439, -0.6960239410400391, -0.38330793380737305, -0.12354210019111633, ...
func (o OSS) URL(styles ...string) string { url := o.Base.URL(styles...) newurl, err := Storage.GetURL(url) if err != nil || len(newurl) == 0 { return url } return newurl }
[ -0.7932335734367371, -0.20270608365535736, 0.4029345214366913, 0.8299956917762756, 0.2131798416376114, -0.13835352659225464, -0.16216370463371277, 0.037977248430252075, 0.028982847929000854, 0.3570284843444824, 0.4186762273311615, 0.07147794216871262, -0.06798597425222397, -0.3905039131641...
func Run(cfg *config.Config) { var wg sync.WaitGroup wg.Add(2) r := newRouter(cfg.StaticPath) port := os.Getenv("PORT") if port != "" { // production log.WithField("port", port).Info("Server started") log.Fatal(http.ListenAndServe(":"+port, r)) } else { // dev serve(wg, cfg, r) } wg.Wait() }
[ -0.6752907633781433, -0.0876341387629509, 0.8418124318122864, 0.6765109300613403, 0.5312723517417908, 1.0045064687728882, 1.0621148347854614, 0.7040308117866516, -0.6021680235862732, 0.20016011595726013, -0.5280609130859375, 0.558611273765564, -0.20142248272895813, 0.7772824764251709, 0....
func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResolver{r} }
[ -0.85917729139328, -0.8114736080169678, 0.21915511786937714, 0.6041824817657471, 0.3279842734336853, -0.12314578890800476, 0.07235062122344971, 0.2440601885318756, 1.0211246013641357, -1.228659987449646, -0.5522106885910034, -1.263425350189209, 0.1981908679008484, -0.07537302374839783, -...
func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} }
[ 0.0017501392867416143, -0.48795756697654724, 0.11716366559267044, 0.41594451665878296, -0.170012965798378, -0.03253801167011261, -0.6646475195884705, 0.6134193539619446, 0.6766958832740784, -1.769515037536621, -0.099466972053051, -0.8924757242202759, -0.0530250146985054, 0.1281633079051971...
func (s LocalFSStore) ReadFile(f *File) ([]byte, error) { return ioutil.ReadFile(path.Join(f.Path, f.FileName)) }
[ 0.05100206285715103, 0.09101766347885132, 0.23770561814308167, 0.5211933851242065, -0.386945515871048, 0.1327255666255951, 0.2364799827337265, 0.7129886746406555, -0.7493144273757935, -0.8593331575393677, 0.3955973982810974, -0.4985596239566803, 0.34261974692344666, 0.023365307599306107, ...
func (s LocalFSStore) ReadDir(dirname string) ([]string, error) { if fs, err := ioutil.ReadDir(dirname); err != nil { return nil, err } else { res := make([]string, len(fs)) for i := range fs { res[i] = fs[i].Name() } return res, nil } }
[ -0.9710618853569031, -0.12101303040981293, 0.4826013743877411, 0.7918596267700195, -0.8414915800094604, -0.38836511969566345, -0.5302377343177795, 0.5973653793334961, 0.40556904673576355, -0.12781687080860138, 0.6268348097801208, -0.14043471217155457, -0.1298544853925705, 0.919362187385559...
func (s FSStore) ReadFile(f *File) ([]byte, error) { return fs.ReadFile(s.FS, path.Join(f.Path, f.FileName)) }
[ -0.1806473433971405, 0.13847123086452484, 0.21196992695331573, 0.7309321165084839, -0.5870373845100403, 0.04034973680973053, 0.32778263092041016, 0.08683096617460251, -0.003732784651219845, -0.8992069363594055, 0.22281040251255035, -0.4861848056316376, 0.6320722699165344, -0.15955109894275...
func (s FSStore) ReadDir(dirname string) ([]string, error) { if dirname == "" { dirname = "." } if fs, err := fs.ReadDir(s.FS, dirname); err != nil { return nil, err } else { res := make([]string, len(fs)) for i := range fs { res[i] = fs[i].Name() } return res, nil } }
[ -1.0419145822525024, 0.06192140653729439, 0.6329218149185181, 1.0958564281463623, -0.8830590844154358, -0.30479493737220764, -0.2005012035369873, 0.38446399569511414, 0.8925220966339111, -0.1862504929304123, 0.4288294315338135, -0.0011189214419573545, -0.018049651756882668, 0.8802813887596...
func (s AssetStore) ReadFile(f *File) ([]byte, error) { return s.Asset(path.Join(f.Path, f.FileName)) }
[ 0.08724292367696762, -0.0022502001374959946, 0.3383445143699646, -0.10722876340150833, -0.6843919157981873, 0.5582725405693054, 0.48106127977371216, 0.042365916073322296, -0.6927615404129028, -0.4483111500740051, 0.7310419082641602, 0.004146595485508442, 0.6288536190986633, -0.391938507556...
func (s AssetStore) ReadDir(dirname string) ([]string, error) { return s.AssetDir(dirname) }
[ -1.1397433280944824, 0.10987173020839691, 0.46401169896125793, 0.18394526839256287, -1.0772844552993774, -0.20520390570163727, 0.3538215160369873, -0.0617934949696064, 0.3792211711406708, -0.4482549726963043, 0.7354399561882019, 0.3544290363788605, 0.2914755344390869, 0.6740906834602356, ...
func terminalIsDumb() bool { var term = os.Getenv("TERM") if term == "" || term == "dumb" { return true } return false }
[ -1.0346683263778687, 0.06521765142679214, 0.5436748266220093, 0.2170884907245636, 0.36146673560142517, 1.0922552347183228, -0.9842551350593567, -0.12267383188009262, 0.6635937094688416, -0.44956523180007935, -0.5433313846588135, 1.152836561203003, 0.186162531375885, 0.23071366548538208, ...
func Conecta() *sql.DB { conexao := "user=postgres dbname=alura password=admin host=localhost sslmode=disable" db, err := sql.Open("postgres", conexao) if err != nil { panic(err.Error()) } return db }
[ 0.4647109806537628, 0.12004244327545166, 0.5318055152893066, 0.8439620137214661, 0.12837918102741241, 1.019233226776123, -0.4243040978908539, 0.27199652791023254, -0.6722249388694763, 0.5275278687477112, 0.7854432463645935, 0.3190954327583313, -0.17567825317382812, -0.273026704788208, 0....
func (c *Client) MoveAccount(ctx context.Context, params *MoveAccountInput, optFns ...func(*Options)) (*MoveAccountOutput, error) { if params == nil { params = &MoveAccountInput{} } result, metadata, err := c.invokeOperation(ctx, "MoveAccount", params, optFns, c.addOperationMoveAccountMiddlewares) if err != nil ...
[ -1.032921552658081, 0.15290620923042297, 0.6796637773513794, 0.6774859428405762, 0.2382769137620926, -0.30772462487220764, 1.4069477319717407, -0.6313969492912292, 0.9406418204307556, 0.06392540037631989, -0.24445605278015137, 1.5602524280548096, -0.5952520966529846, -1.2902199029922485, ...
func New(config *Config) (*Reporter, error) { var ( reporter Reporter err error ) if config == nil { return nil, nil } if err := config.validate(); err != nil { return nil, err } reporter.config = config reporter.D = debug.New("reporter/errors") if config.Debug { reporter.D.On() } reporter...
[ 0.47672349214553833, -0.17396597564220428, 0.38582322001457214, -0.4631248414516449, -0.07441865652799606, -0.47849753499031067, 0.15999017655849457, 0.37033528089523315, -0.4430069029331207, 0.5472754240036011, 0.146736279129982, -0.3477029502391815, -0.2924720048904419, 0.639708042144775...
func (r *Reporter) Start(_ context.Context) error { return nil }
[ 0.943524956703186, -0.20419000089168549, 0.10833735764026642, -0.29199936985969543, 0.49985894560813904, 0.06178672984242439, 0.5572955012321472, 0.811404824256897, 0.08433270454406738, -0.6987492442131042, -0.6006482243537903, 0.11219655722379684, -0.38999587297439575, 0.5418615341186523,...
func (r *Reporter) Stop(_ context.Context) error { return nil }
[ -0.04552464559674263, -0.3410532474517822, 0.012613913975656033, -0.8973888754844666, 0.7253611087799072, 0.6569676399230957, 0.5318251848220825, 0.7086643576622009, -0.21029804646968842, -0.6397380828857422, -0.6296752691268921, -0.39385443925857544, -0.9532723426818848, 0.039229061454534...
func (r *Reporter) LogHandler() log15.Handler { return log15.FuncHandler(func(rec *log15.Record) error { if rec.Lvl > log15.LvlError { return nil } r.sentry.CaptureException(errors.New(rec.Msg), nil, sentryEventFromLogRecord(rec)) return nil }) }
[ 0.9277097582817078, 0.14039236307144165, 0.24805228412151337, -0.056699492037296295, -0.5533420443534851, 0.0999092161655426, 0.0827290266752243, 0.07495145499706268, 0.40816885232925415, -0.2689346671104431, 0.5121035575866699, -0.19947616755962372, -0.4619205892086029, -0.242955788969993...
func (r *Reporter) SetSentryTransport(t sentry.Transport) { r.sentry.Transport = t }
[ 0.3581846356391907, -0.4780159890651703, 0.23651579022407532, -0.4100830554962158, 0.31900694966316223, 0.6395627856254578, 0.21044862270355225, -0.2840830683708191, 0.08378639817237854, -0.2727549374103546, -1.47987699508667, -0.15157444775104523, -0.2435445338487625, -0.01183311175554990...
func subscribeCallback(client MQTT.Client, message MQTT.Message) { fmt.Printf("\n") fmt.Printf("\nTopic: " + message.Topic()) fmt.Printf("\nMessage: \n") fmt.Printf(string(message.Payload())) fmt.Printf("\n--------------") }
[ 1.8854511976242065, -0.5677364468574524, 0.962283194065094, -0.8099515438079834, -0.1469389796257019, 0.4596644639968872, -0.5314131379127502, -0.5731860995292664, -0.07684332877397537, 0.024213070049881935, 0.32206234335899353, 0.9047148823738098, -0.012827476486563683, 0.5984957814216614...
func LongestDistinctPath[T comparable](node *trees.MultiNode[T]) int { multiSet := hashmultisets.New[T]() return longestDistinctPath(node, multiSet) }
[ 0.7299333810806274, 0.3993437886238098, 0.4330766499042511, 0.4467908442020416, -0.09778080135583878, 0.7905433177947998, 0.5941272377967834, 0.7881836295127869, 0.03152070567011833, 0.05353042855858803, -0.641863226890564, -0.3483838737010956, 0.39970165491104126, 0.2506086826324463, -0...
func encode(item interface{}) ([]byte, error) { var buf bytes.Buffer enc := json.NewEncoder(&buf) err := enc.Encode(item) return buf.Bytes(), err }
[ -0.9154554605484009, -0.1714654117822647, 0.6466124057769775, 0.6578559279441833, -0.4412248134613037, -0.22733889520168304, -0.6907220482826233, -1.0505155324935913, 0.3809524476528168, 0.4328685700893402, -0.9684029817581177, 0.9586129784584045, -0.46012863516807556, 0.018946051597595215...
func decode(data []byte, item interface{}) error { dec := json.NewDecoder(bytes.NewBuffer(data)) return dec.Decode(item) }
[ 0.05658905580639839, -0.3600825369358063, 0.5813392400741577, 0.13661764562129974, -0.5461677312850952, -0.17526768147945404, -1.1205302476882935, -0.1455543041229248, 0.12549912929534912, 0.04306996613740921, -1.123536229133606, 0.4090660810470581, -0.5062173008918762, -0.3518729209899902...
func NewDriveDB(client *http.Client, dbPath, cachePath string, pollInterval time.Duration, rootId string) (*DriveDB, error) { svc, _ := gdrive.New(client) _, err := svc.About.Get().Do() if err != nil { log.Fatalf("drive.service.About.Get().Do: %v\n", err) } if *debugDriveDB { debug = true } ldbPath := path...
[ -0.2134026736021042, -0.10518084466457367, 0.8147686123847961, 0.08610166609287262, -0.5069029927253723, 0.06758248805999756, -0.11266390234231949, -0.710157036781311, -0.2490842044353485, 0.2556487023830414, 0.644381582736969, 0.4081896245479584, -1.0208439826965332, 0.4805479347705841, ...
func (d *DriveDB) createRoot() error { launch, _ := time.Unix(1335225600, 0).MarshalText() file := &gdrive.File{ Id: d.rootId, Title: "/", MimeType: driveFolderMimeType, LastViewedByMeDate: string(launch), ModifiedDate: string(launch), CreatedDate: strin...
[ 0.5650578141212463, -0.38895848393440247, 0.5325044393539429, 0.1143469363451004, 0.12409520894289017, 0.02431515045464039, -0.055010031908750534, -0.22973449528217316, -0.3560745120048523, -0.13731665909290314, 0.6864977478981018, 0.16563525795936584, -1.0105088949203491, 0.95617216825485...
func (d *DriveDB) reinit() error { d.Lock() defer d.Unlock() i := d.cpt.LastInode // preserve the last Inode allocated d.cpt = NewCheckpoint() // recreate the checkpoint d.cpt.LastInode = i // restore the last Inode allocated s := time.Now() err := d.RemoveAllFiles() // blow away all of the metadata from ...
[ 0.11618909239768982, -0.41493335366249084, 0.4786788821220398, -0.15695182979106903, 0.765724778175354, 0.07878325879573822, 0.6315708160400391, 1.5943129062652588, -1.244493007659912, 0.04950094595551491, 0.5151032209396362, 0.20365311205387115, -1.0907188653945923, -0.23423682153224945, ...
func internalKey(key string) []byte { return []byte("int:" + key) }
[ -0.6979120969772339, 0.009063882753252983, 0.32382532954216003, -0.9744604229927063, -0.7503662109375, 0.1736803650856018, -0.37028685212135315, 0.3517817556858063, 0.46436750888824463, 0.8768355250358582, -0.25590500235557556, 0.6009882688522339, -1.271722435951233, -0.12218431383371353, ...
func childKeyPrefix(parentId string) []byte { return []byte("kid:" + parentId) }
[ 0.15843971073627472, 0.15762215852737427, 0.44900864362716675, -0.39724305272102356, -0.579307496547699, -0.17097771167755127, -1.0766586065292358, -0.6200883984565735, -0.14915212988853455, 1.05036461353302, -1.910481572151184, 0.2932376265525818, -0.4806244671344757, 0.3329833447933197, ...
func linkCount(f *gdrive.File, numSubDirs int) int { links := len(f.Parents) + numSubDirs // If this is a directory, the '.' counts as an additional link if f.MimeType == driveFolderMimeType { links++ } return links }
[ 0.09757893532514572, 0.016997933387756348, 0.5609045028686523, -0.032926831394433975, 0.2960697114467621, 0.1293361335992813, 0.7197102904319763, 1.2234346866607666, 0.22033435106277466, -1.2617510557174683, -0.021120939403772354, 0.45287594199180603, -0.2867630124092102, 0.881574034690856...
func (d *DriveDB) get(key []byte, item interface{}) error { data, err := d.db.Get(key, nil) if err != nil { return err } return decode(data, item) }
[ -1.1831198930740356, -0.134485125541687, 0.49918392300605774, 0.05951329320669174, 0.5415839552879333, -0.5533839464187622, -1.6723966598510742, 0.24072887003421783, -0.8807893991470337, 0.3392528295516968, -0.2957584261894226, 0.33845505118370056, -1.2493703365325928, -0.4157853126525879,...
func (d *DriveDB) writeCheckpoint(batch *leveldb.Batch) error { d.Lock() cpt := d.cpt d.Unlock() bytes, err := encode(cpt) if err != nil { log.Printf("error encoding checkpoint: %v", err) return err } if batch != nil { batch.Put(internalKey("checkpoint"), bytes) return nil } return d.db.Put(internalKey...
[ -0.5745556354522705, -0.7971888184547424, 0.3596577048301697, 0.6895560622215271, 1.0067710876464844, 0.5922183990478516, 0.1315857172012329, 0.7397947311401367, -0.6726582646369934, 0.7793895602226257, -1.0220937728881836, -0.7471429705619812, -1.1844669580459595, 0.4576103687286377, 0....
func (d *DriveDB) lastChangeId() int64 { d.Lock() defer d.Unlock() return d.cpt.LastChangeID }
[ -0.6212693452835083, -0.7406096458435059, 0.3373420834541321, -0.7235830426216125, -0.12162094563245773, 0.4471660554409027, -0.03016223944723606, 1.037950873374939, 0.07650686055421829, 0.11714305728673935, 0.41904494166374207, 0.21316824853420258, -1.1399232149124146, 1.629879355430603, ...
func (d *DriveDB) setLastChangeId(id int64) { d.Lock() defer d.Unlock() d.cpt.LastChangeID = id }
[ -0.9853799343109131, -0.9800093173980713, 0.3636872172355652, -0.6586259603500366, 0.1556263267993927, 0.6554846167564392, -0.38269826769828796, 0.7637131214141846, 0.5642690062522888, 0.05882216617465019, -0.3910263478755951, 0.21972796320915222, -0.7508312463760376, 1.5005918741226196, ...
func (d *DriveDB) nextInode(batch *leveldb.Batch) (uint64, error) { var inode uint64 d.Lock() d.cpt.LastInode++ inode = d.cpt.LastInode d.Unlock() return inode, d.writeCheckpoint(batch) }
[ -0.7833247780799866, -0.8958964347839355, 0.302474707365036, 0.701400876045227, -0.23381586372852325, -0.08353591710329056, 0.07601501047611237, 0.6526466012001038, -0.24711592495441437, 0.19736583530902863, 0.18379265069961548, 0.25750046968460083, -1.2408570051193237, -0.1618643701076507...
func (d *DriveDB) nextCacheBlock(batch *leveldb.Batch) (int64, error) { var block int64 d.Lock() block = d.cpt.CacheBlock d.cpt.CacheBlock = (d.cpt.CacheBlock + 1) % d.cacheBlocks d.Unlock() return block, d.writeCheckpoint(batch) }
[ -0.7594356536865234, -0.14805464446544647, 0.3980468809604645, 1.0089333057403564, -0.8947740197181702, 0.49286267161369324, 0.11674558371305466, -0.03374864161014557, -0.3051110506057739, -0.32032516598701477, -0.5149866342544556, 0.20404395461082458, -0.5974150896072388, 0.63515698909759...
func (d *DriveDB) InodeForFileId(fileId string) (uint64, error) { key := "inf:" + fileId v, err := d.sf.Do(key, func() (interface{}, error) { return d.inodeForFileIdImpl(fileId) }) return v.(uint64), err }
[ -0.3605014681816101, -0.060003288090229034, 0.16888676583766937, -0.1994468867778778, -0.5664762258529663, -0.8685566782951355, 0.16123691201210022, 0.6662458777427673, -0.8931700587272644, 0.3037101924419403, 0.3618924021720886, -0.3487003743648529, -0.3621058762073517, 1.2116425037384033...
func (d *DriveDB) AllFileIds() ([]string, error) { var ids []string // We can't Close() until all iterators are released. // TODO: this can still be racy with Close(), fix that. d.iters.Add(1) iter := d.db.NewIterator(util.BytesPrefix(fileKey("")), nil) for iter.Next() { ids = append(ids, deKey(string(iter.Key(...
[ -0.38590118288993835, -0.7516109347343445, 0.19621457159519196, -0.18569713830947876, -0.30144941806793213, -0.20209474861621857, -1.101838231086731, 0.6417205929756165, -0.31871989369392395, 0.5727491974830627, 0.34625959396362305, 0.25628796219825745, -1.22483491897583, 1.074644565582275...
func (d *DriveDB) childFileIds(fileId string) (map[string]bool, error) { ids := make(map[string]bool) d.iters.Add(1) batch := new(leveldb.Batch) iter := d.db.NewIterator(util.BytesPrefix(childKeyPrefix(fileId)), nil) for iter.Next() { pidcid := deKey(string(iter.Key())) cid := pidcid[len(fileId)+1:] if gdriv...
[ -0.2834029793739319, -0.9245724678039551, 0.5400432348251343, -0.9769766330718994, -0.14800944924354553, -0.03472490236163139, -0.26903554797172546, 0.2739061415195465, -1.0197358131408691, 1.1908091306686401, -0.637076199054718, -0.37653717398643494, -1.1517823934555054, 0.944829940795898...
func (d *DriveDB) FileById(fileId string) (*gdrive.File, error) { var res gdrive.File err := d.get(fileKey(fileId), &res) if err != nil { return nil, err } return &res, nil }
[ 0.09768369793891907, -0.08428320288658142, -0.028939250856637955, -0.36266863346099854, 0.5103235840797424, -0.2770165503025055, -0.05589672550559044, -0.6429595947265625, -1.0801186561584473, 0.2202170044183731, 0.3307047486305237, -0.440958172082901, -0.7174438238143921, 0.88595098257064...
func (d *DriveDB) FileIdForInode(inode uint64) (string, error) { var fileId string err := d.get(inodeToFileIdKey(inode), &fileId) if err != nil { log.Printf("FileIdForInode: %v: %v", inode, err) return "", err } return fileId, nil }
[ -0.2530636489391327, -0.7194014191627502, 0.3757060170173645, -0.808098554611206, -0.07719749212265015, 0.026875928044319153, -0.08627782762050629, 0.6813918948173523, -0.49225494265556335, -0.22767695784568787, 0.9806991815567017, -0.4322442412376404, -0.31919363141059875, 0.6421398520469...
func (d *DriveDB) FileByInode(inode uint64) (*File, error) { if f, ok := d.lruCache.Get(inode); ok { return f.(*File), nil } fileId, err := d.FileIdForInode(inode) if err != nil { return nil, err } file, err := d.FileByFileId(fileId) if err != nil { return nil, err } d.lruCache.Add(inode, file) return...
[ -0.0646958127617836, -0.09219345450401306, 0.5601046085357666, -0.6825623512268066, 0.07026557624340057, -0.7405429482460022, -0.2878887355327606, 0.16382458806037903, -0.5282477736473083, 0.08415625244379044, 0.39603152871131897, -0.4691917598247528, -0.6178422570228577, 0.154910832643508...
func (d *DriveDB) FileByFileId(fileId string) (*File, error) { gdriveFile, err := d.FileById(fileId) if err != nil { return nil, fmt.Errorf("unknown fileId %v: %v", fileId, err) } file := File{File: gdriveFile} file.Inode, err = d.InodeForFileId(fileId) if err != nil { return nil, fmt.Errorf("no inode for %v...
[ 0.2348485291004181, -0.0036978116258978844, 0.391299843788147, -0.7105332612991333, -0.026896432042121887, -0.5311742424964905, 0.528355598449707, 0.20823650062084198, -0.27387869358062744, -0.10556936264038086, 0.11785053461790085, -0.1261264681816101, -0.5097805261611938, 0.7525437474250...
func (d *DriveDB) Refresh(fileId string) (*File, error) { f, err := d.service.Files.Get(fileId).Do() if err != nil { return &File{}, err } return d.UpdateFile(nil, f) }
[ 0.12476834654808044, -0.20916880667209625, 0.2780366539955139, -0.16145198047161102, 0.4091164171695709, -0.31033855676651, -1.1099345684051514, -0.3754391670227051, -0.6171783208847046, -0.25459226965904236, 0.39222460985183716, -0.07006882131099701, -0.3676026165485382, 0.642575860023498...
func (d *DriveDB) RemoveAllFiles() error { af, err := d.AllFileIds() if err != nil { return fmt.Errorf("AllFileIds(): %v", err) } batch := new(leveldb.Batch) for _, id := range af { d.RemoveFileById(id, batch) } err = d.db.Write(batch, nil) if err != nil { return err } return nil }
[ -0.1670299619436264, -0.333209753036499, 0.5596619844436646, 0.46059495210647583, 0.32016637921333313, -0.32697784900665283, 0.1613144874572754, 1.4523072242736816, -0.7607455849647522, 0.0899585634469986, -0.026298927143216133, -1.061112642288208, -1.726004958152771, 0.9839040637016296, ...
func (d *DriveDB) UpdateFile(batch *leveldb.Batch, f *gdrive.File) (*File, error) { if f == nil { return &File{}, fmt.Errorf("cannot update nil File") } fileId := f.Id bytes, err := encode(f) if err != nil { return &File{}, fmt.Errorf("error encoding file %v: %v", fileId, err) } b := batch if b == nil { ...
[ -0.23970024287700653, -0.725310742855072, 0.8185285329818726, 0.10419752448797226, 0.30155572295188904, -0.43908241391181946, 0.3070434629917145, 0.4858019948005676, -1.1254382133483887, 0.4551592469215393, 0.09550846368074417, -0.27078840136528015, -0.4633025527000427, 0.7260723114013672,...
func (d *DriveDB) pollForChanges() { poll := make(chan struct{}) pollTime := time.NewTicker(d.pollInterval).C http.HandleFunc("/refresh", func(w http.ResponseWriter, r *http.Request) { poll <- struct{}{} fmt.Fprintf(w, "Refresh request accepted.") }) // TODO: Allow full requery via http handler, invoke on leve...
[ -0.6152188777923584, -0.6067531108856201, 0.41273894906044006, -0.6481972336769104, -0.1043379157781601, 0.2713801860809326, -0.5324046015739441, -0.8755325675010681, -0.24896283447742462, -0.5603625178337097, 1.313180923461914, -0.11343978345394135, -0.1331583708524704, 1.1234513521194458...
func (d *DriveDB) readChanges() { l := d.service.Changes.List().IncludeDeleted(true).IncludeSubscribed(true).MaxResults(1000) lastChangeId := d.lastChangeId() if lastChangeId > 0 { l.StartChangeId(lastChangeId + 1) } debug.Printf("Querying Google Drive for changes since %d.", lastChangeId) var filenum int fo...
[ -0.41093626618385315, -0.061532650142908096, 0.570298433303833, -0.6704925894737244, 0.3975575864315033, -0.6318308711051941, 0.03402858227491379, 0.14942358434200287, -0.16588495671749115, -0.13413476943969727, 0.6331804990768433, 0.5011677742004395, -0.19693806767463684, 0.84994512796401...
func (d *DriveDB) processChange(c *gdrive.ChangeList) error { if c == nil { return nil } // If we read zero items, there's no work to do, and we're probably synced. if len(c.Items) == 0 { if d.lastChangeId() >= c.LargestChangeId { d.synced.Broadcast() } return nil } log.Printf("processing %v/%v, %v c...
[ -0.2276381403207779, -0.43196821212768555, 0.6880252957344055, 0.21548357605934143, 0.8443801403045654, -0.39731860160827637, 0.4448026716709137, 0.6430489420890808, -0.6887455582618713, 0.3919064700603485, -0.4150446951389313, -0.49015769362449646, -0.32994896173477173, 1.0598163604736328...
func (d *DriveDB) sync() { var c *gdrive.ChangeList for { c = <-d.changes err := d.processChange(c) if err != nil { // TODO: trigger reinit(), unless rate > N, then log.Fatal log.Printf("error evaluating change from drive: %v", err) } } }
[ -0.3940138816833496, -0.3157089948654175, 0.28873714804649353, -0.5028928518295288, 0.39564210176467896, -0.5431393384933472, -0.5609428882598877, -0.5879985690116882, -0.836757242679596, 0.6445844173431396, 0.002807942219078541, 0.5782739520072937, -0.3693173825740814, 1.633261799812317, ...
func (d *DriveDB) WaitUntilSynced() { d.synced.L.Lock() d.synced.Wait() d.synced.L.Unlock() }
[ 0.5570447444915771, 0.0037910991813987494, 0.2777470648288727, -0.8703315258026123, 0.8565158843994141, -0.1656772643327713, -0.21611858904361725, 0.3009384274482727, -0.027514055371284485, -0.6495162844657898, -1.1878914833068848, 0.20558816194534302, -0.4634963274002075, 0.73982620239257...
func (d *DriveDB) Close() { d.iters.Wait() d.db.Close() d.db = nil }
[ -0.8023906946182251, -0.018702303990721703, 0.20473702251911163, -0.6188642382621765, 0.243302121758461, 0.5811275839805603, 0.5078234672546387, 0.3504350483417511, -0.8034945130348206, -0.5525548458099365, 0.600517749786377, -0.27223294973373413, -1.7287635803222656, 1.5604320764541626, ...
func (d *DriveDB) chunkNumbers(offset, size int64) (chunk0, chunkN int64) { chunk0 = offset / (*driveCacheChunk) // lowest chunk number encompassing the offset chunkN = (offset + size - 1) / (*driveCacheChunk) // highest chunk number, encompassing offset+size. return }
[ -0.9734817147254944, -0.3635708689689636, 0.36159196496009827, -0.5420302748680115, -0.30368804931640625, -0.6322383880615234, -0.006384465377777815, 1.0070399045944214, -0.3575093448162079, -0.7244360446929932, -0.5455989837646484, 0.24240221083164215, 0.23086510598659515, 0.4853811562061...
func (d *DriveDB) ReadFiledata(f *File, offset, size, filesize int64) ([]byte, error) { var ret []byte // Read all the necessary chunks chunk0, chunkN := d.chunkNumbers(offset, size) for chunk := chunk0; chunk <= chunkN; chunk++ { data, err := d.readChunk(f, chunk, filesize) if err != nil { log.Printf(" chun...
[ -0.6753570437431335, -0.0896926000714302, 0.6622909307479858, -0.3768783211708069, -0.6080634593963623, 0.1798034906387329, -0.6708430647850037, 0.1933576762676239, -1.1358674764633179, -0.5667241811752319, 0.4046829044818878, 0.02562125399708748, -0.17832152545452118, 0.2949468195438385, ...
func (d *DriveDB) clearDataCache(fileId string) { var ids []string d.iters.Add(1) iter := d.db.NewIterator(util.BytesPrefix(cacheMapKeyPrefix(fileId)), nil) for iter.Next() { ids = append(ids, string(iter.Key())) } iter.Release() d.iters.Done() batch := new(leveldb.Batch) for _, id := range ids { batch.Del...
[ -0.5207123160362244, 0.07763703912496567, 0.455174058675766, -0.44501569867134094, -0.8506990671157837, 0.21418136358261108, -0.5374112725257874, 0.733727216720581, -0.6932668685913086, 0.6091834306716919, -0.31660589575767517, 0.540501594543457, 0.1002562940120697, 0.8775210380554199, -...
func (d *DriveDB) readChunk(f *File, chunk, filesize int64) ([]byte, error) { if chunk*(*driveCacheChunk) > filesize { return nil, fmt.Errorf("read past eof") } key := cacheMapKey(f.Id, chunk) v, err := d.sf.Do(string(key), func() (interface{}, error) { return d.readChunkImpl(f, chunk, filesize) }) return v.(...
[ -0.9541952013969421, 0.08780203759670258, 0.39644429087638855, 0.7722702026367188, -0.47018933296203613, -0.3962111473083496, -0.022574162110686302, -0.10376601666212082, -1.0773959159851074, -0.3224513530731201, 1.0691083669662476, 0.1769840270280838, 0.5522773861885071, 0.137481570243835...
func (d *DriveDB) blockFilename(block int64) (string, error) { keysize := len(fmt.Sprintf("%d", d.cacheBlocks)) f := fmt.Sprintf("%%0%dd", keysize) b := fmt.Sprintf(f, block%d.cacheBlocks) dir := path.Join(d.data, b[:keysize/2]) err := os.MkdirAll(dir, 0700) if err != nil { return "", err } p := path.Join(dir...
[ -0.5468132495880127, 0.8894017338752747, 0.9154323935508728, -0.08679775148630142, -0.3314177989959717, -0.08895550668239594, 0.7940483689308167, -0.05129672959446907, -0.3621954917907715, 0.372097373008728, 0.04075560346245766, -0.5367552638053894, -0.2929570972919464, 0.12952984869480133...
func (d *DriveDB) readChunkImpl(f *File, chunk, filesize int64) ([]byte, error) { // map to larger drive read size, store last read drive chunk data, err := d.readCacheBlock(f.Id, chunk) if err == nil { return data, nil } dchunk := d.chunkToDriveChunk(chunk) defer d.prefetchDriveChunk(f, dchunk+1, filesize) l...
[ -0.6986282467842102, -0.3618055284023285, 0.7978343963623047, 0.029615167528390884, -0.5250145792961121, -0.5679277777671814, 0.30243629217147827, -0.1675419807434082, -0.8759161829948425, -0.25124627351760864, 0.7716357111930847, 0.07830716669559479, 0.4890638291835785, -0.359166145324707...
func (d *DriveDB) prefetchDriveChunk(f *File, newchunk, filesize int64) { debug.Printf("pfrequest %s drive block %d (q:%d)", f.Id, newchunk, len(d.pfetchq)) // Past eof? don't do anything silly. if newchunk*d.driveSize > filesize { debug.Printf("past eof %s drive block %d", f.Id, newchunk) return } key :=...
[ -0.1574241667985916, -0.3189227283000946, 0.6251055002212524, -0.30032607913017273, 0.00886088702827692, -0.22100354731082916, 0.11580350250005722, -0.29965049028396606, -0.7305882573127747, -0.5530716180801392, 0.2779650390148163, 0.3448597490787506, 0.37817734479904175, 1.209862947463989...
func (d *DriveDB) getChunkFromDriveImpl(f *File, chunk, filesize int64) ([]byte, error) { debug.Printf("retrieving %s drive block %d", f.Id, chunk) if *continuousPrefetch { defer d.prefetchDriveChunk(f, chunk+1, filesize) } url, err := d.downloadUrl(f, false) if err != nil { return nil, fmt.Errorf("downloadUr...
[ -0.5960966348648071, -0.3950968086719513, 0.9487746953964233, -0.2544797360897064, -0.3426796793937683, -0.5910307765007019, 0.29361090064048767, -0.4560498297214508, -0.8937312364578247, -0.06624916195869446, 0.2294028103351593, 0.7247172594070435, -0.1602514386177063, 0.09042224287986755...
func (d *DriveDB) downloadUrlImpl(f *File, force bool) (string, error) { var urldata DownloadURL key := downloadUrlKey(f.Id) if !force { err := d.get(key, &urldata) if err == nil { if time.Since(time.Unix(urldata.When, 0)) < downloadUrlLifetime { return urldata.URL, nil } } else { d.db.Delete(key...
[ -1.0518574714660645, -0.06827202439308167, 0.9104923009872437, -0.5383846759796143, -0.9076062440872192, 0.06703048944473267, -0.4307282567024231, 0.34780222177505493, -0.05725061893463135, 0.22174061834812164, -0.24479444324970245, -0.5895858407020569, -0.07259715348482132, 0.375078886747...
func (b *Builder) Build(name string, groupByTags bool) (*ct.ImageManifest, error) { image, err := b.Context.LookupImage(name) if err != nil { return nil, err } history, err := b.Context.History(name) if err != nil { return nil, err } ids := make([]string, 0, len(history)) layers := make([]*ct.ImageLayer, ...
[ -0.5529927611351013, -0.5945937037467957, 0.4965604245662689, 0.10489929467439651, -0.2581956386566162, -0.8803483843803406, 0.17988315224647522, -0.027390291914343834, 0.10889815539121628, 0.14991627633571625, -0.07522877305746078, 0.3099563419818878, 0.001670368481427431, 0.6050746440887...
func (b *Builder) CreateLayer(ids []string) (*ct.ImageLayer, error) { imageID := ids[len(ids)-1] locker, ok := b.Store.(LayerLocker) if !ok { return b.createLayer(ids) } var layer *ct.ImageLayer err := locker.DoLocked(imageID, func() (err error) { layer, err = b.createLayer(ids) return }) if err != nil {...
[ -1.3213279247283936, 0.015842575579881668, 0.44653716683387756, 0.8587910532951355, 0.24685946106910706, -0.014872978441417217, 0.3513643145561218, -1.1475096940994263, 0.7710098028182983, 0.040929291397333145, 0.08513817191123962, -0.8700331449508667, -0.9666648507118225, 0.70077753067016...
func NewEvictAction() Action { return &evictAction{} }
[ -0.5018685460090637, -1.0631698369979858, 0.3325364589691162, 0.25097987055778503, -0.548894464969635, -0.027685115113854408, 1.0872801542282104, -0.5292980074882507, 0.6498555541038513, 1.290391206741333, -0.8674439191818237, -0.1116357073187828, 0.6479562520980835, -0.3150016963481903, ...
func (e *evictAction) ActionType() ActionType { return Evict }
[ 0.3210734724998474, -0.3241513669490814, 0.3906386196613312, 0.5633954405784607, 1.5410188436508179, 0.20077627897262573, 0.4588533043861389, 0.7810527682304382, 1.3402453660964966, 1.0065345764160156, 0.49249523878097534, 0.5330484509468079, 0.1538892537355423, -0.20275311172008514, -0....
func (e *evictAction) DoAction(conflicting bool, data interface{}) (*ActionResult, error) { return nil, nil }
[ -0.5011584162712097, -0.44540074467658997, 0.5220100283622742, 0.3912585973739624, 1.3252583742141724, 0.24770645797252655, 0.6058517098426819, 0.6040555238723755, 1.2099288702011108, 1.131495714187622, -0.6753556728363037, -0.4972536265850067, -0.5013417601585388, 0.06668032705783844, -...
func float64Round(v float64) float64 { return math.Round(v*100) / 100 }
[ 0.29029035568237305, -0.2935658395290375, 0.21097123622894287, -0.7560633420944214, -0.07658121734857559, 0.03248120844364166, 0.4399781823158264, 0.0002990995708387345, 0.16288815438747406, 0.5500208139419556, 0.9444820284843445, 0.14065833389759064, 0.03856370598077774, 0.816226184368133...
func NewOnetimeToken() string { return random.String(32, random.Alphanumeric) }
[ -0.5446832776069641, -0.8812302350997925, 0.2013443112373352, -1.497200608253479, -1.2361867427825928, 0.3606051504611969, -0.6189392805099487, 0.024290496483445168, 0.9240870475769043, -0.4393327236175537, -0.7205734848976135, 0.13485480844974518, -0.1132645234465599, 0.6434381008148193, ...
func (b *Buffer) processActionKey(key int) bool { switch key { case sdl.K_CAPSLOCK: CAPS_LOCK = !CAPS_LOCK return true case sdl.K_RETURN: if SUPER_DOWN { // in sublime this goes // into the next block // nicely indented! } initial_x := b.curs.x prevLineLen := b.contents[b.curs.y].Len() var n...
[ 0.09662080556154251, -0.32757630944252014, 1.1461795568466187, -0.1002202183008194, -0.44858595728874207, -0.40380340814590454, 0.29350143671035767, -0.15747635066509247, 0.2740362584590912, 0.14242702722549438, 0.3734965920448303, -0.4704526960849762, -0.7308392524719238, 0.24049666523933...
func (b *Buffer) makeTab() string { blah := []rune{} for i := 0; i < int(b.cfg.Editor.Tab_Size); i++ { blah = append(blah, ' ') } return string(blah) }
[ -0.038483742624521255, 0.17552299797534943, 0.5079582333564758, -0.3262570798397064, 0.045446764677762985, 0.4681035578250885, 0.4154084622859955, -0.8159590363502502, -0.6829701066017151, -0.3184334635734558, -0.14377672970294952, -0.025133030489087105, -0.008647390641272068, -0.775077223...
func (val *ValueExpr) IsStatic() bool { return true }
[ -0.6472167372703552, -0.2141530066728592, 0.40843477845191956, 1.1753734350204468, -0.6469905376434326, 0.549994945526123, -0.26370686292648315, 0.20763741433620453, -0.4704250395298004, 0.11695599555969238, -0.7938687205314636, 0.9372316598892212, 0.28253257274627686, 0.21759986877441406,...
func (val *ValueExpr) Accept(v Visitor) (Node, bool) { if skipChildren, ok := v.Enter(val); skipChildren { return val, ok } return v.Leave(val) }
[ -1.0697388648986816, 0.49128565192222595, 0.6030148863792419, -0.3775937855243683, -1.1553657054901123, 0.7929933667182922, 1.2964491844177246, 0.4361403286457062, -0.2782382369041443, 1.0925434827804565, 0.20316897332668304, -0.1270899772644043, 0.023242825642228127, 0.031027046963572502,...
func (b *BetweenExpr) Accept(v Visitor) (Node, bool) { if skipChildren, ok := v.Enter(b); skipChildren { return b, ok } node, ok := b.Expr.Accept(v) if !ok { return b, false } b.Expr = node.(ExprNode) node, ok = b.Left.Accept(v) if !ok { return b, false } b.Left = node.(ExprNode) node, ok = b.Right....
[ -0.822354793548584, -0.4217984080314636, 1.065688967704773, -0.5859952569007874, -1.1548413038253784, 0.6081608533859253, 1.2808839082717896, 0.5892110466957092, -0.47821205854415894, 1.0756213665008545, -0.08765890449285507, -0.06461676210165024, -0.9792970418930054, 0.34810981154441833, ...
func (b *BetweenExpr) IsStatic() bool { return b.Expr.IsStatic() && b.Left.IsStatic() && b.Right.IsStatic() }
[ -0.6086852550506592, -0.3380011022090912, 0.6358077526092529, 1.208799958229065, -0.202677384018898, 0.15546642243862152, 0.062490709125995636, 0.15134672820568085, -0.9406219720840454, 0.5999540090560913, -0.5202033519744873, 0.43284037709236145, -0.3040446937084198, 0.028288403525948524,...
func (o *BinaryOperationExpr) Accept(v Visitor) (Node, bool) { if skipChildren, ok := v.Enter(o); skipChildren { return o, ok } node, ok := o.L.Accept(v) if !ok { return o, false } o.L = node.(ExprNode) node, ok = o.R.Accept(v) if !ok { return o, false } o.R = node.(ExprNode) return v.Leave(o) }
[ -0.7530384659767151, 0.3890741467475891, 0.9192091822624207, -0.42112448811531067, -1.2799012660980225, 0.39499253034591675, 1.7878236770629883, 0.45386114716529846, -0.1749611794948578, 0.9931281208992004, -0.2469579577445984, -0.4582787752151489, -0.09550456702709198, 0.19905760884284973...
func (o *BinaryOperationExpr) IsStatic() bool { return o.L.IsStatic() && o.R.IsStatic() }
[ -0.39727047085762024, 0.039163738489151, 0.6203827261924744, 1.323987364768982, -0.7039653062820435, -0.35824087262153625, 0.6356385350227356, 0.08703958243131638, -0.5470856428146362, 0.3465788662433624, -0.7651621103286743, 0.48070937395095825, 0.44652554392814636, -0.04585624858736992, ...
func (w *WhenClause) Accept(v Visitor) (Node, bool) { if skipChildren, ok := v.Enter(w); skipChildren { return w, ok } node, ok := w.Expr.Accept(v) if !ok { return w, false } w.Expr = node.(ExprNode) node, ok = w.Result.Accept(v) if !ok { return w, false } w.Result = node.(ExprNode) return v.Leave(w) ...
[ -0.869947075843811, 0.13698314130306244, 0.8116621971130371, -0.4205896258354187, -1.486376404762268, 0.03246745839715004, 1.1831520795822144, 0.2726246416568756, -0.3875176012516022, 1.0371015071868896, 0.0011294629657641053, -0.4511730968952179, -0.5357922315597534, 0.3699520528316498, ...
func (w *WhenClause) IsStatic() bool { return w.Expr.IsStatic() && w.Result.IsStatic() }
[ -0.33015018701553345, -0.27446895837783813, 0.40003928542137146, 1.1898609399795532, -0.9794828295707703, -0.569710373878479, -0.1699603646993637, 0.03124481998383999, -0.45523524284362793, 0.4960242807865143, -0.6276848912239075, 0.4188321530818939, 0.0379980243742466, 0.3070386052131653,...
func (f *CaseExpr) Accept(v Visitor) (Node, bool) { if skipChildren, ok := v.Enter(f); skipChildren { return f, ok } if f.Value != nil { node, ok := f.Value.Accept(v) if !ok { return f, false } f.Value = node.(ExprNode) } for i, val := range f.WhenClauses { node, ok := val.Accept(v) if !ok { re...
[ -0.7093333601951599, 0.2372017800807953, 0.8396121859550476, -0.1161816194653511, -1.1656283140182495, -0.03579035401344299, 1.0062596797943115, 0.4904947578907013, -0.5876352787017822, 0.8137011528015137, 0.4231364130973816, -0.7981336712837219, -0.16985119879245758, 0.7178999185562134, ...
func (f *CaseExpr) IsStatic() bool { if f.Value != nil && !f.Value.IsStatic() { return false } for _, w := range f.WhenClauses { if !w.IsStatic() { return false } } if f.ElseClause != nil && !f.ElseClause.IsStatic() { return false } return true }
[ -0.6059550046920776, -0.01293081697076559, 0.4169146716594696, 1.6434530019760132, -0.3856472074985504, -0.4302082359790802, 0.02971222996711731, -0.02165726199746132, -0.9283208250999451, 0.3825303316116333, -0.011218367144465446, -0.25008919835090637, 0.07178770005702972, 1.0556532144546...
func (sq *SubqueryExpr) Accept(v Visitor) (Node, bool) { if skipChildren, ok := v.Enter(sq); skipChildren { return sq, ok } node, ok := sq.Query.Accept(v) if !ok { return sq, false } sq.Query = node.(*SelectStmt) return v.Leave(sq) }
[ -0.8254621624946594, -0.010737573727965355, 0.5371140241622925, -0.5884029269218445, -1.4447652101516724, 0.9630686044692993, 1.0076093673706055, -0.05418778583407402, 0.05793739855289459, 1.0084688663482666, -0.005778372287750244, 0.2303277850151062, 0.14931374788284302, 0.044423602521419...
func (sq *SubqueryExpr) SetResultFields(rfs []*ResultField) { sq.Query.SetResultFields(rfs) }
[ -0.5202532410621643, 0.940571129322052, 0.21495656669139862, 0.2991211414337158, 0.24325022101402283, -0.4784393906593323, 0.4288773834705353, -0.8937492370605469, 0.4392642080783844, -0.4712385833263397, -1.7072428464889526, -0.09007628262042999, -0.45306044816970825, -0.2540333867073059,...
func (sq *SubqueryExpr) GetResultFields() []*ResultField { return sq.Query.GetResultFields() }
[ -0.04863950237631798, 1.0846996307373047, 0.4004608690738678, 0.6963130235671997, 0.5037893056869507, -0.2999597191810608, 0.10130885243415833, -0.9825564026832581, 0.6361129879951477, -0.46679845452308655, -1.935970664024353, 0.7682192325592041, -0.7944236993789673, -1.0032426118850708, ...
func (cs *CompareSubqueryExpr) Accept(v Visitor) (Node, bool) { if skipChildren, ok := v.Enter(cs); skipChildren { return cs, ok } node, ok := cs.L.Accept(v) if !ok { return cs, false } cs.L = node.(ExprNode) node, ok = cs.R.Accept(v) if !ok { return cs, false } cs.R = node.(*SubqueryExpr) return v.Lea...
[ -0.4146263301372528, 0.012963438406586647, 0.6868575215339661, -0.5063916444778442, -1.2979834079742432, 0.9781378507614136, 1.363336443901062, 0.3057004511356354, -0.2678944766521454, 0.607466459274292, -0.3186497092247009, -0.14007556438446045, 0.058565057814121246, 0.36305078864097595, ...
func (cn *ColumnName) Accept(v Visitor) (Node, bool) { if skipChildren, ok := v.Enter(cn); skipChildren { return cn, ok } return v.Leave(cn) }
[ -0.9839065670967102, 0.6283214688301086, 0.6608328819274902, -0.4648406505584717, -0.9775633215904236, 0.6447718739509583, 1.2167315483093262, -0.07284445315599442, -0.5792649388313293, 0.6611762642860413, -0.5122631192207336, -0.6259714365005493, -0.00009503731416771188, -0.28535470366477...
func (cr *ColumnNameExpr) Accept(v Visitor) (Node, bool) { if skipChildren, ok := v.Enter(cr); skipChildren { return cr, ok } node, ok := cr.Name.Accept(v) if !ok { return cr, false } cr.Name = node.(*ColumnName) return v.Leave(cr) }
[ -0.9829643368721008, 0.3310103714466095, 0.7453122138977051, -0.48642945289611816, -1.5051333904266357, 0.26089224219322205, 1.2124600410461426, 0.09731920063495636, -0.7883529663085938, 0.8409797549247742, -0.6548078656196594, -0.3662832975387573, -0.22849515080451965, 0.270395964384079, ...
func (d *DefaultExpr) Accept(v Visitor) (Node, bool) { if skipChildren, ok := v.Enter(d); skipChildren { return d, ok } if d.Name != nil { node, ok := d.Name.Accept(v) if !ok { return d, false } d.Name = node.(*ColumnName) } return v.Leave(d) }
[ -1.1372263431549072, 0.8848164081573486, 0.6775587797164917, -0.5945855379104614, -1.2531371116638184, 0.34402233362197876, 1.0808748006820679, 0.22977128624916077, -0.689095139503479, 0.8701573610305786, -0.13088427484035492, -0.4784495234489441, 0.11396704614162445, 0.4884316921234131, ...
func (i *IdentifierExpr) Accept(v Visitor) (Node, bool) { if skipChildren, ok := v.Enter(i); skipChildren { return i, ok } return v.Leave(i) }
[ -1.522666573524475, 0.44162970781326294, 0.532402515411377, -0.7343658208847046, -1.4636471271514893, 0.9645150303840637, 1.652730107307434, 0.6451836824417114, -0.06857779622077942, 1.1827538013458252, -0.43701210618019104, -0.5164172053337097, -0.4831016957759857, -0.7051197290420532, ...
func (es *ExistsSubqueryExpr) Accept(v Visitor) (Node, bool) { if skipChildren, ok := v.Enter(es); skipChildren { return es, ok } node, ok := es.Sel.Accept(v) if !ok { return es, false } es.Sel = node.(*SubqueryExpr) return v.Leave(es) }
[ -0.8975068926811218, 0.005393974483013153, 0.6183498501777649, -0.6135895252227783, -0.6634699106216431, 1.1950352191925049, 1.0729089975357056, 0.31758153438568115, 0.06374795734882355, 1.0447328090667725, -0.20233191549777985, 0.47610026597976685, 0.35570842027664185, -0.2832544445991516...
func (pi *PatternInExpr) Accept(v Visitor) (Node, bool) { if skipChildren, ok := v.Enter(pi); skipChildren { return pi, ok } node, ok := pi.Expr.Accept(v) if !ok { return pi, false } pi.Expr = node.(ExprNode) for i, val := range pi.List { node, ok = val.Accept(v) if !ok { return pi, false } pi.Lis...
[ -0.8367455005645752, 0.20232591032981873, 0.8514041900634766, -0.7212513089179993, -0.9937750697135925, 0.9665365815162659, 0.9515311121940613, 0.7192857265472412, -0.10375984758138657, 0.9599682688713074, -0.257238507270813, -0.17662133276462555, -0.32964423298835754, 0.04993924871087074,...
func (is *IsNullExpr) Accept(v Visitor) (Node, bool) { if skipChildren, ok := v.Enter(is); skipChildren { return is, ok } node, ok := is.Expr.Accept(v) if !ok { return is, false } is.Expr = node.(ExprNode) return v.Leave(is) }
[ -0.8635776042938232, 0.04635576903820038, 0.7063993811607361, -0.42830583453178406, -1.2286202907562256, 0.15054401755332947, 0.8097834587097168, 0.5558440685272217, 0.4859332740306854, 1.1376042366027832, -0.10448774695396423, 0.5247272253036499, -0.1504245102405548, 0.48397865891456604, ...
func (is *IsNullExpr) IsStatic() bool { return is.Expr.IsStatic() }
[ -0.5031712055206299, -0.14948709309101105, 0.371682733297348, 0.9248945116996765, -0.7255253195762634, -0.21924413740634918, -0.5000056624412537, 0.35540321469306946, 0.29241248965263367, 0.4130130708217621, -0.7855090498924255, 1.157220482826233, 0.40685150027275085, -0.23638547956943512,...
func (is *IsTruthExpr) Accept(v Visitor) (Node, bool) { if skipChildren, ok := v.Enter(is); skipChildren { return is, ok } node, ok := is.Expr.Accept(v) if !ok { return is, false } is.Expr = node.(ExprNode) return v.Leave(is) }
[ -1.1925151348114014, 0.28053680062294006, 0.7548231482505798, -0.6282737255096436, -1.1476671695709229, 0.2601126730442047, 1.001745343208313, 0.8752013444900513, 0.025487717241048813, 1.5067126750946045, -0.05296798050403595, -0.07711651176214218, -0.25632351636886597, -0.1314019858837127...
func (is *IsTruthExpr) IsStatic() bool { return is.Expr.IsStatic() }
[ -0.7929113507270813, -0.1667650192975998, 0.3800725042819977, 0.7627079486846924, -0.7596393823623657, -0.09675997495651245, -0.18417713046073914, 0.637249231338501, -0.29477524757385254, 0.7609672546386719, -0.7526347637176514, 0.6778506636619568, 0.2918611168861389, -0.5788872241973877, ...
func (pl *PatternLikeExpr) Accept(v Visitor) (Node, bool) { if skipChildren, ok := v.Enter(pl); skipChildren { return pl, ok } node, ok := pl.Expr.Accept(v) if !ok { return pl, false } pl.Expr = node.(ExprNode) node, ok = pl.Pattern.Accept(v) if !ok { return pl, false } pl.Pattern = node.(ExprNode) ret...
[ -0.8863023519515991, 0.3952057957649231, 0.9078925848007202, -1.0796376466751099, -1.2808767557144165, 1.1201764345169067, 1.462091088294983, 0.6379693746566772, 0.032184846699237823, 0.9047747254371643, -0.14994390308856964, 0.0372229665517807, -0.3346114158630371, 0.08884470164775848, ...
func (pl *PatternLikeExpr) IsStatic() bool { return pl.Expr.IsStatic() && pl.Pattern.IsStatic() }
[ -0.2576011121273041, -0.09046868234872818, 0.4977356195449829, 0.4313233494758606, -0.49335765838623047, 0.47398728132247925, 0.4098128080368042, 0.06804810464382172, -0.19256213307380676, 0.6036235094070435, -0.7844744920730591, 1.357186198234558, 0.2159152328968048, -0.18728360533714294,...
func (pm *ParamMarkerExpr) Accept(v Visitor) (Node, bool) { if skipChildren, ok := v.Enter(pm); skipChildren { return pm, ok } return v.Leave(pm) }
[ -1.323667287826538, 0.2438923716545105, 0.5733186602592468, -0.37366047501564026, -1.0425535440444946, 0.6589057445526123, 1.0278371572494507, 0.608217716217041, -0.5103680491447449, 1.0091488361358643, 0.5227417349815369, -0.09220050275325775, -0.67568439245224, 0.7251524329185486, -0.6...
func (p *ParenthesesExpr) Accept(v Visitor) (Node, bool) { if skipChildren, ok := v.Enter(p); skipChildren { return p, ok } if p.Expr != nil { node, ok := p.Expr.Accept(v) if !ok { return p, false } p.Expr = node.(ExprNode) } return v.Leave(p) }
[ -1.004801630973816, 0.04199248552322388, 0.8903019428253174, -0.7502484917640686, -1.379172682762146, 0.6166021823883057, 0.8220940828323364, 0.8288438320159912, -0.3123604655265808, 1.3448965549468994, 0.16667719185352325, -0.11922360956668854, -0.7345747351646423, 0.24332593381404877, ...