_id stringlengths 2 7 | title stringclasses 1
value | partition stringclasses 3
values | text stringlengths 6 2.61k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
c20400 | train | // DiffInMinutes returns the difference in minutes | {
"resource": ""
} | ||
c20401 | train | // DiffInSeconds returns the difference in seconds | {
"resource": ""
} | ||
c20402 | train | // SecondsSinceMidnight returns the number of seconds since midnight. | {
"resource": ""
} | ||
c20403 | train | // absValue returns the abs value if needed | {
"resource": ""
} | ||
c20404 | train | // Next changes the time to the next occurrence of a given day of the week | {
"resource": ""
} | ||
c20405 | train | // NextWeekendDay goes forward to the next weekend day | {
"resource": ""
} | ||
c20406 | train | // PreviousWeekendDay goes back to the previous weekend day | {
"resource": ""
} | ||
c20407 | train | // Previous changes the time to the previous occurrence of a given day of the week | {
"resource": ""
} | ||
c20408 | train | // FirstOfMonth returns the first occurrence of a given day of the week in the current month | {
"resource": ""
} | ||
c20409 | train | // LastOfMonth returns the last occurrence of a given day of the week in the current month | {
"resource": ""
} | ||
c20410 | train | // LastDayOfMonth returns a new carbon instance with the last day of current month | {
"resource": ""
} | ||
c20411 | train | // FirstDayOfMonth returns a new carbon instance with the first day of current month | {
"resource": ""
} | ||
c20412 | train | // NthOfMonth returns the given occurrence of a given day of the week in the current month
// If the calculated occurrence is outside the scope of current month, no modifications are made | {
"resource": ""
} | ||
c20413 | train | // FirstOfQuarter returns the first occurrence of a given day of the week in the current quarter | {
"resource": ""
} | ||
c20414 | train | // LastOfQuarter returns the last occurrence of a given day of the week in the current quarter | {
"resource": ""
} | ||
c20415 | train | // NthOfQuarter returns the given occurrence of a given day of the week in the current quarter
// If the calculated occurrence is outside the scope of current quarter, no modifications are made | {
"resource": ""
} | ||
c20416 | train | // FirstOfYear returns the first occurrence of a given day of the week in the current year | {
"resource": ""
} | ||
c20417 | train | // LastOfYear returns the last occurrence of a given day of the week in the current year | {
"resource": ""
} | ||
c20418 | train | // NthOfYear returns the given occurrence of a given day of the week in the current year
// If the calculated occurrence is outside the scope of current year, no modifications are made | {
"resource": ""
} | ||
c20419 | train | // Average returns the average between a given carbon date and the current date | {
"resource": ""
} | ||
c20420 | train | // Localization
// GetTranslator returns Translator inside a Carbon instance if exist,
// otherwise it creates a new Translator with "en" as default locale | {
"resource": ""
} | ||
c20421 | train | // SetLocale sets locale for the Translator of Carbon | {
"resource": ""
} | ||
c20422 | train | // NewCarbonInterval returns a pointer to a new CarbonInterval instance | {
"resource": ""
} | ||
c20423 | train | // DiffInHours return the difference in hours between start and end date | {
"resource": ""
} | ||
c20424 | train | // SetLocale will set locale on a Translator | {
"resource": ""
} | ||
c20425 | train | // AssertValidLocale checks if the locale is valid or not | {
"resource": ""
} | ||
c20426 | train | // loadResource loads the translations according to the locale | {
"resource": ""
} | ||
c20427 | train | // chooseUnit will choose unit of translations according to the count | {
"resource": ""
} | ||
c20428 | train | // chooseTrans will choose the word to make a diffForHumans statement | {
"resource": ""
} | ||
c20429 | train | // LoadLocaleText will load the translations from the locale json files according to the locale | {
"resource": ""
} | ||
c20430 | train | // New makes a new testing helper using the specified
// T through which failures will be reported.
// In strict mode, failures call T.FailNow causing the test
// to be aborted. See NewRelaxed for alternative behavior. | {
"resource": ""
} | ||
c20431 | train | // NewRelaxed makes a new testing helper using the specified
// T through which failures will be reported.
// In relaxed mode, failures call T.Fail allowing
// multiple failures per test. | {
"resource": ""
} | ||
c20432 | train | // loadComment gets the Go comment from the specified line
// in the specified file. | {
"resource": ""
} | ||
c20433 | train | // loadArguments gets the arguments from the function call
// on the specified line of the file. | {
"resource": ""
} | ||
c20434 | train | // decorate prefixes the string with the file and line of the call site
// and inserts the final newline if needed and indentation tabs for formatting.
// this function was copied from the testing framework and modified. | {
"resource": ""
} | ||
c20435 | train | // LexEndOfSubStatement Look for end of statement defined by either
// a semicolon or end of file. | {
"resource": ""
} | ||
c20436 | train | // LexLimit clause
//
// LIMIT 1000 OFFSET 100
// LIMIT 0, 1000
// LIMIT 1000 | {
"resource": ""
} | ||
c20437 | train | // LexDdlTable data definition language table | {
"resource": ""
} | ||
c20438 | train | // Setup this source with schema from parent. | {
"resource": ""
} | ||
c20439 | train | // Open a connection, since sqlite is not threadsafe, this is locked. | {
"resource": ""
} | ||
c20440 | train | // Table gets table schema for given table | {
"resource": ""
} | ||
c20441 | train | // Close this source, closing the underlying sqlite db file | {
"resource": ""
} | ||
c20442 | train | // errRecover is the handler that turns panics into returns from the top | {
"resource": ""
} | ||
c20443 | train | // creates a new Value with a nil group and given value. | {
"resource": ""
} | ||
c20444 | train | // ResolveIncludes take an expression and resolve any includes so that
// it does not have to be resolved at runtime. There is also a
// InlineIncludes alternative in expr pkg which actually re-writes the expression
// to remove includes and embed the expressions they refer to as part of this expression. | {
"resource": ""
} | ||
c20445 | train | // walkTernary ternary evaluator
//
// A BETWEEN B AND C
// | {
"resource": ""
} | ||
c20446 | train | // walkFunc evaluates a function | {
"resource": ""
} | ||
c20447 | train | // LikeCompare takes two strings and evaluates them for like equality | {
"resource": ""
} | ||
c20448 | train | // UnmarshalJSON bytes into this typed struct | {
"resource": ""
} | ||
c20449 | train | // Value convert string to json values | {
"resource": ""
} | ||
c20450 | train | // InlineIncludes take an expression and resolve any includes so that
// the included expression is "Inline" | {
"resource": ""
} | ||
c20451 | train | // WalkStmt Walk given statement for given Planner to produce a query plan
// which is a plan.Task and children, ie a DAG of tasks | {
"resource": ""
} | ||
c20452 | train | // SelectPlanFromPbBytes Create a sql plan from pb. | {
"resource": ""
} | ||
c20453 | train | // SelectTaskFromTaskPb create plan task for SqlSelect from pb. | {
"resource": ""
} | ||
c20454 | train | // NewCreate creates a new Create Task plan. | {
"resource": ""
} | ||
c20455 | train | // NewDrop create Drop plan task. | {
"resource": ""
} | ||
c20456 | train | // NewAlter create Alter plan task. | {
"resource": ""
} | ||
c20457 | train | // NewSource create a new plan Task for data source | {
"resource": ""
} | ||
c20458 | train | // Equal checks if two tasks are equal. | {
"resource": ""
} | ||
c20459 | train | // ToPb to protobuf. | {
"resource": ""
} | ||
c20460 | train | // ProjectionFromPB create Projection from Protobuf. | {
"resource": ""
} | ||
c20461 | train | // NewJoinKey creates JoinKey from Source. | {
"resource": ""
} | ||
c20462 | train | // NewWhere new Where Task from SqlSelect statement. | {
"resource": ""
} | ||
c20463 | train | // NewWhereFinal from SqlSelect statement. | {
"resource": ""
} | ||
c20464 | train | // NewHaving from SqlSelect statement. | {
"resource": ""
} | ||
c20465 | train | // NewGroupBy from SqlSelect statement. | {
"resource": ""
} | ||
c20466 | train | // NewOrder from SqlSelect statement. | {
"resource": ""
} | ||
c20467 | train | // Equal compares equality of two tasks. | {
"resource": ""
} | ||
c20468 | train | // WalkSourceSelect An interface implemented by this connection allowing the planner
// to push down as much logic into mongo as possible | {
"resource": ""
} | ||
c20469 | train | // RewriteSelect We are removing Column Aliases "user_id as uid"
// as well as functions - used when we are going to defer projection, aggs | {
"resource": ""
} | ||
c20470 | train | // RewriteSqlSource this Source to act as a stand-alone query to backend
// @parentStmt = the parent statement that this a partial source to | {
"resource": ""
} | ||
c20471 | train | // Remove any aliases | {
"resource": ""
} | ||
c20472 | train | // FilterFromArgs given set of values | {
"resource": ""
} | ||
c20473 | train | // scalar returns a JSONable representation of a scalar node type for use in ES
// filters.
//
// Does not support Null.
// | {
"resource": ""
} | ||
c20474 | train | // defaultTypeWriter Convert a qlbridge value type to qlbridge value type | {
"resource": ""
} | ||
c20475 | train | // Drop we have a schema change to apply. | {
"resource": ""
} | ||
c20476 | train | // NewCsvSource reader assumes we are getting first row as headers
// - optionally may be gzipped | {
"resource": ""
} | ||
c20477 | train | // NewMemDbData creates a MemDb with given indexes, columns, and values | {
"resource": ""
} | ||
c20478 | train | // NewMemDb creates a MemDb with given indexes, columns | {
"resource": ""
} | ||
c20479 | train | // NewMemDbForSchema creates a MemDb with given indexes, columns | {
"resource": ""
} | ||
c20480 | train | // Delete using a Where Expression | {
"resource": ""
} | ||
c20481 | train | // ValueFromString Given a string, convert to valuetype | {
"resource": ""
} | ||
c20482 | train | // FindAllIdentities gets all identity | {
"resource": ""
} | ||
c20483 | train | // Strings get all identity strings | {
"resource": ""
} | ||
c20484 | train | // LeftStrings get all Left Identity fields. | {
"resource": ""
} | ||
c20485 | train | // ValueTypeFromNode Infer Value type from Node | {
"resource": ""
} | ||
c20486 | train | // NewFuncNode create new Function Expression Node. | {
"resource": ""
} | ||
c20487 | train | // Expr convert the FuncNode to Expr | {
"resource": ""
} | ||
c20488 | train | // NewNumberStr is a little weird in that this Node accepts string @text
// and uses go to parse into Int, AND Float. | {
"resource": ""
} | ||
c20489 | train | // NewBooleanNode Create a boolean node
// @operator = AND, OR
// @args = nodes | {
"resource": ""
} | ||
c20490 | train | // Create a Tri node
//
// @arg1 [NOT] BETWEEN @arg2 AND @arg3
// | {
"resource": ""
} | ||
c20491 | train | // NodeFromPb Create a node from pb | {
"resource": ""
} | ||
c20492 | train | // NodeFromNodePb Create a node from pb | {
"resource": ""
} | ||
c20493 | train | // NewLexer Creates a new lexer for the input string | {
"resource": ""
} | ||
c20494 | train | // ErrMsg an error message helper which provides context of where in input string
// the error is occuring, line, column, current token info. | {
"resource": ""
} | ||
c20495 | train | // NextToken returns the next token from the input. | {
"resource": ""
} | ||
c20496 | train | // Push a named StateFn onto stack. | {
"resource": ""
} | ||
c20497 | train | // Peek returns but does not consume the next rune in the input. | {
"resource": ""
} | ||
c20498 | train | // PeekX grab the next x characters without consuming | {
"resource": ""
} | ||
c20499 | train | // get single character PAST | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.