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

Method convertDeleteQuery

internal/engine/clickhouse/convert.go:891–910  ·  view source on GitHub ↗
(n *chast.DeleteQuery)

Source from the content-addressed store, hash-verified

889}
890
891func (c *cc) convertDeleteQuery(n *chast.DeleteQuery) *ast.DeleteStmt {
892 rv := &ast.RangeVar{
893 Relname: &n.Table,
894 }
895 if n.Database != "" {
896 rv.Schemaname = &n.Database
897 }
898 stmt := &ast.DeleteStmt{
899 Relations: &ast.List{
900 Items: []ast.Node{rv},
901 },
902 }
903
904 // Convert WHERE clause
905 if n.Where != nil {
906 stmt.WhereClause = c.convertExpr(n.Where)
907 }
908
909 return stmt
910}
911
912func (c *cc) convertDropQuery(n *chast.DropQuery) ast.Node {
913 // Handle DROP TABLE

Callers 1

convertMethod · 0.95

Calls 1

convertExprMethod · 0.95

Tested by

no test coverage detected