setStringConstant sets the string value of an AST node that is a string constant.
(node *pg_query.Node, value string)
| 523 | |
| 524 | // setStringConstant sets the string value of an AST node that is a string constant. |
| 525 | func setStringConstant(node *pg_query.Node, value string) { |
| 526 | if node == nil { |
| 527 | return |
| 528 | } |
| 529 | if ac := node.GetAConst(); ac != nil { |
| 530 | if sval := ac.GetSval(); sval != nil { |
| 531 | sval.Sval = value |
| 532 | } |
| 533 | } |
| 534 | } |
| 535 | |
| 536 | // isDateFormat checks if a PG format string is a date/time format (vs number format). |
| 537 | func isDateFormat(format string) bool { |
no outgoing calls
no test coverage detected