[1/2] tinkerpop git commit: Redefined gherkin test that was forcing list[list] assertions
Repository: tinkerpop Updated Branches: refs/heads/tp33 5eaf312c0 -> 445a8bf0b Redefined gherkin test that was forcing list[list] assertions Not sure we really needed the original assertion the way that it was. The fact that we get a result means serialization for list[list] worked and we assert correctness of the traversal in a reasonable way without list[list] so there doesn't seem to be much need to complicate the logic of the gherkin runners to support that CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/3be3550d Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/3be3550d Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/3be3550d Branch: refs/heads/tp33 Commit: 3be3550d191fc894639cfe2aae5447eb7bad3cbf Parents: fd64360 Author: Stephen Mallette Authored: Wed Jul 25 12:16:09 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 12:16:09 2018 -0400 -- .../Gherkin/GherkinTestRunner.cs | 3 +-- .../Gherkin/IgnoreException.cs | 3 --- .../gremlin-javascript/test/cucumber/feature-steps.js | 3 +-- gremlin-python/src/main/jython/radish/feature_steps.py | 2 +- gremlin-test/features/map/Select.feature | 13 + 5 files changed, 8 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3be3550d/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs -- diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs index 787cca9..3802da5 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs @@ -41,8 +41,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin new Dictionary() { { "g_injectX1X_chooseXisX1X__constantX10Xfold__foldX", IgnoreReason.NoReason }, -{ "g_injectX2X_chooseXisX1X__constantX10Xfold__foldX", IgnoreReason.NoReason }, -{ "g_V_asXa_bX_out_asXcX_path_selectXkeysX", IgnoreReason.EmbeddedListAssertion } +{ "g_injectX2X_chooseXisX1X__constantX10Xfold__foldX", IgnoreReason.NoReason } }; private static class Keywords http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3be3550d/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs -- diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs index 368713d..6198f1d 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs @@ -40,9 +40,6 @@ namespace Gremlin.Net.IntegrationTest.Gherkin string reasonSuffix = null; switch (reason) { -case IgnoreReason.EmbeddedListAssertion: -reasonSuffix = "This test returns an embedded list in the result and the Gherkin processor does not parse that correctly"; -break; case IgnoreReason.NoReason: reasonSuffix = ""; break; http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3be3550d/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js index 53f457d..3976348 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js @@ -55,13 +55,12 @@ const parsers = [ const ignoreReason = { lambdaNotSupported: 'Lambdas are not supported on gremlin-javascript', - embeddedListAssertion: '"This test returns an embedded list in the result and the Gherkin processor does not parse that correctly"', needsFurtherInvestigation: '', }; const ignoredScenarios = { // An associative array containing the scenario name as key, for example: - 'g_V_asXa_bX_out_asXcX_path_selectXkeysX': new IgnoreError(ignoreReason.embeddedListAssertion), + // 'g_V_asXa_bX_out_asXcX_path_selectXkeysX': new IgnoreError(ignoreReason.embeddedListAssertion), };
tinkerpop git commit: Redefined gherkin test that was forcing list[list] assertions
Repository: tinkerpop Updated Branches: refs/heads/tp32 fd643609a -> 3be3550d1 Redefined gherkin test that was forcing list[list] assertions Not sure we really needed the original assertion the way that it was. The fact that we get a result means serialization for list[list] worked and we assert correctness of the traversal in a reasonable way without list[list] so there doesn't seem to be much need to complicate the logic of the gherkin runners to support that CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/3be3550d Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/3be3550d Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/3be3550d Branch: refs/heads/tp32 Commit: 3be3550d191fc894639cfe2aae5447eb7bad3cbf Parents: fd64360 Author: Stephen Mallette Authored: Wed Jul 25 12:16:09 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 12:16:09 2018 -0400 -- .../Gherkin/GherkinTestRunner.cs | 3 +-- .../Gherkin/IgnoreException.cs | 3 --- .../gremlin-javascript/test/cucumber/feature-steps.js | 3 +-- gremlin-python/src/main/jython/radish/feature_steps.py | 2 +- gremlin-test/features/map/Select.feature | 13 + 5 files changed, 8 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3be3550d/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs -- diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs index 787cca9..3802da5 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs @@ -41,8 +41,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin new Dictionary() { { "g_injectX1X_chooseXisX1X__constantX10Xfold__foldX", IgnoreReason.NoReason }, -{ "g_injectX2X_chooseXisX1X__constantX10Xfold__foldX", IgnoreReason.NoReason }, -{ "g_V_asXa_bX_out_asXcX_path_selectXkeysX", IgnoreReason.EmbeddedListAssertion } +{ "g_injectX2X_chooseXisX1X__constantX10Xfold__foldX", IgnoreReason.NoReason } }; private static class Keywords http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3be3550d/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs -- diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs index 368713d..6198f1d 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs @@ -40,9 +40,6 @@ namespace Gremlin.Net.IntegrationTest.Gherkin string reasonSuffix = null; switch (reason) { -case IgnoreReason.EmbeddedListAssertion: -reasonSuffix = "This test returns an embedded list in the result and the Gherkin processor does not parse that correctly"; -break; case IgnoreReason.NoReason: reasonSuffix = ""; break; http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3be3550d/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js index 53f457d..3976348 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js @@ -55,13 +55,12 @@ const parsers = [ const ignoreReason = { lambdaNotSupported: 'Lambdas are not supported on gremlin-javascript', - embeddedListAssertion: '"This test returns an embedded list in the result and the Gherkin processor does not parse that correctly"', needsFurtherInvestigation: '', }; const ignoredScenarios = { // An associative array containing the scenario name as key, for example: - 'g_V_asXa_bX_out_asXcX_path_selectXkeysX': new IgnoreError(ignoreReason.embeddedListAssertion), + // 'g_V_asXa_bX_out_asXcX_path_selectXkeysX': new IgnoreError(ignoreReason.embeddedListAssertion), };
[1/3] tinkerpop git commit: Redefined gherkin test that was forcing list[list] assertions
Repository: tinkerpop Updated Branches: refs/heads/master c2ffd946e -> 5f912eab0 Redefined gherkin test that was forcing list[list] assertions Not sure we really needed the original assertion the way that it was. The fact that we get a result means serialization for list[list] worked and we assert correctness of the traversal in a reasonable way without list[list] so there doesn't seem to be much need to complicate the logic of the gherkin runners to support that CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/3be3550d Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/3be3550d Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/3be3550d Branch: refs/heads/master Commit: 3be3550d191fc894639cfe2aae5447eb7bad3cbf Parents: fd64360 Author: Stephen Mallette Authored: Wed Jul 25 12:16:09 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 12:16:09 2018 -0400 -- .../Gherkin/GherkinTestRunner.cs | 3 +-- .../Gherkin/IgnoreException.cs | 3 --- .../gremlin-javascript/test/cucumber/feature-steps.js | 3 +-- gremlin-python/src/main/jython/radish/feature_steps.py | 2 +- gremlin-test/features/map/Select.feature | 13 + 5 files changed, 8 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3be3550d/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs -- diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs index 787cca9..3802da5 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs @@ -41,8 +41,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin new Dictionary() { { "g_injectX1X_chooseXisX1X__constantX10Xfold__foldX", IgnoreReason.NoReason }, -{ "g_injectX2X_chooseXisX1X__constantX10Xfold__foldX", IgnoreReason.NoReason }, -{ "g_V_asXa_bX_out_asXcX_path_selectXkeysX", IgnoreReason.EmbeddedListAssertion } +{ "g_injectX2X_chooseXisX1X__constantX10Xfold__foldX", IgnoreReason.NoReason } }; private static class Keywords http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3be3550d/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs -- diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs index 368713d..6198f1d 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs @@ -40,9 +40,6 @@ namespace Gremlin.Net.IntegrationTest.Gherkin string reasonSuffix = null; switch (reason) { -case IgnoreReason.EmbeddedListAssertion: -reasonSuffix = "This test returns an embedded list in the result and the Gherkin processor does not parse that correctly"; -break; case IgnoreReason.NoReason: reasonSuffix = ""; break; http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3be3550d/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js index 53f457d..3976348 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js @@ -55,13 +55,12 @@ const parsers = [ const ignoreReason = { lambdaNotSupported: 'Lambdas are not supported on gremlin-javascript', - embeddedListAssertion: '"This test returns an embedded list in the result and the Gherkin processor does not parse that correctly"', needsFurtherInvestigation: '', }; const ignoredScenarios = { // An associative array containing the scenario name as key, for example: - 'g_V_asXa_bX_out_asXcX_path_selectXkeysX': new IgnoreError(ignoreReason.embeddedListAssertion), + // 'g_V_asXa_bX_out_asXcX_path_selectXkeysX': new IgnoreError(ignoreReason.embeddedListAssertion), };
[2/3] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Conflicts: gremlin-test/features/map/Select.feature Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/445a8bf0 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/445a8bf0 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/445a8bf0 Branch: refs/heads/master Commit: 445a8bf0b75f8f6ee246c5bd9277f0e902db246c Parents: 5eaf312 3be3550 Author: Stephen Mallette Authored: Wed Jul 25 12:25:51 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 12:25:51 2018 -0400 -- .../Gherkin/GherkinTestRunner.cs | 3 +-- .../Gherkin/IgnoreException.cs | 3 --- .../gremlin-javascript/test/cucumber/feature-steps.js | 3 +-- gremlin-python/src/main/jython/radish/feature_steps.py | 2 +- gremlin-test/features/map/Select.feature | 13 + 5 files changed, 8 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/445a8bf0/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/445a8bf0/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/445a8bf0/gremlin-test/features/map/Select.feature --
[2/2] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Conflicts: gremlin-test/features/map/Select.feature Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/445a8bf0 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/445a8bf0 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/445a8bf0 Branch: refs/heads/tp33 Commit: 445a8bf0b75f8f6ee246c5bd9277f0e902db246c Parents: 5eaf312 3be3550 Author: Stephen Mallette Authored: Wed Jul 25 12:25:51 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 12:25:51 2018 -0400 -- .../Gherkin/GherkinTestRunner.cs | 3 +-- .../Gherkin/IgnoreException.cs | 3 --- .../gremlin-javascript/test/cucumber/feature-steps.js | 3 +-- gremlin-python/src/main/jython/radish/feature_steps.py | 2 +- gremlin-test/features/map/Select.feature | 13 + 5 files changed, 8 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/445a8bf0/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/445a8bf0/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/445a8bf0/gremlin-test/features/map/Select.feature --
[3/3] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/5f912eab Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/5f912eab Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/5f912eab Branch: refs/heads/master Commit: 5f912eab0ff53f7301ff87cef2fd05eb4dda0a34 Parents: c2ffd94 445a8bf Author: Stephen Mallette Authored: Wed Jul 25 12:26:00 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 12:26:00 2018 -0400 -- .../Gherkin/GherkinTestRunner.cs | 3 +-- .../Gherkin/IgnoreException.cs | 3 --- .../gremlin-javascript/test/cucumber/feature-steps.js | 3 +-- gremlin-python/src/main/jython/radish/feature_steps.py | 2 +- gremlin-test/features/map/Select.feature | 13 + 5 files changed, 8 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5f912eab/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5f912eab/gremlin-test/features/map/Select.feature --
[2/2] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/5eaf312c Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/5eaf312c Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/5eaf312c Branch: refs/heads/tp33 Commit: 5eaf312c000d3145707513f20109956f5f97265a Parents: 1bd35dc fd64360 Author: Stephen Mallette Authored: Wed Jul 25 11:30:52 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 11:30:52 2018 -0400 -- .../gremlin-javascript/lib/structure/io/type-serializers.js | 2 +- .../javascript/gremlin-javascript/test/unit/graphson-test.js | 7 +-- 2 files changed, 6 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5eaf312c/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js --
[1/3] tinkerpop git commit: Fixed a problem with writing GraphSON Date in js CTR
Repository: tinkerpop Updated Branches: refs/heads/master 7d4fb343e -> c2ffd946e Fixed a problem with writing GraphSON Date in js CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/fd643609 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/fd643609 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/fd643609 Branch: refs/heads/master Commit: fd643609a8d469130c89dde94d50b66ef0fadf0f Parents: db46c0f Author: Stephen Mallette Authored: Wed Jul 25 11:30:33 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 11:30:33 2018 -0400 -- .../gremlin-javascript/lib/structure/io/type-serializers.js | 2 +- .../javascript/gremlin-javascript/test/unit/graphson-test.js | 7 +-- 2 files changed, 6 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fd643609/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js index 4bc2935..fdf049f 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js @@ -65,7 +65,7 @@ class DateSerializer extends TypeSerializer { serialize(item) { return { [typeKey]: 'g:Date', - [valueKey]: item.value.getTime() + [valueKey]: item.getTime() }; } http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fd643609/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js index 8f749f7..b459407 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js @@ -50,8 +50,6 @@ describe('GraphSONReader', function () { const obj = { "@type" : "g:Date", "@value" : 1481750076295 }; const reader = new GraphSONReader(); const result = reader.read(obj); -console.log("++" + obj); -console.log("++" + result); assert.ok(result instanceof Date); }); it('should parse vertices from GraphSON', function () { @@ -104,6 +102,11 @@ describe('GraphSONWriter', function () { const writer = new GraphSONWriter(); assert.strictEqual(writer.write(2), '2'); }); + it('should write Date', function() { +const writer = new GraphSONWriter(); +const expected = JSON.stringify({ "@type" : "g:Date", "@value" : 1481750076295 }); +assert.strictEqual(writer.write(new Date(1481750076295)), expected); + }); it('should write boolean values', function () { const writer = new GraphSONWriter(); assert.strictEqual(writer.write(true), 'true');
[2/3] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/5eaf312c Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/5eaf312c Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/5eaf312c Branch: refs/heads/master Commit: 5eaf312c000d3145707513f20109956f5f97265a Parents: 1bd35dc fd64360 Author: Stephen Mallette Authored: Wed Jul 25 11:30:52 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 11:30:52 2018 -0400 -- .../gremlin-javascript/lib/structure/io/type-serializers.js | 2 +- .../javascript/gremlin-javascript/test/unit/graphson-test.js | 7 +-- 2 files changed, 6 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5eaf312c/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js --
[1/2] tinkerpop git commit: Fixed a problem with writing GraphSON Date in js CTR
Repository: tinkerpop Updated Branches: refs/heads/tp33 1bd35dcc5 -> 5eaf312c0 Fixed a problem with writing GraphSON Date in js CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/fd643609 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/fd643609 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/fd643609 Branch: refs/heads/tp33 Commit: fd643609a8d469130c89dde94d50b66ef0fadf0f Parents: db46c0f Author: Stephen Mallette Authored: Wed Jul 25 11:30:33 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 11:30:33 2018 -0400 -- .../gremlin-javascript/lib/structure/io/type-serializers.js | 2 +- .../javascript/gremlin-javascript/test/unit/graphson-test.js | 7 +-- 2 files changed, 6 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fd643609/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js index 4bc2935..fdf049f 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js @@ -65,7 +65,7 @@ class DateSerializer extends TypeSerializer { serialize(item) { return { [typeKey]: 'g:Date', - [valueKey]: item.value.getTime() + [valueKey]: item.getTime() }; } http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fd643609/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js index 8f749f7..b459407 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js @@ -50,8 +50,6 @@ describe('GraphSONReader', function () { const obj = { "@type" : "g:Date", "@value" : 1481750076295 }; const reader = new GraphSONReader(); const result = reader.read(obj); -console.log("++" + obj); -console.log("++" + result); assert.ok(result instanceof Date); }); it('should parse vertices from GraphSON', function () { @@ -104,6 +102,11 @@ describe('GraphSONWriter', function () { const writer = new GraphSONWriter(); assert.strictEqual(writer.write(2), '2'); }); + it('should write Date', function() { +const writer = new GraphSONWriter(); +const expected = JSON.stringify({ "@type" : "g:Date", "@value" : 1481750076295 }); +assert.strictEqual(writer.write(new Date(1481750076295)), expected); + }); it('should write boolean values', function () { const writer = new GraphSONWriter(); assert.strictEqual(writer.write(true), 'true');
tinkerpop git commit: Fixed a problem with writing GraphSON Date in js CTR
Repository: tinkerpop Updated Branches: refs/heads/tp32 db46c0f67 -> fd643609a Fixed a problem with writing GraphSON Date in js CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/fd643609 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/fd643609 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/fd643609 Branch: refs/heads/tp32 Commit: fd643609a8d469130c89dde94d50b66ef0fadf0f Parents: db46c0f Author: Stephen Mallette Authored: Wed Jul 25 11:30:33 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 11:30:33 2018 -0400 -- .../gremlin-javascript/lib/structure/io/type-serializers.js | 2 +- .../javascript/gremlin-javascript/test/unit/graphson-test.js | 7 +-- 2 files changed, 6 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fd643609/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js index 4bc2935..fdf049f 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js @@ -65,7 +65,7 @@ class DateSerializer extends TypeSerializer { serialize(item) { return { [typeKey]: 'g:Date', - [valueKey]: item.value.getTime() + [valueKey]: item.getTime() }; } http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fd643609/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js index 8f749f7..b459407 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js @@ -50,8 +50,6 @@ describe('GraphSONReader', function () { const obj = { "@type" : "g:Date", "@value" : 1481750076295 }; const reader = new GraphSONReader(); const result = reader.read(obj); -console.log("++" + obj); -console.log("++" + result); assert.ok(result instanceof Date); }); it('should parse vertices from GraphSON', function () { @@ -104,6 +102,11 @@ describe('GraphSONWriter', function () { const writer = new GraphSONWriter(); assert.strictEqual(writer.write(2), '2'); }); + it('should write Date', function() { +const writer = new GraphSONWriter(); +const expected = JSON.stringify({ "@type" : "g:Date", "@value" : 1481750076295 }); +assert.strictEqual(writer.write(new Date(1481750076295)), expected); + }); it('should write boolean values', function () { const writer = new GraphSONWriter(); assert.strictEqual(writer.write(true), 'true');
[3/3] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c2ffd946 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c2ffd946 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c2ffd946 Branch: refs/heads/master Commit: c2ffd946e61fb2704314ad5ccee0364318229190 Parents: 7d4fb34 5eaf312 Author: Stephen Mallette Authored: Wed Jul 25 11:30:59 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 11:30:59 2018 -0400 -- .../gremlin-javascript/lib/structure/io/type-serializers.js | 2 +- .../javascript/gremlin-javascript/test/unit/graphson-test.js | 7 +-- 2 files changed, 6 insertions(+), 3 deletions(-) --
tinkerpop git commit: Added Date GraphSON serialization for Javascript CTR
Repository: tinkerpop Updated Branches: refs/heads/tp32 f56a3e724 -> db46c0f67 Added Date GraphSON serialization for Javascript CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/db46c0f6 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/db46c0f6 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/db46c0f6 Branch: refs/heads/tp32 Commit: db46c0f67fb1f93b9ea76032dbd2a852c24effd4 Parents: f56a3e7 Author: Stephen Mallette Authored: Wed Jul 25 09:45:30 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 09:45:30 2018 -0400 -- CHANGELOG.asciidoc| 1 + .../lib/structure/io/graph-serializer.js | 2 ++ .../lib/structure/io/type-serializers.js | 18 ++ .../gremlin-javascript/test/unit/graphson-test.js | 8 4 files changed, 29 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/db46c0f6/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index f076ba1..0f2b18b 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -24,6 +24,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima === TinkerPop 3.2.10 (Release Date: NOT OFFICIALLY RELEASED YET) * Match numbers in `choose()` options using `NumberHelper` (match values, ignore data type). +* Added support for GraphSON serialization of `Date` in Javascript. * Fixed bug in Java driver where an disorderly shutdown of the server would cause the client to hang. * Added a dotnet template project that should make it easier to get started with Gremlin.Net. * Removed `ThreadInterruptCustomizerProvider` from documentation as a way to timeout. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/db46c0f6/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js index df05659..55b0265 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js @@ -155,6 +155,7 @@ const deserializers = { 'g:Int64': typeSerializers.NumberSerializer, 'g:Float': typeSerializers.NumberSerializer, 'g:Double': typeSerializers.NumberSerializer, + 'g:Date': typeSerializers.DateSerializer, 'g:Vertex': typeSerializers.VertexSerializer, 'g:Edge': typeSerializers.EdgeSerializer, 'g:VertexProperty': typeSerializers.VertexPropertySerializer, @@ -165,6 +166,7 @@ const deserializers = { const serializers = [ typeSerializers.NumberSerializer, + typeSerializers.DateSerializer, typeSerializers.BytecodeSerializer, typeSerializers.TraverserSerializer, typeSerializers.PSerializer, http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/db46c0f6/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js index 304888f..4bc2935 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js @@ -61,6 +61,23 @@ class NumberSerializer extends TypeSerializer { } } +class DateSerializer extends TypeSerializer { + serialize(item) { +return { + [typeKey]: 'g:Date', + [valueKey]: item.value.getTime() +}; + } + + deserialize(obj) { +return new Date(obj[valueKey]); + } + + canBeUsedFor(value) { +return (value instanceof Date); + } +} + class LongSerializer extends TypeSerializer { serialize(item) { return { @@ -278,6 +295,7 @@ class TSerializer extends TypeSerializer { module.exports = { BytecodeSerializer, + DateSerializer, EdgeSerializer, EnumSerializer, LambdaSerializer, http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/db46c0f6/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js
[2/2] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1bd35dcc Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1bd35dcc Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1bd35dcc Branch: refs/heads/tp33 Commit: 1bd35dcc5383373ed07fb72fdba7da274f982497 Parents: 421839d db46c0f Author: Stephen Mallette Authored: Wed Jul 25 09:46:11 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 09:46:11 2018 -0400 -- CHANGELOG.asciidoc| 1 + .../lib/structure/io/graph-serializer.js | 2 ++ .../lib/structure/io/type-serializers.js | 18 ++ .../gremlin-javascript/test/unit/graphson-test.js | 8 4 files changed, 29 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1bd35dcc/CHANGELOG.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1bd35dcc/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1bd35dcc/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js -- diff --cc gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js index 3b2b9e6,4bc2935..5044ee7 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js @@@ -283,78 -293,9 +300,79 @@@ class TSerializer extends TypeSerialize } } +class ArraySerializer extends TypeSerializer { + constructor(typeKey) { +super(); +this.typeKey = typeKey; + } + + deserialize(obj) { +const value = obj[valueKey]; +if (!Array.isArray(value)) { + throw new Error('Expected Array, obtained: ' + value); +} +return value.map(x => this.reader.read(x)); + } + + /** @param {Array} item */ + serialize(item) { +return { + [typeKey]: this.typeKey, + [valueKey]: item.map(x => this.writer.adaptObject(x)) +}; + } + + canBeUsedFor(value) { +return Array.isArray(value); + } +} + +class MapSerializer extends TypeSerializer { + deserialize(obj) { +const value = obj[valueKey]; +if (!Array.isArray(value)) { + throw new Error('Expected Array, obtained: ' + value); +} +const result = new Map(); +for (let i = 0; i < value.length; i += 2) { + result.set(this.reader.read(value[i]), this.reader.read(value[i + 1])); +} +return result; + } + + /** @param {Map} map */ + serialize(map) { +const arr = []; +map.forEach((v, k) => { + arr.push(this.writer.adaptObject(k)); + arr.push(this.writer.adaptObject(v)); +}); +return { + [typeKey]: 'g:Map', + [valueKey]: arr +}; + } + + canBeUsedFor(value) { +return value instanceof Map; + } +} + +class ListSerializer extends ArraySerializer { + constructor() { +super('g:List'); + } +} + +class SetSerializer extends ArraySerializer { + constructor() { +super('g:Set'); + } +} + module.exports = { BytecodeSerializer, + DateSerializer, EdgeSerializer, EnumSerializer, LambdaSerializer,
[1/2] tinkerpop git commit: Added Date GraphSON serialization for Javascript CTR
Repository: tinkerpop Updated Branches: refs/heads/tp33 421839d27 -> 1bd35dcc5 Added Date GraphSON serialization for Javascript CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/db46c0f6 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/db46c0f6 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/db46c0f6 Branch: refs/heads/tp33 Commit: db46c0f67fb1f93b9ea76032dbd2a852c24effd4 Parents: f56a3e7 Author: Stephen Mallette Authored: Wed Jul 25 09:45:30 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 09:45:30 2018 -0400 -- CHANGELOG.asciidoc| 1 + .../lib/structure/io/graph-serializer.js | 2 ++ .../lib/structure/io/type-serializers.js | 18 ++ .../gremlin-javascript/test/unit/graphson-test.js | 8 4 files changed, 29 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/db46c0f6/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index f076ba1..0f2b18b 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -24,6 +24,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima === TinkerPop 3.2.10 (Release Date: NOT OFFICIALLY RELEASED YET) * Match numbers in `choose()` options using `NumberHelper` (match values, ignore data type). +* Added support for GraphSON serialization of `Date` in Javascript. * Fixed bug in Java driver where an disorderly shutdown of the server would cause the client to hang. * Added a dotnet template project that should make it easier to get started with Gremlin.Net. * Removed `ThreadInterruptCustomizerProvider` from documentation as a way to timeout. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/db46c0f6/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js index df05659..55b0265 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js @@ -155,6 +155,7 @@ const deserializers = { 'g:Int64': typeSerializers.NumberSerializer, 'g:Float': typeSerializers.NumberSerializer, 'g:Double': typeSerializers.NumberSerializer, + 'g:Date': typeSerializers.DateSerializer, 'g:Vertex': typeSerializers.VertexSerializer, 'g:Edge': typeSerializers.EdgeSerializer, 'g:VertexProperty': typeSerializers.VertexPropertySerializer, @@ -165,6 +166,7 @@ const deserializers = { const serializers = [ typeSerializers.NumberSerializer, + typeSerializers.DateSerializer, typeSerializers.BytecodeSerializer, typeSerializers.TraverserSerializer, typeSerializers.PSerializer, http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/db46c0f6/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js index 304888f..4bc2935 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js @@ -61,6 +61,23 @@ class NumberSerializer extends TypeSerializer { } } +class DateSerializer extends TypeSerializer { + serialize(item) { +return { + [typeKey]: 'g:Date', + [valueKey]: item.value.getTime() +}; + } + + deserialize(obj) { +return new Date(obj[valueKey]); + } + + canBeUsedFor(value) { +return (value instanceof Date); + } +} + class LongSerializer extends TypeSerializer { serialize(item) { return { @@ -278,6 +295,7 @@ class TSerializer extends TypeSerializer { module.exports = { BytecodeSerializer, + DateSerializer, EdgeSerializer, EnumSerializer, LambdaSerializer, http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/db46c0f6/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js
[3/3] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/7d4fb343 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/7d4fb343 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/7d4fb343 Branch: refs/heads/master Commit: 7d4fb343e36becfeebc4f08b8cd8a464268b6d24 Parents: a14cf28 1bd35dc Author: Stephen Mallette Authored: Wed Jul 25 09:46:23 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 09:46:23 2018 -0400 -- CHANGELOG.asciidoc| 1 + .../lib/structure/io/graph-serializer.js | 2 ++ .../lib/structure/io/type-serializers.js | 18 ++ .../gremlin-javascript/test/unit/graphson-test.js | 8 4 files changed, 29 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7d4fb343/CHANGELOG.asciidoc --
[1/3] tinkerpop git commit: Added Date GraphSON serialization for Javascript CTR
Repository: tinkerpop Updated Branches: refs/heads/master a14cf28f4 -> 7d4fb343e Added Date GraphSON serialization for Javascript CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/db46c0f6 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/db46c0f6 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/db46c0f6 Branch: refs/heads/master Commit: db46c0f67fb1f93b9ea76032dbd2a852c24effd4 Parents: f56a3e7 Author: Stephen Mallette Authored: Wed Jul 25 09:45:30 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 09:45:30 2018 -0400 -- CHANGELOG.asciidoc| 1 + .../lib/structure/io/graph-serializer.js | 2 ++ .../lib/structure/io/type-serializers.js | 18 ++ .../gremlin-javascript/test/unit/graphson-test.js | 8 4 files changed, 29 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/db46c0f6/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index f076ba1..0f2b18b 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -24,6 +24,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima === TinkerPop 3.2.10 (Release Date: NOT OFFICIALLY RELEASED YET) * Match numbers in `choose()` options using `NumberHelper` (match values, ignore data type). +* Added support for GraphSON serialization of `Date` in Javascript. * Fixed bug in Java driver where an disorderly shutdown of the server would cause the client to hang. * Added a dotnet template project that should make it easier to get started with Gremlin.Net. * Removed `ThreadInterruptCustomizerProvider` from documentation as a way to timeout. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/db46c0f6/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js index df05659..55b0265 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js @@ -155,6 +155,7 @@ const deserializers = { 'g:Int64': typeSerializers.NumberSerializer, 'g:Float': typeSerializers.NumberSerializer, 'g:Double': typeSerializers.NumberSerializer, + 'g:Date': typeSerializers.DateSerializer, 'g:Vertex': typeSerializers.VertexSerializer, 'g:Edge': typeSerializers.EdgeSerializer, 'g:VertexProperty': typeSerializers.VertexPropertySerializer, @@ -165,6 +166,7 @@ const deserializers = { const serializers = [ typeSerializers.NumberSerializer, + typeSerializers.DateSerializer, typeSerializers.BytecodeSerializer, typeSerializers.TraverserSerializer, typeSerializers.PSerializer, http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/db46c0f6/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js index 304888f..4bc2935 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js @@ -61,6 +61,23 @@ class NumberSerializer extends TypeSerializer { } } +class DateSerializer extends TypeSerializer { + serialize(item) { +return { + [typeKey]: 'g:Date', + [valueKey]: item.value.getTime() +}; + } + + deserialize(obj) { +return new Date(obj[valueKey]); + } + + canBeUsedFor(value) { +return (value instanceof Date); + } +} + class LongSerializer extends TypeSerializer { serialize(item) { return { @@ -278,6 +295,7 @@ class TSerializer extends TypeSerializer { module.exports = { BytecodeSerializer, + DateSerializer, EdgeSerializer, EnumSerializer, LambdaSerializer, http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/db46c0f6/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js -- diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphson-test.js
[2/3] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1bd35dcc Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1bd35dcc Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1bd35dcc Branch: refs/heads/master Commit: 1bd35dcc5383373ed07fb72fdba7da274f982497 Parents: 421839d db46c0f Author: Stephen Mallette Authored: Wed Jul 25 09:46:11 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 09:46:11 2018 -0400 -- CHANGELOG.asciidoc| 1 + .../lib/structure/io/graph-serializer.js | 2 ++ .../lib/structure/io/type-serializers.js | 18 ++ .../gremlin-javascript/test/unit/graphson-test.js | 8 4 files changed, 29 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1bd35dcc/CHANGELOG.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1bd35dcc/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/graph-serializer.js -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1bd35dcc/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js -- diff --cc gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js index 3b2b9e6,4bc2935..5044ee7 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/type-serializers.js @@@ -283,78 -293,9 +300,79 @@@ class TSerializer extends TypeSerialize } } +class ArraySerializer extends TypeSerializer { + constructor(typeKey) { +super(); +this.typeKey = typeKey; + } + + deserialize(obj) { +const value = obj[valueKey]; +if (!Array.isArray(value)) { + throw new Error('Expected Array, obtained: ' + value); +} +return value.map(x => this.reader.read(x)); + } + + /** @param {Array} item */ + serialize(item) { +return { + [typeKey]: this.typeKey, + [valueKey]: item.map(x => this.writer.adaptObject(x)) +}; + } + + canBeUsedFor(value) { +return Array.isArray(value); + } +} + +class MapSerializer extends TypeSerializer { + deserialize(obj) { +const value = obj[valueKey]; +if (!Array.isArray(value)) { + throw new Error('Expected Array, obtained: ' + value); +} +const result = new Map(); +for (let i = 0; i < value.length; i += 2) { + result.set(this.reader.read(value[i]), this.reader.read(value[i + 1])); +} +return result; + } + + /** @param {Map} map */ + serialize(map) { +const arr = []; +map.forEach((v, k) => { + arr.push(this.writer.adaptObject(k)); + arr.push(this.writer.adaptObject(v)); +}); +return { + [typeKey]: 'g:Map', + [valueKey]: arr +}; + } + + canBeUsedFor(value) { +return value instanceof Map; + } +} + +class ListSerializer extends ArraySerializer { + constructor() { +super('g:List'); + } +} + +class SetSerializer extends ArraySerializer { + constructor() { +super('g:Set'); + } +} + module.exports = { BytecodeSerializer, + DateSerializer, EdgeSerializer, EnumSerializer, LambdaSerializer,
tinkerpop git commit: Added GLV specific warnings in the step docs to point out step naming differences CTR
Repository: tinkerpop Updated Branches: refs/heads/tp32 9986493ba -> f56a3e724 Added GLV specific warnings in the step docs to point out step naming differences CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/f56a3e72 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/f56a3e72 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/f56a3e72 Branch: refs/heads/tp32 Commit: f56a3e724e08c33b55b0d131438db66b95c4e54d Parents: 9986493 Author: Stephen Mallette Authored: Wed Jul 25 08:58:41 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 08:58:41 2018 -0400 -- docs/src/reference/gremlin-variants.asciidoc | 2 +- docs/src/reference/the-traversal.asciidoc| 63 +++ 2 files changed, 64 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f56a3e72/docs/src/reference/gremlin-variants.asciidoc -- diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc index 04090b5..e8b4c21 100644 --- a/docs/src/reference/gremlin-variants.asciidoc +++ b/docs/src/reference/gremlin-variants.asciidoc @@ -88,7 +88,7 @@ link:https://en.wikipedia.org/wiki/CPython[CPython] machine. Python's syntax has namespaces (`a(b())` vs `a(__.b())`). As such, anyone familiar with Gremlin-Java will immediately be able to work with Gremlin-Python. Moreover, there are a few added constructs to Gremlin-Python that make traversals a bit more succinct. -WARNING: In Python, `as`, `in`, `and`, `or`, `is`, `not`, `from`, and `global` are reserved words. Gremlin-Python simply +WARNING: In Python, `and`, `as`, `from`, `global`, `in`, `is`, `not`, and `or` are reserved words. Gremlin-Python simply postfixes `_` to the end of these terms for their use with graph traversal. For instance: `g.V().as_('a').in_().as_('b').select('a','b')`. To install Gremlin-Python, use Python's link:https://en.wikipedia.org/wiki/Pip_(package_manager)[pip] package manager. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f56a3e72/docs/src/reference/the-traversal.asciidoc -- diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc index 8cc6ac0..057ec6a 100644 --- a/docs/src/reference/the-traversal.asciidoc +++ b/docs/src/reference/the-traversal.asciidoc @@ -315,6 +315,11 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem The `and()`-step ensures that all provided traversals yield a result (*filter*). Please see <> for or-semantics. +[NOTE, caption=Python] + +The term `and` is a reserved word in Python, and therefore must be referred to in Gremlin with `and_()`. + + [gremlin-groovy,modern] g.V().and( @@ -345,6 +350,17 @@ The `as()`-step is not a real step, but a "step modulator" similar to <>, <>, and path. +[NOTE, caption=Groovy] + +The term `as` is a reserved word in Groovy, and when therefore used as part of an anonymous traversal must be referred +to in Gremlin with the double underscore `__.as()`. + + +[NOTE, caption=Python] + +The term `as` is a reserved word in Python, and therefore must be referred to in Gremlin with `as_()`. + + [gremlin-groovy,modern] g.V().as('a').out('created').as('b').select('a','b')<1> @@ -809,6 +825,16 @@ means by which they are added. The general pattern is `step().from()`. See <>, <>, <>, and <>. +[NOTE, caption=Javasacript] + +The term `from` is a reserved word in Javascript, and therefore must be referred to in Gremlin with `from_()`. + + +[NOTE, caption=Python] + +The term `from` is a reserved word in Python, and therefore must be referred to in Gremlin with `from_()`. + + *Additional References* link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#from-java.lang.String-++[`from(String)`], @@ -1045,6 +1071,11 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem It is possible to filter scalar values using `is()`-step (*filter*). +[NOTE, caption=Python] + +The term `is` is a reserved word in Python, and therefore must be referred to in Gremlin with `is_()`. + + [gremlin-groovy,modern] g.V().values('age').is(32) @@ -1482,6 +1513,17 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem The `not()`-step (*filter*) removes objects from the traversal stream when the traversal provided as an argument returns an object. +[NOTE, caption=Groovy] + +The term `not` is a reserved word in Groovy, and when therefore
[1/2] tinkerpop git commit: Added GLV specific warnings in the step docs to point out step naming differences CTR
Repository: tinkerpop Updated Branches: refs/heads/tp33 ebee26c47 -> 421839d27 Added GLV specific warnings in the step docs to point out step naming differences CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/f56a3e72 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/f56a3e72 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/f56a3e72 Branch: refs/heads/tp33 Commit: f56a3e724e08c33b55b0d131438db66b95c4e54d Parents: 9986493 Author: Stephen Mallette Authored: Wed Jul 25 08:58:41 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 08:58:41 2018 -0400 -- docs/src/reference/gremlin-variants.asciidoc | 2 +- docs/src/reference/the-traversal.asciidoc| 63 +++ 2 files changed, 64 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f56a3e72/docs/src/reference/gremlin-variants.asciidoc -- diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc index 04090b5..e8b4c21 100644 --- a/docs/src/reference/gremlin-variants.asciidoc +++ b/docs/src/reference/gremlin-variants.asciidoc @@ -88,7 +88,7 @@ link:https://en.wikipedia.org/wiki/CPython[CPython] machine. Python's syntax has namespaces (`a(b())` vs `a(__.b())`). As such, anyone familiar with Gremlin-Java will immediately be able to work with Gremlin-Python. Moreover, there are a few added constructs to Gremlin-Python that make traversals a bit more succinct. -WARNING: In Python, `as`, `in`, `and`, `or`, `is`, `not`, `from`, and `global` are reserved words. Gremlin-Python simply +WARNING: In Python, `and`, `as`, `from`, `global`, `in`, `is`, `not`, and `or` are reserved words. Gremlin-Python simply postfixes `_` to the end of these terms for their use with graph traversal. For instance: `g.V().as_('a').in_().as_('b').select('a','b')`. To install Gremlin-Python, use Python's link:https://en.wikipedia.org/wiki/Pip_(package_manager)[pip] package manager. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f56a3e72/docs/src/reference/the-traversal.asciidoc -- diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc index 8cc6ac0..057ec6a 100644 --- a/docs/src/reference/the-traversal.asciidoc +++ b/docs/src/reference/the-traversal.asciidoc @@ -315,6 +315,11 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem The `and()`-step ensures that all provided traversals yield a result (*filter*). Please see <> for or-semantics. +[NOTE, caption=Python] + +The term `and` is a reserved word in Python, and therefore must be referred to in Gremlin with `and_()`. + + [gremlin-groovy,modern] g.V().and( @@ -345,6 +350,17 @@ The `as()`-step is not a real step, but a "step modulator" similar to <>, <>, and path. +[NOTE, caption=Groovy] + +The term `as` is a reserved word in Groovy, and when therefore used as part of an anonymous traversal must be referred +to in Gremlin with the double underscore `__.as()`. + + +[NOTE, caption=Python] + +The term `as` is a reserved word in Python, and therefore must be referred to in Gremlin with `as_()`. + + [gremlin-groovy,modern] g.V().as('a').out('created').as('b').select('a','b')<1> @@ -809,6 +825,16 @@ means by which they are added. The general pattern is `step().from()`. See <>, <>, <>, and <>. +[NOTE, caption=Javasacript] + +The term `from` is a reserved word in Javascript, and therefore must be referred to in Gremlin with `from_()`. + + +[NOTE, caption=Python] + +The term `from` is a reserved word in Python, and therefore must be referred to in Gremlin with `from_()`. + + *Additional References* link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#from-java.lang.String-++[`from(String)`], @@ -1045,6 +1071,11 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem It is possible to filter scalar values using `is()`-step (*filter*). +[NOTE, caption=Python] + +The term `is` is a reserved word in Python, and therefore must be referred to in Gremlin with `is_()`. + + [gremlin-groovy,modern] g.V().values('age').is(32) @@ -1482,6 +1513,17 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem The `not()`-step (*filter*) removes objects from the traversal stream when the traversal provided as an argument returns an object. +[NOTE, caption=Groovy] + +The term `not` is a reserved word in Groovy, and when therefore
[2/2] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/421839d2 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/421839d2 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/421839d2 Branch: refs/heads/tp33 Commit: 421839d2744d679afe922e55e814b34fb61cfec5 Parents: ebee26c f56a3e7 Author: Stephen Mallette Authored: Wed Jul 25 08:59:31 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 08:59:31 2018 -0400 -- docs/src/reference/gremlin-variants.asciidoc | 2 +- docs/src/reference/the-traversal.asciidoc| 63 +++ 2 files changed, 64 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/421839d2/docs/src/reference/gremlin-variants.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/421839d2/docs/src/reference/the-traversal.asciidoc --
[2/3] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/421839d2 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/421839d2 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/421839d2 Branch: refs/heads/master Commit: 421839d2744d679afe922e55e814b34fb61cfec5 Parents: ebee26c f56a3e7 Author: Stephen Mallette Authored: Wed Jul 25 08:59:31 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 08:59:31 2018 -0400 -- docs/src/reference/gremlin-variants.asciidoc | 2 +- docs/src/reference/the-traversal.asciidoc| 63 +++ 2 files changed, 64 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/421839d2/docs/src/reference/gremlin-variants.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/421839d2/docs/src/reference/the-traversal.asciidoc --
[1/3] tinkerpop git commit: Added GLV specific warnings in the step docs to point out step naming differences CTR
Repository: tinkerpop Updated Branches: refs/heads/master dbbe4482f -> a14cf28f4 Added GLV specific warnings in the step docs to point out step naming differences CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/f56a3e72 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/f56a3e72 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/f56a3e72 Branch: refs/heads/master Commit: f56a3e724e08c33b55b0d131438db66b95c4e54d Parents: 9986493 Author: Stephen Mallette Authored: Wed Jul 25 08:58:41 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 08:58:41 2018 -0400 -- docs/src/reference/gremlin-variants.asciidoc | 2 +- docs/src/reference/the-traversal.asciidoc| 63 +++ 2 files changed, 64 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f56a3e72/docs/src/reference/gremlin-variants.asciidoc -- diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc index 04090b5..e8b4c21 100644 --- a/docs/src/reference/gremlin-variants.asciidoc +++ b/docs/src/reference/gremlin-variants.asciidoc @@ -88,7 +88,7 @@ link:https://en.wikipedia.org/wiki/CPython[CPython] machine. Python's syntax has namespaces (`a(b())` vs `a(__.b())`). As such, anyone familiar with Gremlin-Java will immediately be able to work with Gremlin-Python. Moreover, there are a few added constructs to Gremlin-Python that make traversals a bit more succinct. -WARNING: In Python, `as`, `in`, `and`, `or`, `is`, `not`, `from`, and `global` are reserved words. Gremlin-Python simply +WARNING: In Python, `and`, `as`, `from`, `global`, `in`, `is`, `not`, and `or` are reserved words. Gremlin-Python simply postfixes `_` to the end of these terms for their use with graph traversal. For instance: `g.V().as_('a').in_().as_('b').select('a','b')`. To install Gremlin-Python, use Python's link:https://en.wikipedia.org/wiki/Pip_(package_manager)[pip] package manager. http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f56a3e72/docs/src/reference/the-traversal.asciidoc -- diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc index 8cc6ac0..057ec6a 100644 --- a/docs/src/reference/the-traversal.asciidoc +++ b/docs/src/reference/the-traversal.asciidoc @@ -315,6 +315,11 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem The `and()`-step ensures that all provided traversals yield a result (*filter*). Please see <> for or-semantics. +[NOTE, caption=Python] + +The term `and` is a reserved word in Python, and therefore must be referred to in Gremlin with `and_()`. + + [gremlin-groovy,modern] g.V().and( @@ -345,6 +350,17 @@ The `as()`-step is not a real step, but a "step modulator" similar to <>, <>, and path. +[NOTE, caption=Groovy] + +The term `as` is a reserved word in Groovy, and when therefore used as part of an anonymous traversal must be referred +to in Gremlin with the double underscore `__.as()`. + + +[NOTE, caption=Python] + +The term `as` is a reserved word in Python, and therefore must be referred to in Gremlin with `as_()`. + + [gremlin-groovy,modern] g.V().as('a').out('created').as('b').select('a','b')<1> @@ -809,6 +825,16 @@ means by which they are added. The general pattern is `step().from()`. See <>, <>, <>, and <>. +[NOTE, caption=Javasacript] + +The term `from` is a reserved word in Javascript, and therefore must be referred to in Gremlin with `from_()`. + + +[NOTE, caption=Python] + +The term `from` is a reserved word in Python, and therefore must be referred to in Gremlin with `from_()`. + + *Additional References* link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#from-java.lang.String-++[`from(String)`], @@ -1045,6 +1071,11 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem It is possible to filter scalar values using `is()`-step (*filter*). +[NOTE, caption=Python] + +The term `is` is a reserved word in Python, and therefore must be referred to in Gremlin with `is_()`. + + [gremlin-groovy,modern] g.V().values('age').is(32) @@ -1482,6 +1513,17 @@ link:++http://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/grem The `not()`-step (*filter*) removes objects from the traversal stream when the traversal provided as an argument returns an object. +[NOTE, caption=Groovy] + +The term `not` is a reserved word in Groovy, and when
[3/3] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/a14cf28f Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/a14cf28f Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/a14cf28f Branch: refs/heads/master Commit: a14cf28f45742f47f15b768a90355ca9e9e89e17 Parents: dbbe448 421839d Author: Stephen Mallette Authored: Wed Jul 25 08:59:39 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 08:59:39 2018 -0400 -- docs/src/reference/gremlin-variants.asciidoc | 2 +- docs/src/reference/the-traversal.asciidoc| 63 +++ 2 files changed, 64 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a14cf28f/docs/src/reference/gremlin-variants.asciidoc -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a14cf28f/docs/src/reference/the-traversal.asciidoc --
tinkerpop git commit: Added warning for postfixes in gremlin-javascript CTR
Repository: tinkerpop Updated Branches: refs/heads/tp32 ecd944e60 -> 9986493ba Added warning for postfixes in gremlin-javascript CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9986493b Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9986493b Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9986493b Branch: refs/heads/tp32 Commit: 9986493baed59c964673460324a5abcd2fbb2e98 Parents: ecd944e Author: Stephen Mallette Authored: Wed Jul 25 07:43:28 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 07:43:28 2018 -0400 -- docs/src/reference/gremlin-variants.asciidoc | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9986493b/docs/src/reference/gremlin-variants.asciidoc -- diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc index 7a85ab1..04090b5 100644 --- a/docs/src/reference/gremlin-variants.asciidoc +++ b/docs/src/reference/gremlin-variants.asciidoc @@ -491,6 +491,9 @@ traversal source. Since Gremlin-JavaScript currently doesn't support lambda expressions, all traversals can be translated to Gremlin-Java on the remote location (e.g. Gremlin Server). +WARNING: In Javascript, `from` and `in` are reserved words. Gremlin-Javascript simply postfixes `_` to the end of +these terms for their use with graph traversal. For instance: `g.V().in_().out()` + IMPORTANT: Gremlin-JavaScriptâs `Traversal` base class supports the standard Gremlin methods such as `next()` and `toList()` Such "terminal" methods trigger the evaluation of the traversal.
[3/3] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/dbbe4482 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/dbbe4482 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/dbbe4482 Branch: refs/heads/master Commit: dbbe4482ff5b7b892d68528eb5070cb8ca91b834 Parents: e1e15fa ebee26c Author: Stephen Mallette Authored: Wed Jul 25 07:43:53 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 07:43:53 2018 -0400 -- docs/src/reference/gremlin-variants.asciidoc | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dbbe4482/docs/src/reference/gremlin-variants.asciidoc --
[2/2] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/ebee26c4 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/ebee26c4 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/ebee26c4 Branch: refs/heads/tp33 Commit: ebee26c47fd3ec341d95fcdd6d87190d27e37f27 Parents: 1ca5ef3 9986493 Author: Stephen Mallette Authored: Wed Jul 25 07:43:46 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 07:43:46 2018 -0400 -- docs/src/reference/gremlin-variants.asciidoc | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ebee26c4/docs/src/reference/gremlin-variants.asciidoc --
[1/2] tinkerpop git commit: Added warning for postfixes in gremlin-javascript CTR
Repository: tinkerpop Updated Branches: refs/heads/tp33 1ca5ef3d1 -> ebee26c47 Added warning for postfixes in gremlin-javascript CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9986493b Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9986493b Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9986493b Branch: refs/heads/tp33 Commit: 9986493baed59c964673460324a5abcd2fbb2e98 Parents: ecd944e Author: Stephen Mallette Authored: Wed Jul 25 07:43:28 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 07:43:28 2018 -0400 -- docs/src/reference/gremlin-variants.asciidoc | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9986493b/docs/src/reference/gremlin-variants.asciidoc -- diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc index 7a85ab1..04090b5 100644 --- a/docs/src/reference/gremlin-variants.asciidoc +++ b/docs/src/reference/gremlin-variants.asciidoc @@ -491,6 +491,9 @@ traversal source. Since Gremlin-JavaScript currently doesn't support lambda expressions, all traversals can be translated to Gremlin-Java on the remote location (e.g. Gremlin Server). +WARNING: In Javascript, `from` and `in` are reserved words. Gremlin-Javascript simply postfixes `_` to the end of +these terms for their use with graph traversal. For instance: `g.V().in_().out()` + IMPORTANT: Gremlin-JavaScriptâs `Traversal` base class supports the standard Gremlin methods such as `next()` and `toList()` Such "terminal" methods trigger the evaluation of the traversal.
[1/3] tinkerpop git commit: Added warning for postfixes in gremlin-javascript CTR
Repository: tinkerpop Updated Branches: refs/heads/master e1e15fa10 -> dbbe4482f Added warning for postfixes in gremlin-javascript CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9986493b Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9986493b Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9986493b Branch: refs/heads/master Commit: 9986493baed59c964673460324a5abcd2fbb2e98 Parents: ecd944e Author: Stephen Mallette Authored: Wed Jul 25 07:43:28 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 07:43:28 2018 -0400 -- docs/src/reference/gremlin-variants.asciidoc | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9986493b/docs/src/reference/gremlin-variants.asciidoc -- diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc index 7a85ab1..04090b5 100644 --- a/docs/src/reference/gremlin-variants.asciidoc +++ b/docs/src/reference/gremlin-variants.asciidoc @@ -491,6 +491,9 @@ traversal source. Since Gremlin-JavaScript currently doesn't support lambda expressions, all traversals can be translated to Gremlin-Java on the remote location (e.g. Gremlin Server). +WARNING: In Javascript, `from` and `in` are reserved words. Gremlin-Javascript simply postfixes `_` to the end of +these terms for their use with graph traversal. For instance: `g.V().in_().out()` + IMPORTANT: Gremlin-JavaScriptâs `Traversal` base class supports the standard Gremlin methods such as `next()` and `toList()` Such "terminal" methods trigger the evaluation of the traversal.
[2/3] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/ebee26c4 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/ebee26c4 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/ebee26c4 Branch: refs/heads/master Commit: ebee26c47fd3ec341d95fcdd6d87190d27e37f27 Parents: 1ca5ef3 9986493 Author: Stephen Mallette Authored: Wed Jul 25 07:43:46 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 07:43:46 2018 -0400 -- docs/src/reference/gremlin-variants.asciidoc | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ebee26c4/docs/src/reference/gremlin-variants.asciidoc --
[2/2] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1ca5ef3d Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1ca5ef3d Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1ca5ef3d Branch: refs/heads/tp33 Commit: 1ca5ef3d15bfc7acc2f53268ec8a60f6f7e956c9 Parents: 3aa6dcf ecd944e Author: Stephen Mallette Authored: Wed Jul 25 07:01:05 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 07:01:05 2018 -0400 -- CHANGELOG.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1ca5ef3d/CHANGELOG.asciidoc --
tinkerpop git commit: Minor fix in formatting CTR
Repository: tinkerpop Updated Branches: refs/heads/tp32 f9ad72a25 -> ecd944e60 Minor fix in formatting CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/ecd944e6 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/ecd944e6 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/ecd944e6 Branch: refs/heads/tp32 Commit: ecd944e6018ddd87a917cde82541d2068a267ae4 Parents: f9ad72a Author: Stephen Mallette Authored: Wed Jul 25 07:00:45 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 07:00:45 2018 -0400 -- CHANGELOG.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ecd944e6/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 6270880..f076ba1 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -33,7 +33,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Improved performance of `TraversalVertexProgram` and related infrastructure. * Deprecated `BulkLoaderVertexProgram` and related infrastructure. * Deprecated `BulkDumperVertexProgram` with the more aptly named `CloneVertexProgram`. -* Added `createGratefulDead()`to `TinkerFactory` to help make it easier to try to instantiate that toy graph. +* Added `createGratefulDead()` to `TinkerFactory` to help make it easier to try to instantiate that toy graph. * Added identifiers to edges in the Kitchen Sink toy graph. * Ordered the loading of plugins in the Gremlin Console by their position in the configuration file. * Refactored the Gremlin Server integration testing framework and streamlined that infrastructure.
[3/3] tinkerpop git commit: Merge branch 'tp33'
Merge branch 'tp33' Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/e1e15fa1 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/e1e15fa1 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/e1e15fa1 Branch: refs/heads/master Commit: e1e15fa10a5a7f183be81143bfb8a902b483610a Parents: aad0102 1ca5ef3 Author: Stephen Mallette Authored: Wed Jul 25 07:01:18 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 07:01:18 2018 -0400 -- CHANGELOG.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e1e15fa1/CHANGELOG.asciidoc --
[1/2] tinkerpop git commit: Minor fix in formatting CTR
Repository: tinkerpop Updated Branches: refs/heads/tp33 3aa6dcf41 -> 1ca5ef3d1 Minor fix in formatting CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/ecd944e6 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/ecd944e6 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/ecd944e6 Branch: refs/heads/tp33 Commit: ecd944e6018ddd87a917cde82541d2068a267ae4 Parents: f9ad72a Author: Stephen Mallette Authored: Wed Jul 25 07:00:45 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 07:00:45 2018 -0400 -- CHANGELOG.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ecd944e6/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 6270880..f076ba1 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -33,7 +33,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Improved performance of `TraversalVertexProgram` and related infrastructure. * Deprecated `BulkLoaderVertexProgram` and related infrastructure. * Deprecated `BulkDumperVertexProgram` with the more aptly named `CloneVertexProgram`. -* Added `createGratefulDead()`to `TinkerFactory` to help make it easier to try to instantiate that toy graph. +* Added `createGratefulDead()` to `TinkerFactory` to help make it easier to try to instantiate that toy graph. * Added identifiers to edges in the Kitchen Sink toy graph. * Ordered the loading of plugins in the Gremlin Console by their position in the configuration file. * Refactored the Gremlin Server integration testing framework and streamlined that infrastructure.
[1/3] tinkerpop git commit: Minor fix in formatting CTR
Repository: tinkerpop Updated Branches: refs/heads/master aad010227 -> e1e15fa10 Minor fix in formatting CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/ecd944e6 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/ecd944e6 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/ecd944e6 Branch: refs/heads/master Commit: ecd944e6018ddd87a917cde82541d2068a267ae4 Parents: f9ad72a Author: Stephen Mallette Authored: Wed Jul 25 07:00:45 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 07:00:45 2018 -0400 -- CHANGELOG.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ecd944e6/CHANGELOG.asciidoc -- diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 6270880..f076ba1 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -33,7 +33,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Improved performance of `TraversalVertexProgram` and related infrastructure. * Deprecated `BulkLoaderVertexProgram` and related infrastructure. * Deprecated `BulkDumperVertexProgram` with the more aptly named `CloneVertexProgram`. -* Added `createGratefulDead()`to `TinkerFactory` to help make it easier to try to instantiate that toy graph. +* Added `createGratefulDead()` to `TinkerFactory` to help make it easier to try to instantiate that toy graph. * Added identifiers to edges in the Kitchen Sink toy graph. * Ordered the loading of plugins in the Gremlin Console by their position in the configuration file. * Refactored the Gremlin Server integration testing framework and streamlined that infrastructure.
[2/3] tinkerpop git commit: Merge branch 'tp32' into tp33
Merge branch 'tp32' into tp33 Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1ca5ef3d Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1ca5ef3d Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1ca5ef3d Branch: refs/heads/master Commit: 1ca5ef3d15bfc7acc2f53268ec8a60f6f7e956c9 Parents: 3aa6dcf ecd944e Author: Stephen Mallette Authored: Wed Jul 25 07:01:05 2018 -0400 Committer: Stephen Mallette Committed: Wed Jul 25 07:01:05 2018 -0400 -- CHANGELOG.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1ca5ef3d/CHANGELOG.asciidoc --