sdcli格式 - 提供自定义配置文件

时间:2014-12-09 15:43:52

标签: oracle plsql oracle-sqldeveloper code-formatting

我尝试使用" sdcli格式"格式化PLSQL代码。 SQL开发人员的命令行工具。

我想提供自定义配置文件以自定义输出。

我们的想法是创造我的完美设置"从GUI导出,然后将其导出到文件中,并在调用sdcli时重新使用此导出的文件。

可能吗?

1 个答案:

答案 0 :(得分:2)

SQLCL支持您所描述的功能。

SQLcl: Release 17.4.0 Production on Tue Feb 20 16:08:22 2018

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

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options


FORMAT
---------

FORMAT BUFFER - formats the script in the SQLcl Buffer
FORMAT RULES <filename> - Loads SQLDeveloper Formatter rules file to formatter.
FORMAT FILE <input_file> <output_file>

Format used is default or for SQLcl can be chosen by setting an environmental variable
pointing to a SQLDeveloper export (.xml) of formatter options.
The variable is called SQLFORMATPATH
In SQLDeveloper the format options are the default chosen in the preferences.

SQL>

请参阅https://community.oracle.com/thread/4110977以获取可处理整个文件目录的脚本