You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Postgres parses sql strings such as execute 'select 1'; and function bodies, e.g.
CREATEFUNCTIONdup(inint, out f1 int, out f2 text)
AS $$ SELECT $1, CAST($1AStext) ||' is text' $$
LANGUAGE SQL;
as string constants. To improve dx, especially for function bodies, we should pass the string back into the SourceParser.
A few things to consider here:
refactor SourceFileParser to SourceParser, and pub fn parse_source_file(&mut self, text: &str) to pub fn parse_source(&mut self, text &str, at_offset: Option<i32>), similar to how the statement parser is designed (done)
we have to find a way to make a distinction between a sql string, and a normal string. I would propose to just parse any string constant, and if does not return an error use replace it with the sub-tree.
The text was updated successfully, but these errors were encountered:
Postgres parses sql strings such as
execute 'select 1';
and function bodies, e.g.as string constants. To improve dx, especially for function bodies, we should pass the string back into the
SourceParser
.A few things to consider here:
SourceFileParser
toSourceParser
, andpub fn parse_source_file(&mut self, text: &str)
topub fn parse_source(&mut self, text &str, at_offset: Option<i32>)
, similar to how the statement parser is designed (done)The text was updated successfully, but these errors were encountered: