tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [44/48] tinkerpop git commit: Renamed empty.result.indicator to result.indicator.null
Date Fri, 16 Sep 2016 11:36:29 GMT
Renamed empty.result.indicator to result.indicator.null


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/75b4f204
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/75b4f204
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/75b4f204

Branch: refs/heads/TINKERPOP-1442-master
Commit: 75b4f204a973de5f7b9d4271093810d669b85f65
Parents: 6599159
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Thu Sep 15 16:05:07 2016 -0400
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Thu Sep 15 16:05:07 2016 -0400

----------------------------------------------------------------------
 .../src/reference/gremlin-applications.asciidoc |  2 +-
 .../upgrade/release-3.2.x-incubating.asciidoc   | 27 ++++++++++++++++++++
 .../gremlin/console/Preferences.groovy          | 12 ++++-----
 .../console/commands/GremlinSetCommand.groovy   |  2 +-
 4 files changed, 35 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/75b4f204/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index 13ac6ff..bff9f0f 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -173,7 +173,7 @@ Preferences are set with `:set name value`.  Values can contain spaces
when quot
 |result.prompt.color | colors | Color of the result prompt.
 |input.prompt | string | Text of the input prompt.
 |result.prompt | string | Text of the result prompt.
-|empty.result.indicator | string | Text of the void/no results indicator - setting to empty
string (i.e. "" at the
+|result.indicator.null | string | Text of the void/no results indicator - setting to empty
string (i.e. "" at the
 command line) will print no result line in these cases.
 |=========================================================
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/75b4f204/docs/src/upgrade/release-3.2.x-incubating.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
index 2cf8ef2..5db0522 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -32,6 +32,33 @@ Please see the link:https://github.com/apache/tinkerpop/blob/3.2.3/CHANGELOG.asc
 Upgrading for Users
 ~~~~~~~~~~~~~~~~~~~
 
+Renamed Null Result Preference
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+In 3.2.2, the Gremlin Console introduced a setting called `empty.result.indicator`, which
controlled the output that
+was presented when no result was returned. For consistency, this setting has been renamed
to `result.indicator.null`
+and can be set as follows:
+
+[source,text]
+----
+gremlin> graph = TinkerGraph.open()
+==>tinkergraph[vertices:0 edges:0]
+gremlin> graph.close()
+==>null
+gremlin> :set result.indicator.null nil
+gremlin> graph = TinkerGraph.open()
+==>tinkergraph[vertices:0 edges:0]
+gremlin> graph.close()
+==>nil
+gremlin> :set result.indicator.null ""
+gremlin> graph = TinkerGraph.open()
+==>tinkergraph[vertices:0 edges:0]
+gremlin> graph.close()
+gremlin>
+----
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1409[TINKERPOP-1409]
+
 Where Step Supports By-Modulation
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/75b4f204/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Preferences.groovy
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Preferences.groovy
b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Preferences.groovy
index 5403ae8..22f5f74 100644
--- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Preferences.groovy
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Preferences.groovy
@@ -73,9 +73,9 @@ public class Preferences {
     public static final String PREF_RESULT_PROMPT_COLOR_DEFAULT = "reset"
     public static String  resultPromptColor = PREF_RESULT_PROMPT_COLOR_DEFAULT
 
-    public static final String PREF_EMPTY_RESULT_IND = "empty.result.indicator"
-    public static final String PREF_EMPTY_RESULT_IND_DEFAULT = "null"
-    public static String  emptyResult = PREF_EMPTY_RESULT_IND_DEFAULT
+    public static final String PREF_RESULT_IND_NULL = "result.indicator.null"
+    public static final String PREF_RESULT_IND_NULL_DEFAULT = "null"
+    public static String  emptyResult = PREF_RESULT_IND_NULL_DEFAULT
 
     public static final String PREF_INPUT_PROMPT = "input.prompt"
     public static final String PREF_INPUT_PROMPT_DEFAULT = "gremlin>"
@@ -212,9 +212,9 @@ public class Preferences {
                             inputPromptColor =  getValidColor(PREF_INPUT_PROMPT_COLOR, evt.newValue,
PREF_INPUT_PROMPT_COLOR_DEFAULT)
                         } else if (evt.key == PREF_RESULT_PROMPT_COLOR) {
                             resultPromptColor =  getValidColor(PREF_RESULT_PROMPT_COLOR,
evt.newValue, PREF_RESULT_PROMPT_COLOR_DEFAULT)
-                        } else if (evt.key == PREF_EMPTY_RESULT_IND) {
+                        } else if (evt.key == PREF_RESULT_IND_NULL) {
                             if (null == evt.newValue) {
-                                emptyResult =  STORE.get(PREF_EMPTY_RESULT_IND, PREF_EMPTY_RESULT_IND_DEFAULT)
+                                emptyResult =  STORE.get(PREF_RESULT_IND_NULL, PREF_RESULT_IND_NULL_DEFAULT)
                             } else {
                                 emptyResult = evt.newValue
                             }
@@ -285,7 +285,7 @@ public class Preferences {
 
         resultPromptColor =  getValidColor(PREF_RESULT_PROMPT_COLOR, null, PREF_RESULT_PROMPT_COLOR_DEFAULT)
 
-        emptyResult =  STORE.get(PREF_EMPTY_RESULT_IND, PREF_EMPTY_RESULT_IND_DEFAULT)
+        emptyResult =  STORE.get(PREF_RESULT_IND_NULL, PREF_RESULT_IND_NULL_DEFAULT)
 
         inputPrompt =  STORE.get(PREF_INPUT_PROMPT, PREF_INPUT_PROMPT_DEFAULT)
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/75b4f204/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/commands/GremlinSetCommand.groovy
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/commands/GremlinSetCommand.groovy
b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/commands/GremlinSetCommand.groovy
index 4078374..f86042d 100644
--- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/commands/GremlinSetCommand.groovy
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/commands/GremlinSetCommand.groovy
@@ -66,7 +66,7 @@ class GremlinSetCommand extends SetCommand {
             set << org.apache.tinkerpop.gremlin.console.Preferences.PREF_INFO_COLOR
             set << org.apache.tinkerpop.gremlin.console.Preferences.PREF_INPUT_PROMPT_COLOR
             set << org.apache.tinkerpop.gremlin.console.Preferences.PREF_RESULT_PROMPT_COLOR
-            set << org.apache.tinkerpop.gremlin.console.Preferences.PREF_EMPTY_RESULT_IND
+            set << org.apache.tinkerpop.gremlin.console.Preferences.PREF_RESULT_IND_NULL
             set << org.apache.tinkerpop.gremlin.console.Preferences.PREF_INPUT_PROMPT
             set << org.apache.tinkerpop.gremlin.console.Preferences.PREF_RESULT_PROMPT
             set << org.apache.tinkerpop.gremlin.console.Preferences.PREF_EDGE_COLOR


Mime
View raw message