mickeypearce / vscode-oracle-format

PL/SQL formatter (using SQLcl)
https://marketplace.visualstudio.com/items?itemName=mp.vscode-oracle-format
11 stars 4 forks source link

Doesn't work with rules specified #6

Closed orloffm closed 5 years ago

orloffm commented 5 years ago

Without rules it works:

[Extension Host] (echo format file "\\...\format_temp.sql" "\\...\format_temp.sql") | "C:\sqlcl\bin\sql.exe" /nolog console.ts:136 [Extension Host] SQLcl: Release 18.3 Production on Tue Nov 13 13:29:19 2018

Copyright (c) 1982, 2018, Oracle. All rights reserved.

With rules it doesn't, text stays unformatted.

[Extension Host] (echo format rules C:\Source\oracle_format\oracle_format.xml & echo format file "\\...\format_temp.sql" "\\...\format_temp.sql") | "C:\sqlcl\bin\sql.exe" /nolog console.ts:136 [Extension Host] SQLcl: Release 18.3 Production on Tue Nov 13 13:31:48 2018

Copyright (c) 1982, 2018, Oracle. All rights reserved.

Formatter rules loaded

Should it be && instead? I'm on Windows.

mickeypearce commented 5 years ago

I think this is unfortunatelyl a 18.3 version problem. It will work if you downgrade SqlCl to 17.3.

There is an error opened https://community.oracle.com/thread/4164273 for this issue with piping several commands but there is no response from Oracle yet.

I will implement a bypass with intermediate sql script file soon but for now I suggest downgrading. Let me know how it goes..

mickeypearce commented 5 years ago

@orloffm, I published a new version (0.0.7) that makes it work for sqldeveloper 18.x as well...