File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed
pg_workspace_new/src/workspace/server Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 1- DATABASE_URL = postgresql://postgres:postgres@127.0.0.1:5432 /postgres
1+ DATABASE_URL = postgresql://postgres:postgres@127.0.0.1:54322 /postgres
Original file line number Diff line number Diff line change @@ -26,8 +26,7 @@ pub fn parse(sql: &str) -> Result<NodeEnum> {
2626 . nodes ( )
2727 . iter ( )
2828 . find ( |n| n. 1 == 1 )
29- . unwrap ( )
30- . 0
31- . to_enum ( )
32- } )
29+ . map ( |n| n. 0 . to_enum ( ) )
30+ . ok_or_else ( || Error :: Parse ( "Unable to find root node" . to_string ( ) ) )
31+ } ) ?
3332}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ impl PgQueryStore {
4141
4242 pub fn modify_statement ( & self , change : & ModifiedStatement ) {
4343 self . remove_statement ( & change. old_stmt ) ;
44- self . add_statement ( & change. new_stmt , & change. change_text ) ;
44+ self . add_statement ( & change. new_stmt , & change. new_stmt_text ) ;
4545 }
4646
4747 pub fn get_diagnostics ( & self , stmt : & Statement ) -> Vec < pg_diagnostics:: serde:: Diagnostic > {
You can’t perform that action at this time.
0 commit comments