ParseOne parses a sql statement string, ensuring that it contains only a single statement, and returns that Statement. ParseOne will always interpret the INT and SERIAL types as 64-bit types, since this is used in various internal-execution paths where we might receive bits of SQL from other nodes.
(sql string)
| 247 | // bits of SQL from other nodes. In general, we expect that all |
| 248 | // user-generated SQL has been run through the ParseWithInt() function. |
| 249 | func ParseOne(sql string) (statements.Statement[tree.Statement], error) { |
| 250 | return ParseOneWithInt(sql, defaultNakedIntType) |
| 251 | } |
| 252 | |
| 253 | // ParseOneRetainComments is similar to ParseOne, but it retains scanned |
| 254 | // comments in the returned statement's Comment field. |
searching dependent graphs…