_id stringlengths 2 7 | title stringlengths 1 118 | partition stringclasses 3
values | text stringlengths 52 85.5k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q167200 | SetEngineDescription | train | func (s *RelationalDatabaseBlueprint) SetEngineDescription(v string) *RelationalDatabaseBlueprint {
s.EngineDescription = &v
return s
} | go | {
"resource": ""
} |
q167201 | SetEngineVersionDescription | train | func (s *RelationalDatabaseBlueprint) SetEngineVersionDescription(v string) *RelationalDatabaseBlueprint {
s.EngineVersionDescription = &v
return s
} | go | {
"resource": ""
} |
q167202 | SetIsEngineDefault | train | func (s *RelationalDatabaseBlueprint) SetIsEngineDefault(v bool) *RelationalDatabaseBlueprint {
s.IsEngineDefault = &v
return s
} | go | {
"resource": ""
} |
q167203 | SetFromRelationalDatabaseArn | train | func (s *RelationalDatabaseSnapshot) SetFromRelationalDatabaseArn(v string) *RelationalDatabaseSnapshot {
s.FromRelationalDatabaseArn = &v
return s
} | go | {
"resource": ""
} |
q167204 | SetFromRelationalDatabaseBlueprintId | train | func (s *RelationalDatabaseSnapshot) SetFromRelationalDatabaseBlueprintId(v string) *RelationalDatabaseSnapshot {
s.FromRelationalDatabaseBlueprintId = &v
return s
} | go | {
"resource": ""
} |
q167205 | SetFromRelationalDatabaseBundleId | train | func (s *RelationalDatabaseSnapshot) SetFromRelationalDatabaseBundleId(v string) *RelationalDatabaseSnapshot {
s.FromRelationalDatabaseBundleId = &v
return s
} | go | {
"resource": ""
} |
q167206 | SetFromRelationalDatabaseName | train | func (s *RelationalDatabaseSnapshot) SetFromRelationalDatabaseName(v string) *RelationalDatabaseSnapshot {
s.FromRelationalDatabaseName = &v
return s
} | go | {
"resource": ""
} |
q167207 | SetDisableBackupRetention | train | func (s *UpdateRelationalDatabaseInput) SetDisableBackupRetention(v bool) *UpdateRelationalDatabaseInput {
s.DisableBackupRetention = &v
return s
} | go | {
"resource": ""
} |
q167208 | SetEnableBackupRetention | train | func (s *UpdateRelationalDatabaseInput) SetEnableBackupRetention(v bool) *UpdateRelationalDatabaseInput {
s.EnableBackupRetention = &v
return s
} | go | {
"resource": ""
} |
q167209 | SetRotateMasterUserPassword | train | func (s *UpdateRelationalDatabaseInput) SetRotateMasterUserPassword(v bool) *UpdateRelationalDatabaseInput {
s.RotateMasterUserPassword = &v
return s
} | go | {
"resource": ""
} |
q167210 | SetExtendedKeyUsages | train | func (s *CertificateDetail) SetExtendedKeyUsages(v []*ExtendedKeyUsage) *CertificateDetail {
s.ExtendedKeyUsages = v
return s
} | go | {
"resource": ""
} |
q167211 | SetImportedAt | train | func (s *CertificateDetail) SetImportedAt(v time.Time) *CertificateDetail {
s.ImportedAt = &v
return s
} | go | {
"resource": ""
} |
q167212 | SetInUseBy | train | func (s *CertificateDetail) SetInUseBy(v []*string) *CertificateDetail {
s.InUseBy = v
return s
} | go | {
"resource": ""
} |
q167213 | SetKeyUsages | train | func (s *CertificateDetail) SetKeyUsages(v []*KeyUsage) *CertificateDetail {
s.KeyUsages = v
return s
} | go | {
"resource": ""
} |
q167214 | SetRenewalEligibility | train | func (s *CertificateDetail) SetRenewalEligibility(v string) *CertificateDetail {
s.RenewalEligibility = &v
return s
} | go | {
"resource": ""
} |
q167215 | SetCertificateTransparencyLoggingPreference | train | func (s *CertificateOptions) SetCertificateTransparencyLoggingPreference(v string) *CertificateOptions {
s.CertificateTransparencyLoggingPreference = &v
return s
} | go | {
"resource": ""
} |
q167216 | SetResourceRecord | train | func (s *DomainValidation) SetResourceRecord(v *ResourceRecord) *DomainValidation {
s.ResourceRecord = v
return s
} | go | {
"resource": ""
} |
q167217 | SetValidationEmails | train | func (s *DomainValidation) SetValidationEmails(v []*string) *DomainValidation {
s.ValidationEmails = v
return s
} | go | {
"resource": ""
} |
q167218 | SetPassphrase | train | func (s *ExportCertificateInput) SetPassphrase(v []byte) *ExportCertificateInput {
s.Passphrase = v
return s
} | go | {
"resource": ""
} |
q167219 | SetOID | train | func (s *ExtendedKeyUsage) SetOID(v string) *ExtendedKeyUsage {
s.OID = &v
return s
} | go | {
"resource": ""
} |
q167220 | SetExtendedKeyUsage | train | func (s *Filters) SetExtendedKeyUsage(v []*string) *Filters {
s.ExtendedKeyUsage = v
return s
} | go | {
"resource": ""
} |
q167221 | SetKeyTypes | train | func (s *Filters) SetKeyTypes(v []*string) *Filters {
s.KeyTypes = v
return s
} | go | {
"resource": ""
} |
q167222 | SetCertificateStatuses | train | func (s *ListCertificatesInput) SetCertificateStatuses(v []*string) *ListCertificatesInput {
s.CertificateStatuses = v
return s
} | go | {
"resource": ""
} |
q167223 | SetIncludes | train | func (s *ListCertificatesInput) SetIncludes(v *Filters) *ListCertificatesInput {
s.Includes = v
return s
} | go | {
"resource": ""
} |
q167224 | SetCertificateSummaryList | train | func (s *ListCertificatesOutput) SetCertificateSummaryList(v []*CertificateSummary) *ListCertificatesOutput {
s.CertificateSummaryList = v
return s
} | go | {
"resource": ""
} |
q167225 | SetRenewalStatusReason | train | func (s *RenewalSummary) SetRenewalStatusReason(v string) *RenewalSummary {
s.RenewalStatusReason = &v
return s
} | go | {
"resource": ""
} |
q167226 | SetCloudWatchLoggingOption | train | func (s *AddApplicationCloudWatchLoggingOptionInput) SetCloudWatchLoggingOption(v *CloudWatchLoggingOption) *AddApplicationCloudWatchLoggingOptionInput {
s.CloudWatchLoggingOption = v
return s
} | go | {
"resource": ""
} |
q167227 | SetReferenceDataSource | train | func (s *AddApplicationReferenceDataSourceInput) SetReferenceDataSource(v *ReferenceDataSource) *AddApplicationReferenceDataSourceInput {
s.ReferenceDataSource = v
return s
} | go | {
"resource": ""
} |
q167228 | SetApplicationCodeUpdate | train | func (s *ApplicationUpdate) SetApplicationCodeUpdate(v string) *ApplicationUpdate {
s.ApplicationCodeUpdate = &v
return s
} | go | {
"resource": ""
} |
q167229 | SetRecordColumnDelimiter | train | func (s *CSVMappingParameters) SetRecordColumnDelimiter(v string) *CSVMappingParameters {
s.RecordColumnDelimiter = &v
return s
} | go | {
"resource": ""
} |
q167230 | SetRecordRowDelimiter | train | func (s *CSVMappingParameters) SetRecordRowDelimiter(v string) *CSVMappingParameters {
s.RecordRowDelimiter = &v
return s
} | go | {
"resource": ""
} |
q167231 | SetLogStreamARNUpdate | train | func (s *CloudWatchLoggingOptionUpdate) SetLogStreamARNUpdate(v string) *CloudWatchLoggingOptionUpdate {
s.LogStreamARNUpdate = &v
return s
} | go | {
"resource": ""
} |
q167232 | SetApplicationSummary | train | func (s *CreateApplicationOutput) SetApplicationSummary(v *ApplicationSummary) *CreateApplicationOutput {
s.ApplicationSummary = v
return s
} | go | {
"resource": ""
} |
q167233 | SetParsedInputRecords | train | func (s *DiscoverInputSchemaOutput) SetParsedInputRecords(v [][]*string) *DiscoverInputSchemaOutput {
s.ParsedInputRecords = v
return s
} | go | {
"resource": ""
} |
q167234 | SetProcessedInputRecords | train | func (s *DiscoverInputSchemaOutput) SetProcessedInputRecords(v []*string) *DiscoverInputSchemaOutput {
s.ProcessedInputRecords = v
return s
} | go | {
"resource": ""
} |
q167235 | SetRawInputRecords | train | func (s *DiscoverInputSchemaOutput) SetRawInputRecords(v []*string) *DiscoverInputSchemaOutput {
s.RawInputRecords = v
return s
} | go | {
"resource": ""
} |
q167236 | SetKinesisFirehoseInput | train | func (s *Input) SetKinesisFirehoseInput(v *KinesisFirehoseInput) *Input {
s.KinesisFirehoseInput = v
return s
} | go | {
"resource": ""
} |
q167237 | SetKinesisStreamsInput | train | func (s *Input) SetKinesisStreamsInput(v *KinesisStreamsInput) *Input {
s.KinesisStreamsInput = v
return s
} | go | {
"resource": ""
} |
q167238 | SetInAppStreamNames | train | func (s *InputDescription) SetInAppStreamNames(v []*string) *InputDescription {
s.InAppStreamNames = v
return s
} | go | {
"resource": ""
} |
q167239 | SetKinesisFirehoseInputDescription | train | func (s *InputDescription) SetKinesisFirehoseInputDescription(v *KinesisFirehoseInputDescription) *InputDescription {
s.KinesisFirehoseInputDescription = v
return s
} | go | {
"resource": ""
} |
q167240 | SetKinesisStreamsInputDescription | train | func (s *InputDescription) SetKinesisStreamsInputDescription(v *KinesisStreamsInputDescription) *InputDescription {
s.KinesisStreamsInputDescription = v
return s
} | go | {
"resource": ""
} |
q167241 | SetCountUpdate | train | func (s *InputParallelismUpdate) SetCountUpdate(v int64) *InputParallelismUpdate {
s.CountUpdate = &v
return s
} | go | {
"resource": ""
} |
q167242 | SetInputLambdaProcessor | train | func (s *InputProcessingConfiguration) SetInputLambdaProcessor(v *InputLambdaProcessor) *InputProcessingConfiguration {
s.InputLambdaProcessor = v
return s
} | go | {
"resource": ""
} |
q167243 | SetInputLambdaProcessorDescription | train | func (s *InputProcessingConfigurationDescription) SetInputLambdaProcessorDescription(v *InputLambdaProcessorDescription) *InputProcessingConfigurationDescription {
s.InputLambdaProcessorDescription = v
return s
} | go | {
"resource": ""
} |
q167244 | SetInputLambdaProcessorUpdate | train | func (s *InputProcessingConfigurationUpdate) SetInputLambdaProcessorUpdate(v *InputLambdaProcessorUpdate) *InputProcessingConfigurationUpdate {
s.InputLambdaProcessorUpdate = v
return s
} | go | {
"resource": ""
} |
q167245 | SetRecordColumnUpdates | train | func (s *InputSchemaUpdate) SetRecordColumnUpdates(v []*RecordColumn) *InputSchemaUpdate {
s.RecordColumnUpdates = v
return s
} | go | {
"resource": ""
} |
q167246 | SetRecordEncodingUpdate | train | func (s *InputSchemaUpdate) SetRecordEncodingUpdate(v string) *InputSchemaUpdate {
s.RecordEncodingUpdate = &v
return s
} | go | {
"resource": ""
} |
q167247 | SetRecordFormatUpdate | train | func (s *InputSchemaUpdate) SetRecordFormatUpdate(v *RecordFormat) *InputSchemaUpdate {
s.RecordFormatUpdate = v
return s
} | go | {
"resource": ""
} |
q167248 | SetInputStartingPosition | train | func (s *InputStartingPositionConfiguration) SetInputStartingPosition(v string) *InputStartingPositionConfiguration {
s.InputStartingPosition = &v
return s
} | go | {
"resource": ""
} |
q167249 | SetInputParallelismUpdate | train | func (s *InputUpdate) SetInputParallelismUpdate(v *InputParallelismUpdate) *InputUpdate {
s.InputParallelismUpdate = v
return s
} | go | {
"resource": ""
} |
q167250 | SetInputProcessingConfigurationUpdate | train | func (s *InputUpdate) SetInputProcessingConfigurationUpdate(v *InputProcessingConfigurationUpdate) *InputUpdate {
s.InputProcessingConfigurationUpdate = v
return s
} | go | {
"resource": ""
} |
q167251 | SetInputSchemaUpdate | train | func (s *InputUpdate) SetInputSchemaUpdate(v *InputSchemaUpdate) *InputUpdate {
s.InputSchemaUpdate = v
return s
} | go | {
"resource": ""
} |
q167252 | SetKinesisFirehoseInputUpdate | train | func (s *InputUpdate) SetKinesisFirehoseInputUpdate(v *KinesisFirehoseInputUpdate) *InputUpdate {
s.KinesisFirehoseInputUpdate = v
return s
} | go | {
"resource": ""
} |
q167253 | SetKinesisStreamsInputUpdate | train | func (s *InputUpdate) SetKinesisStreamsInputUpdate(v *KinesisStreamsInputUpdate) *InputUpdate {
s.KinesisStreamsInputUpdate = v
return s
} | go | {
"resource": ""
} |
q167254 | SetNamePrefixUpdate | train | func (s *InputUpdate) SetNamePrefixUpdate(v string) *InputUpdate {
s.NamePrefixUpdate = &v
return s
} | go | {
"resource": ""
} |
q167255 | SetRecordRowPath | train | func (s *JSONMappingParameters) SetRecordRowPath(v string) *JSONMappingParameters {
s.RecordRowPath = &v
return s
} | go | {
"resource": ""
} |
q167256 | SetExclusiveStartApplicationName | train | func (s *ListApplicationsInput) SetExclusiveStartApplicationName(v string) *ListApplicationsInput {
s.ExclusiveStartApplicationName = &v
return s
} | go | {
"resource": ""
} |
q167257 | SetApplicationSummaries | train | func (s *ListApplicationsOutput) SetApplicationSummaries(v []*ApplicationSummary) *ListApplicationsOutput {
s.ApplicationSummaries = v
return s
} | go | {
"resource": ""
} |
q167258 | SetHasMoreApplications | train | func (s *ListApplicationsOutput) SetHasMoreApplications(v bool) *ListApplicationsOutput {
s.HasMoreApplications = &v
return s
} | go | {
"resource": ""
} |
q167259 | SetCSVMappingParameters | train | func (s *MappingParameters) SetCSVMappingParameters(v *CSVMappingParameters) *MappingParameters {
s.CSVMappingParameters = v
return s
} | go | {
"resource": ""
} |
q167260 | SetJSONMappingParameters | train | func (s *MappingParameters) SetJSONMappingParameters(v *JSONMappingParameters) *MappingParameters {
s.JSONMappingParameters = v
return s
} | go | {
"resource": ""
} |
q167261 | SetKinesisFirehoseOutput | train | func (s *Output) SetKinesisFirehoseOutput(v *KinesisFirehoseOutput) *Output {
s.KinesisFirehoseOutput = v
return s
} | go | {
"resource": ""
} |
q167262 | SetKinesisStreamsOutput | train | func (s *Output) SetKinesisStreamsOutput(v *KinesisStreamsOutput) *Output {
s.KinesisStreamsOutput = v
return s
} | go | {
"resource": ""
} |
q167263 | SetLambdaOutput | train | func (s *Output) SetLambdaOutput(v *LambdaOutput) *Output {
s.LambdaOutput = v
return s
} | go | {
"resource": ""
} |
q167264 | SetKinesisFirehoseOutputDescription | train | func (s *OutputDescription) SetKinesisFirehoseOutputDescription(v *KinesisFirehoseOutputDescription) *OutputDescription {
s.KinesisFirehoseOutputDescription = v
return s
} | go | {
"resource": ""
} |
q167265 | SetKinesisStreamsOutputDescription | train | func (s *OutputDescription) SetKinesisStreamsOutputDescription(v *KinesisStreamsOutputDescription) *OutputDescription {
s.KinesisStreamsOutputDescription = v
return s
} | go | {
"resource": ""
} |
q167266 | SetLambdaOutputDescription | train | func (s *OutputDescription) SetLambdaOutputDescription(v *LambdaOutputDescription) *OutputDescription {
s.LambdaOutputDescription = v
return s
} | go | {
"resource": ""
} |
q167267 | SetDestinationSchemaUpdate | train | func (s *OutputUpdate) SetDestinationSchemaUpdate(v *DestinationSchema) *OutputUpdate {
s.DestinationSchemaUpdate = v
return s
} | go | {
"resource": ""
} |
q167268 | SetKinesisFirehoseOutputUpdate | train | func (s *OutputUpdate) SetKinesisFirehoseOutputUpdate(v *KinesisFirehoseOutputUpdate) *OutputUpdate {
s.KinesisFirehoseOutputUpdate = v
return s
} | go | {
"resource": ""
} |
q167269 | SetKinesisStreamsOutputUpdate | train | func (s *OutputUpdate) SetKinesisStreamsOutputUpdate(v *KinesisStreamsOutputUpdate) *OutputUpdate {
s.KinesisStreamsOutputUpdate = v
return s
} | go | {
"resource": ""
} |
q167270 | SetLambdaOutputUpdate | train | func (s *OutputUpdate) SetLambdaOutputUpdate(v *LambdaOutputUpdate) *OutputUpdate {
s.LambdaOutputUpdate = v
return s
} | go | {
"resource": ""
} |
q167271 | SetNameUpdate | train | func (s *OutputUpdate) SetNameUpdate(v string) *OutputUpdate {
s.NameUpdate = &v
return s
} | go | {
"resource": ""
} |
q167272 | SetSqlType | train | func (s *RecordColumn) SetSqlType(v string) *RecordColumn {
s.SqlType = &v
return s
} | go | {
"resource": ""
} |
q167273 | SetMappingParameters | train | func (s *RecordFormat) SetMappingParameters(v *MappingParameters) *RecordFormat {
s.MappingParameters = v
return s
} | go | {
"resource": ""
} |
q167274 | SetS3ReferenceDataSource | train | func (s *ReferenceDataSource) SetS3ReferenceDataSource(v *S3ReferenceDataSource) *ReferenceDataSource {
s.S3ReferenceDataSource = v
return s
} | go | {
"resource": ""
} |
q167275 | SetS3ReferenceDataSourceDescription | train | func (s *ReferenceDataSourceDescription) SetS3ReferenceDataSourceDescription(v *S3ReferenceDataSourceDescription) *ReferenceDataSourceDescription {
s.S3ReferenceDataSourceDescription = v
return s
} | go | {
"resource": ""
} |
q167276 | SetReferenceSchemaUpdate | train | func (s *ReferenceDataSourceUpdate) SetReferenceSchemaUpdate(v *SourceSchema) *ReferenceDataSourceUpdate {
s.ReferenceSchemaUpdate = v
return s
} | go | {
"resource": ""
} |
q167277 | SetS3ReferenceDataSourceUpdate | train | func (s *ReferenceDataSourceUpdate) SetS3ReferenceDataSourceUpdate(v *S3ReferenceDataSourceUpdate) *ReferenceDataSourceUpdate {
s.S3ReferenceDataSourceUpdate = v
return s
} | go | {
"resource": ""
} |
q167278 | SetTableNameUpdate | train | func (s *ReferenceDataSourceUpdate) SetTableNameUpdate(v string) *ReferenceDataSourceUpdate {
s.TableNameUpdate = &v
return s
} | go | {
"resource": ""
} |
q167279 | SetReferenceRoleARNUpdate | train | func (s *S3ReferenceDataSourceUpdate) SetReferenceRoleARNUpdate(v string) *S3ReferenceDataSourceUpdate {
s.ReferenceRoleARNUpdate = &v
return s
} | go | {
"resource": ""
} |
q167280 | SetRecordColumns | train | func (s *SourceSchema) SetRecordColumns(v []*RecordColumn) *SourceSchema {
s.RecordColumns = v
return s
} | go | {
"resource": ""
} |
q167281 | SetRecordEncoding | train | func (s *SourceSchema) SetRecordEncoding(v string) *SourceSchema {
s.RecordEncoding = &v
return s
} | go | {
"resource": ""
} |
q167282 | SetRecordFormat | train | func (s *SourceSchema) SetRecordFormat(v *RecordFormat) *SourceSchema {
s.RecordFormat = v
return s
} | go | {
"resource": ""
} |
q167283 | SetInputConfigurations | train | func (s *StartApplicationInput) SetInputConfigurations(v []*InputConfiguration) *StartApplicationInput {
s.InputConfigurations = v
return s
} | go | {
"resource": ""
} |
q167284 | SetApplicationUpdate | train | func (s *UpdateApplicationInput) SetApplicationUpdate(v *ApplicationUpdate) *UpdateApplicationInput {
s.ApplicationUpdate = v
return s
} | go | {
"resource": ""
} |
q167285 | GetIdempotencyToken | train | func GetIdempotencyToken() string {
b := make([]byte, 16)
RandReader.Read(b)
return UUIDVersion4(b)
} | go | {
"resource": ""
} |
q167286 | SetIdempotencyToken | train | func SetIdempotencyToken(v reflect.Value) {
if v.Kind() == reflect.Ptr {
if v.IsNil() && v.CanSet() {
v.Set(reflect.New(v.Type().Elem()))
}
v = v.Elem()
}
v = reflect.Indirect(v)
if !v.CanSet() {
panic(fmt.Sprintf("unable to set idempotnecy token %v", v))
}
b := make([]byte, 16)
_, err := rand.Read(... | go | {
"resource": ""
} |
q167287 | UUIDVersion4 | train | func UUIDVersion4(u []byte) string {
// https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_.28random.29
// 13th character is "4"
u[6] = (u[6] | 0x40) & 0x4F
// 17th character is "8", "9", "a", or "b"
u[8] = (u[8] | 0x80) & 0xBF
return fmt.Sprintf(`%X-%X-%X-%X-%X`, u[0:4], u[4:6], u[6:8], u[8:1... | go | {
"resource": ""
} |
q167288 | Close | validation | func (q *query) Close() {
for _, s := range q.matrix {
putPointSlice(s.Points)
}
} | go | {
"resource": ""
} |
q167289 | Exec | validation | func (q *query) Exec(ctx context.Context) *Result {
if span := opentracing.SpanFromContext(ctx); span != nil {
span.SetTag(queryTag, q.stmt.String())
}
res, warnings, err := q.ng.exec(ctx, q)
return &Result{Err: err, Value: res, Warnings: warnings}
} | go | {
"resource": ""
} |
q167290 | contextDone | validation | func contextDone(ctx context.Context, env string) error {
if err := ctx.Err(); err != nil {
return contextErr(err, env)
}
return nil
} | go | {
"resource": ""
} |
q167291 | NewEngine | validation | func NewEngine(opts EngineOpts) *Engine {
if opts.Logger == nil {
opts.Logger = log.NewNopLogger()
}
metrics := &engineMetrics{
currentQueries: prometheus.NewGauge(prometheus.GaugeOpts{
Namespace: namespace,
Subsystem: subsystem,
Name: "queries",
Help: "The current number of queries being ... | go | {
"resource": ""
} |
q167292 | NewInstantQuery | validation | func (ng *Engine) NewInstantQuery(q storage.Queryable, qs string, ts time.Time) (Query, error) {
expr, err := ParseExpr(qs)
if err != nil {
return nil, err
}
qry := ng.newQuery(q, expr, ts, ts, 0)
qry.q = qs
return qry, nil
} | go | {
"resource": ""
} |
q167293 | NewRangeQuery | validation | func (ng *Engine) NewRangeQuery(q storage.Queryable, qs string, start, end time.Time, interval time.Duration) (Query, error) {
expr, err := ParseExpr(qs)
if err != nil {
return nil, err
}
if expr.Type() != ValueTypeVector && expr.Type() != ValueTypeScalar {
return nil, errors.Errorf("invalid expression type %q ... | go | {
"resource": ""
} |
q167294 | exec | validation | func (ng *Engine) exec(ctx context.Context, q *query) (Value, storage.Warnings, error) {
ng.metrics.currentQueries.Inc()
defer ng.metrics.currentQueries.Dec()
ctx, cancel := context.WithTimeout(ctx, ng.timeout)
q.cancel = cancel
execSpanTimer, ctx := q.stats.GetSpanTimer(ctx, stats.ExecTotalTime)
defer execSpan... | go | {
"resource": ""
} |
q167295 | cumulativeSubqueryOffset | validation | func (ng *Engine) cumulativeSubqueryOffset(path []Node) time.Duration {
var subqOffset time.Duration
for _, node := range path {
switch n := node.(type) {
case *SubqueryExpr:
subqOffset += n.Range + n.Offset
}
}
return subqOffset
} | go | {
"resource": ""
} |
q167296 | extractFuncFromPath | validation | func extractFuncFromPath(p []Node) string {
if len(p) == 0 {
return ""
}
switch n := p[len(p)-1].(type) {
case *AggregateExpr:
return n.Op.String()
case *Call:
return n.Func.Name
case *BinaryExpr:
// If we hit a binary expression we terminate since we only care about functions
// or aggregations over a ... | go | {
"resource": ""
} |
q167297 | errorf | validation | func (ev *evaluator) errorf(format string, args ...interface{}) {
ev.error(errors.Errorf(format, args...))
} | go | {
"resource": ""
} |
q167298 | recover | validation | func (ev *evaluator) recover(errp *error) {
e := recover()
if e == nil {
return
}
if err, ok := e.(runtime.Error); ok {
// Print the stack trace but do not inhibit the running application.
buf := make([]byte, 64<<10)
buf = buf[:runtime.Stack(buf, false)]
level.Error(ev.logger).Log("msg", "runtime panic i... | go | {
"resource": ""
} |
q167299 | dropMetricName | validation | func (enh *EvalNodeHelper) dropMetricName(l labels.Labels) labels.Labels {
if enh.dmn == nil {
enh.dmn = make(map[uint64]labels.Labels, len(enh.out))
}
h := l.Hash()
ret, ok := enh.dmn[h]
if ok {
return ret
}
ret = dropMetricName(l)
enh.dmn[h] = ret
return ret
} | go | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.