Format formats the node.
(buf *nodeBuffer)
| 196 | |
| 197 | // Format formats the node. |
| 198 | func (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 |