MCPcopy Create free account
hub / github.com/pingcap/tidb / d

Function d

pkg/ttl/sqlbuilder/sql_test.go:934–949  ·  view source on GitHub ↗
(vs ...any)

Source from the content-addressed store, hash-verified

932}
933
934func d(vs ...any) []types.Datum {
935 datums := make([]types.Datum, len(vs))
936 for i, v := range vs {
937 switch val := v.(type) {
938 case string:
939 datums[i] = types.NewStringDatum(val)
940 case int:
941 datums[i] = types.NewIntDatum(int64(val))
942 case []byte:
943 datums[i] = types.NewBytesDatum(val)
944 default:
945 panic(fmt.Sprintf("invalid value type: %T, value: %v", v, v))
946 }
947 }
948 return datums
949}

Callers 4

TestEscapeFunction · 0.85
TestSQLBuilderFunction · 0.85
TestScanQueryGeneratorFunction · 0.85
TestBuildDeleteSQLFunction · 0.85

Calls 3

NewStringDatumFunction · 0.92
NewIntDatumFunction · 0.92
NewBytesDatumFunction · 0.92

Tested by

no test coverage detected