MCPcopy Create free account
hub / github.com/rilldata/rill / writeName

Method writeName

runtime/metricsview/query_expression_sql.go:45–52  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

43}
44
45func (b exprSQLBuilder) writeName(name string) error {
46 escaped := name
47 if !safeSQLIdentifierRegexp.MatchString(name) {
48 escaped = fmt.Sprintf(`"%s"`, strings.ReplaceAll(name, `"`, `""`)) // nolint:gocritic
49 }
50 b.writeString(escaped)
51 return nil
52}
53
54func (b exprSQLBuilder) writeValue(val any) error {
55 _, err := b.WriteString(sqlstring.ToLiteral(val))

Callers 1

writeExpressionMethod · 0.95

Calls 1

writeStringMethod · 0.95

Tested by

no test coverage detected