(out *bytes.Buffer)
| 282 | } |
| 283 | |
| 284 | func (c *funcExpression) SerializeSql(out *bytes.Buffer) (err error) { |
| 285 | if !validIdentifierName(c.funcName) { |
| 286 | return errors.Newf( |
| 287 | "Invalid function name: %s. Generated sql: %s", |
| 288 | c.funcName, |
| 289 | out.String()) |
| 290 | } |
| 291 | _, _ = out.WriteString(c.funcName) |
| 292 | if c.args == nil { |
| 293 | _, _ = out.WriteString("()") |
| 294 | } else { |
| 295 | return c.args.SerializeSql(out) |
| 296 | } |
| 297 | return nil |
| 298 | } |
| 299 | |
| 300 | // Returns a representation of sql function call "func_call(c[0], ..., c[n-1]) |
| 301 | func SqlFunc(funcName string, expressions ...Expression) Expression { |
nothing calls this directly
no test coverage detected