Skip to content

Commit

Permalink
fix: execute immediate
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoKaios committed Oct 15, 2024
1 parent c470ce7 commit 6127b0a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/lsp/sql_preproc/data_gestion.ml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,14 @@ let transform_stm map (_, stm) filename =
| [ Sql_ast.SqlVarToken (CobolVar (CobVarNotNull _)) ] -> ([], map)
| _ ->
let ws, map =
create_new_var (Format.asprintf "%a" Sql_ast.Printer.pp_sql sql) ()
let content =
let content = Format.asprintf "%a" Sql_ast.Printer.pp_sql sql in
if String.starts_with ~prefix:"'" content ||
String.starts_with ~prefix:"\"" content
then String.sub content 1 (String.length content - 2)
else content
in
create_new_var content ()
in
(ws, map) )
| Rollback (rb_work_or_tran, rb_args) -> begin
Expand Down

0 comments on commit 6127b0a

Please sign in to comment.