Skip to content

Commit

Permalink
Don't show routines by default
Browse files Browse the repository at this point in the history
  • Loading branch information
sualeh committed Feb 8, 2018
1 parent d2ff1dd commit fac7b40
Show file tree
Hide file tree
Showing 9 changed files with 97 additions and 88 deletions.
Expand Up @@ -122,8 +122,8 @@ public SchemaCrawlerOptionsBuilder fromConfig(final Config config)
.getInclusionRule(SC_COLUMN_PATTERN_INCLUDE, SC_COLUMN_PATTERN_EXCLUDE));

options.setRoutineInclusionRule(configProperties
.getInclusionRule(SC_ROUTINE_PATTERN_INCLUDE,
SC_ROUTINE_PATTERN_EXCLUDE));
.getInclusionRuleDefaultExclude(SC_ROUTINE_PATTERN_INCLUDE,
SC_ROUTINE_PATTERN_EXCLUDE));
options.setRoutineColumnInclusionRule(configProperties
.getInclusionRule(SC_ROUTINE_COLUMN_PATTERN_INCLUDE,
SC_ROUTINE_COLUMN_PATTERN_EXCLUDE));
Expand Down
Expand Up @@ -86,6 +86,7 @@ public void commandLineRoutinesWithColumnsSorting()
{
final Map<String, String> args = new HashMap<>();
args.put("tables", "");
args.put("routines", ".*");
args.put("sortcolumns", Boolean.TRUE.toString());
// Testing no tables, all routines
// Testing no sequences, synonyms
Expand All @@ -99,6 +100,7 @@ public void commandLineRoutinesWithoutColumnsSorting()
{
final Map<String, String> args = new HashMap<>();
args.put("tables", "");
args.put("routines", ".*");
args.put("sortcolumns", Boolean.FALSE.toString());
// Testing no tables, all routines
// Testing no sequences, synonyms
Expand All @@ -112,6 +114,7 @@ public void commandLineRoutinesWithoutSorting()
{
final Map<String, String> args = new HashMap<>();
args.put("tables", "");
args.put("routines", ".*");
args.put("sortroutines", Boolean.FALSE.toString());
// Testing no tables, all routines
// Testing no sequences, synonyms
Expand All @@ -125,6 +128,7 @@ public void commandLineRoutinesWithSorting()
{
final Map<String, String> args = new HashMap<>();
args.put("tables", "");
args.put("routines", ".*");
args.put("sortroutines", Boolean.TRUE.toString());
// Testing no tables, all routines
// Testing no sequences, synonyms
Expand Down Expand Up @@ -224,7 +228,7 @@ public void commandLineWithNonDefaults()
final Map<String, String> args = new HashMap<>();
args.put("portablenames", Boolean.TRUE.toString());
args.put("tables", "");
args.put("routines", "");
args.put("routines", ".*");
args.put("sequences", ".*");
args.put("synonyms", ".*");

Expand Down
Expand Up @@ -70,24 +70,22 @@ public void grep()

final String[][] grepArgs = new String[][] {
new String[] {
"-grepcolumns=.*\\.STREET|.*\\.PRICE",
"-routines=", },
"-grepcolumns=.*\\.STREET|.*\\.PRICE", },
new String[] {
"-grepcolumns=.*\\..*NAME",
"-routines=", },
"-grepcolumns=.*\\..*NAME", },
new String[] {
"-grepdef=.*book authors.*",
"-routines=", },
"-grepdef=.*book authors.*", },
new String[] {
"-tables=",
"-routines=.*",
"-grepinout=.*\\.B_COUNT", },
new String[] {
"-tables=",
"-routines=.*",
"-grepinout=.*\\.B_OFFSET", },
new String[] {
"-grepcolumns=.*\\.STREET|.*\\.PRICE",
"-grepdef=.*book authors.*",
"-routines=", }, };
"-grepdef=.*book authors.*", }, };
for (int i = 0; i < grepArgs.length; i++)
{
final String[] grepArgsForRun = grepArgs[i];
Expand Down
Expand Up @@ -188,6 +188,7 @@ public void spinThroughMain()
argsMap.put("g", hsqldbProperties.toString());
argsMap.put("sequences", ".*");
argsMap.put("synonyms", ".*");
argsMap.put("routines", ".*");
argsMap.put("noinfo", Boolean.FALSE.toString());
argsMap.put("infolevel", infoLevel.name());
argsMap.put("command", schemaTextDetailType.name());
Expand Down
Expand Up @@ -191,78 +191,3 @@ Foreign Keys
[foreign key, with no action]
SALESDATAID <--(0..many) SALES.SALESDATAID



Routines
========================================================================



NEW_PUBLISHER [procedure, no result]
------------------------------------------------------------------------



NEW_PUBLISHER [procedure, no result]
------------------------------------------------------------------------



CUSTOMADD [function, does not return a table]
------------------------------------------------------------------------



CUSTOMADD [function, does not return a table]
------------------------------------------------------------------------



ALLOC_BLOCKS [procedure, no result]
------------------------------------------------------------------------



ALLOC_SINGLE_BLOCK [procedure, no result]
------------------------------------------------------------------------



CONVERT_BLOCK [procedure, no result]
------------------------------------------------------------------------



CREATE_EMPTY_BLOCK [procedure, no result]
------------------------------------------------------------------------



DELETE_BLOCKS [procedure, no result]
------------------------------------------------------------------------



DELETE_LOB [procedure, no result]
------------------------------------------------------------------------



DELETE_UNUSED [procedure, no result]
------------------------------------------------------------------------



DELETE_UNUSED_LOBS [procedure, no result]
------------------------------------------------------------------------



DIVIDE_BLOCK [procedure, no result]
------------------------------------------------------------------------



MERGE_EMPTY_BLOCKS [procedure, no result]
------------------------------------------------------------------------

@@ -1,5 +1,80 @@


Routines
========================================================================



NEW_PUBLISHER [procedure, no result]
------------------------------------------------------------------------



NEW_PUBLISHER [procedure, no result]
------------------------------------------------------------------------



CUSTOMADD [function, does not return a table]
------------------------------------------------------------------------



CUSTOMADD [function, does not return a table]
------------------------------------------------------------------------



ALLOC_BLOCKS [procedure, no result]
------------------------------------------------------------------------



ALLOC_SINGLE_BLOCK [procedure, no result]
------------------------------------------------------------------------



CONVERT_BLOCK [procedure, no result]
------------------------------------------------------------------------



CREATE_EMPTY_BLOCK [procedure, no result]
------------------------------------------------------------------------



DELETE_BLOCKS [procedure, no result]
------------------------------------------------------------------------



DELETE_LOB [procedure, no result]
------------------------------------------------------------------------



DELETE_UNUSED [procedure, no result]
------------------------------------------------------------------------



DELETE_UNUSED_LOBS [procedure, no result]
------------------------------------------------------------------------



DIVIDE_BLOCK [procedure, no result]
------------------------------------------------------------------------



MERGE_EMPTY_BLOCKS [procedure, no result]
------------------------------------------------------------------------



Sequences
========================================================================

Expand Down
5 changes: 5 additions & 0 deletions schemacrawler-distrib/src/site/markdown/changes-report.md
@@ -1,5 +1,10 @@
# SchemaCrawler Change History

<a name="a14.19.02"></a>
## Release 14.19.02 - 2018-02-11

* Make -routines return no routines by default, to make it easier for first-time users.

<a name="a14.19.01"></a>
## Release 14.19.01 - 2018-02-04

Expand Down
4 changes: 2 additions & 2 deletions schemacrawler-docs/config/schemacrawler.config.properties
Expand Up @@ -27,8 +27,8 @@ schemacrawler.column.pattern.exclude=
# Regular expression routine and routine parameter name pattern to filter
# routine and routine parameter names
# Default: .* for include, <none> for exclude
schemacrawler.routine.pattern.include=.*
schemacrawler.routine.pattern.exclude=
schemacrawler.routine.pattern.include=
schemacrawler.routine.pattern.exclude=.*
schemacrawler.routine.inout.pattern.include=.*
schemacrawler.routine.inout.pattern.exclude=

Expand Down
Expand Up @@ -103,6 +103,7 @@ public void testHsqldbMain()
argsMap.put("command", "details,dump,count,hsqldb.tables");
argsMap.put("infolevel", "maximum");
argsMap.put("synonyms", ".*");
argsMap.put("routines", ".*");
argsMap.put("outputfile", out.toString());

Main.main(flattenCommandlineArgs(argsMap));
Expand Down

0 comments on commit fac7b40

Please sign in to comment.