MCPcopy
hub / github.com/sqldef/sqldef / Format

Method Format

parser/node.go:198–213  ·  view source on GitHub ↗

Format formats the node.

(buf *nodeBuffer)

Source from the content-addressed store, hash-verified

196
197// Format formats the node.
198func (node *Select) Format(buf *nodeBuffer) {
199 buf.Printf("%vselect %v%s%v%s",
200 node.With, node.Comments, node.Cache, node.Distinct, node.Hints,
201 )
202 if node.Top != nil {
203 buf.Printf("top %v ", node.Top)
204 }
205 buf.Printf("%v", node.SelectExprs)
206 if !node.From.IsEmpty() {
207 buf.Printf(" from %v", node.From)
208 }
209 buf.Printf("%v%v%v%v%v%s",
210 node.Where,
211 node.GroupBy, node.Having, node.OrderBy,
212 node.Limit, node.Lock)
213}
214
215// addWhere adds the boolean expression to the
216// WHERE clause as an AND condition. If the expression

Callers

nothing calls this directly

Calls 2

PrintfMethod · 0.65
IsEmptyMethod · 0.45

Tested by

no test coverage detected