MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / parseExprsWithInt

Function parseExprsWithInt

pkg/sql/parser/parse.go:355–365  ·  view source on GitHub ↗

parseExprsWithInt parses one or more sql expressions.

(exprs []string, nakedIntType *types.T)

Source from the content-addressed store, hash-verified

353
354// parseExprsWithInt parses one or more sql expressions.
355func parseExprsWithInt(exprs []string, nakedIntType *types.T) (tree.Exprs, error) {
356 stmt, err := ParseOneWithInt(fmt.Sprintf("SET ROW (%s)", strings.Join(exprs, ",")), nakedIntType)
357 if err != nil {
358 return nil, err
359 }
360 set, ok := stmt.AST.(*tree.SetVar)
361 if !ok {
362 return nil, errors.AssertionFailedf("expected a SET statement, but found %T", stmt)
363 }
364 return set.Values, nil
365}
366
367// ParseExprs parses a comma-delimited sequence of SQL scalar
368// expressions. The caller is responsible for ensuring that the input

Callers 2

ParseExprsFunction · 0.85
ParseExprWithIntFunction · 0.85

Calls 1

ParseOneWithIntFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…