MCPcopy Create free account
hub / github.com/deepflowio/deepflow / ToSQLString

Method ToSQLString

server/querier/engine/clickhouse/clickhouse.go:1532–1544  ·  view source on GitHub ↗

原始sql转为clickhouse-sql

()

Source from the content-addressed store, hash-verified

1530
1531// 原始sql转为clickhouse-sql
1532func (e *CHEngine) ToSQLString() string {
1533 if e.View == nil {
1534 for _, stmt := range e.Statements {
1535 stmt.Format(e.Model)
1536 }
1537 FormatLimit(e.Model)
1538 // 使用Model生成View
1539 e.View = view.NewView(e.Model)
1540 }
1541 // View生成clickhouse-sql
1542 chSql := e.View.ToString()
1543 return chSql
1544}
1545
1546func (e *CHEngine) parseOrderBy(order *sqlparser.Order) error {
1547 switch expr := order.Expr.(type) {

Callers 3

ExecuteQueryMethod · 0.95
ParseSlimitSqlMethod · 0.95
ParseWithSqlMethod · 0.95

Calls 3

FormatLimitFunction · 0.85
FormatMethod · 0.65
ToStringMethod · 0.65

Tested by

no test coverage detected