MCPcopy Index your code
hub / github.com/sqlc-dev/sqlc / convertTruncateQuery

Method convertTruncateQuery

internal/engine/clickhouse/convert.go:1002–1020  ·  view source on GitHub ↗
(n *chast.TruncateQuery)

Source from the content-addressed store, hash-verified

1000}
1001
1002func (c *cc) convertTruncateQuery(n *chast.TruncateQuery) *ast.TruncateStmt {
1003 stmt := &ast.TruncateStmt{
1004 Relations: &ast.List{},
1005 }
1006
1007 tableName := n.Table
1008 schemaName := n.Database
1009
1010 rv := &ast.RangeVar{
1011 Relname: &tableName,
1012 }
1013 if schemaName != "" {
1014 rv.Schemaname = &schemaName
1015 }
1016
1017 stmt.Relations.Items = append(stmt.Relations.Items, rv)
1018
1019 return stmt
1020}

Callers 1

convertMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected