Merge branch '3.6-dev'
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index fdabcbb..6300bbc 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -31,4 +31,27 @@
target-branch: "3.5-dev"
labels:
- "javascript"
+ - "dependencies"
+ - package-ecosystem: "gomod"
+ directory: "/gremlin-go"
+ schedule:
+ interval: "daily"
+ target-branch: "3.5-dev"
+ labels:
+ - "go"
+ - "dependencies"
+ - package-ecosystem: "maven"
+ directory: "/"
+ schedule:
+ interval: "daily"
+ target-branch: "3.5-dev"
+ labels:
+ - "java"
+ - "dependencies"
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "daily"
+ target-branch: "3.5-dev"
+ labels:
- "dependencies"
\ No newline at end of file
diff --git a/.mailmap b/.mailmap
index 892e4ec..27d9bc1 100644
--- a/.mailmap
+++ b/.mailmap
@@ -18,3 +18,9 @@
Stephen Mallette <spmallette@users.noreply.github.com>
Stephen Mallette <spmva@genoprime.com>
Stephen Mallette <spmva@genprime.com>
+Valentyn Kahamlyk <vkagamlyk@users.noreply.github.com>
+Valentyn Kahamlyk <valentynk@bitquilltech.com>
+Jorge Bay-Gondra <jorgebaygondra@gmail.com>
+Jorge Bay-Gondra <jorgebaygondra@gmail.com>
+
+
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index c4ec706..7bc5b73 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -16,9 +16,25 @@
////
= TinkerPop3 CHANGELOG
-== TinkerPop 3.6.0 (Tinkerheart)
+== TinkerPop 3.7.0 (NOT OFFICIALLY NAMED YET)
-image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/images/gremlin-victorian.png[width=185]
+image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/images/gremlin-standing.png[width=185]
+
+[[release-3-7.0]]
+=== TinkerPop 3.7.0 (Release Date: NOT OFFICIALLY RELEASED YET)
+
+This release also includes changes from <<release-3-6-XXX, 3.6.XXX>>.
+
+* Removed `connectOnStartup` configuration option from gremlin-javascript.
+* Changed `Gremlin.version()` to read from the more specificly named `tinkerpop-version` attribute.
+* Added warning on vertex property cardinality mismatch when reading GraphML.
+* Bumped to `ws` 8.x for `gremlin-javascript`.
+* Added support for mid-traversal `E()`-steps to Gremlin core and GLV's.
+* Added nullable annotations to Gremlin.NET.
+* Bumped Objenesis to 3.3 in `gremlin-shaded`.
+* Moves java serializer, message and token classes from `gremlin-driver` to a new `gremlin-util` module.
+* Moves `SimpleSocketServer` and its initializers to a new `gremlin-tools/gremlin-socket-server` module.
+* Configures `gremlin-socket-server` to build a docker image which can be used for testing GLV's. (Can be skipped with -DskipImageBuild)
[[release-3-6-2]]
=== TinkerPop 3.6.2 (Release Date: NOT OFFICIALLY RELEASED YET)
diff --git a/docs/gremlint/package-lock.json b/docs/gremlint/package-lock.json
index 28b2c57..6a9d332 100644
--- a/docs/gremlint/package-lock.json
+++ b/docs/gremlint/package-lock.json
@@ -17,20 +17,20 @@
"react-scripts": "^5.0.0",
"sharp-router": "^4.1.5",
"styled-components": "^5.3.3",
- "typescript": "^4.4.4",
+ "typescript": "^4.7.3",
"web-vitals": "^2.1.3"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.16.1",
"@testing-library/react": "^12.1.2",
"@testing-library/user-event": "^13.5.0",
- "@types/jest": "^27.4.0",
+ "@types/jest": "^27.5.0",
"@types/node": "^17.0.8",
"@types/react": "^17.0.38",
"@types/react-dom": "^17.0.11",
"@types/styled-components": "^5.1.20",
"gh-pages": "^3.1.0",
- "prettier": "^2.5.1",
+ "prettier": "^2.7.0",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0"
}
@@ -3008,12 +3008,12 @@
}
},
"node_modules/@types/jest": {
- "version": "27.4.0",
- "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.4.0.tgz",
- "integrity": "sha512-gHl8XuC1RZ8H2j5sHv/JqsaxXkDDM9iDOgu0Wp8sjs4u/snb2PVehyWXJPr+ORA0RPpgw231mnutWI1+0hgjIQ==",
+ "version": "27.5.2",
+ "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.5.2.tgz",
+ "integrity": "sha512-mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA==",
"dev": true,
"dependencies": {
- "jest-diff": "^27.0.0",
+ "jest-matcher-utils": "^27.0.0",
"pretty-format": "^27.0.0"
}
},
@@ -11283,15 +11283,18 @@
}
},
"node_modules/prettier": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz",
- "integrity": "sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==",
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz",
+ "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==",
"dev": true,
"bin": {
"prettier": "bin-prettier.js"
},
"engines": {
"node": ">=10.13.0"
+ },
+ "funding": {
+ "url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/pretty-bytes": {
@@ -13677,9 +13680,9 @@
}
},
"node_modules/typescript": {
- "version": "4.5.4",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz",
- "integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==",
+ "version": "4.7.4",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
+ "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@@ -16836,12 +16839,12 @@
}
},
"@types/jest": {
- "version": "27.4.0",
- "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.4.0.tgz",
- "integrity": "sha512-gHl8XuC1RZ8H2j5sHv/JqsaxXkDDM9iDOgu0Wp8sjs4u/snb2PVehyWXJPr+ORA0RPpgw231mnutWI1+0hgjIQ==",
+ "version": "27.5.2",
+ "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.5.2.tgz",
+ "integrity": "sha512-mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA==",
"dev": true,
"requires": {
- "jest-diff": "^27.0.0",
+ "jest-matcher-utils": "^27.0.0",
"pretty-format": "^27.0.0"
}
},
@@ -22833,9 +22836,9 @@
"integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g=="
},
"prettier": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz",
- "integrity": "sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==",
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz",
+ "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==",
"dev": true
},
"pretty-bytes": {
@@ -24609,9 +24612,9 @@
}
},
"typescript": {
- "version": "4.5.4",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz",
- "integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg=="
+ "version": "4.7.4",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
+ "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ=="
},
"unbox-primitive": {
"version": "1.0.1",
diff --git a/docs/site/home/benefits-use-cases.html b/docs/site/home/benefits-use-cases.html
index 7f617c9..b1c9589 100644
--- a/docs/site/home/benefits-use-cases.html
+++ b/docs/site/home/benefits-use-cases.html
@@ -32,9 +32,7 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.1/animate.css"
integrity="sha512-K2J6Yt6ElUYEMPcTr0wm555AAyiqkgYiUgPIW18FT88/aYSNDk0EvGjsln/TEu3ee/jaHf0xoXzFppSbBtUXbQ=="
crossorigin="anonymous" referrerpolicy="no-referrer"/>
- <link rel="preconnect" href="https://fonts.googleapis.com">
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
- <link href="https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700&display=swap" rel="stylesheet">
+ <link href="css/fonts.css" rel="stylesheet">
</head>
<body>
<!-- header -->
@@ -349,6 +347,7 @@
<li><a href="index.html">Home</a></li>
<li><a href="download.html">Downloads</a></li>
<li><a href="https://tinkerpop.apache.org/docs/current">Documentation</a></li>
+ <li><a href="https://privacy.apache.org/policies/privacy-policy-public.html" target="_blank">Privacy Policy</a></li>
</ul>
</div>
<div class="col-lg-6">
diff --git a/docs/site/home/community.html b/docs/site/home/community.html
index 890fc2f..cc7d9de 100644
--- a/docs/site/home/community.html
+++ b/docs/site/home/community.html
@@ -32,9 +32,7 @@
integrity="sha512-K2J6Yt6ElUYEMPcTr0wm555AAyiqkgYiUgPIW18FT88/aYSNDk0EvGjsln/TEu3ee/jaHf0xoXzFppSbBtUXbQ=="
crossorigin="anonymous" referrerpolicy="no-referrer"/>
<link href="css/prism.css" rel="stylesheet">
- <link rel="preconnect" href="https://fonts.googleapis.com">
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
- <link href="https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700&display=swap" rel="stylesheet">
+ <link href="css/fonts.css" rel="stylesheet">
</head>
<body>
<!-- header -->
@@ -338,7 +336,7 @@
</div>
<div class="col-md-12 mb-4 mb-lg-0 col-lg-6 text-center">
<div class="code-box">
- <code class="language-go-module">COMING SOON</code>
+ <code class="language-go-module">go get github.com/apache/tinkerpop/gremlin-go/v3@v3.6.1</code>
</div>
<p class="medium black">Go Module</p>
</div>
@@ -347,7 +345,7 @@
</div>
<div class="mt-4 text-center text-blue ft-17">
- <a href="https://github.com/apache/tinkerpop/blob/master/gremlin-go/README.md"
+ <a href="https://tinkerpop.apache.org/docs/current/reference/#gremlin-go"
target="_blank"><u>Learn More</u></a>
</div>
@@ -410,7 +408,7 @@
<div class="col-md-12 mb-4 mb-lg-0 col-lg-6 text-center">
<div class="code-box">
<code class="language-groovy">implementation
- 'org.apache.tinkerpop:gremlin-groovy:3.6.0'</code>
+ 'org.apache.tinkerpop:gremlin-groovy:3.6.1'</code>
</div>
<p class="medium black">Gradle</p>
</div>
@@ -498,7 +496,7 @@
<dependency>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>gremlin-driver</artifactId>
- <version>3.6.0</version>
+ <version>3.6.1</version>
</dependency></code></pre>
</div>
<p class="medium black">Maven</p>
@@ -690,7 +688,7 @@
</div>
<div class="col-md-12 mb-4 mb-lg-0 col-lg-6 text-center">
<div class="code-box">
- <pre><code class="language-plain">dotnet add package Gremlin.Net --version 3.6.0</code></pre>
+ <pre><code class="language-plain">dotnet add package Gremlin.Net --version 3.6.1</code></pre>
</div>
<p class="medium black">NuGet</p>
</div>
@@ -1172,6 +1170,7 @@
<li><a href="index.html">Home</a></li>
<li><a href="download.html">Downloads</a></li>
<li><a href="https://tinkerpop.apache.org/docs/current">Documentation</a></li>
+ <li><a href="https://privacy.apache.org/policies/privacy-policy-public.html" target="_blank">Privacy Policy</a></li>
</ul>
</div>
<div class="col-lg-6">
diff --git a/docs/site/home/css/fonts.css b/docs/site/home/css/fonts.css
new file mode 100644
index 0000000..9a63156
--- /dev/null
+++ b/docs/site/home/css/fonts.css
@@ -0,0 +1,180 @@
+/* cyrillic-ext */
+@font-face {
+ font-family: 'Raleway';
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src: url(../fonts/raleway.woff2) format('woff2');
+ unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
+}
+/* cyrillic */
+@font-face {
+ font-family: 'Raleway';
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src: url(../fonts/raleway.woff2) format('woff2');
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
+}
+/* vietnamese */
+@font-face {
+ font-family: 'Raleway';
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src: url(../fonts/raleway.woff2) format('woff2');
+ unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
+}
+/* latin-ext */
+@font-face {
+ font-family: 'Raleway';
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src: url(../fonts/raleway.woff2) format('woff2');
+ unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+/* latin */
+@font-face {
+ font-family: 'Raleway';
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src: url(../fonts/raleway.woff2) format('woff2');
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+/* cyrillic-ext */
+@font-face {
+ font-family: 'Raleway';
+ font-style: normal;
+ font-weight: 500;
+ font-display: swap;
+ src: url(../fonts/raleway.woff2) format('woff2');
+ unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
+}
+/* cyrillic */
+@font-face {
+ font-family: 'Raleway';
+ font-style: normal;
+ font-weight: 500;
+ font-display: swap;
+ src: url(../fonts/raleway.woff2) format('woff2');
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
+}
+/* vietnamese */
+@font-face {
+ font-family: 'Raleway';
+ font-style: normal;
+ font-weight: 500;
+ font-display: swap;
+ src: url(../fonts/raleway.woff2) format('woff2');
+ unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
+}
+/* latin-ext */
+@font-face {
+ font-family: 'Raleway';
+ font-style: normal;
+ font-weight: 500;
+ font-display: swap;
+ src: url(../fonts/raleway.woff2) format('woff2');
+ unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+/* latin */
+@font-face {
+ font-family: 'Raleway';
+ font-style: normal;
+ font-weight: 500;
+ font-display: swap;
+ src: url(../fonts/raleway.woff2) format('woff2');
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+/* cyrillic-ext */
+@font-face {
+ font-family: 'Raleway';
+ font-style: normal;
+ font-weight: 600;
+ font-display: swap;
+ src: url(../fonts/raleway.woff2) format('woff2');
+ unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
+}
+/* cyrillic */
+@font-face {
+ font-family: 'Raleway';
+ font-style: normal;
+ font-weight: 600;
+ font-display: swap;
+ src: url(../fonts/raleway.woff2) format('woff2');
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
+}
+/* vietnamese */
+@font-face {
+ font-family: 'Raleway';
+ font-style: normal;
+ font-weight: 600;
+ font-display: swap;
+ src: url(../fonts/raleway.woff2) format('woff2');
+ unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
+}
+/* latin-ext */
+@font-face {
+ font-family: 'Raleway';
+ font-style: normal;
+ font-weight: 600;
+ font-display: swap;
+ src: url(../fonts/raleway.woff2) format('woff2');
+ unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+/* latin */
+@font-face {
+ font-family: 'Raleway';
+ font-style: normal;
+ font-weight: 600;
+ font-display: swap;
+ src: url(../fonts/raleway.woff2) format('woff2');
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
+/* cyrillic-ext */
+@font-face {
+ font-family: 'Raleway';
+ font-style: normal;
+ font-weight: 700;
+ font-display: swap;
+ src: url(../fonts/raleway.woff2) format('woff2');
+ unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
+}
+/* cyrillic */
+@font-face {
+ font-family: 'Raleway';
+ font-style: normal;
+ font-weight: 700;
+ font-display: swap;
+ src: url(../fonts/raleway.woff2) format('woff2');
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
+}
+/* vietnamese */
+@font-face {
+ font-family: 'Raleway';
+ font-style: normal;
+ font-weight: 700;
+ font-display: swap;
+ src: url(../fonts/raleway.woff2) format('woff2');
+ unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
+}
+/* latin-ext */
+@font-face {
+ font-family: 'Raleway';
+ font-style: normal;
+ font-weight: 700;
+ font-display: swap;
+ src: url(../fonts/raleway.woff2) format('woff2');
+ unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+/* latin */
+@font-face {
+ font-family: 'Raleway';
+ font-style: normal;
+ font-weight: 700;
+ font-display: swap;
+ src: url(../fonts/raleway.woff2) format('woff2');
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+}
diff --git a/docs/site/home/download.html b/docs/site/home/download.html
index 773a625..a9762da 100644
--- a/docs/site/home/download.html
+++ b/docs/site/home/download.html
@@ -26,9 +26,7 @@
<link href="css/custome.css" rel="stylesheet">
<link href="css/responsive.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.1/animate.css" integrity="sha512-K2J6Yt6ElUYEMPcTr0wm555AAyiqkgYiUgPIW18FT88/aYSNDk0EvGjsln/TEu3ee/jaHf0xoXzFppSbBtUXbQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
- <link rel="preconnect" href="https://fonts.googleapis.com">
-<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
-<link href="https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700&display=swap" rel="stylesheet">
+ <link href="css/fonts.css" rel="stylesheet">
</head>
<body>
<!-- header -->
@@ -154,28 +152,28 @@
</div>
<div class="row d-flex align-items-center">
<div class="col-lg-3 col-md-6 mb-2 mb-lg-0">
- <img src="img/download/icon.png" class="img-fluid me-2" alt="img"> <span class="bold">3.6.0</span> (latest, stable) <p class="d-inline-block ms-4 mb-0">10-January-2022</p>
+ <img src="img/download/icon.png" class="img-fluid me-2" alt="img"> <span class="bold">3.6.1</span> (latest, stable) <p class="d-inline-block ms-4 mb-0">18-July-2022</p>
</div>
<div class="col-lg-4 col-md-6 mb-2 mb-lg-0">
- <p class="text-blue mb-0"><a href="https://github.com/apache/tinkerpop/blob/3.6.0/CHANGELOG.asciidoc#release-3-6-0">release notes</a> | <a href="https://tinkerpop.apache.org/docs/3.6.0/upgrade/#_tinkerpop_3_6_0">upgrade</a> | <a href="https://tinkerpop.apache.org/docs/3.6.0/">documentation</a> | <a href="#" data-bs-toggle="modal" data-bs-target="#contributors-3_6_0">contributors</a></p>
+ <p class="text-blue mb-0"><a href="https://github.com/apache/tinkerpop/blob/3.6.1/CHANGELOG.asciidoc#release-3-6-1">release notes</a> | <a href="https://tinkerpop.apache.org/docs/3.6.1/upgrade/#_tinkerpop_3_6_1">upgrade</a> | <a href="https://tinkerpop.apache.org/docs/3.6.1/">documentation</a> | <a href="#" data-bs-toggle="modal" data-bs-target="#contributors-3_6_1">contributors</a></p>
</div>
<div class="col-lg-5 col-md-12 mb-2 mb-lg-2">
- <a class="btn btn-theme me-2" href="https://www.apache.org/dyn/closer.lua/tinkerpop/3.6.0/apache-tinkerpop-gremlin-console-3.6.0-bin.zip"><img src="img/download/bx-download.svg" class="img-fluid me-2" alt="img">Gremlin Console</a>
- <a class="btn btn-theme me-2" href="https://www.apache.org/dyn/closer.lua/tinkerpop/3.6.0/apache-tinkerpop-gremlin-server-3.6.0-bin.zip"><img src="img/download/bx-download.svg" class="img-fluid me-2" alt="img">Gremlin Server</a>
- <a class="btn btn-theme me-2" href="https://www.apache.org/dyn/closer.lua/tinkerpop/3.6.0/apache-tinkerpop-3.6.0-src.zip"><img src="img/download/bx-download.svg" class="img-fluid me-2" alt="img">Source</a>
+ <a class="btn btn-theme me-2" href="https://www.apache.org/dyn/closer.lua/tinkerpop/3.6.1/apache-tinkerpop-gremlin-console-3.6.1-bin.zip"><img src="img/download/bx-download.svg" class="img-fluid me-2" alt="img">Gremlin Console</a>
+ <a class="btn btn-theme me-2" href="https://www.apache.org/dyn/closer.lua/tinkerpop/3.6.1/apache-tinkerpop-gremlin-server-3.6.1-bin.zip"><img src="img/download/bx-download.svg" class="img-fluid me-2" alt="img">Gremlin Server</a>
+ <a class="btn btn-theme me-2" href="https://www.apache.org/dyn/closer.lua/tinkerpop/3.6.1/apache-tinkerpop-3.6.1-src.zip"><img src="img/download/bx-download.svg" class="img-fluid me-2" alt="img">Source</a>
</div>
</div>
<div class="row d-flex align-items-center">
<div class="col-lg-3 col-md-6 mb-2 mb-lg-0">
- <img src="img/download/icon.png" class="img-fluid me-2" alt="img"> <span class="bold">3.5.3</span> (maintenance) <p class="d-inline-block ms-4 mb-0">10-January-2022</p>
+ <img src="img/download/icon.png" class="img-fluid me-2" alt="img"> <span class="bold">3.5.4</span> (maintenance) <p class="d-inline-block ms-4 mb-0">18-July-2022</p>
</div>
<div class="col-lg-4 col-md-6 mb-2 mb-lg-0">
- <p class="text-blue mb-0"><a href="https://github.com/apache/tinkerpop/blob/3.5.3/CHANGELOG.asciidoc#release-3-5-3">release notes</a> | <a href="https://tinkerpop.apache.org/docs/3.5.3/upgrade/#_tinkerpop_3_5_3">upgrade</a> | <a href="https://tinkerpop.apache.org/docs/3.5.3/">documentation</a> | <a href="#" data-bs-toggle="modal" data-bs-target="#contributors-3_5_3">contributors</a></p>
+ <p class="text-blue mb-0"><a href="https://github.com/apache/tinkerpop/blob/3.5.4/CHANGELOG.asciidoc#release-3-5-4">release notes</a> | <a href="https://tinkerpop.apache.org/docs/3.5.4/upgrade/#_tinkerpop_3_5_4">upgrade</a> | <a href="https://tinkerpop.apache.org/docs/3.5.4/">documentation</a> | <a href="#" data-bs-toggle="modal" data-bs-target="#contributors-3_5_4">contributors</a></p>
</div>
<div class="col-lg-5 col-md-12 mb-2 mb-lg-0">
- <a class="btn btn-theme me-2" href="https://www.apache.org/dyn/closer.lua/tinkerpop/3.5.3/apache-tinkerpop-gremlin-console-3.5.3-bin.zip"><img src="img/download/bx-download.svg" class="img-fluid me-2" alt="img">Gremlin Console</a>
- <a class="btn btn-theme me-2" href="https://www.apache.org/dyn/closer.lua/tinkerpop/3.5.3/apache-tinkerpop-gremlin-server-3.5.3-bin.zip"><img src="img/download/bx-download.svg" class="img-fluid me-2" alt="img">Gremlin Server</a>
- <a class="btn btn-theme me-2" href="https://www.apache.org/dyn/closer.lua/tinkerpop/3.5.3/apache-tinkerpop-3.5.3-src.zip"><img src="img/download/bx-download.svg" class="img-fluid me-2" alt="img">Source</a>
+ <a class="btn btn-theme me-2" href="https://www.apache.org/dyn/closer.lua/tinkerpop/3.5.4/apache-tinkerpop-gremlin-console-3.5.4-bin.zip"><img src="img/download/bx-download.svg" class="img-fluid me-2" alt="img">Gremlin Console</a>
+ <a class="btn btn-theme me-2" href="https://www.apache.org/dyn/closer.lua/tinkerpop/3.5.4/apache-tinkerpop-gremlin-server-3.5.4-bin.zip"><img src="img/download/bx-download.svg" class="img-fluid me-2" alt="img">Gremlin Server</a>
+ <a class="btn btn-theme me-2" href="https://www.apache.org/dyn/closer.lua/tinkerpop/3.5.4/apache-tinkerpop-3.5.4-src.zip"><img src="img/download/bx-download.svg" class="img-fluid me-2" alt="img">Source</a>
</div>
</div>
@@ -184,7 +182,9 @@
<div class="col-lg-3 col-md-6 mb-2 mb-lg-0">
<img src="img/download/icon.png" class="img-fluid me-2" alt="img">
<select id="dropdownArchives" class="form-select d-inliine-block">
- <option selected="selected">3.5.2 (10-January-2022)</option>
+ <option selected="selected">3.6.0 (4-April-2022)</option>
+ <option>3.5.3 (4-April-2022)</option>
+ <option>3.5.2 (10-January-2022)</option>
<option>3.5.1 (19-July-2021)</option>
<option>3.5.0 (3-May-2021)</option>
<option>3.4.13 (10-January-2022)</option>
@@ -307,10 +307,10 @@
<tr>
<td data-label="Repository" class="bold">Go Module</td>
- <td data-label="Artifacts">COMING SOON</td>
+ <td data-label="Artifacts"><a href="https://pkg.go.dev/github.com/apache/tinkerpop/gremlin-go/v3" class="text-blue">gremlin-go</a></td>
<td data-label="">
<div class="code-box1">
- COMING SOON
+ go get github.com/apache/tinkerpop/gremlin-go/v3@v3.6.1
</div>
</td>
</tr>
@@ -324,7 +324,7 @@
<dependency> <br>
<groupId>org.apache.tinkerpop</groupId> <br>
<artifactId>gremlin-driver</artifactId> <br>
- <version>3.5.1</version> <br>
+ <version>3.6.1</version> <br>
</dependency>
</div>
</td>
@@ -355,7 +355,7 @@
<td data-label="Artifacts"><a href="https://www.nuget.org/packages/Gremlin.Net/" class="text-blue">Gremlin.Net </a> <br> <a href="https://www.nuget.org/packages/Gremlin.Net.Template/" class="text-blue">Gremlin.Net.Template </a></td>
<td data-label="">
<div class="code-box1">
- dotnet add package Gremlin.Net --version 3.5.1 <br>dotnet add package Gremlin.Net.template --version 3.5.1
+ dotnet add package Gremlin.Net --version 3.6.1 <br>dotnet add package Gremlin.Net.template --version 3.6.1
</div>
</td>
</tr>
@@ -412,6 +412,48 @@
<!-- Contributor Modals -->
+ <!-- 3.6.1 -->
+ <div class="modal fade" id="contributors-3_6_1" tabindex="-1" role="dialog">
+ <div class="modal-dialog" role="document">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
+
+ </div>
+ <div class="modal-body">
+ <h4 class="modal-title bold black mb-2 ">3.6.1</h4>
+ <p>Release Manager: Kelvin Lawrence</p>
+
+ <div class="code-box1"><pre><code>$ git shortlog -sn 3.6.0..3.6.1
+ 122 Stephen Mallette
+ 81 Igor Ostapenko
+ 56 Lyndon Bauto
+ 49 Valentyn Kahamlyk
+ 23 Rithin Kumar
+ 19 Florian Hockmann
+ 18 Simon Zhao
+ 18 Yang Xia
+ 15 Roi Martin
+ 14 Dave Bechberger
+ 12 dependabot[bot]
+ 4 Daniel Weber
+ 4 Jorge Bay-Gondra
+ 4 Mike Personick
+ 2 Dan DeRobertis
+ 2 Ken Hu
+ 2 Norio Akagi (norakagi)
+ 1 Boxuan Li
+ 1 Saikiran Boga
+ 1 Vivek Gupta
+ 1 c
+ 1 felix
+ 1 steigma</code></pre></div>
+ </div>
+
+ </div>
+ </div>
+ </div>
+
<!-- 3.6.0 -->
<div class="modal fade" id="contributors-3_6_0" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
@@ -459,6 +501,48 @@
</div>
</div>
+ <!-- 3.5.4 -->
+ <div class="modal fade" id="contributors-3_5_4" tabindex="-1" role="dialog">
+ <div class="modal-dialog" role="document">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
+
+ </div>
+ <div class="modal-body">
+ <h4 class="modal-title bold black mb-2 ">3.5.4</h4>
+ <p>Release Manager: Kelvin Lawrence</p>
+
+ <div class="code-box1"><pre><code>$ git shortlog -sn 3.5.3..3.5.4
+ 81 Igor Ostapenko
+ 52 Stephen Mallette
+ 43 Valentyn Kahamlyk
+ 23 Lyndon Bauto
+ 21 Rithin Kumar
+ 18 Yang Xia
+ 16 Simon Zhao
+ 14 Roi Martin
+ 13 Florian Hockmann
+ 12 dependabot[bot]
+ 6 Dave Bechberger
+ 2 Daniel Weber
+ 2 Jorge Bay-Gondra
+ 2 Ken Hu
+ 2 Mike Personick
+ 1 Boxuan Li
+ 1 Dan DeRobertis
+ 1 Norio Akagi (norakagi)
+ 1 Saikiran Boga
+ 1 Vivek Gupta
+ 1 c
+ 1 felix
+ 1 steigma</code></pre></div>
+ </div>
+
+ </div>
+ </div>
+ </div>
+
<!-- 3.5.3 -->
<div class="modal fade" id="contributors-3_5_3" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
@@ -2124,6 +2208,7 @@
<li><a href="index.html">Home</a></li>
<li><a href="download.html">Downloads</a></li>
<li><a href="https://tinkerpop.apache.org/docs/current">Documentation</a></li>
+ <li><a href="https://privacy.apache.org/policies/privacy-policy-public.html" target="_blank">Privacy Policy</a></li>
</ul>
</div>
<div class="col-lg-6">
diff --git a/docs/site/home/fonts/raleway.woff2 b/docs/site/home/fonts/raleway.woff2
new file mode 100644
index 0000000..33cb165
--- /dev/null
+++ b/docs/site/home/fonts/raleway.woff2
Binary files differ
diff --git a/docs/site/home/gremlin.html b/docs/site/home/gremlin.html
index 901610f..3995664 100644
--- a/docs/site/home/gremlin.html
+++ b/docs/site/home/gremlin.html
@@ -27,9 +27,7 @@
<link href="css/responsive.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.1/animate.css" integrity="sha512-K2J6Yt6ElUYEMPcTr0wm555AAyiqkgYiUgPIW18FT88/aYSNDk0EvGjsln/TEu3ee/jaHf0xoXzFppSbBtUXbQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link href="css/prism.css" rel="stylesheet">
- <link rel="preconnect" href="https://fonts.googleapis.com">
-<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
-<link href="https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700&display=swap" rel="stylesheet">
+ <link href="css/fonts.css" rel="stylesheet">
</head>
<body>
<!-- header -->
@@ -325,7 +323,7 @@
<div class="col-md-12 col-lg-6 mb-4 mb-lg-0">
<div class="code-box h-100">
<code>
- <span class="text-purpal">g</span><span class="text-blue">.V</span><span class="text-success">().</span><span class="text-blue">has</span><span class="text-success">("name","gremlin").</span> <span class="text-blue">as</span><span class="text-success">("a").</span>
+ <span class="text-purpal">g</span><span class="text-blue">.V</span><span class="text-success">().</span><span class="text-blue">has</span><span class="text-success">("name","gremlin").</span><span class="text-blue">as</span><span class="text-success">("a").</span>
<br> <span class="text-blue">out</span><span class="text-success">("created").</span><span class="text-blue">in</span><span class="text-success">("created").</span>
@@ -336,17 +334,17 @@
</code>
</div>
</div>
- <div class="col-md-12 col-lg-6">
+ <div class="col-md-12 col-lg-6">
<h2 class="ft-30 bold black mb-3 md-md-5">Imperative & Declarative Traversals</h2>
- <p>A Gremlin traversal can be written in either an imperative (procedural) manner, a declarative (descriptive) manner, or in a hybrid manner containing both imperative and declarative aspects. An imperative Gremlin traversal tells the traversers how to proceed at each step in the traversal. For instance, the imperative traversal on the right first places a traverser at the vertex denoting Gremlin. That traverser then splits itself across all of Gremlin's collaborators that are not Gremlin himself. Next, the traversers walk to the managers of those collaborators to ultimately be grouped into a manager name count distribution. This traversal is imperative in that it tells the traversers to "go here and then go there" in an explicit, procedural manner.</p>
+ <p>A Gremlin traversal can be written in either an imperative (procedural) manner, a declarative (descriptive) manner, or in a hybrid manner containing both imperative and declarative aspects. An imperative Gremlin traversal tells the traversers how to proceed at each step in the traversal. For instance, the imperative traversal in the first box first places a traverser at the vertex denoting Gremlin. That traverser then splits itself across all of Gremlin's collaborators that are not Gremlin himself. Next, the traversers walk to the managers of those collaborators to ultimately be grouped into a manager name count distribution. This traversal is imperative in that it tells the traversers to "go here and then go there" in an explicit, procedural manner.</p>
</div>
</div>
<div class="row mb-3 mb-md-5">
- <div class="col-md-12 col-lg-6 order-2 order-md-1">
- <p class="text-lg-end text-start">A declarative Gremlin traversal does not tell the traversers the order in which to execute their walk, but instead, allows each traverser to select a pattern to execute from a collection of (potentially nested) patterns. The declarative traversal on the left yields the same result as the imperative traversal above. However, the declarative traversal has the added benefit that it leverages not only a compile-time query planner (like imperative traversals), but also a runtime query planner that chooses which traversal pattern to execute next based on the historic statistics of each pattern -- favoring those patterns which tend to reduce/filter the most data.</p>
+ <div class="col-md-12 col-lg-6 order-2 order-md-1">
+ <p class="text-lg-end text-start">A declarative Gremlin traversal does not tell the traversers the order in which to execute their walk, but instead, allows each traverser to select a pattern to execute from a collection of (potentially nested) patterns. The declarative traversal in the second box yields the same result as the imperative traversal above. However, the declarative traversal has the added benefit that it leverages not only a compile-time query planner (like imperative traversals), but also a runtime query planner that chooses which traversal pattern to execute next based on the historic statistics of each pattern -- favoring those patterns which tend to reduce/filter the most data.</p>
</div>
<div class="col-md-12 col-lg-6 mb-4 mb-lg-0 order-1 order-md-2">
<div class="code-box h-100">
@@ -357,9 +355,9 @@
<br> <span class="text-blue">as</span><span class="text-success">("a").</span><span class="text-blue">out</span><span class="text-success">("created").as("b"),</span>
- <br> <span class="text-blue">as</span><span class="text-success">("a").</span><span class="text-blue">in</span><span class="text-success">("created").as("c"),</span>
+ <br> <span class="text-blue">as</span><span class="text-success">("b").</span><span class="text-blue">in</span><span class="text-success">("created").as("c"),</span>
- <br> <span class="text-blue">as</span><span class="text-success">("a").</span><span class="text-blue">in</span><span class="text-success">("manages").as("d"),</span>
+ <br> <span class="text-blue">as</span><span class="text-success">("c").</span><span class="text-blue">in</span><span class="text-success">("manages").as("d"),</span>
<br> <span class="text-blue">where</span><span class="text-success">("a",</span><span class="text-blue">neq</span><span class="text-success">("c"))).</span>
@@ -420,9 +418,9 @@
<br> <span class="text-blue">System.out.printIn</span><span class="text-success">("Average rating :" +</span><span class="text-blue">avg</span><span class="text-success">);</span>
- <br> <span class="text-success">}</span>
+ <br> <span class="text-blue">}</span>
- <br> <span class="text-success">}</span>
+ <br> <span class="text-blue">}</span>
</code>
</div>
@@ -450,7 +448,7 @@
- <br> <span class="text-blue">System.out.println(</span><span class="text-success">"Average rating"</span><span class="text-purpal">+</span><span class="text-blue">result.next().getDouble(</span><span class="text-success">"AVERAGE"</span><span class="text-blue">)</span>
+ <br> <span class="text-blue">System.out.println(</span><span class="text-success">"Average rating"</span><span class="text-purpal">+</span><span class="text-blue">result.next().getDouble(</span><span class="text-success">"AVERAGE"</span><span class="text-blue">));</span>
<br> <span class="text-blue">}</span>
@@ -479,7 +477,7 @@
<br><span class="text-purpal">g</span><span class="text-blue"> = traversal().withRemote(DriverRemoteConnection.using("<span class="text-success">Localhost</span><span class="text-blue">",</span><span class="text-purpal">8182</span><span class="text-blue">));</span> <span class="comment-text">//remote</span></span>
- <br><span class="text-purpal">g</span><span class="text-blue"> = traversal().withEmbedded((graph).withComputer(SparkGraphComputer.<span class="text-purpal">class</span><span class="text-blue">);</span> <span class="comment-text">//distributed OLAP</span></span>
+ <br><span class="text-purpal">g</span><span class="text-blue"> = traversal().withEmbedded(graph).withComputer(SparkGraphComputer.<span class="text-purpal">class</span><span class="text-blue">);</span> <span class="comment-text">//distributed OLAP</span></span>
</code>
@@ -572,6 +570,7 @@
<li><a href="index.html">Home</a></li>
<li><a href="download.html">Downloads</a></li>
<li><a href="https://tinkerpop.apache.org/docs/current">Documentation</a></li>
+ <li><a href="https://privacy.apache.org/policies/privacy-policy-public.html" target="_blank">Privacy Policy</a></li>
</ul>
</div>
<div class="col-lg-6">
diff --git a/docs/site/home/index.html b/docs/site/home/index.html
index 447f373..ee0be24 100644
--- a/docs/site/home/index.html
+++ b/docs/site/home/index.html
@@ -32,9 +32,7 @@
integrity="sha512-K2J6Yt6ElUYEMPcTr0wm555AAyiqkgYiUgPIW18FT88/aYSNDk0EvGjsln/TEu3ee/jaHf0xoXzFppSbBtUXbQ=="
crossorigin="anonymous" referrerpolicy="no-referrer"/>
<link href="css/prism.css" rel="stylesheet">
- <link rel="preconnect" href="https://fonts.googleapis.com">
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
- <link href="https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700&display=swap" rel="stylesheet">
+ <link href="css/fonts.css" rel="stylesheet">
</head>
<body>
<!-- header -->
@@ -200,30 +198,30 @@
<div class="dd-box">
<div class="text-center">
<h2 class="ft-30 bold black mb-2">Downloads & Documentation</h2>
- <p class="mb-3 mb-md-5 medium ">Released: 4-April-2022</p>
+ <p class="mb-3 mb-md-5 medium ">Released: 18-July-2022</p>
</div>
<div class="row">
<div class="col-lg-6 border-right text-center">
- <h3 class="ft-25 bold black mb-4">TinkerPop 3.6.0 Downloads</h3>
+ <h3 class="ft-25 bold black mb-4">TinkerPop 3.6.1 Downloads</h3>
<div class="row">
<div class="col-md-4 mb-3">
<img src="img/group-24.svg" class="img-fluid mb-2" alt="img"><br>
<a class="text-blue"
- href="https://www.apache.org/dyn/closer.lua/tinkerpop/3.6.0/apache-tinkerpop-gremlin-console-3.6.0-bin.zip"><img
+ href="https://www.apache.org/dyn/closer.lua/tinkerpop/3.6.1/apache-tinkerpop-gremlin-console-3.6.1-bin.zip"><img
src="img/download-cloud-line.svg" class="me-2 img-fluid" alt="img">Gremlin
Console</a>
</div>
<div class="col-md-4 mb-3">
<img src="img/group-25.svg" class="img-fluid mb-2" alt="img"><br>
<a class="text-blue"
- href="https://www.apache.org/dyn/closer.lua/tinkerpop/3.6.0/apache-tinkerpop-gremlin-server-3.6.0-bin.zip"><img
+ href="https://www.apache.org/dyn/closer.lua/tinkerpop/3.6.1/apache-tinkerpop-gremlin-server-3.6.1-bin.zip"><img
src="img/download-cloud-line.svg" class="me-2 img-fluid" alt="img">Gremlin
Server</a>
</div>
<div class="col-md-4 mb-3">
<img src="img/group-26.svg" class="img-fluid mb-2" alt="img"><br>
<a class="text-blue"
- href="https://www.apache.org/dyn/closer.lua/tinkerpop/3.6.0/apache-tinkerpop-3.6.0-src.zip"><img
+ href="https://www.apache.org/dyn/closer.lua/tinkerpop/3.6.1/apache-tinkerpop-3.6.1-src.zip"><img
src="img/download-cloud-line.svg" class="me-2 img-fluid"
alt="img">Source</a>
</div>
@@ -616,7 +614,7 @@
<div class="mb-3">
<p class="mb-0"><a class="medium text-blue"
href="https://ketrinadrawsalot.tumblr.com/" target="_blank">
- Ketrina Yim</a><span class="medium">(Committer)</span></p>
+ Ketrina Thompson</a><span class="medium">(Committer)</span></p>
<p class="mb-0"><span class="medium">Year : 2009</span></p>
<p class="mb-0">Illustrator, creator of Gremlin and his merry band of
robots.</p>
@@ -669,7 +667,7 @@
<div class="mb-3">
<p class="mb-0"><a class="medium text-blue"
href="https://www.linkedin.com/in/divijvaidya/"
- target="_blank">Divij Vaidya </a><span class="medium">(Committer)</span>
+ target="_blank">Divij Vaidya </a><span class="medium">(PMC)</span>
</p>
<p class="mb-0"><span class="medium">Year : 2019</span></p>
<p class="mb-0">Gremlin server-client interaction.</p>
@@ -706,6 +704,56 @@
<p class="mb-0">Gremlin language and general core development</p>
</div>
</div>
+ <div class="col-lg-6">
+ <div class="mb-3">
+ <p class="mb-0"><a class="medium text-blue"
+ href="https://www.linkedin.com/in/davebechberger/"
+ target="_blank">Dave Bechberger </a><span class="medium">(Committer)</span>
+ </p>
+ <p class="mb-0"><span class="medium">Year : 2022</span></p>
+ <p class="mb-0">Gremlin language, documentation, mailing list and Discord support</p>
+ </div>
+ </div>
+ <div class="col-lg-6">
+ <div class="mb-3">
+ <p class="mb-0"><a class="medium text-blue" href="https://www.linkedin.com/in/simon-zhao-69a792ab/"
+ target="_blank">Simon Zhao </a><span class="medium">(Committer)</span>
+ </p>
+ <p class="mb-0"><span class="medium">Year : 2022</span></p>
+ <p class="mb-0">Golang GLV</p>
+ </div>
+ </div>
+ <div class="col-lg-6">
+ <div class="mb-3">
+ <p class="mb-0"><a class="medium text-blue" href="https://www.linkedin.com/in/xiazcy/"
+ target="_blank">Yang Xia </a><span class="medium">(Committer)</span>
+ </p>
+ <p class="mb-0"><span class="medium">Year : 2022</span></p>
+ <p class="mb-0">Go GLV development, Docker and Windows build improvements</p>
+ </div>
+ </div>
+ <div class="col-lg-6">
+ <div class="mb-3">
+ <p class="mb-0">
+ <a class="medium text-blue"
+ href="https://www.linkedin.com/in/valentyn-kahamlyk-2bb4874b/"
+ target="_blank">Valentyn Kahamlyk </a><span class="medium">(Committer)</span>
+ </p>
+ <p class="mb-0"><span class="medium">Year : 2022</span></p>
+ <p class="mb-0">Go and Python GLV development, </p>
+ </div>
+ </div>
+ <div class="col-lg-6">
+ <div class="mb-3">
+ <p class="mb-0">
+ <a class="medium text-blue"
+ href="https://github.com/L0Lmaker"
+ target="_blank">Rithin Kumar </a><span class="medium">(Committer)</span>
+ </p>
+ <p class="mb-0"><span class="medium">Year : 2022</span></p>
+ <p class="mb-0">Golang GLV</p>
+ </div>
+ </div>
</div>
</div>
<div class="tab-pane fade" id="pills-inactive" role="tabpanel"
@@ -907,6 +955,7 @@
<li><a href="index.html">Home</a></li>
<li><a href="download.html">Downloads</a></li>
<li><a href="https://tinkerpop.apache.org/docs/current">Documentation</a></li>
+ <li><a href="https://privacy.apache.org/policies/privacy-policy-public.html" target="_blank">Privacy Policy</a></li>
</ul>
</div>
<div class="col-lg-6">
diff --git a/docs/site/home/providers.html b/docs/site/home/providers.html
index 77a7a21..668356b 100644
--- a/docs/site/home/providers.html
+++ b/docs/site/home/providers.html
@@ -31,9 +31,7 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.1/animate.css"
integrity="sha512-K2J6Yt6ElUYEMPcTr0wm555AAyiqkgYiUgPIW18FT88/aYSNDk0EvGjsln/TEu3ee/jaHf0xoXzFppSbBtUXbQ=="
crossorigin="anonymous" referrerpolicy="no-referrer"/>
- <link rel="preconnect" href="https://fonts.googleapis.com">
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
- <link href="https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700&display=swap" rel="stylesheet">
+ <link href="css/fonts.css" rel="stylesheet">
</head>
<body>
<!-- header -->
@@ -557,6 +555,7 @@
<li><a href="index.html">Home</a></li>
<li><a href="download.html">Downloads</a></li>
<li><a href="https://tinkerpop.apache.org/docs/current">Documentation</a></li>
+ <li><a href="https://privacy.apache.org/policies/privacy-policy-public.html" target="_blank">Privacy Policy</a></li>
</ul>
</div>
<div class="col-lg-6">
diff --git a/docs/src/dev/developer/administration.asciidoc b/docs/src/dev/developer/administration.asciidoc
index 53be99a..7facd8d 100644
--- a/docs/src/dev/developer/administration.asciidoc
+++ b/docs/src/dev/developer/administration.asciidoc
@@ -146,41 +146,12 @@
== Board Reports
The PMC Chair is responsible for submitting a link:http://www.apache.org/foundation/board/reporting[report to the board]
-on a quarterly basis. TinkerPop reports on the following months: January, April, July, October. The report has the
-following format:
-
-[source,text]
-----
-## Description:
- Apache TinkerPop is a graph computing framework for both graph databases
- (OLTP) and graph analytic systems (OLAP).
-
-## Activity:
- <discuss general project health, project direction, community growth/activity, etc.>
-
-## Issues:
- There are no issues requiring board attention at this time.
-
-## Releases:
- - x.y.z (<month> <day>, <year>)
- - x.y.z (<month> <day>, <year>)
-
-## PMC/Committer:
-
- - Last PMC addition was <name> - <month> <year>
- - Last committer addition was <name> - <month> <year>
-
-## Links
-
-[1] <hyperlink to external reference, if a reference was made in the report>
-----
+on a quarterly basis. TinkerPop reports on the following months: January, April, July, October.
A draft of the report should be sent to the TinkerPop developer mailing list for review at least three days prior to
-submitting to the board. The final report should be sent in plain-text format to `board@apache.org` and should be
-committed to the appropriate meeting agenda in SVN at:
-
-[source,text]
-https://svn.apache.org/repos/private/foundation/board
+submitting to the board. The final report can be submitted via link:https://whimsy.apache.org/board/agenda/[Whimsy] or
+via the link:https://reporter.apache.org[Apache Reporter Service] which already provides a template for the report and
+explains the different sections.
[[contributor-listing]]
== Contributor Listing
diff --git a/docs/src/dev/developer/for-committers.asciidoc b/docs/src/dev/developer/for-committers.asciidoc
index 175ef4d..f09202c 100644
--- a/docs/src/dev/developer/for-committers.asciidoc
+++ b/docs/src/dev/developer/for-committers.asciidoc
@@ -547,6 +547,28 @@
Tag filters can be applied to Intellij at execution time by adding a system properties of
`-Dcucumber.filter.tags=<step-filter>`.
+[[gremlin-socket-server-tests]]
+=== Gremlin Socket Server Tests
+`gremlin-socket-server` is an included test server for driver tests which require predefined server
+behavior. Typically, this is to test scenarios such as the server closing the connection or returning
+an error code but other response behavior can be added as needed for tests.
+
+Gremlin socket server uses the request id of incoming messages to determine how to respond.
+Request ids are defined in `gremlin-tools/gremlin-socket-server/conf/*.yaml`. The server side
+behavior for each request id is implemented in `TestWSGremlinInitializer`.
+
+To add new server side behavior, define a new request id in the config yaml, then add a corresponding
+field in `SocketServerSettings`. In `TestWSGremlinInitializer`, add a new block to the if else chain in the
+decode method which matches the request id. Define all server behavior and responses in this block.
+
+To write the driver test, send a request message to the gremlin socket server port as if it were a normal
+gremlin server. Override the request id on the request with one defined in the config yaml and gremlin
+socket server will respond according to the defined behavior.
+
+Ensure that the socket server is running during driver tests. By default, a docker image for
+`gremlin-socket-server` is built during `mvn install`. The simplest way to use the socket server during
+driver tests is to run a gremlin socket server container during the integration phase of driver tests.
+
== Developing Benchmarks
Benchmarks are a useful tool to track performance between TinkerPop versions and also as tools to aid development
diff --git a/docs/src/dev/future/index.asciidoc b/docs/src/dev/future/index.asciidoc
index 76a4c5d..1140f33 100644
--- a/docs/src/dev/future/index.asciidoc
+++ b/docs/src/dev/future/index.asciidoc
@@ -42,14 +42,14 @@
are removed with new items taking their place as they are planned. The release line is removed from the roadmap
completely when it is no longer maintained.
-== 3.7.x - Target 22Q4
+== 3.7.x - Target 2023H1
-Development has not yet started on the 3.7.x release line with a targeted release date for the initial release of the
-line of 22H2.
+The development of the 3.7.x release line is currently under way with a target release date for the initial release of
+the line of 23H1.
* Add support for traversals as parameters for `V()`, `is()`, and `has()` (includes `Traversal` arguments to `P`)
* Geospatial support for TinkerPop (link:++https://lists.apache.org/list?dev@tinkerpop.apache.org:2021-7:DISCUSS%20geo-spatial++[DISCUSS Thread])
-* Add mid-traversal `E()` support
+* Add mid-traversal `E()` support (link:https://issues.apache.org/jira/browse/TINKERPOP-2798[TINKERPOP-2798])
* Allow properties on elements (as opposed to just references) for remote traversals
* Add subgraph/tree structure in all GLVs
* List functions (`concat()`/etc.)
@@ -91,6 +91,7 @@
|=========================================================
|Proposal |Description |Targets |Resolved
|link:https://github.com/apache/tinkerpop/blob/master/docs/src/dev/future/proposal-equality-1.asciidoc[Proposal 1] |Equality, Equivalence, Comparability and Orderability Semantics - Documents existing Gremlin semantics along with clarifications for ambiguous behaviors and recommendations for consistency. |3.6.0 |N
+|link:https://github.com/apache/tinkerpop/blob/master/docs/src/dev/future/proposal-arrow-flight-2[Proposal 2] |Gremlin Arrow Flight. |4.0.0 |N
|=========================================================
= Appendix
diff --git a/docs/src/dev/future/proposal-arrow-flight-2.asciidoc b/docs/src/dev/future/proposal-arrow-flight-2.asciidoc
new file mode 100644
index 0000000..0849c08
--- /dev/null
+++ b/docs/src/dev/future/proposal-arrow-flight-2.asciidoc
@@ -0,0 +1,77 @@
+////
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+////
+image::apache-tinkerpop-logo.png[width=500,link="https://tinkerpop.apache.org"]
+
+*x.y.z - Proposal 2*
+
+= Gremlin Arrow Flight
+
+== Introduction
+Gremlin Server and Clients are based on WebSockets with a https://tinkerpop.apache.org/docs/current/dev/provider/#_graph_driver_provider_requirements/[custom sub-protocol] and serialization to GraphSON and GraphBinary. Developers for each driver must implement those protocols from scratch and there is a limited amount of code which is being reused (only 3rd party WebSocket libraries are currently reused in the client variants). The protocol implementation is a complicated and error-prone process, so most drivers only support some subset of Gremlin Server features. The maintenance cost is also constantly increasing with the number of new client variants being added to TinkerPop.
+
+== Motivation
+We would like to propose a solution to reduce maintenance and simplify the development of the client drivers by using a standard protocol based on the Apache Arrow Flight. As Arrow Flight is implemented in the most common languages like C++, C#, Java and Python we anticipate a larger amount of existing codebase can be reused which would help to reduce maintenance costs in the future. Also, we can reuse some other Arrow Flight features like authentication and error handling.
+
+== Assumptions
+
+* Need to reuse existing code as much as possible
+* It is desirable, but not necessary, to maintain compatibility with existing drivers
+* To simplify development at the initial stage, we will reuse existing serialization mechanism
+
+== Requirements
+
+* Gremlin Server and drivers should replace the network layer with Arrow Flight
+* No significant drop in performance
+* Gremlin Arrow must pass the Gherkin test suite
+
+== Specifications
+=== Design Overview
+
+The main idea is to replace the transport layer with FlightServer and FlightClient. They support asynchronous data transfer, splitting data into chunks, and authorization. While Arrow Flight typically requires schema, in a short term we can proceed with implementation using existing serializers and GraphBinary format. By using GraphBinary we will not have all capabilities that Arrow Flight provides out of the box, like efficient compression. However, in future, we see the value of adding capabilities to generate a schema from the server-side, and that can enable additional use cases.
+
+==== First stage: replace transport layer, but keep serializers
+
+Arrow Flight Server and Client implementations can be used to replace network code for Gremlin Server and GLV's.
+
+Pros:
+* Reduction of the code base to be developed and maintained
+* A relatively low number of modifications
+
+Cons:
+* We may observe reduced performance due to schema transfer and other overhead
+* Still need to support GraphBinary serialization
+
+==== Second stage: replace transport layer, make dynamic schema generation and use native Arrow structures for data transmission
+
+In addition, need to rework the serialization and add schema generation.
+We can use a user-provided schema to simplify development and reduce the size of the data transferred.
+
+Pros:
+* Greater reduction of the codebase to be developed and maintained
+* Performance and memory usage will be improved for large data sets due to Arrow Flight optimizations and the ability to transfer data in parallel
+* No need to support GraphBinary and GraphSON serialization protocols
+* We can use Arrow libraries to import and export data, supported several popular formats like CSV, JSON, Apache Parquet, Apache ORC
+
+Cons:
+* Reduced performance for small result sets
+* Can be complicated and expensive to generate a schema for each request. Can be solved with intoducing schema to Tinkerpop.
+
+Open question: how to efficiently serialize heterogeneous data, for example `g.inject(1,"str",new HashMap<>())`.
+
+== Similar solutions
+
+link:https://github.com/neo4j-field/neo4j-arrow/[neo4j-arrow]
diff --git a/docs/src/dev/provider/index.asciidoc b/docs/src/dev/provider/index.asciidoc
index b276621..6eb09a3 100644
--- a/docs/src/dev/provider/index.asciidoc
+++ b/docs/src/dev/provider/index.asciidoc
@@ -1096,6 +1096,9 @@
NOTE: Please refer to the link:https://tinkerpop.apache.org/docs/x.y.z/dev/io[IO Reference Documentation] for more
examples of `RequestMessage` and `ResponseMessage` instances.
+NOTE: Tinkerpop provides a test server which may be useful for testing drivers. Details can be found
+link:https://tinkerpop.apache.org/docs/current/dev/developer/#gremlin-socket-server-tests[here]
+
=== OpProcessors Arguments
The following sections define a non-exhaustive list of available operations and arguments for embedded `OpProcessors`
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index 79bca99..79e4ee3 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -1236,16 +1236,18 @@
[[e-step]]
=== E Step
-The `E()`-step is meant to read edges from the graph and is usually used to start a `GraphTraversal`. Unlike the related
-<<v-step,V()>> it cannot be used mid-traversal.
+The `E()`-step is meant to read edges from the graph and is usually used to start a `GraphTraversal`, but can also
+be used mid-traversal.
[gremlin-groovy,modern]
----
g.E(11) <1>
g.E().hasLabel('knows').has('weight', gt(0.75))
+g.inject(1).coalesce(E().hasLabel("knows"), addE("knows").from(V().has("name","josh")).to(V().has("name","vadas"))) <2>
----
<1> Find the edge by its unique identifier (i.e. `T.id`) - not all graphs will use a numeric value for their identifier.
+<2> Get edges with label `knows`, if there is none then add new one between `josh` and `vadas`.
*Additional References*
@@ -1759,6 +1761,10 @@
writing perspective is not that different in there are no parallel operations in play, however streaming the output
to disk requires a single pass of the data without high memory requirements for larger datasets.
+IMPORTANT: Default graph formats don't contain information about property cardinality, so it is up to the graph
+provider to choose the appropriate one. You will see a warning message if the chosen cardinality is SINGLE
+while your graph input contains multiple values for that property.
+
In general, TinkerPop recommends that users examine the native bulk import/export tools of the graph implementation
that they choose. Those tools will often outperform the `io()`-step and perhaps be easier to use with a greater
feature set. That said, graph providers do have the option to optimize `io()` to back it with their own
diff --git a/docs/src/upgrade/index.asciidoc b/docs/src/upgrade/index.asciidoc
index 512ec7a..b9c40b0 100644
--- a/docs/src/upgrade/index.asciidoc
+++ b/docs/src/upgrade/index.asciidoc
@@ -25,6 +25,8 @@
equally useful to TinkerPop providers, who build libraries and other systems on the core APIs and protocols that
TinkerPop exposes.
+include::release-3.7.x.asciidoc[]
+
include::release-3.6.x.asciidoc[]
include::release-3.5.x.asciidoc[]
diff --git a/docs/src/upgrade/release-3.7.x.asciidoc b/docs/src/upgrade/release-3.7.x.asciidoc
new file mode 100644
index 0000000..29458b7
--- /dev/null
+++ b/docs/src/upgrade/release-3.7.x.asciidoc
@@ -0,0 +1,92 @@
+////
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+////
+
+= TinkerPop 3.7.0
+
+image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/images/gremlin-running.png[width=185]
+
+*NOT OFFICIALLY NAMED YET*
+
+== TinkerPop 3.7.0
+
+*Release Date: NOT OFFICIALLY RELEASED YET*
+
+Please see the link:https://github.com/apache/tinkerpop/blob/3.7.0/CHANGELOG.asciidoc#release-3-7-0[changelog] for a complete list of all the modifications that are part of this release.
+
+=== Upgrading for Users
+
+==== Gremlin.NET: Nullable Annotations
+
+Gremlin.NET now uses link:https://learn.microsoft.com/en-us/dotnet/csharp/nullable-references#nullable-variable-annotations[nullable annotations]
+to state wether an argument or a return value can be null or not. This should make it much less likely to get a
+`NullReferenceException` from Gremlin.NET.
+
+This change required to make some breaking changes but most users should not be affected by this as the breaking
+changes are limited to APIs that are mostly intended for graph driver providers.
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-2348[TINKERPOP-2348]
+
+==== Removed connectOnStartup javascript
+
+Removed the `connectOnStartup` option for Gremlin Javascript API to resolve potential `unhandledRejection` and race
+conditions. New `DriverRemoteConnection` objects no longer initiate connection by default at startup. Call `open()`
+explicitly if one wishes to manually connect on startup.
+
+For example:
+
+[source,javascript]
+----
+const drc = new DriverRemoteConnection(url);
+drc.open().catch(err => {
+ // Handle error upon open.
+})
+----
+
+==== Creation of New `gremlin-util` Module
+
+`gremlin-driver` has been refactored and several classes have been extracted to a new `gremlin-util` module. Any classes
+which are utilized by both `gremlin-driver` and `gremlin-server` have been extracted to `gremlin-util`. This includes
+the entire `tinkerpop.gremlin.driver.ser` and `tinkerpop.gremlin.driver.message` packages as well as
+`tinkerpop.gremlin.driver.MessageSerializer` and `tinkerpop.gremlin.driver.Tokens`. This change is non-breaking as the
+package names remain unchanged and `gremlin-util` remains included in `gremlin-driver` as a dependency. As long as
+maven is being used as a build system, there is no change to the use in any of these classes.
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-2819[TINKERPOP-2819]
+
+=== Upgrading for Providers
+
+==== Graph Driver Providers
+
+===== Gremlin.NET: Nullable Reference Types
+
+Enabling nullable reference types comes with some breaking changes in Gremlin.NET which can affect driver providers.
+
+GraphBinary APIs changed to make better use of nullable reference types. Instead of one method `WriteValueAsync` and
+one method `ReadValueAsync`, there are now methods `WriteNullableValueAsync` and `ReadNullableValueAsync` that allow
+`null` values and methods `WriteNonNullableValueAsync` and `ReadNonNullableValueAsync` that do not allow `null` values.
+
+Some `set` property accessors were removed from some pure data classes in the `Structure` and the `Driver.Messages`
+namespaces to initialize these properties directly from the constructor which ensures that they are really not `null`.
+We also used this opportunity to convert some of these pure data classes into a `record`.
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-2348[TINKERPOP-2348]
+
+===== Reworked Gremlin Socket Server
+
+The `SimpleSocketServer` from `gremlin-driver` has been brought into a new module `gremlin-tools/gremlin-socket-server`
+and it has been adapted to be usable by all drivers for testing. See more about creating gremlin socket server tests
+link:https://tinkerpop.apache.org/docs/x.y.z/dev/developer/#gremlin-socket-server-tests[here].
diff --git a/gremlin-annotations/pom.xml b/gremlin-annotations/pom.xml
index 39e4306..faa19f4 100644
--- a/gremlin-annotations/pom.xml
+++ b/gremlin-annotations/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>tinkerpop</artifactId>
<groupId>org.apache.tinkerpop</groupId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-annotations</artifactId>
diff --git a/gremlin-archetype/gremlin-archetype-dsl/pom.xml b/gremlin-archetype/gremlin-archetype-dsl/pom.xml
index d63ad4b..dee245b 100644
--- a/gremlin-archetype/gremlin-archetype-dsl/pom.xml
+++ b/gremlin-archetype/gremlin-archetype-dsl/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>gremlin-archetype</artifactId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-archetype-dsl</artifactId>
diff --git a/gremlin-archetype/gremlin-archetype-server/pom.xml b/gremlin-archetype/gremlin-archetype-server/pom.xml
index 25f01b3..b8c3f97 100644
--- a/gremlin-archetype/gremlin-archetype-server/pom.xml
+++ b/gremlin-archetype/gremlin-archetype-server/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>gremlin-archetype</artifactId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-archetype-server</artifactId>
diff --git a/gremlin-archetype/gremlin-archetype-tinkergraph/pom.xml b/gremlin-archetype/gremlin-archetype-tinkergraph/pom.xml
index 9d2ce68..8b643d7 100644
--- a/gremlin-archetype/gremlin-archetype-tinkergraph/pom.xml
+++ b/gremlin-archetype/gremlin-archetype-tinkergraph/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>gremlin-archetype</artifactId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-archetype-tinkergraph</artifactId>
diff --git a/gremlin-archetype/pom.xml b/gremlin-archetype/pom.xml
index 338eedb..2a35046 100644
--- a/gremlin-archetype/pom.xml
+++ b/gremlin-archetype/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>tinkerpop</artifactId>
<groupId>org.apache.tinkerpop</groupId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-archetype</artifactId>
diff --git a/gremlin-console/bin/gremlin.sh b/gremlin-console/bin/gremlin.sh
index 28e8301..d6bc18d 120000
--- a/gremlin-console/bin/gremlin.sh
+++ b/gremlin-console/bin/gremlin.sh
@@ -1 +1 @@
-../target/apache-tinkerpop-gremlin-console-3.6.2-SNAPSHOT-standalone/bin/gremlin.sh
\ No newline at end of file
+../target/apache-tinkerpop-gremlin-console-3.7.0-SNAPSHOT-standalone/bin/gremlin.sh
\ No newline at end of file
diff --git a/gremlin-console/pom.xml b/gremlin-console/pom.xml
index 1f0cf7d..392bb12 100644
--- a/gremlin-console/pom.xml
+++ b/gremlin-console/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>tinkerpop</artifactId>
<groupId>org.apache.tinkerpop</groupId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-console</artifactId>
<name>Apache TinkerPop :: Gremlin Console</name>
diff --git a/gremlin-console/src/main/static/NOTICE b/gremlin-console/src/main/static/NOTICE
index c9f1534..88d6df9 100644
--- a/gremlin-console/src/main/static/NOTICE
+++ b/gremlin-console/src/main/static/NOTICE
@@ -64,3 +64,8 @@
------------------------------------------------------------------------
Copyright 2014 The Netty Project
+------------------------------------------------------------------------
+Objenesis 3.3 - shaded in gremlin-shaded to org.apache.tinkerpop.shaded.objenesis
+------------------------------------------------------------------------
+Copyright 2006-2022 Joe Walnes, Henri Tremblay, Leonardo Mesquita
+
diff --git a/gremlin-core/pom.xml b/gremlin-core/pom.xml
index 18a3276..2e933c0 100644
--- a/gremlin-core/pom.xml
+++ b/gremlin-core/pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>tinkerpop</artifactId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-core</artifactId>
<name>Apache TinkerPop :: Gremlin Core</name>
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/DefaultGremlinBaseVisitor.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/DefaultGremlinBaseVisitor.java
index 39dac7e..4531861 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/DefaultGremlinBaseVisitor.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/DefaultGremlinBaseVisitor.java
@@ -167,6 +167,10 @@
/**
* {@inheritDoc}
*/
+ @Override public T visitTraversalMethod_E(final GremlinParser.TraversalMethod_EContext ctx) { notImplemented(ctx); return null; }
+ /**
+ * {@inheritDoc}
+ */
@Override public T visitTraversalMethod_addE_String(final GremlinParser.TraversalMethod_addE_StringContext ctx) { notImplemented(ctx); return null; }
/**
* {@inheritDoc}
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/TraversalMethodVisitor.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/TraversalMethodVisitor.java
index 111732c..6c2a0ca2 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/TraversalMethodVisitor.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/grammar/TraversalMethodVisitor.java
@@ -77,6 +77,18 @@
* {@inheritDoc}
*/
@Override
+ public GraphTraversal visitTraversalMethod_E(final GremlinParser.TraversalMethod_EContext ctx) {
+ if (ctx.genericLiteralList().getChildCount() != 0) {
+ return this.graphTraversal.E(GenericLiteralVisitor.getGenericLiteralList(ctx.genericLiteralList()));
+ } else {
+ return this.graphTraversal.E();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
public GraphTraversal visitTraversalMethod_addV_Empty(final GremlinParser.TraversalMethod_addV_EmptyContext ctx) {
return this.graphTraversal.addV();
}
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
index a906bc2..6956b21 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
@@ -332,6 +332,21 @@
}
/**
+ * A {@code E} step is usually used to start a traversal but it may also be used mid-traversal.
+ *
+ * @param edgeIdsOrElements edges to inject into the traversal
+ * @return the traversal with an appended {@link GraphStep}
+ * @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#e-step" target="_blank">Reference Documentation - E Step</a>
+ * @since 3.7.0
+ */
+ public default GraphTraversal<S, Edge> E(final Object... edgeIdsOrElements) {
+ // a single null is [null]
+ final Object[] ids = null == edgeIdsOrElements ? new Object[] { null } : edgeIdsOrElements;
+ this.asAdmin().getBytecode().addStep(Symbols.E, ids);
+ return this.asAdmin().addStep(new GraphStep<>(this.asAdmin(), Edge.class, false, ids));
+ }
+
+ /**
* Map the {@link Vertex} to its adjacent vertices given a direction and edge labels.
*
* @param direction the direction to traverse from the current vertex
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/__.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/__.java
index 6274b45..e0d5136 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/__.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/__.java
@@ -130,6 +130,13 @@
}
/**
+ * @see GraphTraversal#E(Object...)
+ */
+ public static <A> GraphTraversal<A, Edge> E(final Object... edgeIdsOrElements) {
+ return __.<A>start().E(edgeIdsOrElements);
+ }
+
+ /**
* @see GraphTraversal#to(Direction, String...)
*/
public static GraphTraversal<Vertex, Vertex> to(final Direction direction, final String... edgeLabels) {
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/Attachable.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/Attachable.java
index 3cd76f2..701121f 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/Attachable.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/Attachable.java
@@ -27,8 +27,14 @@
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.structure.VertexProperty;
import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
import java.util.Optional;
import java.util.function.Function;
@@ -43,6 +49,8 @@
*/
public interface Attachable<V> {
+ Logger logger = LoggerFactory.getLogger(Attachable.class);
+
/**
* Get the raw object trying to be attached.
*
@@ -291,12 +299,21 @@
final Vertex vertex = hostGraph.features().vertex().willAllowId(baseVertex.id()) ?
hostGraph.addVertex(T.id, baseVertex.id(), T.label, baseVertex.label()) :
hostGraph.addVertex(T.label, baseVertex.label());
- baseVertex.properties().forEachRemaining(vp -> {
- final VertexProperty vertexProperty = hostGraph.features().vertex().properties().willAllowId(vp.id()) ?
- vertex.property(hostGraph.features().vertex().getCardinality(vp.key()), vp.key(), vp.value(), T.id, vp.id()) :
- vertex.property(hostGraph.features().vertex().getCardinality(vp.key()), vp.key(), vp.value());
- vp.properties().forEachRemaining(p -> vertexProperty.property(p.key(), p.value()));
- });
+ final Map<String, List<VertexProperty<Object>>> propertyMap = new HashMap<>();
+ baseVertex.properties().forEachRemaining(vp -> propertyMap.computeIfAbsent(vp.key(), k -> new ArrayList<>()).add(vp));
+ for (Map.Entry<String, List<VertexProperty<Object>>> entry : propertyMap.entrySet()) {
+ final VertexProperty.Cardinality cardinality = hostGraph.features().vertex().getCardinality(entry.getKey());
+ if (VertexProperty.Cardinality.single == cardinality && entry.getValue().size() > 1) {
+ logger.warn("{} has SINGLE cardinality but with more than one value: {}. Only last value will be retained.",
+ entry.getKey(), entry.getValue());
+ }
+ for (VertexProperty<Object> vp : entry.getValue()) {
+ final VertexProperty<Object> vertexProperty = hostGraph.features().vertex().properties().willAllowId(vp.id()) ?
+ vertex.property(cardinality, vp.key(), vp.value(), T.id, vp.id()) :
+ vertex.property(cardinality, vp.key(), vp.value());
+ vp.properties().forEachRemaining(p -> vertexProperty.property(p.key(), p.value()));
+ }
+ }
return vertex;
}
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/Gremlin.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/Gremlin.java
index 2d4a720..58394ab 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/Gremlin.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/Gremlin.java
@@ -26,10 +26,10 @@
* @author Stephen Mallette (http://stephen.genoprime.com)
*/
public final class Gremlin {
- private static String version;
+ private static final String version;
static {
- version = Manifests.read("version");
+ version = Manifests.read("tinkerpop-version");
}
private Gremlin() {
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/TraversalMethodVisitorTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/TraversalMethodVisitorTest.java
index be1af46..d9a4fce 100644
--- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/TraversalMethodVisitorTest.java
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/language/grammar/TraversalMethodVisitorTest.java
@@ -1124,4 +1124,25 @@
compare(g.V().with("blah", "bleh"),
eval("g.V().with('blah', 'bleh')"));
}
+
+ @Test
+ public void testTraversalMethod_midTraversal_E() throws Exception {
+ compare(g.inject(1).E(), eval("g.inject(1).E()"));
+ }
+
+ @Test
+ public void testTraversalMethod_midTraversal_E_multipleArgs() throws Exception {
+ compare(g.inject(1).E(2,null), eval("g.inject(1).E(2,null)"));
+ }
+
+ @Test
+ public void testTraversalMethod_midTraversal_E_spawning() throws Exception {
+ compare(g.V().coalesce(E(),addE("person")), eval("g.V().coalesce(__.E(),__.addE('person'))"));
+ }
+
+ @Test
+ public void testTraversalMethod_midTraversal_E_multipleArgs_spawning() throws Exception {
+ compare(g.V().coalesce(E(1,2),addE("person")),
+ eval("g.V().coalesce(__.E(1,2),__.addE('person'))"));
+ }
}
diff --git a/gremlin-dotnet/build/generate.groovy b/gremlin-dotnet/build/generate.groovy
index 77659aa..a1c0947 100644
--- a/gremlin-dotnet/build/generate.groovy
+++ b/gremlin-dotnet/build/generate.groovy
@@ -89,7 +89,8 @@
writer.writeLine("\n\n//********************************************************************************")
writer.writeLine("//* Do NOT edit this file directly - generated by build/generate.groovy")
- writer.writeLine("//********************************************************************************\n\n")
+ writer.writeLine("//********************************************************************************\n")
+ writer.writeLine("#nullable disable\n")
writer.writeLine('using System;\n' +
'using System.Collections.Generic;\n' +
@@ -174,6 +175,7 @@
' }\n' +
' }\n' +
'}\n')
+ writer.writeLine("#nullable restore\n")
}
diff --git a/gremlin-dotnet/pom.xml b/gremlin-dotnet/pom.xml
index 44124e1..b3f2384 100644
--- a/gremlin-dotnet/pom.xml
+++ b/gremlin-dotnet/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>tinkerpop</artifactId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-dotnet</artifactId>
<name>Apache TinkerPop :: Gremlin.Net</name>
diff --git a/gremlin-dotnet/src/Gremlin.Net.Template/Gremlin.Net.Template.csproj b/gremlin-dotnet/src/Gremlin.Net.Template/Gremlin.Net.Template.csproj
index 33916f2..753caa7 100644
--- a/gremlin-dotnet/src/Gremlin.Net.Template/Gremlin.Net.Template.csproj
+++ b/gremlin-dotnet/src/Gremlin.Net.Template/Gremlin.Net.Template.csproj
@@ -20,6 +20,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
+ <Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
@@ -28,7 +29,7 @@
<ProjectReference Include="../Gremlin.Net/Gremlin.Net.csproj" />
<!-- do not edit the version directly - maven updates it automatically -->
- <PackageReference Include="Gremlin.Net" Version="3.6.2-SNAPSHOT" />
+ <PackageReference Include="Gremlin.Net" Version="3.7.0-SNAPSHOT" />
</ItemGroup>
</Project>
diff --git a/gremlin-dotnet/src/Gremlin.Net.Template/Gremlin.Net.Template.nuspec b/gremlin-dotnet/src/Gremlin.Net.Template/Gremlin.Net.Template.nuspec
index 8bfb8ab..e11630e 100644
--- a/gremlin-dotnet/src/Gremlin.Net.Template/Gremlin.Net.Template.nuspec
+++ b/gremlin-dotnet/src/Gremlin.Net.Template/Gremlin.Net.Template.nuspec
@@ -5,7 +5,7 @@
<title>Gremlin.Net Template</title>
<!-- do not edit the version directly - maven updates it automatically -->
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
<description>Gremlin.Net template to create a console application with dotnet new.</description>
<authors>Apache TinkerPop</authors>
diff --git a/gremlin-dotnet/src/Gremlin.Net.Template/Service.cs b/gremlin-dotnet/src/Gremlin.Net.Template/Service.cs
index 4ded6d3..d4ba4eb 100644
--- a/gremlin-dotnet/src/Gremlin.Net.Template/Service.cs
+++ b/gremlin-dotnet/src/Gremlin.Net.Template/Service.cs
@@ -35,7 +35,7 @@
_g = g;
}
- public IList<string> FindCreatorsOfSoftware(string softwareName)
+ public IList<string?> FindCreatorsOfSoftware(string softwareName)
{
return _g.V().HasLabel("software").Has("name", softwareName).In("created").Values<string>("name").ToList();
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs
index 223b979..4fb3735 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/Connection.cs
@@ -45,9 +45,9 @@
private readonly IMessageSerializer _messageSerializer;
private readonly Uri _uri;
private readonly IWebSocketConnection _webSocketConnection;
- private readonly string _username;
- private readonly string _password;
- private readonly string _sessionId;
+ private readonly string? _username;
+ private readonly string? _password;
+ private readonly string? _sessionId;
private readonly bool _sessionEnabled;
private readonly ConcurrentQueue<(RequestMessage msg, CancellationToken cancellationToken)> _writeQueue =
@@ -62,8 +62,8 @@
private int _writeInProgress = 0;
private const int Closed = 1;
- public Connection(IWebSocketConnection webSocketConnection, Uri uri, string username, string password,
- IMessageSerializer messageSerializer, string sessionId)
+ public Connection(IWebSocketConnection webSocketConnection, Uri uri, string? username, string? password,
+ IMessageSerializer messageSerializer, string? sessionId)
{
_uri = uri;
_username = username;
@@ -132,7 +132,8 @@
var receivedMsg = await _messageSerializer.DeserializeMessageAsync(received).ConfigureAwait(false);
if (receivedMsg == null)
{
- ThrowMessageDeserializedNull();
+ throw new InvalidOperationException(
+ "Received data deserialized into null object message. Cannot operate on it.");
}
try
@@ -149,9 +150,6 @@
}
}
- private static void ThrowMessageDeserializedNull() =>
- throw new InvalidOperationException("Received data deserialized into null object message. Cannot operate on it.");
-
private void HandleReceivedMessage(ResponseMessage<List<object>> receivedMsg)
{
var status = receivedMsg.Status;
@@ -291,7 +289,7 @@
{
msgBuilder.AddArgument(kv.Key, kv.Value);
}
- msgBuilder.AddArgument(Tokens.ArgsSession, _sessionId);
+ msgBuilder.AddArgument(Tokens.ArgsSession, _sessionId!);
return msgBuilder.Create();
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionFactory.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionFactory.cs
index 3ccbc3c..4657172 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionFactory.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/ConnectionFactory.cs
@@ -27,11 +27,11 @@
{
private readonly WebSocketSettings _webSocketSettings;
private readonly GremlinServer _gremlinServer;
- private readonly string _sessionId;
+ private readonly string? _sessionId;
private readonly IMessageSerializer _messageSerializer;
public ConnectionFactory(GremlinServer gremlinServer, IMessageSerializer messageSerializer,
- WebSocketSettings webSocketSettings, string sessionId)
+ WebSocketSettings webSocketSettings, string? sessionId)
{
_gremlinServer = gremlinServer;
_messageSerializer = messageSerializer;
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/Exceptions/ConnectionClosedException.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/Exceptions/ConnectionClosedException.cs
index 13417ea..e03c7f6 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/Exceptions/ConnectionClosedException.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/Exceptions/ConnectionClosedException.cs
@@ -27,8 +27,8 @@
namespace Gremlin.Net.Driver.Exceptions
{
/// <summary>
- /// The exception that is thrown for requests that in-flight when the underlyingg websocket is closed by the server.
- /// Requests that recieve this exception will be in a non-deteministic state and may need to be retried.
+ /// The exception that is thrown for requests that in-flight when the underlying websocket is closed by the server.
+ /// Requests that receive this exception will be in a non-deterministic state and may need to be retried.
/// </summary>
/// <remarks>
/// It is recommended to use the same request retry policy that is applied when a <see cref="System.Net.WebSockets.WebSocketException" />,
@@ -44,19 +44,19 @@
/// <summary>
/// Gets the Websocket closure description provided by the server.
/// </summary>
- public string Description { get; }
+ public string? Description { get; }
/// <summary>
/// Initializes a new instance of the <see cref="ConnectionClosedException" /> class.
/// </summary>
- public ConnectionClosedException(WebSocketCloseStatus? status, string description)
+ public ConnectionClosedException(WebSocketCloseStatus? status, string? description)
: base(CreateMessage(status, description))
{
Status = status;
Description = description;
}
- private static string CreateMessage(WebSocketCloseStatus? status, string description)
+ private static string CreateMessage(WebSocketCloseStatus? status, string? description)
{
return $"Connection closed by server. CloseStatus: {status?.ToString() ?? "<none>"}, CloseDescription: {description ?? "<none>"}." +
" Any in-progress requests on the connection will be in an unknown state, and may need to be retried.";
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/GremlinClient.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/GremlinClient.cs
index 361cf57..e97d8eb 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/GremlinClient.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/GremlinClient.cs
@@ -57,8 +57,8 @@
/// <param name="sessionId">The session Id if Gremlin Client in session mode, defaults to null as session-less Client.</param>
[Obsolete("This constructor is obsolete. Use the constructor that takes a IMessageSerializer instead.")]
public GremlinClient(GremlinServer gremlinServer, GraphSONReader graphSONReader, GraphSONWriter graphSONWriter,
- ConnectionPoolSettings connectionPoolSettings = null,
- Action<ClientWebSocketOptions> webSocketConfiguration = null, string sessionId = null)
+ ConnectionPoolSettings? connectionPoolSettings = null,
+ Action<ClientWebSocketOptions>? webSocketConfiguration = null, string? sessionId = null)
: this(gremlinServer, graphSONReader, graphSONWriter, SerializationTokens.GraphSON3MimeType,
connectionPoolSettings, webSocketConfiguration, sessionId)
{
@@ -78,9 +78,9 @@
/// </param>
/// <param name="sessionId">The session Id if Gremlin Client in session mode, defaults to null as session-less Client.</param>
[Obsolete("This constructor is obsolete. Use the constructor that takes a IMessageSerializer instead.")]
- public GremlinClient(GremlinServer gremlinServer, GraphSONReader graphSONReader, GraphSONWriter graphSONWriter,
- string mimeType, ConnectionPoolSettings connectionPoolSettings = null,
- Action<ClientWebSocketOptions> webSocketConfiguration = null, string sessionId = null)
+ public GremlinClient(GremlinServer gremlinServer, GraphSONReader? graphSONReader, GraphSONWriter? graphSONWriter,
+ string mimeType, ConnectionPoolSettings? connectionPoolSettings = null,
+ Action<ClientWebSocketOptions>? webSocketConfiguration = null, string? sessionId = null)
{
IMessageSerializer messageSerializer;
switch (mimeType)
@@ -91,8 +91,8 @@
VerifyGraphSONArgumentTypeForMimeType<GraphSON3Writer>(graphSONWriter, nameof(graphSONWriter),
mimeType);
messageSerializer = new GraphSON3MessageSerializer(
- (GraphSON3Reader) graphSONReader ?? new GraphSON3Reader(),
- (GraphSON3Writer) graphSONWriter ?? new GraphSON3Writer());
+ (GraphSON3Reader?) graphSONReader ?? new GraphSON3Reader(),
+ (GraphSON3Writer?) graphSONWriter ?? new GraphSON3Writer());
break;
case SerializationTokens.GraphSON2MimeType:
VerifyGraphSONArgumentTypeForMimeType<GraphSON2Reader>(graphSONReader, nameof(graphSONReader),
@@ -100,8 +100,8 @@
VerifyGraphSONArgumentTypeForMimeType<GraphSON2Writer>(graphSONWriter, nameof(graphSONWriter),
mimeType);
messageSerializer = new GraphSON2MessageSerializer(
- (GraphSON2Reader) graphSONReader ?? new GraphSON2Reader(),
- (GraphSON2Writer) graphSONWriter ?? new GraphSON2Writer());
+ (GraphSON2Reader?) graphSONReader ?? new GraphSON2Reader(),
+ (GraphSON2Writer?) graphSONWriter ?? new GraphSON2Writer());
break;
default:
throw new ArgumentException(nameof(mimeType), $"{mimeType} not supported");
@@ -135,10 +135,10 @@
connectionPoolSettings ?? new ConnectionPoolSettings(), LoggerFactory.CreateLogger<ConnectionPool>());
}
- private static void VerifyGraphSONArgumentTypeForMimeType<T>(object argument, string argumentName,
+ private static void VerifyGraphSONArgumentTypeForMimeType<T>(object? argument, string argumentName,
string mimeType)
{
- if (argument != null && !(argument is T))
+ if (argument != null && argument is not T)
{
throw new ArgumentException(
$"{argumentName} is not a {typeof(T).Name} but the mime type is: {mimeType}", argumentName);
@@ -168,10 +168,10 @@
/// that could potentially be controlled by an untrusted user.
/// </param>
/// <param name="loggerFactory">A factory to create loggers. If not provided, then nothing will be logged.</param>
- public GremlinClient(GremlinServer gremlinServer, IMessageSerializer messageSerializer = null,
- ConnectionPoolSettings connectionPoolSettings = null,
- Action<ClientWebSocketOptions> webSocketConfiguration = null, string sessionId = null,
- bool disableCompression = false, ILoggerFactory loggerFactory = null)
+ public GremlinClient(GremlinServer gremlinServer, IMessageSerializer? messageSerializer = null,
+ ConnectionPoolSettings? connectionPoolSettings = null,
+ Action<ClientWebSocketOptions>? webSocketConfiguration = null, string? sessionId = null,
+ bool disableCompression = false, ILoggerFactory? loggerFactory = null)
{
messageSerializer ??= new GraphBinaryMessageSerializer();
var webSocketSettings = new WebSocketSettings
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/GremlinClientExtensions.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/GremlinClientExtensions.cs
index 54dabff..8132c7a 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/GremlinClientExtensions.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/GremlinClientExtensions.cs
@@ -52,9 +52,9 @@
/// Thrown when a response is received from Gremlin Server that indicates
/// that an error occurred.
/// </exception>
- public static async Task<T> SubmitWithSingleResultAsync<T>(this IGremlinClient gremlinClient,
+ public static async Task<T?> SubmitWithSingleResultAsync<T>(this IGremlinClient gremlinClient,
string requestScript,
- Dictionary<string, object> bindings = null,
+ Dictionary<string, object>? bindings = null,
CancellationToken cancellationToken = default)
{
var resultCollection = await gremlinClient.SubmitAsync<T>(requestScript, bindings, cancellationToken)
@@ -78,7 +78,7 @@
/// Thrown when a response is received from Gremlin Server that indicates
/// that an error occurred.
/// </exception>
- public static async Task<T> SubmitWithSingleResultAsync<T>(this IGremlinClient gremlinClient,
+ public static async Task<T?> SubmitWithSingleResultAsync<T>(this IGremlinClient gremlinClient,
RequestMessage requestMessage, CancellationToken cancellationToken = default)
{
var resultCollection =
@@ -100,7 +100,7 @@
/// that an error occurred.
/// </exception>
public static async Task SubmitAsync(this IGremlinClient gremlinClient, string requestScript,
- Dictionary<string, object> bindings = null, CancellationToken cancellationToken = default)
+ Dictionary<string, object>? bindings = null, CancellationToken cancellationToken = default)
{
await gremlinClient.SubmitAsync<object>(requestScript, bindings, cancellationToken).ConfigureAwait(false);
}
@@ -138,7 +138,7 @@
/// </exception>
public static async Task<ResultSet<T>> SubmitAsync<T>(this IGremlinClient gremlinClient,
string requestScript,
- Dictionary<string, object> bindings = null,
+ Dictionary<string, object>? bindings = null,
CancellationToken cancellationToken = default)
{
var msgBuilder = RequestMessage.Build(Tokens.OpsEval).AddArgument(Tokens.ArgsGremlin, requestScript);
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/GremlinServer.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/GremlinServer.cs
index 43ef159..fbe5bae 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/GremlinServer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/GremlinServer.cs
@@ -39,7 +39,7 @@
/// <param name="username">The username to submit on requests that require authentication.</param>
/// <param name="password">The password to submit on requests that require authentication.</param>
public GremlinServer(string hostname = "localhost", int port = 8182, bool enableSsl = false,
- string username = null, string password = null)
+ string? username = null, string? password = null)
{
Uri = CreateUri(hostname, port, enableSsl);
Username = username;
@@ -55,12 +55,12 @@
/// <summary>
/// Gets the username to submit on requests that require authentication.
/// </summary>
- public string Username { get; }
+ public string? Username { get; }
/// <summary>
/// Gets the password to submit on requests that require authentication.
/// </summary>
- public string Password { get; }
+ public string? Password { get; }
private Uri CreateUri(string hostname, int port, bool enableSsl)
{
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/IMessageSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/IMessageSerializer.cs
index e1a6a0e..0f2d79f 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/IMessageSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/IMessageSerializer.cs
@@ -48,7 +48,7 @@
/// <param name="message">The serialized message to deserialize.</param>
/// <param name="cancellationToken">The token to cancel the operation. The default value is None.</param>
/// <returns>The deserialized <see cref="ResponseMessage{T}"/>.</returns>
- Task<ResponseMessage<List<object>>> DeserializeMessageAsync(byte[] message,
+ Task<ResponseMessage<List<object>>?> DeserializeMessageAsync(byte[] message,
CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseMessage.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseMessage.cs
index a273cc0..bbb4c16 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseMessage.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseMessage.cs
@@ -29,20 +29,33 @@
/// The message returned from the server.
/// </summary>
/// <typeparam name="T">The type of the data returned.</typeparam>
- public class ResponseMessage<T>
+ public record ResponseMessage<T>
{
/// <summary>
- /// Gets or sets the identifier of the <see cref="RequestMessage"/> that generated this <see cref="ResponseMessage{T}"/>.
+ /// Initializes a new instance of the <see cref="ResponseMessage{T}" /> record.
/// </summary>
- public Guid? RequestId { get; set; }
+ /// <param name="requestId">The identifier of the <see cref="RequestMessage"/> that generated this <see cref="ResponseMessage{T}"/>.</param>
+ /// <param name="status">Status information about this <see cref="ResponseMessage{T}"/>.</param>
+ /// <param name="result">The result with its data and optional meta information.</param>
+ public ResponseMessage(Guid? requestId, ResponseStatus status, ResponseResult<T> result)
+ {
+ RequestId = requestId;
+ Status = status;
+ Result = result;
+ }
+
+ /// <summary>
+ /// Gets the identifier of the <see cref="RequestMessage"/> that generated this <see cref="ResponseMessage{T}"/>.
+ /// </summary>
+ public Guid? RequestId { get; }
/// <summary>
- /// Gets or sets status information about this <see cref="ResponseMessage{T}"/>.
+ /// Gets status information about this <see cref="ResponseMessage{T}"/>.
/// </summary>
- public ResponseStatus Status { get; set; }
+ public ResponseStatus Status { get; }
/// <summary>
- /// Gets or sets the result with its data and optional meta information.
+ /// Gets the result with its data and optional meta information.
/// </summary>
public ResponseResult<T> Result { get; set; }
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseResult.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseResult.cs
index abc2907..387893a 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseResult.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseResult.cs
@@ -30,16 +30,27 @@
/// <see cref="ResponseMessage{T}"/> by the server.
/// </summary>
/// <typeparam name="T">The type of the <see cref="Data"/>.</typeparam>
- public class ResponseResult<T>
+ public record ResponseResult<T>
{
/// <summary>
- /// Gets or sets the data of this result.
+ /// Initializes a new instance of the <see cref="ResponseResult{T}" /> record.
/// </summary>
- public T Data { get; set; }
+ /// <param name="data">The data of this result.</param>
+ /// <param name="meta">The (optional) meta data of this result.</param>
+ public ResponseResult(T? data, Dictionary<string, object>? meta = null)
+ {
+ Data = data;
+ Meta = meta ?? new Dictionary<string, object>();
+ }
+
+ /// <summary>
+ /// Gets the data of this result.
+ /// </summary>
+ public T? Data { get; }
/// <summary>
- /// Gets or sets meta data of this result.
+ /// Gets meta data of this result.
/// </summary>
- public Dictionary<string, object> Meta { get; set; }
+ public Dictionary<string, object> Meta { get; }
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatus.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatus.cs
index 63530a3..1d36113 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatus.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/Messages/ResponseStatus.cs
@@ -29,22 +29,36 @@
/// <summary>
/// Represents status information of a <see cref="ResponseMessage{T}"/>.
/// </summary>
- public class ResponseStatus
+ public record ResponseStatus
{
/// <summary>
- /// Gets or sets the <see cref="ResponseStatusCode"/>.
+ /// Initializes a new instance of the <see cref="ResponseStatus" /> record.
/// </summary>
- public ResponseStatusCode Code { get; set; }
+ /// <param name="code">The <see cref="ResponseStatusCode" />.</param>
+ /// <param name="attributes">The (optional) attributes with protocol-level information.</param>
+ /// <param name="message">The (optional) message which is just a human-readable string usually associated with errors.</param>
+ public ResponseStatus(ResponseStatusCode code, Dictionary<string, object>? attributes = null,
+ string? message = null)
+ {
+ Code = code;
+ Attributes = attributes ?? new Dictionary<string, object>();
+ Message = message;
+ }
+
+ /// <summary>
+ /// Gets the <see cref="ResponseStatusCode"/>.
+ /// </summary>
+ public ResponseStatusCode Code { get; }
/// <summary>
- /// Gets or sets the attributes <see cref="Dictionary{TKey,TValue}"/> with protocol-level information.
+ /// Gets the attributes <see cref="Dictionary{TKey,TValue}"/> with protocol-level information.
/// </summary>
- public Dictionary<string, object> Attributes { get; set; }
+ public Dictionary<string, object> Attributes { get; }
/// <summary>
- /// Gets or sets the message which is just a human-readable string usually associated with errors.
+ /// Gets the message which is just a human-readable string usually associated with errors.
/// </summary>
- public string Message { get; set; }
+ public string? Message { get; }
}
internal static class ResponseStatusExtensions
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/Remote/DriverRemoteConnection.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/Remote/DriverRemoteConnection.cs
index a623a44..36a33a7 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/Remote/DriverRemoteConnection.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/Remote/DriverRemoteConnection.cs
@@ -54,7 +54,7 @@
Tokens.RequestId, Tokens.ArgsUserAgent
};
- private readonly string _sessionId;
+ private readonly string? _sessionId;
private string Processor => IsSessionBound ? Tokens.ProcessorSession : Tokens.ProcessorTraversal;
/// <inheritdoc />
@@ -69,7 +69,7 @@
/// <param name="loggerFactory">A factory to create loggers. If not provided, then nothing will be logged.</param>
/// <exception cref="ArgumentNullException">Thrown when client is null.</exception>
public DriverRemoteConnection(string host, int port, string traversalSource = "g",
- ILoggerFactory loggerFactory = null) : this(
+ ILoggerFactory? loggerFactory = null) : this(
new GremlinClient(new GremlinServer(host, port), loggerFactory: loggerFactory), traversalSource,
logger: loggerFactory?.CreateLogger<DriverRemoteConnection>() ?? NullLogger<DriverRemoteConnection>.Instance)
{
@@ -86,8 +86,8 @@
{
}
- private DriverRemoteConnection(IGremlinClient client, string traversalSource, string sessionId = null,
- ILogger<DriverRemoteConnection> logger = null)
+ private DriverRemoteConnection(IGremlinClient client, string traversalSource, string? sessionId = null,
+ ILogger<DriverRemoteConnection>? logger = null)
{
_client = client ?? throw new ArgumentNullException(nameof(client));
_traversalSource = traversalSource ?? throw new ArgumentNullException(nameof(traversalSource));
@@ -110,12 +110,12 @@
/// <param name="bytecode">The <see cref="Bytecode" /> to submit.</param>
/// <param name="cancellationToken">The token to cancel the operation. The default value is None.</param>
/// <returns>A <see cref="ITraversal" /> allowing to access the results and side-effects.</returns>
- public async Task<ITraversal<S, E>> SubmitAsync<S, E>(Bytecode bytecode,
+ public async Task<ITraversal<TStart, TEnd>> SubmitAsync<TStart, TEnd>(Bytecode bytecode,
CancellationToken cancellationToken = default)
{
var requestId = Guid.NewGuid();
var resultSet = await SubmitBytecodeAsync(requestId, bytecode, cancellationToken).ConfigureAwait(false);
- return new DriverRemoteTraversal<S, E>(_client, requestId, resultSet);
+ return new DriverRemoteTraversal<TStart, TEnd>(resultSet);
}
private async Task<IEnumerable<Traverser>> SubmitBytecodeAsync(Guid requestid, Bytecode bytecode,
@@ -132,15 +132,15 @@
if (IsSessionBound)
{
- requestMsg.AddArgument(Tokens.ArgsSession, _sessionId);
+ requestMsg.AddArgument(Tokens.ArgsSession, _sessionId!);
}
var optionsStrategyInst = bytecode.SourceInstructions.Find(
s => s.OperatorName == "withStrategies" && s.Arguments[0] is OptionsStrategy);
if (optionsStrategyInst != null)
{
- OptionsStrategy optionsStrategy = optionsStrategyInst.Arguments[0];
- foreach (KeyValuePair<string,dynamic> pair in optionsStrategy.Configuration)
+ OptionsStrategy optionsStrategy = optionsStrategyInst.Arguments[0]!;
+ foreach (var pair in optionsStrategy.Configuration)
{
if (_allowedKeys.Contains(pair.Key))
{
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/Remote/DriverRemoteTraversal.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/Remote/DriverRemoteTraversal.cs
index cf50646..66501ff 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/Remote/DriverRemoteTraversal.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/Remote/DriverRemoteTraversal.cs
@@ -27,12 +27,13 @@
namespace Gremlin.Net.Driver.Remote
{
- internal class DriverRemoteTraversal<S, E> : DefaultTraversal<S, E>
+ internal class DriverRemoteTraversal<TStart, TEnd> : DefaultTraversal<TStart, TEnd>
{
- public DriverRemoteTraversal(IGremlinClient gremlinClient, Guid requestId,
- IEnumerable<Traverser> traversers)
+ public DriverRemoteTraversal(IEnumerable<Traverser> traversers)
{
Traversers = traversers;
}
+
+ public override Bytecode Bytecode => throw new NotSupportedException("Remote traversals do not have Bytecode");
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/ResponseHandlerForSingleRequestMessage.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/ResponseHandlerForSingleRequestMessage.cs
index 93b3097..7993ccb 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/ResponseHandlerForSingleRequestMessage.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/ResponseHandlerForSingleRequestMessage.cs
@@ -33,13 +33,13 @@
public Task<ResultSet<T>> Result => _tcs.Task;
private readonly TaskCompletionSource<ResultSet<T>> _tcs =
- new TaskCompletionSource<ResultSet<T>>(TaskCreationOptions.RunContinuationsAsynchronously);
+ new(TaskCreationOptions.RunContinuationsAsynchronously);
- private readonly List<T> _result = new List<T>();
+ private readonly List<T> _result = new();
public void HandleReceived(ResponseMessage<List<object>> received)
{
- foreach (var d in received.Result.Data)
+ foreach (var d in received.Result.Data!)
{
_result.Add((T) d);
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/WebSocketConnection.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/WebSocketConnection.cs
index 0a5bee9..68fe913 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/WebSocketConnection.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/WebSocketConnection.cs
@@ -124,7 +124,7 @@
throw new ConnectionClosedException(received.CloseStatus, received.CloseStatusDescription);
}
- ms.Write(receiveBuffer.Array, receiveBuffer.Offset, received.Count);
+ ms.Write(receiveBuffer.Array!, receiveBuffer.Offset, received.Count);
} while (!received.EndOfMessage);
return ms.ToArray();
diff --git a/gremlin-dotnet/src/Gremlin.Net/Driver/WebSocketSettings.cs b/gremlin-dotnet/src/Gremlin.Net/Driver/WebSocketSettings.cs
index 7cb794e..62c8ca0 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Driver/WebSocketSettings.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Driver/WebSocketSettings.cs
@@ -39,7 +39,7 @@
/// Gets or sets the delegate that will be invoked with the <see cref="ClientWebSocketOptions" />
/// object used to configure WebSocket connections.
/// </summary>
- public Action<ClientWebSocketOptions> WebSocketConfigurationCallback { get; set; }
+ public Action<ClientWebSocketOptions>? WebSocketConfigurationCallback { get; set; }
public bool EnableUserAgentOnConnect { get; set; }
diff --git a/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj b/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
index 7d436ff..2d676b1 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
+++ b/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
@@ -22,11 +22,12 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LangVersion>9</LangVersion>
+ <Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup Label="Package">
<!-- do not edit the version directly - maven updates it automatically -->
- <Version>3.6.2-SNAPSHOT</Version>
+ <Version>3.7.0-SNAPSHOT</Version>
<Title>Gremlin.Net</Title>
<Authors>Apache TinkerPop</Authors>
<Description>Gremlin.Net for Apache TinkerPop™ is a language variant and driver for .NET.
@@ -79,6 +80,10 @@
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
+ <PackageReference Include="Nullable" Version="1.3.1">
+ <PrivateAssets>all</PrivateAssets>
+ <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
+ </PackageReference>
</ItemGroup>
<ItemGroup>
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Remote/IRemoteConnection.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Remote/IRemoteConnection.cs
index cf236af..b721e40 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Remote/IRemoteConnection.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Remote/IRemoteConnection.cs
@@ -39,7 +39,7 @@
/// <param name="bytecode">The <see cref="Bytecode" /> to send.</param>
/// <param name="cancellationToken">The token to cancel the operation. The default value is None.</param>
/// <returns>The <see cref="ITraversal" /> with the results and optional side-effects.</returns>
- Task<ITraversal<S, E>> SubmitAsync<S, E>(Bytecode bytecode, CancellationToken cancellationToken = default);
+ Task<ITraversal<TStart, TEnd>> SubmitAsync<TStart, TEnd>(Bytecode bytecode, CancellationToken cancellationToken = default);
/// <summary>
/// Creates a <see cref="RemoteTransaction" /> in the context of a <see cref="GraphTraversalSource" /> designed to work with
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Remote/RemoteStrategy.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Remote/RemoteStrategy.cs
index d84dba1..aa39f59 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Remote/RemoteStrategy.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Remote/RemoteStrategy.cs
@@ -45,16 +45,16 @@
}
/// <inheritdoc />
- public void Apply<S, E>(ITraversal<S, E> traversal)
+ public void Apply<TStart, TEnd>(ITraversal<TStart, TEnd> traversal)
{
ApplyAsync(traversal, CancellationToken.None).WaitUnwrap();
}
/// <inheritdoc />
- public async Task ApplyAsync<S, E>(ITraversal<S, E> traversal, CancellationToken cancellationToken = default)
+ public async Task ApplyAsync<TStart, TEnd>(ITraversal<TStart, TEnd> traversal, CancellationToken cancellationToken = default)
{
if (traversal.Traversers != null) return;
- var remoteTraversal = await _remoteConnection.SubmitAsync<S, E>(traversal.Bytecode, cancellationToken)
+ var remoteTraversal = await _remoteConnection.SubmitAsync<TStart, TEnd>(traversal.Bytecode, cancellationToken)
.ConfigureAwait(false);
traversal.Traversers = remoteTraversal.Traversers;
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Binding.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Binding.cs
index 80c8269..ce76181 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Binding.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Binding.cs
@@ -35,7 +35,7 @@
/// </summary>
/// <param name="key">The key that identifies the <see cref="Binding" />.</param>
/// <param name="value">The value of the <see cref="Binding" />.</param>
- public Binding(string key, object value)
+ public Binding(string key, object? value)
{
Key = key;
Value = value;
@@ -49,18 +49,18 @@
/// <summary>
/// Gets the value of the <see cref="Binding" />.
/// </summary>
- public object Value { get; }
+ public object? Value { get; }
/// <inheritdoc />
- public bool Equals(Binding other)
+ public bool Equals(Binding? other)
{
if (other == null)
return false;
- return Key == other.Key && Value.Equals(other.Value);
+ return Key == other.Key && (Value?.Equals(other.Value) ?? other.Value == null);
}
/// <inheritdoc />
- public override bool Equals(object other)
+ public override bool Equals(object? other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bindings.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bindings.cs
index a6e13b9..746b499 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bindings.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bindings.cs
@@ -34,10 +34,9 @@
/// <summary>
/// Gets an instance of the <see cref="Bindings" /> class.
/// </summary>
- public static Bindings Instance { get; } = new Bindings();
+ public static Bindings Instance { get; } = new();
- private static readonly ThreadLocal<Dictionary<object, string>> BoundVariableByValue =
- new ThreadLocal<Dictionary<object, string>>();
+ private static readonly ThreadLocal<Dictionary<object, string>> BoundVariableByValue = new();
/// <summary>
/// Binds the variable to the specified value.
@@ -45,7 +44,7 @@
/// <param name="variable">The variable to bind.</param>
/// <param name="value">The value to which the variable should be bound.</param>
/// <returns>The bound value.</returns>
- public TV Of<TV>(string variable, TV value)
+ public TV Of<TV>(string variable, TV value) where TV : notnull
{
var dict = BoundVariableByValue.Value;
if (dict == null)
@@ -57,7 +56,7 @@
return value;
}
- internal static string GetBoundVariable<TV>(TV value)
+ internal static string? GetBoundVariable<TV>(TV value) where TV : notnull
{
var dict = BoundVariableByValue.Value;
if (dict == null)
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bytecode.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bytecode.cs
index e692ed2..604ba67 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bytecode.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bytecode.cs
@@ -24,6 +24,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
using System.Linq;
namespace Gremlin.Net.Process.Traversal
@@ -60,19 +61,19 @@
/// <summary>
/// Gets the traversal source instructions.
/// </summary>
- public List<Instruction> SourceInstructions { get; } = new List<Instruction>();
+ public List<Instruction> SourceInstructions { get; } = new();
/// <summary>
/// Gets the <see cref="ITraversal" /> instructions.
/// </summary>
- public List<Instruction> StepInstructions { get; } = new List<Instruction>();
+ public List<Instruction> StepInstructions { get; } = new();
/// <summary>
/// Add a traversal source instruction to the bytecode.
/// </summary>
/// <param name="sourceName">The traversal source method name (e.g. withSack()).</param>
/// <param name="args">The traversal source method arguments.</param>
- public void AddSource(string sourceName, params object[] args)
+ public void AddSource(string sourceName, params object?[] args)
{
SourceInstructions.Add(new Instruction(sourceName, FlattenArguments(args)));
Bindings.Clear();
@@ -83,17 +84,17 @@
/// </summary>
/// <param name="stepName">The traversal method name (e.g. out()).</param>
/// <param name="args">The traversal method arguments.</param>
- public void AddStep(string stepName, params object[] args)
+ public void AddStep(string stepName, params object?[] args)
{
StepInstructions.Add(new Instruction(stepName, FlattenArguments(args)));
Bindings.Clear();
}
- private object[] FlattenArguments(object[] arguments)
+ private object?[] FlattenArguments(object?[] arguments)
{
if (arguments.Length == 0)
return EmptyArray;
- var flatArguments = new List<object>();
+ var flatArguments = new List<object?>();
foreach (var arg in arguments)
{
if (arg is object[] objects)
@@ -108,7 +109,8 @@
return flatArguments.ToArray();
}
- private object ConvertArgument(object argument, bool searchBindings)
+ [return: NotNullIfNotNull("argument")]
+ private object? ConvertArgument(object? argument, bool searchBindings)
{
if (null == argument)
{
@@ -129,7 +131,7 @@
if (IsDictionaryType(argument.GetType()))
{
- var dict = new Dictionary<object, object>();
+ var dict = new Dictionary<object, object?>();
foreach (DictionaryEntry item in (IDictionary)argument)
{
dict[ConvertArgument(item.Key, true)] = ConvertArgument(item.Value, true);
@@ -138,13 +140,13 @@
}
if (IsListType(argument.GetType()))
{
- var list = new List<object>(((IList) argument).Count);
- list.AddRange(from object item in (IList) argument select ConvertArgument(item, true));
+ var list = new List<object?>(((IList) argument).Count);
+ list.AddRange(from object? item in (IList)argument select ConvertArgument(item, true));
return list;
}
if (IsHashSetType(argument.GetType()))
{
- var set = new HashSet<object>();
+ var set = new HashSet<object?>();
foreach (var item in (IEnumerable)argument)
{
set.Add(ConvertArgument(item, true));
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/DefaultTraversal.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/DefaultTraversal.cs
index 191b7a8..d2da68e 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/DefaultTraversal.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/DefaultTraversal.cs
@@ -24,6 +24,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
@@ -33,14 +34,14 @@
/// <summary>
/// A traversal represents a directed walk over a graph.
/// </summary>
- public abstract class DefaultTraversal<S, E> : ITraversal<S, E>
+ public abstract class DefaultTraversal<TStart, TEnd> : ITraversal<TStart, TEnd>
{
- private IEnumerator<Traverser> _traverserEnumerator;
+ private IEnumerator<Traverser>? _traverserEnumerator;
/// <summary>
/// Gets the <see cref="Traversal.Bytecode" /> representation of this traversal.
/// </summary>
- public Bytecode Bytecode { get; protected set; }
+ public abstract Bytecode Bytecode { get; }
/// <summary>
/// Determines if this traversal was spawned anonymously or not.
@@ -50,7 +51,7 @@
/// <summary>
/// Gets or sets the <see cref="Traverser" />'s of this traversal that hold the results of the traversal.
/// </summary>
- public IEnumerable<Traverser> Traversers { get; set; }
+ public IEnumerable<Traverser>? Traversers { get; set; }
ITraversal ITraversal.Iterate()
{
@@ -63,7 +64,7 @@
protected ICollection<ITraversalStrategy> TraversalStrategies { get; set; } = new List<ITraversalStrategy>();
private IEnumerator<Traverser> TraverserEnumerator
- => _traverserEnumerator ?? (_traverserEnumerator = GetTraverserEnumerator());
+ => _traverserEnumerator ??= GetTraverserEnumerator();
private bool _nextAvailable;
private bool _fetchedNext;
@@ -109,23 +110,23 @@
}
/// <inheritdoc />
- public E Current => GetCurrent<E>();
+ public TEnd? Current => GetCurrent<TEnd>();
- object IEnumerator.Current => GetCurrent();
+ object? IEnumerator.Current => GetCurrent();
- private TReturn GetCurrent<TReturn>()
+ private TReturn? GetCurrent<TReturn>()
{
var value = GetCurrent();
var returnType = typeof(TReturn);
if (value == null || value.GetType() == returnType)
{
// Avoid evaluating type comparisons
- return (TReturn) value;
+ return (TReturn?) value;
}
return (TReturn) GetValue(returnType, value);
}
- private object GetCurrent()
+ private object? GetCurrent()
{
// Use dynamic to object to prevent runtime dynamic conversion evaluation
return TraverserEnumerator.Current?.Object;
@@ -134,7 +135,8 @@
/// <summary>
/// Gets the value, converting to the expected type when necessary and supported.
/// </summary>
- private static object GetValue(Type type, object value)
+ [return: NotNullIfNotNull("value")]
+ private static object? GetValue(Type type, object? value)
{
var genericType = type.GetTypeInfo().IsGenericType
? type.GetTypeInfo().GetGenericTypeDefinition()
@@ -144,7 +146,8 @@
var keyType = type.GenericTypeArguments[0];
var valueType = type.GenericTypeArguments[1];
var mapType = typeof(Dictionary<,>).MakeGenericType(keyType, valueType);
- var result = (IDictionary) Activator.CreateInstance(mapType);
+ var result = (IDictionary?)Activator.CreateInstance(mapType) ??
+ throw new InvalidOperationException($"Cannot convert value {value} to a Dictionary.");
foreach (DictionaryEntry kv in dictValue)
{
result.Add(GetValue(keyType, kv.Key), GetValue(valueType, kv.Value));
@@ -155,7 +158,8 @@
{
var childType = type.GenericTypeArguments[0];
var listType = typeof(List<>).MakeGenericType(childType);
- var result = (IList) Activator.CreateInstance(listType);
+ var result = (IList?)Activator.CreateInstance(listType) ??
+ throw new InvalidOperationException($"Cannot convert value {value} to a list.");
foreach (var itemValue in enumerableValue)
{
result.Add(itemValue);
@@ -169,6 +173,11 @@
{
if (Traversers == null)
ApplyStrategies();
+ if (Traversers == null)
+ {
+ throw new InvalidOperationException(
+ $"Cannot enumerate the traversal as there are no {nameof(Traversers)}. Maybe a strategy needs to be added.");
+ }
return Traversers.GetEnumerator();
}
@@ -196,7 +205,7 @@
/// Gets the next result from the traversal.
/// </summary>
/// <returns>The result.</returns>
- public E Next()
+ public TEnd? Next()
{
MoveNext();
return Current;
@@ -207,7 +216,7 @@
/// </summary>
/// <param name="amount">The number of results to get.</param>
/// <returns>The n-results.</returns>
- public IEnumerable<E> Next(int amount)
+ public IEnumerable<TEnd?> Next(int amount)
{
for (var i = 0; i < amount; i++)
yield return Next();
@@ -217,7 +226,7 @@
/// Iterates all <see cref="Traverser" /> instances in the traversal.
/// </summary>
/// <returns>The fully drained traversal.</returns>
- public ITraversal<S, E> Iterate()
+ public ITraversal<TStart, TEnd> Iterate()
{
Bytecode.AddStep("none");
while (MoveNext())
@@ -240,9 +249,9 @@
/// Puts all the results into a <see cref="List{T}" />.
/// </summary>
/// <returns>The results in a list.</returns>
- public IList<E> ToList()
+ public IList<TEnd?> ToList()
{
- var objs = new List<E>();
+ var objs = new List<TEnd?>();
while (MoveNext())
objs.Add(Current);
return objs;
@@ -252,9 +261,9 @@
/// Puts all the results into a <see cref="HashSet{T}" />.
/// </summary>
/// <returns>The results in a set.</returns>
- public ISet<E> ToSet()
+ public ISet<TEnd?> ToSet()
{
- var objs = new HashSet<E>();
+ var objs = new HashSet<TEnd?>();
while (MoveNext())
objs.Add(Current);
return objs;
@@ -267,7 +276,7 @@
/// <param name="callback">The function to execute on the current traversal.</param>
/// <param name="cancellationToken">The token to cancel the operation. The default value is None.</param>
/// <returns>The result of the executed <paramref name="callback" />.</returns>
- public async Task<TReturn> Promise<TReturn>(Func<ITraversal<S, E>, TReturn> callback,
+ public async Task<TReturn> Promise<TReturn>(Func<ITraversal<TStart, TEnd>, TReturn> callback,
CancellationToken cancellationToken = default)
{
await ApplyStrategiesAsync(cancellationToken).ConfigureAwait(false);
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/EnumWrapper.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/EnumWrapper.cs
index ac0185c..3df6a6d 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/EnumWrapper.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/EnumWrapper.cs
@@ -47,12 +47,12 @@
/// <param name="enumValue">The value of the enum.</param>
protected EnumWrapper(string enumName, string enumValue)
{
- EnumName = enumName;
- EnumValue = enumValue;
+ EnumName = enumName ?? throw new ArgumentNullException(nameof(enumName));
+ EnumValue = enumValue ?? throw new ArgumentNullException(nameof(enumValue));
}
/// <inheritdoc />
- public bool Equals(EnumWrapper other)
+ public bool Equals(EnumWrapper? other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
@@ -60,7 +60,7 @@
}
/// <inheritdoc />
- public override bool Equals(object obj)
+ public override bool Equals(object? obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
@@ -73,8 +73,7 @@
{
unchecked
{
- return ((EnumName != null ? EnumName.GetHashCode() : 0) * 397) ^
- (EnumValue != null ? EnumValue.GetHashCode() : 0);
+ return (EnumName.GetHashCode() * 397) ^ EnumValue.GetHashCode();
}
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
index c6cf798..2d16336 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
@@ -31,7 +31,7 @@
/// <summary>
/// Graph traversals are the primary way in which graphs are processed.
/// </summary>
- public class GraphTraversal<S, E> : DefaultTraversal<S, E>
+ public class GraphTraversal<TStart, TEnd> : DefaultTraversal<TStart, TEnd>
{
/// <summary>
/// Initializes a new instance of the <see cref="GraphTraversal{SType, EType}" /> class.
@@ -64,115 +64,136 @@
IsAnonymous = anonymous;
}
- private static GraphTraversal<S2, E2> Wrap<S2, E2>(GraphTraversal<S, E> traversal)
+ /// <inheritdoc />
+ public override Bytecode Bytecode { get; }
+
+ private static GraphTraversal<TNewStart, TNewEnd> Wrap<TNewStart, TNewEnd>(GraphTraversal<TStart, TEnd> traversal)
{
- if (typeof(S2) == typeof(S) && typeof(E2) == typeof(E))
+ if (typeof(TNewStart) == typeof(TStart) && typeof(TNewEnd) == typeof(TEnd))
{
- return traversal as GraphTraversal<S2, E2>;
+ return (traversal as GraphTraversal<TNewStart, TNewEnd>)!;
}
// New wrapper
- return new GraphTraversal<S2, E2>(traversal.TraversalStrategies, traversal.Bytecode, traversal.IsAnonymous);
+ return new GraphTraversal<TNewStart, TNewEnd>(traversal.TraversalStrategies, traversal.Bytecode, traversal.IsAnonymous);
}
/// <summary>
/// Adds the V step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Vertex> V (params object[] vertexIdsOrElements)
+ public GraphTraversal<TStart, Vertex> V (params object?[]? vertexIdsOrElements)
{
if (vertexIdsOrElements == null)
{
- Bytecode.AddStep("V", new object[] { null });
+ Bytecode.AddStep("V", new object?[] { null });
}
else
{
- var args = new List<object>(vertexIdsOrElements.Length);
+ var args = new List<object?>(vertexIdsOrElements.Length);
args.AddRange(vertexIdsOrElements);
Bytecode.AddStep("V", args.ToArray());
}
- return Wrap<S, Vertex>(this);
+ return Wrap<TStart, Vertex>(this);
+ }
+
+ /// <summary>
+ /// Adds the E step to this <see cref="GraphTraversal{SType, EType}" />.
+ /// </summary>
+ public GraphTraversal<TStart, Edge> E (params object?[]? edgeIdsOrElements)
+ {
+ if (edgeIdsOrElements == null)
+ {
+ Bytecode.AddStep("E", new object?[] { null });
+ }
+ else
+ {
+ var args = new List<object?>(edgeIdsOrElements.Length);
+ args.AddRange(edgeIdsOrElements);
+ Bytecode.AddStep("E", args.ToArray());
+ }
+ return Wrap<TStart, Edge>(this);
}
/// <summary>
/// Adds the addE step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Edge> AddE (string edgeLabel)
+ public GraphTraversal<TStart, Edge> AddE (string edgeLabel)
{
Bytecode.AddStep("addE", edgeLabel);
- return Wrap<S, Edge>(this);
+ return Wrap<TStart, Edge>(this);
}
/// <summary>
/// Adds the addE step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Edge> AddE (ITraversal edgeLabelTraversal)
+ public GraphTraversal<TStart, Edge> AddE (ITraversal edgeLabelTraversal)
{
Bytecode.AddStep("addE", edgeLabelTraversal);
- return Wrap<S, Edge>(this);
+ return Wrap<TStart, Edge>(this);
}
/// <summary>
/// Adds the addV step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Vertex> AddV ()
+ public GraphTraversal<TStart, Vertex> AddV ()
{
Bytecode.AddStep("addV");
- return Wrap<S, Vertex>(this);
+ return Wrap<TStart, Vertex>(this);
}
/// <summary>
/// Adds the addV step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Vertex> AddV (string vertexLabel)
+ public GraphTraversal<TStart, Vertex> AddV (string vertexLabel)
{
Bytecode.AddStep("addV", vertexLabel);
- return Wrap<S, Vertex>(this);
+ return Wrap<TStart, Vertex>(this);
}
/// <summary>
/// Adds the addV step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Vertex> AddV (ITraversal vertexLabelTraversal)
+ public GraphTraversal<TStart, Vertex> AddV (ITraversal vertexLabelTraversal)
{
Bytecode.AddStep("addV", vertexLabelTraversal);
- return Wrap<S, Vertex>(this);
+ return Wrap<TStart, Vertex>(this);
}
/// <summary>
/// Adds the aggregate step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Aggregate (Scope scope, string sideEffectKey)
+ public GraphTraversal<TStart, TEnd> Aggregate (Scope scope, string sideEffectKey)
{
Bytecode.AddStep("aggregate", scope, sideEffectKey);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the aggregate step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Aggregate (string sideEffectKey)
+ public GraphTraversal<TStart, TEnd> Aggregate (string sideEffectKey)
{
Bytecode.AddStep("aggregate", sideEffectKey);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the and step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> And (params ITraversal[] andTraversals)
+ public GraphTraversal<TStart, TEnd> And (params ITraversal[] andTraversals)
{
if (andTraversals == null) throw new ArgumentNullException(nameof(andTraversals));
var args = new List<object>(andTraversals.Length);
args.AddRange(andTraversals);
Bytecode.AddStep("and", args.ToArray());
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the as step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> As (string stepLabel, params string[] stepLabels)
+ public GraphTraversal<TStart, TEnd> As (string stepLabel, params string[] stepLabels)
{
if (stepLabel == null) throw new ArgumentNullException(nameof(stepLabel));
if (stepLabels == null) throw new ArgumentNullException(nameof(stepLabels));
@@ -180,219 +201,220 @@
var args = new List<object>(1 + stepLabels.Length) {stepLabel};
args.AddRange(stepLabels);
Bytecode.AddStep("as", args.ToArray());
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the barrier step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Barrier ()
+ public GraphTraversal<TStart, TEnd> Barrier ()
{
Bytecode.AddStep("barrier");
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the barrier step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Barrier (IConsumer barrierConsumer)
+ public GraphTraversal<TStart, TEnd> Barrier (IConsumer barrierConsumer)
{
Bytecode.AddStep("barrier", barrierConsumer);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the barrier step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Barrier (int maxBarrierSize)
+ public GraphTraversal<TStart, TEnd> Barrier (int maxBarrierSize)
{
Bytecode.AddStep("barrier", maxBarrierSize);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the both step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Vertex> Both (params string[] edgeLabels)
+ public GraphTraversal<TStart, Vertex> Both (params string?[] edgeLabels)
{
if (edgeLabels == null) throw new ArgumentNullException(nameof(edgeLabels));
- var args = new List<object>(edgeLabels.Length);
+ var args = new List<object?>(edgeLabels.Length);
args.AddRange(edgeLabels);
Bytecode.AddStep("both", args.ToArray());
- return Wrap<S, Vertex>(this);
+ return Wrap<TStart, Vertex>(this);
}
/// <summary>
/// Adds the bothE step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Edge> BothE (params string[] edgeLabels)
+ public GraphTraversal<TStart, Edge> BothE (params string?[] edgeLabels)
{
if (edgeLabels == null) throw new ArgumentNullException(nameof(edgeLabels));
- var args = new List<object>(edgeLabels.Length);
+ var args = new List<object?>(edgeLabels.Length);
args.AddRange(edgeLabels);
Bytecode.AddStep("bothE", args.ToArray());
- return Wrap<S, Edge>(this);
+ return Wrap<TStart, Edge>(this);
}
/// <summary>
/// Adds the bothV step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Vertex> BothV ()
+ public GraphTraversal<TStart, Vertex> BothV ()
{
Bytecode.AddStep("bothV");
- return Wrap<S, Vertex>(this);
+ return Wrap<TStart, Vertex>(this);
}
/// <summary>
/// Adds the branch step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Branch<E2> (IFunction function)
+ public GraphTraversal<TStart, TNewEnd> Branch<TNewEnd> (IFunction? function)
{
Bytecode.AddStep("branch", function);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the branch step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Branch<E2> (ITraversal branchTraversal)
+ public GraphTraversal<TStart, TNewEnd> Branch<TNewEnd> (ITraversal branchTraversal)
{
Bytecode.AddStep("branch", branchTraversal);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the by step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> By ()
+ public GraphTraversal<TStart, TEnd> By ()
{
Bytecode.AddStep("by");
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the by step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> By (IComparator comparator)
+ public GraphTraversal<TStart, TEnd> By (IComparator comparator)
{
Bytecode.AddStep("by", comparator);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the by step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> By (IFunction function)
+ public GraphTraversal<TStart, TEnd> By (IFunction function)
{
Bytecode.AddStep("by", function);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the by step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> By (IFunction function, IComparator comparator)
+ public GraphTraversal<TStart, TEnd> By (IFunction function, IComparator comparator)
{
Bytecode.AddStep("by", function, comparator);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the by step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> By (Order order)
+ public GraphTraversal<TStart, TEnd> By (Order order)
{
Bytecode.AddStep("by", order);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the by step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> By (string key)
+ public GraphTraversal<TStart, TEnd> By (string? key)
{
Bytecode.AddStep("by", key);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the by step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> By (string key, IComparator comparator)
+ public GraphTraversal<TStart, TEnd> By (string? key, IComparator comparator)
{
Bytecode.AddStep("by", key, comparator);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the by step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> By (T token)
+ public GraphTraversal<TStart, TEnd> By (T token)
{
Bytecode.AddStep("by", token);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the by step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> By (ITraversal traversal)
+ public GraphTraversal<TStart, TEnd> By (ITraversal traversal)
{
Bytecode.AddStep("by", traversal);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the by step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> By (ITraversal traversal, IComparator comparator)
+ public GraphTraversal<TStart, TEnd> By (ITraversal traversal, IComparator comparator)
{
Bytecode.AddStep("by", traversal, comparator);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the call step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Call<E2> (string service)
+ public GraphTraversal<TStart, TNewEnd> Call<TNewEnd> (string? service)
{
Bytecode.AddStep("call", service);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the call step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Call<E2> (string service, ITraversal t)
+ public GraphTraversal<TStart, TNewEnd> Call<TNewEnd> (string? service, ITraversal? t)
{
Bytecode.AddStep("call", service, t);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the call step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Call<E2> (string service, IDictionary<object,object> m)
+ public GraphTraversal<TStart, TNewEnd> Call<TNewEnd> (string? service, IDictionary<object,object>? m)
{
Bytecode.AddStep("call", service, m);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the call step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Call<E2> (string service, IDictionary<object,object> m, ITraversal t)
+ public GraphTraversal<TStart, TNewEnd> Call<TNewEnd>(string? service, IDictionary<object, object>? m,
+ ITraversal? t)
{
Bytecode.AddStep("call", service, m, t);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the cap step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Cap<E2> (string sideEffectKey, params string[] sideEffectKeys)
+ public GraphTraversal<TStart, TNewEnd> Cap<TNewEnd> (string sideEffectKey, params string[] sideEffectKeys)
{
if (sideEffectKey == null) throw new ArgumentNullException(nameof(sideEffectKey));
if (sideEffectKeys == null) throw new ArgumentNullException(nameof(sideEffectKeys));
@@ -400,1662 +422,1663 @@
var args = new List<object>(1 + sideEffectKeys.Length) { sideEffectKey };
args.AddRange(sideEffectKeys);
Bytecode.AddStep("cap", args.ToArray());
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the choose step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Choose<E2> (IFunction choiceFunction)
+ public GraphTraversal<TStart, TNewEnd> Choose<TNewEnd> (IFunction choiceFunction)
{
Bytecode.AddStep("choose", choiceFunction);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the choose step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Choose<E2> (IPredicate choosePredicate, ITraversal trueChoice)
+ public GraphTraversal<TStart, TNewEnd> Choose<TNewEnd> (IPredicate choosePredicate, ITraversal trueChoice)
{
Bytecode.AddStep("choose", choosePredicate, trueChoice);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the choose step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Choose<E2> (IPredicate choosePredicate, ITraversal trueChoice, ITraversal falseChoice)
+ public GraphTraversal<TStart, TNewEnd> Choose<TNewEnd> (IPredicate choosePredicate, ITraversal trueChoice, ITraversal falseChoice)
{
Bytecode.AddStep("choose", choosePredicate, trueChoice, falseChoice);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the choose step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Choose<E2> (ITraversal choiceTraversal)
+ public GraphTraversal<TStart, TNewEnd> Choose<TNewEnd> (ITraversal choiceTraversal)
{
Bytecode.AddStep("choose", choiceTraversal);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the choose step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Choose<E2> (ITraversal traversalPredicate, ITraversal trueChoice)
+ public GraphTraversal<TStart, TNewEnd> Choose<TNewEnd> (ITraversal traversalPredicate, ITraversal trueChoice)
{
Bytecode.AddStep("choose", traversalPredicate, trueChoice);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the choose step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Choose<E2> (ITraversal traversalPredicate, ITraversal trueChoice, ITraversal falseChoice)
+ public GraphTraversal<TStart, TNewEnd> Choose<TNewEnd> (ITraversal traversalPredicate, ITraversal trueChoice, ITraversal falseChoice)
{
Bytecode.AddStep("choose", traversalPredicate, trueChoice, falseChoice);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the coalesce step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Coalesce<E2> (params ITraversal[] coalesceTraversals)
+ public GraphTraversal<TStart, TNewEnd> Coalesce<TNewEnd> (params ITraversal[] coalesceTraversals)
{
if (coalesceTraversals == null) throw new ArgumentNullException(nameof(coalesceTraversals));
var args = new List<object>(coalesceTraversals.Length);
args.AddRange(coalesceTraversals);
Bytecode.AddStep("coalesce", args.ToArray());
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the coin step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Coin (double probability)
+ public GraphTraversal<TStart, TEnd> Coin (double probability)
{
Bytecode.AddStep("coin", probability);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the connectedComponent step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> ConnectedComponent ()
+ public GraphTraversal<TStart, TEnd> ConnectedComponent ()
{
Bytecode.AddStep("connectedComponent");
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the constant step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Constant<E2> (E2 e)
+ public GraphTraversal<TStart, TNewEnd> Constant<TNewEnd> (TNewEnd e)
{
Bytecode.AddStep("constant", e);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the count step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, long> Count ()
+ public GraphTraversal<TStart, long> Count ()
{
Bytecode.AddStep("count");
- return Wrap<S, long>(this);
+ return Wrap<TStart, long>(this);
}
/// <summary>
/// Adds the count step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, long> Count (Scope scope)
+ public GraphTraversal<TStart, long> Count (Scope scope)
{
Bytecode.AddStep("count", scope);
- return Wrap<S, long>(this);
+ return Wrap<TStart, long>(this);
}
/// <summary>
/// Adds the cyclicPath step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> CyclicPath ()
+ public GraphTraversal<TStart, TEnd> CyclicPath ()
{
Bytecode.AddStep("cyclicPath");
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the dedup step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Dedup (Scope scope, params string[] dedupLabels)
+ public GraphTraversal<TStart, TEnd> Dedup (Scope scope, params string?[] dedupLabels)
{
if (dedupLabels == null) throw new ArgumentNullException(nameof(dedupLabels));
- var args = new List<object>(1 + dedupLabels.Length) { scope };
+ var args = new List<object?>(1 + dedupLabels.Length) { scope };
args.AddRange(dedupLabels);
Bytecode.AddStep("dedup", args.ToArray());
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the dedup step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Dedup (params string[] dedupLabels)
+ public GraphTraversal<TStart, TEnd> Dedup (params string?[] dedupLabels)
{
if (dedupLabels == null) throw new ArgumentNullException(nameof(dedupLabels));
- var args = new List<object>(dedupLabels.Length);
+ var args = new List<object?>(dedupLabels.Length);
args.AddRange(dedupLabels);
Bytecode.AddStep("dedup", args.ToArray());
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the drop step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Drop ()
+ public GraphTraversal<TStart, TEnd> Drop ()
{
Bytecode.AddStep("drop");
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the element step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Element> Element ()
+ public GraphTraversal<TStart, Element> Element ()
{
Bytecode.AddStep("element");
- return Wrap<S, Element>(this);
+ return Wrap<TStart, Element>(this);
}
/// <summary>
/// Adds the elementMap step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, IDictionary<object, E2>> ElementMap<E2> (params string[] propertyKeys)
+ public GraphTraversal<TStart, IDictionary<object, TNewEnd>> ElementMap<TNewEnd> (params string?[] propertyKeys)
{
if (propertyKeys == null) throw new ArgumentNullException(nameof(propertyKeys));
- var args = new List<object>(0 + propertyKeys.Length);
+ var args = new List<object?>(0 + propertyKeys.Length);
args.AddRange(propertyKeys);
Bytecode.AddStep("elementMap", args.ToArray());
- return Wrap<S, IDictionary<object, E2>>(this);
+ return Wrap<TStart, IDictionary<object, TNewEnd>>(this);
}
/// <summary>
/// Adds the emit step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Emit ()
+ public GraphTraversal<TStart, TEnd> Emit ()
{
Bytecode.AddStep("emit");
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the emit step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Emit (IPredicate emitPredicate)
+ public GraphTraversal<TStart, TEnd> Emit (IPredicate emitPredicate)
{
Bytecode.AddStep("emit", emitPredicate);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the emit step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Emit (ITraversal emitTraversal)
+ public GraphTraversal<TStart, TEnd> Emit (ITraversal emitTraversal)
{
Bytecode.AddStep("emit", emitTraversal);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the fail step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Fail ()
+ public GraphTraversal<TStart, TEnd> Fail ()
{
Bytecode.AddStep("fail");
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the fail step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Fail (string msg)
+ public GraphTraversal<TStart, TEnd> Fail (string? msg)
{
Bytecode.AddStep("fail", msg);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the fail step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Fail (string msg, IDictionary<string,object> m)
+ public GraphTraversal<TStart, TEnd> Fail (string? msg, IDictionary<string,object> m)
{
Bytecode.AddStep("fail", msg, m);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the filter step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Filter (IPredicate predicate)
+ public GraphTraversal<TStart, TEnd> Filter (IPredicate? predicate)
{
Bytecode.AddStep("filter", predicate);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the filter step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Filter (ITraversal filterTraversal)
+ public GraphTraversal<TStart, TEnd> Filter (ITraversal filterTraversal)
{
Bytecode.AddStep("filter", filterTraversal);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the flatMap step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> FlatMap<E2> (IFunction function)
+ public GraphTraversal<TStart, TNewEnd> FlatMap<TNewEnd> (IFunction? function)
{
Bytecode.AddStep("flatMap", function);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the flatMap step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> FlatMap<E2> (ITraversal flatMapTraversal)
+ public GraphTraversal<TStart, TNewEnd> FlatMap<TNewEnd> (ITraversal flatMapTraversal)
{
Bytecode.AddStep("flatMap", flatMapTraversal);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the fold step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, IList<E>> Fold ()
+ public GraphTraversal<TStart, IList<TEnd>> Fold ()
{
Bytecode.AddStep("fold");
- return Wrap<S, IList<E>>(this);
+ return Wrap<TStart, IList<TEnd>>(this);
}
/// <summary>
/// Adds the fold step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Fold<E2> (E2 seed, IBiFunction foldFunction)
+ public GraphTraversal<TStart, TNewEnd> Fold<TNewEnd> (TNewEnd seed, IBiFunction? foldFunction)
{
Bytecode.AddStep("fold", seed, foldFunction);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the from step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> From (string fromStepLabel)
+ public GraphTraversal<TStart, TEnd> From (string? fromStepLabel)
{
Bytecode.AddStep("from", fromStepLabel);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the from step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> From (ITraversal fromVertex)
+ public GraphTraversal<TStart, TEnd> From (ITraversal fromVertex)
{
Bytecode.AddStep("from", fromVertex);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the from step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> From (Vertex fromVertex)
+ public GraphTraversal<TStart, TEnd> From (Vertex? fromVertex)
{
Bytecode.AddStep("from", fromVertex);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the group step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, IDictionary<K, V>> Group<K, V> ()
+ public GraphTraversal<TStart, IDictionary<K, V>> Group<K, V> ()
{
Bytecode.AddStep("group");
- return Wrap<S, IDictionary<K, V>>(this);
+ return Wrap<TStart, IDictionary<K, V>>(this);
}
/// <summary>
/// Adds the group step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Group (string sideEffectKey)
+ public GraphTraversal<TStart, TEnd> Group (string sideEffectKey)
{
Bytecode.AddStep("group", sideEffectKey);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the groupCount step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, IDictionary<K, long>> GroupCount<K> ()
+ public GraphTraversal<TStart, IDictionary<K, long>> GroupCount<K> ()
{
Bytecode.AddStep("groupCount");
- return Wrap<S, IDictionary<K, long>>(this);
+ return Wrap<TStart, IDictionary<K, long>>(this);
}
/// <summary>
/// Adds the groupCount step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> GroupCount (string sideEffectKey)
+ public GraphTraversal<TStart, TEnd> GroupCount (string sideEffectKey)
{
Bytecode.AddStep("groupCount", sideEffectKey);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the has step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Has (string propertyKey)
+ public GraphTraversal<TStart, TEnd> Has (string? propertyKey)
{
Bytecode.AddStep("has", propertyKey);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the has step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Has (string propertyKey, object value)
+ public GraphTraversal<TStart, TEnd> Has (string? propertyKey, object? value)
{
Bytecode.AddStep("has", propertyKey, value);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the has step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Has (string propertyKey, P predicate)
+ public GraphTraversal<TStart, TEnd> Has (string? propertyKey, P? predicate)
{
Bytecode.AddStep("has", propertyKey, predicate);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the has step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Has (string label, string propertyKey, object value)
+ public GraphTraversal<TStart, TEnd> Has (string? label, string? propertyKey, object? value)
{
Bytecode.AddStep("has", label, propertyKey, value);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the has step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Has (string label, string propertyKey, P predicate)
+ public GraphTraversal<TStart, TEnd> Has (string? label, string? propertyKey, P? predicate)
{
Bytecode.AddStep("has", label, propertyKey, predicate);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the has step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Has (string propertyKey, ITraversal propertyTraversal)
+ public GraphTraversal<TStart, TEnd> Has (string? propertyKey, ITraversal propertyTraversal)
{
Bytecode.AddStep("has", propertyKey, propertyTraversal);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the has step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Has (T accessor, object value)
+ public GraphTraversal<TStart, TEnd> Has (T accessor, object? value)
{
Bytecode.AddStep("has", accessor, value);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the has step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Has (T accessor, P predicate)
+ public GraphTraversal<TStart, TEnd> Has (T accessor, P? predicate)
{
Bytecode.AddStep("has", accessor, predicate);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the has step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Has (T accessor, ITraversal propertyTraversal)
+ public GraphTraversal<TStart, TEnd> Has (T accessor, ITraversal propertyTraversal)
{
Bytecode.AddStep("has", accessor, propertyTraversal);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the hasId step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> HasId (object id, params object[] otherIds)
+ public GraphTraversal<TStart, TEnd> HasId (object? id, params object?[]? otherIds)
{
- List<object> args;
+ List<object?> args;
if (otherIds == null)
{
- args = new List<object> { id, null };
+ args = new List<object?> { id, null };
}
else
{
- args = new List<object>(1 + otherIds.Length) { id };
+ args = new List<object?>(1 + otherIds.Length) { id };
args.AddRange(otherIds);
}
Bytecode.AddStep("hasId", args.ToArray());
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the hasId step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> HasId (P predicate)
+ public GraphTraversal<TStart, TEnd> HasId (P? predicate)
{
Bytecode.AddStep("hasId", predicate);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the hasKey step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> HasKey (P predicate)
+ public GraphTraversal<TStart, TEnd> HasKey (P? predicate)
{
Bytecode.AddStep("hasKey", predicate);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the hasKey step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> HasKey (string label, params string[] otherLabels)
+ public GraphTraversal<TStart, TEnd> HasKey (string? label, params string?[]? otherLabels)
{
- List<object> args;
+ List<object?> args;
if (otherLabels == null)
{
- args = new List<object> { label, null };
+ args = new List<object?> { label, null };
}
else
{
- args = new List<object>(1 + otherLabels.Length) { label };
+ args = new List<object?>(1 + otherLabels.Length) { label };
args.AddRange(otherLabels);
}
Bytecode.AddStep("hasKey", args.ToArray());
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the hasLabel step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> HasLabel (P predicate)
+ public GraphTraversal<TStart, TEnd> HasLabel (P? predicate)
{
Bytecode.AddStep("hasLabel", predicate);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the hasLabel step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> HasLabel (string label, params string[] otherLabels)
+ public GraphTraversal<TStart, TEnd> HasLabel (string? label, params string?[]? otherLabels)
{
- List<object> args;
+ List<object?> args;
if (otherLabels == null)
{
- args = new List<object> { label, null };
+ args = new List<object?> { label, null };
}
else
{
- args = new List<object>(1 + otherLabels.Length) { label };
+ args = new List<object?>(1 + otherLabels.Length) { label };
args.AddRange(otherLabels);
}
Bytecode.AddStep("hasLabel", args.ToArray());
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the hasNot step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> HasNot (string propertyKey)
+ public GraphTraversal<TStart, TEnd> HasNot (string? propertyKey)
{
Bytecode.AddStep("hasNot", propertyKey);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the hasValue step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> HasValue (object value, params object[] otherValues)
+ public GraphTraversal<TStart, TEnd> HasValue (object? value, params object?[]? otherValues)
{
- List<object> args;
+ List<object?> args;
if (otherValues == null)
{
- args = new List<object> { value, null };
+ args = new List<object?> { value, null };
}
else
{
- args = new List<object>(1 + otherValues.Length) { value };
+ args = new List<object?>(1 + otherValues.Length) { value };
args.AddRange(otherValues);
}
Bytecode.AddStep("hasValue", args.ToArray());
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the hasValue step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> HasValue (P predicate)
+ public GraphTraversal<TStart, TEnd> HasValue (P? predicate)
{
Bytecode.AddStep("hasValue", predicate);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the id step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, object> Id ()
+ public GraphTraversal<TStart, object> Id ()
{
Bytecode.AddStep("id");
- return Wrap<S, object>(this);
+ return Wrap<TStart, object>(this);
}
/// <summary>
/// Adds the identity step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Identity ()
+ public GraphTraversal<TStart, TEnd> Identity ()
{
Bytecode.AddStep("identity");
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the in step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Vertex> In (params string[] edgeLabels)
+ public GraphTraversal<TStart, Vertex> In (params string?[] edgeLabels)
{
if (edgeLabels == null) throw new ArgumentNullException(nameof(edgeLabels));
- var args = new List<object>(edgeLabels.Length);
+ var args = new List<object?>(edgeLabels.Length);
args.AddRange(edgeLabels);
Bytecode.AddStep("in", args.ToArray());
- return Wrap<S, Vertex>(this);
+ return Wrap<TStart, Vertex>(this);
}
/// <summary>
/// Adds the inE step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Edge> InE (params string[] edgeLabels)
+ public GraphTraversal<TStart, Edge> InE (params string?[] edgeLabels)
{
if (edgeLabels == null) throw new ArgumentNullException(nameof(edgeLabels));
- var args = new List<object>(edgeLabels.Length);
+ var args = new List<object?>(edgeLabels.Length);
args.AddRange(edgeLabels);
Bytecode.AddStep("inE", args.ToArray());
- return Wrap<S, Edge>(this);
+ return Wrap<TStart, Edge>(this);
}
/// <summary>
/// Adds the inV step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Vertex> InV ()
+ public GraphTraversal<TStart, Vertex> InV ()
{
Bytecode.AddStep("inV");
- return Wrap<S, Vertex>(this);
+ return Wrap<TStart, Vertex>(this);
}
/// <summary>
/// Adds the index step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Index<E2> ()
+ public GraphTraversal<TStart, TNewEnd> Index<TNewEnd> ()
{
Bytecode.AddStep("index");
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the inject step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Inject (params E[] injections)
+ public GraphTraversal<TStart, TEnd> Inject (params TEnd?[]? injections)
{
// null injections is treated as g.inject(null) meaning inject a single null traverser
if (injections == null)
{
- Bytecode.AddStep("inject", new object[] { null });
+ Bytecode.AddStep("inject", new object?[] { null });
}
else
{
- var args = new List<object>(injections.Length);
- args.AddRange(injections.Cast<object>());
+ var args = new List<object?>(injections.Length);
+ args.AddRange(injections.Cast<object?>());
Bytecode.AddStep("inject", args.ToArray());
}
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the is step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Is (object value)
+ public GraphTraversal<TStart, TEnd> Is (object? value)
{
Bytecode.AddStep("is", value);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the is step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Is (P predicate)
+ public GraphTraversal<TStart, TEnd> Is (P? predicate)
{
Bytecode.AddStep("is", predicate);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the key step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, string> Key ()
+ public GraphTraversal<TStart, string> Key ()
{
Bytecode.AddStep("key");
- return Wrap<S, string>(this);
+ return Wrap<TStart, string>(this);
}
/// <summary>
/// Adds the label step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, string> Label ()
+ public GraphTraversal<TStart, string> Label ()
{
Bytecode.AddStep("label");
- return Wrap<S, string>(this);
+ return Wrap<TStart, string>(this);
}
/// <summary>
/// Adds the limit step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Limit<E2> (Scope scope, long limit)
+ public GraphTraversal<TStart, TNewEnd> Limit<TNewEnd> (Scope scope, long limit)
{
Bytecode.AddStep("limit", scope, limit);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the limit step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Limit<E2> (long limit)
+ public GraphTraversal<TStart, TNewEnd> Limit<TNewEnd> (long limit)
{
Bytecode.AddStep("limit", limit);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the local step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Local<E2> (ITraversal localTraversal)
+ public GraphTraversal<TStart, TNewEnd> Local<TNewEnd> (ITraversal localTraversal)
{
Bytecode.AddStep("local", localTraversal);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the loops step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, int> Loops ()
+ public GraphTraversal<TStart, int> Loops ()
{
Bytecode.AddStep("loops");
- return Wrap<S, int>(this);
+ return Wrap<TStart, int>(this);
}
/// <summary>
/// Adds the loops step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, int> Loops (string loopName)
+ public GraphTraversal<TStart, int> Loops (string? loopName)
{
Bytecode.AddStep("loops", loopName);
- return Wrap<S, int>(this);
+ return Wrap<TStart, int>(this);
}
/// <summary>
/// Adds the map step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Map<E2> (IFunction function)
+ public GraphTraversal<TStart, TNewEnd> Map<TNewEnd> (IFunction? function)
{
Bytecode.AddStep("map", function);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the map step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Map<E2> (ITraversal mapTraversal)
+ public GraphTraversal<TStart, TNewEnd> Map<TNewEnd> (ITraversal mapTraversal)
{
Bytecode.AddStep("map", mapTraversal);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the match step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, IDictionary<string, E2>> Match<E2> (params ITraversal[] matchTraversals)
+ public GraphTraversal<TStart, IDictionary<string, TNewEnd>> Match<TNewEnd> (params ITraversal[] matchTraversals)
{
if (matchTraversals == null) throw new ArgumentNullException(nameof(matchTraversals));
var args = new List<object>(matchTraversals.Length);
args.AddRange(matchTraversals);
Bytecode.AddStep("match", args.ToArray());
- return Wrap<S, IDictionary<string, E2>>(this);
+ return Wrap<TStart, IDictionary<string, TNewEnd>>(this);
}
/// <summary>
/// Adds the math step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, double> Math (string expression)
+ public GraphTraversal<TStart, double> Math (string expression)
{
Bytecode.AddStep("math", expression);
- return Wrap<S, double>(this);
+ return Wrap<TStart, double>(this);
}
/// <summary>
/// Adds the max step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Max<E2> ()
+ public GraphTraversal<TStart, TNewEnd> Max<TNewEnd> ()
{
Bytecode.AddStep("max");
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the max step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Max<E2> (Scope scope)
+ public GraphTraversal<TStart, TNewEnd> Max<TNewEnd> (Scope scope)
{
Bytecode.AddStep("max", scope);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the mean step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Mean<E2> ()
+ public GraphTraversal<TStart, TNewEnd> Mean<TNewEnd> ()
{
Bytecode.AddStep("mean");
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the mean step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Mean<E2> (Scope scope)
+ public GraphTraversal<TStart, TNewEnd> Mean<TNewEnd> (Scope scope)
{
Bytecode.AddStep("mean", scope);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the mergeE step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Edge> MergeE ()
+ public GraphTraversal<TStart, Edge> MergeE ()
{
Bytecode.AddStep("mergeE");
- return Wrap<S, Edge>(this);
+ return Wrap<TStart, Edge>(this);
}
/// <summary>
/// Adds the mergeE step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Edge> MergeE (IDictionary<object,object> m)
+ public GraphTraversal<TStart, Edge> MergeE (IDictionary<object,object>? m)
{
Bytecode.AddStep("mergeE", m);
- return Wrap<S, Edge>(this);
+ return Wrap<TStart, Edge>(this);
}
/// <summary>
/// Adds the mergeE step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Edge> MergeE (ITraversal t)
+ public GraphTraversal<TStart, Edge> MergeE (ITraversal? t)
{
Bytecode.AddStep("mergeE", t);
- return Wrap<S, Edge>(this);
+ return Wrap<TStart, Edge>(this);
}
/// <summary>
/// Adds the mergeV step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Vertex> MergeV ()
+ public GraphTraversal<TStart, Vertex> MergeV ()
{
Bytecode.AddStep("mergeV");
- return Wrap<S, Vertex>(this);
+ return Wrap<TStart, Vertex>(this);
}
/// <summary>
/// Adds the mergeV step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Vertex> MergeV (IDictionary<object,object> m)
+ public GraphTraversal<TStart, Vertex> MergeV (IDictionary<object,object>? m)
{
Bytecode.AddStep("mergeV", m);
- return Wrap<S, Vertex>(this);
+ return Wrap<TStart, Vertex>(this);
}
/// <summary>
/// Adds the mergeV step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Vertex> MergeV (ITraversal t)
+ public GraphTraversal<TStart, Vertex> MergeV (ITraversal? t)
{
Bytecode.AddStep("mergeV", t);
- return Wrap<S, Vertex>(this);
+ return Wrap<TStart, Vertex>(this);
}
/// <summary>
/// Adds the min step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Min<E2> ()
+ public GraphTraversal<TStart, TNewEnd> Min<TNewEnd> ()
{
Bytecode.AddStep("min");
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the min step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Min<E2> (Scope scope)
+ public GraphTraversal<TStart, TNewEnd> Min<TNewEnd> (Scope scope)
{
Bytecode.AddStep("min", scope);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the none step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> None ()
+ public GraphTraversal<TStart, TEnd> None ()
{
Bytecode.AddStep("none");
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the not step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Not (ITraversal notTraversal)
+ public GraphTraversal<TStart, TEnd> Not (ITraversal notTraversal)
{
Bytecode.AddStep("not", notTraversal);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the option step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Option (object pickToken, ITraversal traversalOption)
+ public GraphTraversal<TStart, TEnd> Option (object pickToken, ITraversal? traversalOption)
{
Bytecode.AddStep("option", pickToken, traversalOption);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the option step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Option (object pickToken, IDictionary<object,object> traversalOption)
+ public GraphTraversal<TStart, TEnd> Option (object pickToken, IDictionary<object,object>? traversalOption)
{
Bytecode.AddStep("option", pickToken, traversalOption);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the option step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Option (ITraversal traversalOption)
+ public GraphTraversal<TStart, TEnd> Option (ITraversal? traversalOption)
{
Bytecode.AddStep("option", traversalOption);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the optional step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Optional<E2> (ITraversal optionalTraversal)
+ public GraphTraversal<TStart, TNewEnd> Optional<TNewEnd> (ITraversal optionalTraversal)
{
Bytecode.AddStep("optional", optionalTraversal);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the or step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Or (params ITraversal[] orTraversals)
+ public GraphTraversal<TStart, TEnd> Or (params ITraversal[] orTraversals)
{
if (orTraversals == null) throw new ArgumentNullException(nameof(orTraversals));
var args = new List<object>(orTraversals.Length);
args.AddRange(orTraversals);
Bytecode.AddStep("or", args.ToArray());
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the order step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Order ()
+ public GraphTraversal<TStart, TEnd> Order ()
{
Bytecode.AddStep("order");
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the order step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Order (Scope scope)
+ public GraphTraversal<TStart, TEnd> Order (Scope scope)
{
Bytecode.AddStep("order", scope);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the otherV step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Vertex> OtherV ()
+ public GraphTraversal<TStart, Vertex> OtherV ()
{
Bytecode.AddStep("otherV");
- return Wrap<S, Vertex>(this);
+ return Wrap<TStart, Vertex>(this);
}
/// <summary>
/// Adds the out step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Vertex> Out (params string[] edgeLabels)
+ public GraphTraversal<TStart, Vertex> Out (params string?[] edgeLabels)
{
if (edgeLabels == null) throw new ArgumentNullException(nameof(edgeLabels));
- var args = new List<object>(edgeLabels.Length);
+ var args = new List<object?>(edgeLabels.Length);
args.AddRange(edgeLabels);
Bytecode.AddStep("out", args.ToArray());
- return Wrap<S, Vertex>(this);
+ return Wrap<TStart, Vertex>(this);
}
/// <summary>
/// Adds the outE step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Edge> OutE (params string[] edgeLabels)
+ public GraphTraversal<TStart, Edge> OutE (params string?[] edgeLabels)
{
if (edgeLabels == null) throw new ArgumentNullException(nameof(edgeLabels));
- var args = new List<object>(edgeLabels.Length);
+ var args = new List<object?>(edgeLabels.Length);
args.AddRange(edgeLabels);
Bytecode.AddStep("outE", args.ToArray());
- return Wrap<S, Edge>(this);
+ return Wrap<TStart, Edge>(this);
}
/// <summary>
/// Adds the outV step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Vertex> OutV ()
+ public GraphTraversal<TStart, Vertex> OutV ()
{
Bytecode.AddStep("outV");
- return Wrap<S, Vertex>(this);
+ return Wrap<TStart, Vertex>(this);
}
/// <summary>
/// Adds the pageRank step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> PageRank ()
+ public GraphTraversal<TStart, TEnd> PageRank ()
{
Bytecode.AddStep("pageRank");
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the pageRank step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> PageRank (double alpha)
+ public GraphTraversal<TStart, TEnd> PageRank (double alpha)
{
Bytecode.AddStep("pageRank", alpha);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the path step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Path> Path ()
+ public GraphTraversal<TStart, Path> Path ()
{
Bytecode.AddStep("path");
- return Wrap<S, Path>(this);
+ return Wrap<TStart, Path>(this);
}
/// <summary>
/// Adds the peerPressure step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> PeerPressure ()
+ public GraphTraversal<TStart, TEnd> PeerPressure ()
{
Bytecode.AddStep("peerPressure");
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the profile step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Profile<E2> ()
+ public GraphTraversal<TStart, TNewEnd> Profile<TNewEnd> ()
{
Bytecode.AddStep("profile");
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the profile step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Profile (string sideEffectKey)
+ public GraphTraversal<TStart, TEnd> Profile (string sideEffectKey)
{
Bytecode.AddStep("profile", sideEffectKey);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the program step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Program (object vertexProgram)
+ public GraphTraversal<TStart, TEnd> Program (object vertexProgram)
{
Bytecode.AddStep("program", vertexProgram);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the project step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, IDictionary<string, E2>> Project<E2> (string projectKey, params string[] otherProjectKeys)
+ public GraphTraversal<TStart, IDictionary<string, TNewEnd>> Project<TNewEnd>(string? projectKey,
+ params string?[] otherProjectKeys)
{
// Using null as a key is allowed in Java, but we cannot support it in .NET as null is not allowed as a
// Dictionary key.
if (projectKey == null) throw new ArgumentNullException(nameof(projectKey));
if (otherProjectKeys == null) throw new ArgumentNullException(nameof(otherProjectKeys));
- var args = new List<object>(1 + otherProjectKeys.Length) { projectKey };
+ var args = new List<object?>(1 + otherProjectKeys.Length) { projectKey };
args.AddRange(otherProjectKeys);
Bytecode.AddStep("project", args.ToArray());
- return Wrap<S, IDictionary<string, E2>>(this);
+ return Wrap<TStart, IDictionary<string, TNewEnd>>(this);
}
/// <summary>
/// Adds the properties step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Properties<E2> (params string[] propertyKeys)
+ public GraphTraversal<TStart, TNewEnd> Properties<TNewEnd> (params string?[] propertyKeys)
{
// Using null as a key is allowed in Java, but we cannot support it in .NET as null is not allowed as a
// Dictionary key.
if (propertyKeys == null) throw new ArgumentNullException(nameof(propertyKeys));
- var args = new List<object>(propertyKeys.Length);
+ var args = new List<object?>(propertyKeys.Length);
args.AddRange(propertyKeys);
Bytecode.AddStep("properties", args.ToArray());
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the property step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Property(Cardinality cardinality, object key, object value,
- params object[] keyValues)
+ public GraphTraversal<TStart, TEnd> Property(Cardinality cardinality, object? key, object? value,
+ params object?[] keyValues)
{
if (keyValues == null) throw new ArgumentNullException(nameof(keyValues));
- var args = new List<object>(3 + keyValues.Length) { cardinality, key, value };
+ var args = new List<object?>(3 + keyValues.Length) { cardinality, key, value };
args.AddRange(keyValues);
Bytecode.AddStep("property", args.ToArray());
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the property step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Property (object key, object value, params object[] keyValues)
+ public GraphTraversal<TStart, TEnd> Property (object? key, object? value, params object?[] keyValues)
{
if (keyValues == null) throw new ArgumentNullException(nameof(keyValues));
- var args = new List<object>(2 + keyValues.Length) { key, value };
+ var args = new List<object?>(2 + keyValues.Length) { key, value };
args.AddRange(keyValues);
Bytecode.AddStep("property", args.ToArray());
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the propertyMap step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, IDictionary<string, E2>> PropertyMap<E2> (params string[] propertyKeys)
+ public GraphTraversal<TStart, IDictionary<string, TNewEnd>> PropertyMap<TNewEnd> (params string?[] propertyKeys)
{
if (propertyKeys == null) throw new ArgumentNullException(nameof(propertyKeys));
- var args = new List<object>(propertyKeys.Length);
+ var args = new List<object?>(propertyKeys.Length);
args.AddRange(propertyKeys);
Bytecode.AddStep("propertyMap", args.ToArray());
- return Wrap<S, IDictionary<string, E2>>(this);
+ return Wrap<TStart, IDictionary<string, TNewEnd>>(this);
}
/// <summary>
/// Adds the range step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Range<E2> (Scope scope, long low, long high)
+ public GraphTraversal<TStart, TNewEnd> Range<TNewEnd> (Scope scope, long low, long high)
{
Bytecode.AddStep("range", scope, low, high);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the range step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Range<E2> (long low, long high)
+ public GraphTraversal<TStart, TNewEnd> Range<TNewEnd> (long low, long high)
{
Bytecode.AddStep("range", low, high);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the read step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Read ()
+ public GraphTraversal<TStart, TEnd> Read ()
{
Bytecode.AddStep("read");
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the repeat step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Repeat (string loopName, ITraversal repeatTraversal)
+ public GraphTraversal<TStart, TEnd> Repeat (string loopName, ITraversal repeatTraversal)
{
Bytecode.AddStep("repeat", loopName, repeatTraversal);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the repeat step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Repeat (ITraversal repeatTraversal)
+ public GraphTraversal<TStart, TEnd> Repeat (ITraversal repeatTraversal)
{
Bytecode.AddStep("repeat", repeatTraversal);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the sack step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Sack<E2> ()
+ public GraphTraversal<TStart, TNewEnd> Sack<TNewEnd> ()
{
Bytecode.AddStep("sack");
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the sack step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Sack (IBiFunction sackOperator)
+ public GraphTraversal<TStart, TEnd> Sack (IBiFunction sackOperator)
{
Bytecode.AddStep("sack", sackOperator);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the sample step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Sample (Scope scope, int amountToSample)
+ public GraphTraversal<TStart, TEnd> Sample (Scope scope, int amountToSample)
{
Bytecode.AddStep("sample", scope, amountToSample);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the sample step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Sample (int amountToSample)
+ public GraphTraversal<TStart, TEnd> Sample (int amountToSample)
{
Bytecode.AddStep("sample", amountToSample);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the select step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, ICollection<E2>> Select<E2> (Column column)
+ public GraphTraversal<TStart, ICollection<TNewEnd>> Select<TNewEnd> (Column column)
{
Bytecode.AddStep("select", column);
- return Wrap<S, ICollection<E2>>(this);
+ return Wrap<TStart, ICollection<TNewEnd>>(this);
}
/// <summary>
/// Adds the select step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Select<E2> (Pop pop, string selectKey)
+ public GraphTraversal<TStart, TNewEnd> Select<TNewEnd> (Pop pop, string? selectKey)
{
Bytecode.AddStep("select", pop, selectKey);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the select step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, IDictionary<string, E2>> Select<E2>(Pop pop, string selectKey1, string selectKey2,
- params string[] otherSelectKeys)
+ public GraphTraversal<TStart, IDictionary<string, TNewEnd>> Select<TNewEnd>(Pop pop, string? selectKey1,
+ string? selectKey2, params string?[] otherSelectKeys)
{
if (otherSelectKeys == null) throw new ArgumentNullException(nameof(otherSelectKeys));
- var args = new List<object>(3 + otherSelectKeys.Length) { pop, selectKey1, selectKey2 };
+ var args = new List<object?>(3 + otherSelectKeys.Length) { pop, selectKey1, selectKey2 };
args.AddRange(otherSelectKeys);
Bytecode.AddStep("select", args.ToArray());
- return Wrap<S, IDictionary<string, E2>>(this);
+ return Wrap<TStart, IDictionary<string, TNewEnd>>(this);
}
/// <summary>
/// Adds the select step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Select<E2> (Pop pop, ITraversal keyTraversal)
+ public GraphTraversal<TStart, TNewEnd> Select<TNewEnd> (Pop pop, ITraversal keyTraversal)
{
Bytecode.AddStep("select", pop, keyTraversal);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the select step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Select<E2> (string selectKey)
+ public GraphTraversal<TStart, TNewEnd> Select<TNewEnd> (string? selectKey)
{
Bytecode.AddStep("select", selectKey);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the select step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, IDictionary<string, E2>> Select<E2>(string selectKey1, string selectKey2,
- params string[] otherSelectKeys)
+ public GraphTraversal<TStart, IDictionary<string, TNewEnd>> Select<TNewEnd>(string? selectKey1,
+ string? selectKey2, params string?[] otherSelectKeys)
{
if (otherSelectKeys == null) throw new ArgumentNullException(nameof(otherSelectKeys));
- var args = new List<object>(2 + otherSelectKeys.Length) { selectKey1, selectKey2 };
+ var args = new List<object?>(2 + otherSelectKeys.Length) { selectKey1, selectKey2 };
args.AddRange(otherSelectKeys);
Bytecode.AddStep("select", args.ToArray());
- return Wrap<S, IDictionary<string, E2>>(this);
+ return Wrap<TStart, IDictionary<string, TNewEnd>>(this);
}
/// <summary>
/// Adds the select step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Select<E2> (ITraversal keyTraversal)
+ public GraphTraversal<TStart, TNewEnd> Select<TNewEnd> (ITraversal keyTraversal)
{
Bytecode.AddStep("select", keyTraversal);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the shortestPath step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Path> ShortestPath ()
+ public GraphTraversal<TStart, Path> ShortestPath ()
{
Bytecode.AddStep("shortestPath");
- return Wrap<S, Path>(this);
+ return Wrap<TStart, Path>(this);
}
/// <summary>
/// Adds the sideEffect step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> SideEffect (IConsumer consumer)
+ public GraphTraversal<TStart, TEnd> SideEffect (IConsumer? consumer)
{
Bytecode.AddStep("sideEffect", consumer);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the sideEffect step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> SideEffect (ITraversal sideEffectTraversal)
+ public GraphTraversal<TStart, TEnd> SideEffect (ITraversal sideEffectTraversal)
{
Bytecode.AddStep("sideEffect", sideEffectTraversal);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the simplePath step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> SimplePath ()
+ public GraphTraversal<TStart, TEnd> SimplePath ()
{
Bytecode.AddStep("simplePath");
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the skip step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Skip<E2> (Scope scope, long skip)
+ public GraphTraversal<TStart, TNewEnd> Skip<TNewEnd> (Scope scope, long skip)
{
Bytecode.AddStep("skip", scope, skip);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the skip step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Skip<E2> (long skip)
+ public GraphTraversal<TStart, TNewEnd> Skip<TNewEnd> (long skip)
{
Bytecode.AddStep("skip", skip);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the store step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Store (string sideEffectKey)
+ public GraphTraversal<TStart, TEnd> Store (string sideEffectKey)
{
Bytecode.AddStep("store", sideEffectKey);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the subgraph step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Edge> Subgraph (string sideEffectKey)
+ public GraphTraversal<TStart, Edge> Subgraph (string sideEffectKey)
{
Bytecode.AddStep("subgraph", sideEffectKey);
- return Wrap<S, Edge>(this);
+ return Wrap<TStart, Edge>(this);
}
/// <summary>
/// Adds the sum step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Sum<E2> ()
+ public GraphTraversal<TStart, TNewEnd> Sum<TNewEnd> ()
{
Bytecode.AddStep("sum");
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the sum step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Sum<E2> (Scope scope)
+ public GraphTraversal<TStart, TNewEnd> Sum<TNewEnd> (Scope scope)
{
Bytecode.AddStep("sum", scope);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the tail step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Tail<E2> ()
+ public GraphTraversal<TStart, TNewEnd> Tail<TNewEnd> ()
{
Bytecode.AddStep("tail");
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the tail step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Tail<E2> (Scope scope)
+ public GraphTraversal<TStart, TNewEnd> Tail<TNewEnd> (Scope scope)
{
Bytecode.AddStep("tail", scope);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the tail step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Tail<E2> (Scope scope, long limit)
+ public GraphTraversal<TStart, TNewEnd> Tail<TNewEnd> (Scope scope, long limit)
{
Bytecode.AddStep("tail", scope, limit);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the tail step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Tail<E2> (long limit)
+ public GraphTraversal<TStart, TNewEnd> Tail<TNewEnd> (long limit)
{
Bytecode.AddStep("tail", limit);
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the timeLimit step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> TimeLimit (long timeLimit)
+ public GraphTraversal<TStart, TEnd> TimeLimit (long timeLimit)
{
Bytecode.AddStep("timeLimit", timeLimit);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the times step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Times (int maxLoops)
+ public GraphTraversal<TStart, TEnd> Times (int maxLoops)
{
Bytecode.AddStep("times", maxLoops);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the to step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Vertex> To (Direction direction, params string[] edgeLabels)
+ public GraphTraversal<TStart, Vertex> To (Direction? direction, params string?[] edgeLabels)
{
if (edgeLabels == null) throw new ArgumentNullException(nameof(edgeLabels));
- var args = new List<object>(1 + edgeLabels.Length) { direction };
+ var args = new List<object?>(1 + edgeLabels.Length) { direction };
args.AddRange(edgeLabels);
Bytecode.AddStep("to", args.ToArray());
- return Wrap<S, Vertex>(this);
+ return Wrap<TStart, Vertex>(this);
}
/// <summary>
/// Adds the to step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> To (string toStepLabel)
+ public GraphTraversal<TStart, TEnd> To (string? toStepLabel)
{
Bytecode.AddStep("to", toStepLabel);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the to step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> To (ITraversal toVertex)
+ public GraphTraversal<TStart, TEnd> To (ITraversal toVertex)
{
Bytecode.AddStep("to", toVertex);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the to step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> To (Vertex toVertex)
+ public GraphTraversal<TStart, TEnd> To (Vertex? toVertex)
{
Bytecode.AddStep("to", toVertex);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the toE step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Edge> ToE (Direction direction, params string[] edgeLabels)
+ public GraphTraversal<TStart, Edge> ToE (Direction? direction, params string?[] edgeLabels)
{
if (edgeLabels == null) throw new ArgumentNullException(nameof(edgeLabels));
- var args = new List<object>(1 + edgeLabels.Length) {direction};
+ var args = new List<object?>(1 + edgeLabels.Length) {direction};
args.AddRange(edgeLabels);
Bytecode.AddStep("toE", args.ToArray());
- return Wrap<S, Edge>(this);
+ return Wrap<TStart, Edge>(this);
}
/// <summary>
/// Adds the toV step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, Vertex> ToV (Direction direction)
+ public GraphTraversal<TStart, Vertex> ToV (Direction? direction)
{
Bytecode.AddStep("toV", direction);
- return Wrap<S, Vertex>(this);
+ return Wrap<TStart, Vertex>(this);
}
/// <summary>
/// Adds the tree step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Tree<E2> ()
+ public GraphTraversal<TStart, TNewEnd> Tree<TNewEnd> ()
{
Bytecode.AddStep("tree");
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the tree step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Tree (string sideEffectKey)
+ public GraphTraversal<TStart, TEnd> Tree (string sideEffectKey)
{
Bytecode.AddStep("tree", sideEffectKey);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the unfold step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Unfold<E2> ()
+ public GraphTraversal<TStart, TNewEnd> Unfold<TNewEnd> ()
{
Bytecode.AddStep("unfold");
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the union step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Union<E2> (params ITraversal[] unionTraversals)
+ public GraphTraversal<TStart, TNewEnd> Union<TNewEnd> (params ITraversal[] unionTraversals)
{
if (unionTraversals == null) throw new ArgumentNullException(nameof(unionTraversals));
var args = new List<object>(unionTraversals.Length);
args.AddRange(unionTraversals);
Bytecode.AddStep("union", args.ToArray());
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the until step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Until (IPredicate untilPredicate)
+ public GraphTraversal<TStart, TEnd> Until (IPredicate untilPredicate)
{
Bytecode.AddStep("until", untilPredicate);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the until step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Until (ITraversal untilTraversal)
+ public GraphTraversal<TStart, TEnd> Until (ITraversal untilTraversal)
{
Bytecode.AddStep("until", untilTraversal);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the value step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Value<E2> ()
+ public GraphTraversal<TStart, TNewEnd> Value<TNewEnd> ()
{
Bytecode.AddStep("value");
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the valueMap step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, IDictionary<TKey, TValue>> ValueMap<TKey, TValue> (params string[] propertyKeys)
+ public GraphTraversal<TStart, IDictionary<TKey, TValue>> ValueMap<TKey, TValue> (params string?[] propertyKeys)
{
if (propertyKeys == null) throw new ArgumentNullException(nameof(propertyKeys));
- var args = new List<object>(propertyKeys.Length);
+ var args = new List<object?>(propertyKeys.Length);
args.AddRange(propertyKeys);
Bytecode.AddStep("valueMap", args.ToArray());
- return Wrap<S, IDictionary<TKey, TValue>>(this);
+ return Wrap<TStart, IDictionary<TKey, TValue>>(this);
}
/// <summary>
/// Adds the valueMap step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, IDictionary<TKey, TValue>> ValueMap<TKey, TValue>(bool includeTokens,
- params string[] propertyKeys)
+ public GraphTraversal<TStart, IDictionary<TKey, TValue>> ValueMap<TKey, TValue>(bool includeTokens,
+ params string?[] propertyKeys)
{
if (propertyKeys == null) throw new ArgumentNullException(nameof(propertyKeys));
- var args = new List<object>(1 + propertyKeys.Length) { includeTokens };
+ var args = new List<object?>(1 + propertyKeys.Length) { includeTokens };
args.AddRange(propertyKeys);
Bytecode.AddStep("valueMap", args.ToArray());
- return Wrap<S, IDictionary<TKey, TValue>>(this);
+ return Wrap<TStart, IDictionary<TKey, TValue>>(this);
}
/// <summary>
/// Adds the values step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E2> Values<E2> (params string[] propertyKeys)
+ public GraphTraversal<TStart, TNewEnd> Values<TNewEnd> (params string?[] propertyKeys)
{
if (propertyKeys == null) throw new ArgumentNullException(nameof(propertyKeys));
- var args = new List<object>(propertyKeys.Length);
+ var args = new List<object?>(propertyKeys.Length);
args.AddRange(propertyKeys);
Bytecode.AddStep("values", args.ToArray());
- return Wrap<S, E2>(this);
+ return Wrap<TStart, TNewEnd>(this);
}
/// <summary>
/// Adds the where step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Where (P predicate)
+ public GraphTraversal<TStart, TEnd> Where (P predicate)
{
Bytecode.AddStep("where", predicate);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the where step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Where (string startKey, P predicate)
+ public GraphTraversal<TStart, TEnd> Where (string startKey, P predicate)
{
Bytecode.AddStep("where", startKey, predicate);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the where step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Where (ITraversal whereTraversal)
+ public GraphTraversal<TStart, TEnd> Where (ITraversal whereTraversal)
{
Bytecode.AddStep("where", whereTraversal);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the with step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> With (string key)
+ public GraphTraversal<TStart, TEnd> With (string key)
{
Bytecode.AddStep("with", key);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the with step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> With (string key, object value)
+ public GraphTraversal<TStart, TEnd> With (string key, object? value)
{
Bytecode.AddStep("with", key, value);
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Adds the write step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<S, E> Write ()
+ public GraphTraversal<TStart, TEnd> Write ()
{
Bytecode.AddStep("write");
- return Wrap<S, E>(this);
+ return Wrap<TStart, TEnd>(this);
}
/// <summary>
/// Make a copy of a traversal that is reset for iteration.
/// </summary>
- public GraphTraversal<S, E> Clone()
+ public GraphTraversal<TStart, TEnd> Clone()
{
- return new GraphTraversal<S, E>(TraversalStrategies, new Bytecode(Bytecode));
+ return new GraphTraversal<TStart, TEnd>(TraversalStrategies, new Bytecode(Bytecode));
}
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs
index 6f18bc2..218fb7b 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs
@@ -38,7 +38,7 @@
/// </summary>
public class GraphTraversalSource
{
- private readonly IRemoteConnection _connection;
+ private readonly IRemoteConnection? _connection;
public bool IsSessionBound => _connection is { IsSessionBound: true };
@@ -89,7 +89,7 @@
return With(key, true);
}
- public GraphTraversalSource With(string key, object value)
+ public GraphTraversalSource With(string key, object? value)
{
var optionsStrategyInst = Bytecode.SourceInstructions.Find(
inst => inst.OperatorName == "withStrategies" && inst.Arguments[0] is OptionsStrategy);
@@ -102,7 +102,7 @@
return WithStrategies(optionsStrategy);
}
- optionsStrategy = optionsStrategyInst.Arguments[0];
+ optionsStrategy = optionsStrategyInst.Arguments[0]!;
optionsStrategy.Configuration[key] = value;
return new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
new Bytecode(Bytecode));
@@ -125,7 +125,7 @@
return source;
}
- public GraphTraversalSource WithSack(object initialValue)
+ public GraphTraversalSource WithSack(object? initialValue)
{
var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
new Bytecode(Bytecode));
@@ -133,7 +133,7 @@
return source;
}
- public GraphTraversalSource WithSack(object initialValue, IBinaryOperator mergeOperator)
+ public GraphTraversalSource WithSack(object? initialValue, IBinaryOperator? mergeOperator)
{
var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
new Bytecode(Bytecode));
@@ -141,7 +141,7 @@
return source;
}
- public GraphTraversalSource WithSack(object initialValue, IUnaryOperator splitOperator)
+ public GraphTraversalSource WithSack(object? initialValue, IUnaryOperator? splitOperator)
{
var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
new Bytecode(Bytecode));
@@ -149,7 +149,8 @@
return source;
}
- public GraphTraversalSource WithSack(object initialValue, IUnaryOperator splitOperator, IBinaryOperator mergeOperator)
+ public GraphTraversalSource WithSack(object? initialValue, IUnaryOperator? splitOperator,
+ IBinaryOperator? mergeOperator)
{
var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
new Bytecode(Bytecode));
@@ -157,7 +158,7 @@
return source;
}
- public GraphTraversalSource WithSack(ISupplier initialValue)
+ public GraphTraversalSource WithSack(ISupplier? initialValue)
{
var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
new Bytecode(Bytecode));
@@ -165,7 +166,7 @@
return source;
}
- public GraphTraversalSource WithSack(ISupplier initialValue, IBinaryOperator mergeOperator)
+ public GraphTraversalSource WithSack(ISupplier? initialValue, IBinaryOperator? mergeOperator)
{
var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
new Bytecode(Bytecode));
@@ -173,7 +174,7 @@
return source;
}
- public GraphTraversalSource WithSack(ISupplier initialValue, IUnaryOperator splitOperator)
+ public GraphTraversalSource WithSack(ISupplier? initialValue, IUnaryOperator? splitOperator)
{
var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
new Bytecode(Bytecode));
@@ -181,7 +182,8 @@
return source;
}
- public GraphTraversalSource WithSack(ISupplier initialValue, IUnaryOperator splitOperator, IBinaryOperator mergeOperator)
+ public GraphTraversalSource WithSack(ISupplier? initialValue, IUnaryOperator? splitOperator,
+ IBinaryOperator? mergeOperator)
{
var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
new Bytecode(Bytecode));
@@ -189,7 +191,7 @@
return source;
}
- public GraphTraversalSource WithSideEffect(string key, object initialValue)
+ public GraphTraversalSource WithSideEffect(string? key, object? initialValue)
{
var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
new Bytecode(Bytecode));
@@ -197,7 +199,7 @@
return source;
}
- public GraphTraversalSource WithSideEffect(string key, object initialValue, IBinaryOperator reducer)
+ public GraphTraversalSource WithSideEffect(string? key, object? initialValue, IBinaryOperator reducer)
{
var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
new Bytecode(Bytecode));
@@ -205,7 +207,7 @@
return source;
}
- public GraphTraversalSource WithSideEffect(string key, ISupplier initialValue)
+ public GraphTraversalSource WithSideEffect(string? key, ISupplier? initialValue)
{
var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
new Bytecode(Bytecode));
@@ -213,7 +215,7 @@
return source;
}
- public GraphTraversalSource WithSideEffect(string key, ISupplier initialValue, IBinaryOperator reducer)
+ public GraphTraversalSource WithSideEffect(string? key, ISupplier? initialValue, IBinaryOperator? reducer)
{
var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
new Bytecode(Bytecode));
@@ -233,20 +235,20 @@
return source;
}
- public GraphTraversalSource WithoutStrategies(params Type[] traversalStrategyClasses)
+ public GraphTraversalSource WithoutStrategies(params Type?[] traversalStrategyClasses)
{
if (traversalStrategyClasses == null) throw new ArgumentNullException(nameof(traversalStrategyClasses));
var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
new Bytecode(Bytecode));
- var args = new List<object>(traversalStrategyClasses.Length);
+ var args = new List<object?>(traversalStrategyClasses.Length);
args.AddRange(traversalStrategyClasses);
source.Bytecode.AddSource("withoutStrategies", args.ToArray());
return source;
}
[Obsolete("Use the Bindings class instead.", false)]
- public GraphTraversalSource WithBindings(object bindings)
+ public GraphTraversalSource WithBindings(object? bindings)
{
return this;
}
@@ -277,35 +279,35 @@
throw new InvalidOperationException(
"This GraphTraversalSource is already bound to a transaction - child transactions are not supported");
}
- return _connection.Tx(this);
+ return _connection!.Tx(this);
}
/// <summary>
/// Add a GraphComputer class used to execute the traversal.
/// This adds a <see cref="VertexProgramStrategy" /> to the strategies.
/// </summary>
- public GraphTraversalSource WithComputer(string graphComputer = null, int? workers = null, string persist = null,
- string result = null, ITraversal vertices = null, ITraversal edges = null,
- Dictionary<string, dynamic> configuration = null)
+ public GraphTraversalSource WithComputer(string? graphComputer = null, int? workers = null,
+ string? persist = null, string? result = null, ITraversal? vertices = null, ITraversal? edges = null,
+ Dictionary<string, dynamic>? configuration = null)
{
- return WithStrategies(new VertexProgramStrategy(graphComputer, workers, persist, result, vertices, edges, configuration));
+ return WithStrategies(new VertexProgramStrategy(graphComputer, workers, persist, result, vertices, edges,
+ configuration));
}
-
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> off this graph traversal source and adds the E step to that
/// traversal.
/// </summary>
- public GraphTraversal<Edge, Edge> E(params object[] edgesIds)
+ public GraphTraversal<Edge, Edge> E(params object?[]? edgesIds)
{
var traversal = new GraphTraversal<Edge, Edge>(TraversalStrategies, new Bytecode(Bytecode));
if (edgesIds == null)
{
- traversal.Bytecode.AddStep("E", new object[] { null });
+ traversal.Bytecode.AddStep("E", new object?[] { null });
}
else
{
- var args = new List<object>(edgesIds.Length);
+ var args = new List<object?>(edgesIds.Length);
args.AddRange(edgesIds);
traversal.Bytecode.AddStep("E", args.ToArray());
}
@@ -316,16 +318,16 @@
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> off this graph traversal source and adds the V step to that
/// traversal.
/// </summary>
- public GraphTraversal<Vertex, Vertex> V(params object[] vertexIds)
+ public GraphTraversal<Vertex, Vertex> V(params object?[]? vertexIds)
{
var traversal = new GraphTraversal<Vertex, Vertex>(TraversalStrategies, new Bytecode(Bytecode));
if (vertexIds == null)
{
- traversal.Bytecode.AddStep("V", new object[] { null });
+ traversal.Bytecode.AddStep("V", new object?[] { null });
}
else
{
- var args = new List<object>(vertexIds.Length);
+ var args = new List<object?>(vertexIds.Length);
args.AddRange(vertexIds);
traversal.Bytecode.AddStep("V", args.ToArray());
}
@@ -358,7 +360,7 @@
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> off this graph traversal source and adds the mergeE step to that
/// traversal.
/// </summary>
- public GraphTraversal<Edge, Edge> MergeE(IDictionary<object,object> m)
+ public GraphTraversal<Edge, Edge> MergeE(IDictionary<object,object>? m)
{
var traversal = new GraphTraversal<Edge, Edge>(TraversalStrategies, new Bytecode(Bytecode));
traversal.Bytecode.AddStep("mergeE", m);
@@ -369,7 +371,7 @@
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> off this graph traversal source and adds the mergeE step to that
/// traversal.
/// </summary>
- public GraphTraversal<Edge, Edge> MergeE(ITraversal t)
+ public GraphTraversal<Edge, Edge> MergeE(ITraversal? t)
{
var traversal = new GraphTraversal<Edge, Edge>(TraversalStrategies, new Bytecode(Bytecode));
traversal.Bytecode.AddStep("mergeE", t);
@@ -413,7 +415,7 @@
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> off this graph traversal source and adds the mergeV step to that
/// traversal.
/// </summary>
- public GraphTraversal<Vertex, Vertex> MergeV(IDictionary<object,object> m)
+ public GraphTraversal<Vertex, Vertex> MergeV(IDictionary<object,object>? m)
{
var traversal = new GraphTraversal<Vertex, Vertex>(TraversalStrategies, new Bytecode(Bytecode));
traversal.Bytecode.AddStep("mergeV", m);
@@ -424,7 +426,7 @@
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> off this graph traversal source and adds the mergeV step to that
/// traversal.
/// </summary>
- public GraphTraversal<Vertex, Vertex> MergeV(ITraversal t)
+ public GraphTraversal<Vertex, Vertex> MergeV(ITraversal? t)
{
var traversal = new GraphTraversal<Vertex, Vertex>(TraversalStrategies, new Bytecode(Bytecode));
traversal.Bytecode.AddStep("mergeV", t);
@@ -435,19 +437,19 @@
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> off this graph traversal source and adds the inject step to that
/// traversal.
/// </summary>
- public GraphTraversal<S, S> Inject<S>(params S[] starts)
+ public GraphTraversal<TStart, TStart> Inject<TStart>(params TStart?[]? starts)
{
- var traversal = new GraphTraversal<S, S>(TraversalStrategies, new Bytecode(Bytecode));
+ var traversal = new GraphTraversal<TStart, TStart>(TraversalStrategies, new Bytecode(Bytecode));
// null starts is treated as g.inject(null) meaning inject a single null traverser
if (starts == null)
{
- traversal.Bytecode.AddStep("inject", new object[] { null });
+ traversal.Bytecode.AddStep("inject", new object?[] { null });
}
else
{
- var args = new List<object>(starts.Length);
- args.AddRange(starts.Cast<object>());
+ var args = new List<object?>(starts.Length);
+ args.AddRange(starts.Cast<object?>());
traversal.Bytecode.AddStep("inject", args.ToArray());
}
@@ -458,10 +460,10 @@
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> off this graph traversal source and adds the io step to that
/// traversal.
/// </summary>
- public GraphTraversal<S, S> Io<S>(string file)
+ public GraphTraversal<TStart, TStart> Io<TStart>(string file)
{
- var traversal = new GraphTraversal<S, S>(TraversalStrategies, new Bytecode(Bytecode));
- traversal.Bytecode.AddStep("io", file);
+ var traversal = new GraphTraversal<TStart, TStart>(TraversalStrategies, new Bytecode(Bytecode));
+ traversal.Bytecode.AddStep("io", file);
return traversal;
}
@@ -469,9 +471,9 @@
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> off this graph traversal source and adds the call step to that
/// traversal.
/// </summary>
- public GraphTraversal<S, S> Call<S>()
+ public GraphTraversal<TStart, TStart> Call<TStart>()
{
- var traversal = new GraphTraversal<S, S>(TraversalStrategies, new Bytecode(Bytecode));
+ var traversal = new GraphTraversal<TStart, TStart>(TraversalStrategies, new Bytecode(Bytecode));
traversal.Bytecode.AddStep("call");
return traversal;
}
@@ -480,9 +482,9 @@
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> off this graph traversal source and adds the call step to that
/// traversal.
/// </summary>
- public GraphTraversal<S, S> Call<S>(string service)
+ public GraphTraversal<TStart, TStart> Call<TStart>(string? service)
{
- var traversal = new GraphTraversal<S, S>(TraversalStrategies, new Bytecode(Bytecode));
+ var traversal = new GraphTraversal<TStart, TStart>(TraversalStrategies, new Bytecode(Bytecode));
traversal.Bytecode.AddStep("call", service);
return traversal;
}
@@ -491,9 +493,9 @@
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> off this graph traversal source and adds the call step to that
/// traversal.
/// </summary>
- public GraphTraversal<S, S> Call<S>(string service, IDictionary<object,object> m)
+ public GraphTraversal<TStart, TStart> Call<TStart>(string? service, IDictionary<object, object>? m)
{
- var traversal = new GraphTraversal<S, S>(TraversalStrategies, new Bytecode(Bytecode));
+ var traversal = new GraphTraversal<TStart, TStart>(TraversalStrategies, new Bytecode(Bytecode));
traversal.Bytecode.AddStep("call", service, m);
return traversal;
}
@@ -502,9 +504,9 @@
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> off this graph traversal source and adds the call step to that
/// traversal.
/// </summary>
- public GraphTraversal<S, S> Call<S>(string service, ITraversal t)
+ public GraphTraversal<TStart, TStart> Call<TStart>(string? service, ITraversal? t)
{
- var traversal = new GraphTraversal<S, S>(TraversalStrategies, new Bytecode(Bytecode));
+ var traversal = new GraphTraversal<TStart, TStart>(TraversalStrategies, new Bytecode(Bytecode));
traversal.Bytecode.AddStep("call", service, t);
return traversal;
}
@@ -513,14 +515,14 @@
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> off this graph traversal source and adds the call step to that
/// traversal.
/// </summary>
- public GraphTraversal<S, S> Call<S>(string service, IDictionary<object,object> m, ITraversal t)
+ public GraphTraversal<TStart, TStart> Call<TStart>(string? service, IDictionary<object, object>? m,
+ ITraversal? t)
{
- var traversal = new GraphTraversal<S, S>(TraversalStrategies, new Bytecode(Bytecode));
+ var traversal = new GraphTraversal<TStart, TStart>(TraversalStrategies, new Bytecode(Bytecode));
traversal.Bytecode.AddStep("call", service, m, t);
return traversal;
}
-
}
#pragma warning restore 1591
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/ITraversal.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/ITraversal.cs
index f0c682d..17874b5 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/ITraversal.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/ITraversal.cs
@@ -48,7 +48,7 @@
/// <summary>
/// Gets or sets the <see cref="Traverser" />'s of this traversal that hold the results of the traversal.
/// </summary>
- IEnumerable<Traverser> Traversers { get; set; }
+ IEnumerable<Traverser>? Traversers { get; set; }
/// <summary>
/// Iterates all <see cref="Traverser" /> instances in the traversal.
@@ -60,13 +60,13 @@
/// <summary>
/// A traversal represents a directed walk over a graph.
/// </summary>
- public interface ITraversal<S, E> : ITraversal, IEnumerator<E>
+ public interface ITraversal<TStart, TEnd> : ITraversal, IEnumerator<TEnd?>
{
/// <summary>
/// Gets the next result from the traversal.
/// </summary>
/// <returns>The result.</returns>
- E Next();
+ TEnd? Next();
/// <summary>
/// Determines if the traversal contains any additional results for iteration.
@@ -79,13 +79,13 @@
/// </summary>
/// <param name="amount">The number of results to get.</param>
/// <returns>The n-results.</returns>
- IEnumerable<E> Next(int amount);
+ IEnumerable<TEnd?> Next(int amount);
/// <summary>
/// Iterates all <see cref="Traverser" /> instances in the traversal.
/// </summary>
/// <returns>The fully drained traversal.</returns>
- new ITraversal<S, E> Iterate();
+ new ITraversal<TStart, TEnd> Iterate();
/// <summary>
/// Gets the next <see cref="Traverser" />.
@@ -97,13 +97,13 @@
/// Puts all the results into a <see cref="IList{T}" />.
/// </summary>
/// <returns>The results in a list.</returns>
- IList<E> ToList();
+ IList<TEnd?> ToList();
/// <summary>
/// Puts all the results into a <see cref="ISet{T}" />.
/// </summary>
/// <returns>The results in a set.</returns>
- ISet<E> ToSet();
+ ISet<TEnd?> ToSet();
/// <summary>
/// Starts a promise to execute a function on the current traversal that will be completed in the future.
@@ -112,7 +112,7 @@
/// <param name="callback">The function to execute on the current traversal.</param>
/// <param name="cancellationToken">The token to cancel the operation. The default value is None.</param>
/// <returns>The result of the executed <paramref name="callback" />.</returns>
- Task<TReturn> Promise<TReturn>(Func<ITraversal<S, E>, TReturn> callback,
+ Task<TReturn> Promise<TReturn>(Func<ITraversal<TStart, TEnd>, TReturn> callback,
CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/ITraversalStrategy.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/ITraversalStrategy.cs
index 45a0b97..20b3bc0 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/ITraversalStrategy.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/ITraversalStrategy.cs
@@ -36,13 +36,13 @@
/// Applies the strategy to the given <see cref="ITraversal" />.
/// </summary>
/// <param name="traversal">The <see cref="ITraversal" /> the strategy should be applied to.</param>
- void Apply<S, E>(ITraversal<S, E> traversal);
+ void Apply<TStart, TEnd>(ITraversal<TStart, TEnd> traversal);
/// <summary>
/// Applies the strategy to the given <see cref="ITraversal" /> asynchronously.
/// </summary>
/// <param name="traversal">The <see cref="ITraversal" /> the strategy should be applied to.</param>
/// <param name="cancellationToken">The token to cancel the operation. The default value is None.</param>
- Task ApplyAsync<S, E>(ITraversal<S, E> traversal, CancellationToken cancellationToken = default);
+ Task ApplyAsync<TStart, TEnd>(ITraversal<TStart, TEnd> traversal, CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Instruction.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Instruction.cs
index f6453fe..cf9cd0c 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Instruction.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Instruction.cs
@@ -36,10 +36,10 @@
/// </summary>
/// <param name="operatorName">The name of the operator.</param>
/// <param name="arguments">The arguments.</param>
- public Instruction(string operatorName, params dynamic[] arguments)
+ public Instruction(string operatorName, params dynamic?[] arguments)
{
- OperatorName = operatorName;
- Arguments = arguments;
+ OperatorName = operatorName ?? throw new ArgumentNullException(nameof(operatorName));
+ Arguments = arguments ?? throw new ArgumentNullException(nameof(arguments));
}
/// <summary>
@@ -50,7 +50,7 @@
/// <summary>
/// Gets the arguments.
/// </summary>
- public dynamic[] Arguments { get; }
+ public dynamic?[] Arguments { get; }
/// <summary>
/// String representation of the <see cref="Instruction"/>.
@@ -61,7 +61,7 @@
}
/// <inheritdoc />
- public bool Equals(Instruction other)
+ public bool Equals(Instruction? other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
@@ -69,7 +69,7 @@
}
/// <inheritdoc />
- public override bool Equals(object obj)
+ public override bool Equals(object? obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
@@ -83,15 +83,10 @@
unchecked
{
var hash = 19;
- if (OperatorName != null)
- {
- hash = hash * 397 + OperatorName.GetHashCode();
- }
+ hash = hash * 397 + OperatorName.GetHashCode();
- if (Arguments != null)
- {
- hash = Arguments.Aggregate(hash, (current, value) => current * 31 + value.GetHashCode());
- }
+ hash = Arguments.Aggregate(hash,
+ (current, value) => current * 31 + (value == null ? 0 : value.GetHashCode()));
return hash;
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/NamingConversions.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/NamingConversions.cs
deleted file mode 100644
index a650dc5..0000000
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/NamingConversions.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-#region License
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#endregion
-
-using System.Collections.Generic;
-
-namespace Gremlin.Net.Process.Traversal
-{
- internal static class NamingConversions
- {
- /// <summary>
- /// Gets the Java name equivalent for a given enum value
- /// </summary>
- internal static string GetEnumJavaName(string typeName, string value)
- {
- var key = $"{typeName}.{value}";
- string javaName;
- if (!CSharpToJavaEnums.TryGetValue(key, out javaName))
- {
- throw new KeyNotFoundException($"Java name for {key} not found");
- }
- return javaName;
- }
-
- internal static readonly IDictionary<string, string> CSharpToJavaEnums = new Dictionary<string, string>
- {
- {"Barrier.NormSack", "normSack"},
- {"Cardinality.List", "list"},
- {"Cardinality.Set", "set"},
- {"Cardinality.Single", "single"},
- {"Column.Keys", "keys"},
- {"Column.Values", "values"},
- {"Direction.Both", "BOTH"},
- {"Direction.In", "IN"},
- {"Direction.Out", "OUT"},
- {"GraphSONVersion.V1_0", "V1_0"},
- {"GraphSONVersion.V2_0", "V2_0"},
- {"GraphSONVersion.V3_0", "V3_0"},
- {"GryoVersion.V1_0", "V1_0"},
- {"GryoVersion.V3_0", "V3_0"},
- {"Operator.AddAll", "addAll"},
- {"Operator.And", "and"},
- {"Operator.Assign", "assign"},
- {"Operator.Div", "div"},
- {"Operator.Max", "max"},
- {"Operator.Min", "min"},
- {"Operator.Minus", "minus"},
- {"Operator.Mult", "mult"},
- {"Operator.Or", "or"},
- {"Operator.Sum", "sum"},
- {"Operator.SumLong", "sumLong"},
- {"Order.Decr", "decr"},
- {"Order.Incr", "incr"},
- {"Order.Shuffle", "shuffle"},
- {"Order.Asc", "asc"},
- {"Order.Desc", "desc"},
- {"Pick.Any", "any"},
- {"Pick.None", "none"},
- {"Pop.All", "all"},
- {"Pop.First", "first"},
- {"Pop.Last", "last"},
- {"Pop.Mixed", "mixed"},
- {"Scope.Global", "global"},
- {"Scope.Local", "local"},
- {"T.Id", "id"},
- {"T.Key", "key"},
- {"T.Label", "label"},
- {"T.Value", "value"}
-
- };
- }
-}
\ No newline at end of file
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/P.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/P.cs
index 733352b..2e4e2b3 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/P.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/P.cs
@@ -41,7 +41,7 @@
/// <param name="operatorName">The name of the predicate.</param>
/// <param name="value">The value of the predicate.</param>
/// <param name="other">An optional other predicate that is used as an argument for this predicate.</param>
- public P(string operatorName, dynamic value, P other = null)
+ public P(string operatorName, dynamic? value, P? other = null)
{
OperatorName = operatorName;
Value = value;
@@ -56,12 +56,12 @@
/// <summary>
/// Gets the value of the predicate.
/// </summary>
- public dynamic Value { get; }
+ public dynamic? Value { get; }
/// <summary>
/// Gets an optional other predicate that is used as an argument for this predicate.
/// </summary>
- public P Other { get; }
+ public P? Other { get; }
/// <summary>
/// Returns a composed predicate that represents a logical AND of this predicate and another.
@@ -83,86 +83,86 @@
return new P("or", this, otherPredicate);
}
- public static P Between(params object[] args)
+ public static P Between(params object[]? args)
{
- var value = args != null && args.Length == 1 ? args[0] : args;
+ var value = args is { Length: 1 } ? args[0] : args;
return new P("between", value);
}
- public static P Eq(params object[] args)
+ public static P Eq(params object[]? args)
{
- var value = args != null && args.Length == 1 ? args[0] : args;
+ var value = args is { Length: 1 } ? args[0] : args;
return new P("eq", value);
}
- public static P Gt(params object[] args)
+ public static P Gt(params object[]? args)
{
- var value = args != null && args.Length == 1 ? args[0] : args;
+ var value = args is { Length: 1 } ? args[0] : args;
return new P("gt", value);
}
- public static P Gte(params object[] args)
+ public static P Gte(params object[]? args)
{
- var value = args != null && args.Length == 1 ? args[0] : args;
+ var value = args is { Length: 1 } ? args[0] : args;
return new P("gte", value);
}
- public static P Inside(params object[] args)
+ public static P Inside(params object[]? args)
{
- var value = args != null && args.Length == 1 ? args[0] : args;
+ var value = args is { Length: 1 } ? args[0] : args;
return new P("inside", value);
}
- public static P Lt(params object[] args)
+ public static P Lt(params object[]? args)
{
- var value = args != null && args.Length == 1 ? args[0] : args;
+ var value = args is { Length: 1 } ? args[0] : args;
return new P("lt", value);
}
- public static P Lte(params object[] args)
+ public static P Lte(params object[]? args)
{
- var value = args != null && args.Length == 1 ? args[0] : args;
+ var value = args is { Length: 1 } ? args[0] : args;
return new P("lte", value);
}
- public static P Neq(params object[] args)
+ public static P Neq(params object[]? args)
{
- var value = args != null && args.Length == 1 ? args[0] : args;
+ var value = args is { Length: 1 } ? args[0] : args;
return new P("neq", value);
}
- public static P Not(params object[] args)
+ public static P Not(params object[]? args)
{
- var value = args != null && args.Length == 1 ? args[0] : args;
+ var value = args is { Length: 1 } ? args[0] : args;
return new P("not", value);
}
- public static P Outside(params object[] args)
+ public static P Outside(params object[]? args)
{
- var value = args != null && args.Length == 1 ? args[0] : args;
+ var value = args is { Length: 1 } ? args[0] : args;
return new P("outside", value);
}
- public static P Test(params object[] args)
+ public static P Test(params object[]? args)
{
- var value = args != null && args.Length == 1 ? args[0] : args;
+ var value = args is { Length: 1 } ? args[0] : args;
return new P("test", value);
}
- public static P Within(params object[] args)
+ public static P Within(params object[]? args)
{
- var x = args != null && args.Length == 1 && args[0] is ICollection collection ? collection : args;
+ var x = args is { Length: 1 } && args[0] is ICollection collection ? collection : args;
return new P("within", ToGenericList(x));
}
- public static P Without(params object[] args)
+ public static P Without(params object[]? args)
{
- var x = args != null && args.Length == 1 && args[0] is ICollection collection ? collection : args;
+ var x = args is { Length: 1 } && args[0] is ICollection collection ? collection : args;
return new P("without", ToGenericList(x));
}
- private static List<object> ToGenericList(IEnumerable collection)
+ private static List<object> ToGenericList(IEnumerable? collection)
{
return collection?.Cast<object>().ToList() ?? Enumerable.Empty<object>().ToList();
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/AbstractTraversalStrategy.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/AbstractTraversalStrategy.cs
index 7170aa7..1c7376d 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/AbstractTraversalStrategy.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/AbstractTraversalStrategy.cs
@@ -84,10 +84,10 @@
/// <summary>
/// Gets the configuration of the strategy.
/// </summary>
- public Dictionary<string, dynamic> Configuration { get; } = new Dictionary<string, dynamic>();
+ public Dictionary<string, dynamic?> Configuration { get; } = new();
/// <inheritdoc />
- public bool Equals(AbstractTraversalStrategy other)
+ public bool Equals(AbstractTraversalStrategy? other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
@@ -95,18 +95,18 @@
}
/// <inheritdoc />
- public virtual void Apply<S, E>(ITraversal<S, E> traversal)
+ public virtual void Apply<TStart, TEnd>(ITraversal<TStart, TEnd> traversal)
{
}
/// <inheritdoc />
- public virtual Task ApplyAsync<S, E>(ITraversal<S, E> traversal, CancellationToken cancellationToken = default)
+ public virtual Task ApplyAsync<TStart, TEnd>(ITraversal<TStart, TEnd> traversal, CancellationToken cancellationToken = default)
{
return Task.CompletedTask;
}
/// <inheritdoc />
- public override bool Equals(object obj)
+ public override bool Equals(object? obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/HaltedTraverserStrategy.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/HaltedTraverserStrategy.cs
index 6ae8876..ffa38fc 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/HaltedTraverserStrategy.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/HaltedTraverserStrategy.cs
@@ -32,7 +32,7 @@
{
}
- public HaltedTraverserStrategy(string haltedTraverserFactoryName = null)
+ public HaltedTraverserStrategy(string? haltedTraverserFactoryName = null)
: this()
{
if (haltedTraverserFactoryName != null)
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/PartitionStrategy.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/PartitionStrategy.cs
index 8c59ad4..34f7b55 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/PartitionStrategy.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/PartitionStrategy.cs
@@ -49,8 +49,8 @@
/// </param>
/// <param name="readPartitions">Specifies the partition of the graph to read from.</param>
/// <param name="includeMetaProperties">Set to true if vertex properties should get assigned to partitions.</param>
- public PartitionStrategy(string partitionKey = null, string writePartition = null,
- IEnumerable<string> readPartitions = null, bool? includeMetaProperties = null)
+ public PartitionStrategy(string? partitionKey = null, string? writePartition = null,
+ IEnumerable<string>? readPartitions = null, bool? includeMetaProperties = null)
: this()
{
if (partitionKey != null)
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/SubgraphStrategy.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/SubgraphStrategy.cs
index af312d6..141b851 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/SubgraphStrategy.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/SubgraphStrategy.cs
@@ -44,8 +44,8 @@
/// <param name="edges">Constrains edges for the <see cref="ITraversal" />.</param>
/// <param name="vertexProperties">Constrains vertex properties for the <see cref="ITraversal" />.</param>
/// <param name="checkAdjacentVertices">Determines if filters are applied to the adjacent vertices of an edge.</param>
- public SubgraphStrategy(ITraversal vertices = null, ITraversal edges = null,
- ITraversal vertexProperties = null, bool? checkAdjacentVertices = null)
+ public SubgraphStrategy(ITraversal? vertices = null, ITraversal? edges = null,
+ ITraversal? vertexProperties = null, bool? checkAdjacentVertices = null)
: this()
{
if (vertices != null)
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/VertexProgramStrategy.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/VertexProgramStrategy.cs
index 17bfbaa..149dfe7 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/VertexProgramStrategy.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/VertexProgramStrategy.cs
@@ -35,9 +35,9 @@
{
}
- public VertexProgramStrategy(string graphComputer = null, int? workers = null, string persist = null,
- string result = null, ITraversal vertices = null, ITraversal edges = null,
- Dictionary<string, dynamic> configuration = null)
+ public VertexProgramStrategy(string? graphComputer = null, int? workers = null, string? persist = null,
+ string? result = null, ITraversal? vertices = null, ITraversal? edges = null,
+ Dictionary<string, dynamic>? configuration = null)
: this()
{
if (graphComputer != null)
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Optimization/ProductiveByStrategy.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Optimization/ProductiveByStrategy.cs
index 1586580..e989f48 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Optimization/ProductiveByStrategy.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Optimization/ProductiveByStrategy.cs
@@ -43,7 +43,7 @@
/// Initializes a new instance of the <see cref="ProductiveByStrategy" /> class.
/// </summary>
/// <param name="productiveKeys">Specifies keys that will always be productive.</param>
- public ProductiveByStrategy(IEnumerable<object> productiveKeys = null)
+ public ProductiveByStrategy(IEnumerable<object>? productiveKeys = null)
: this()
{
if (productiveKeys != null)
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Verification/ReservedKeysVerificationStrategy.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Verification/ReservedKeysVerificationStrategy.cs
index eccae0d..204f9d8 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Verification/ReservedKeysVerificationStrategy.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Verification/ReservedKeysVerificationStrategy.cs
@@ -47,7 +47,7 @@
/// <param name="throwException">Throw an exception if a reserved key is used.</param>
/// <param name="keys">List of keys to define as reserved. If not set then the defaults are used.</param>
public ReservedKeysVerificationStrategy(bool logWarning = false, bool throwException = false,
- List<string> keys = null)
+ List<string>? keys = null)
: this()
{
Configuration["logWarning"] = logWarning;
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TextP.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TextP.cs
index 2bf4968..9a97d1a 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TextP.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TextP.cs
@@ -41,7 +41,7 @@
/// <param name="operatorName">The name of the predicate.</param>
/// <param name="value">The value of the predicate.</param>
/// <param name="other">An optional other predicate that is used as an argument for this predicate.</param>
- public TextP(string operatorName, string value, P other = null) : base(operatorName, value, other)
+ public TextP(string operatorName, string value, P? other = null) : base(operatorName, value, other)
{
}
@@ -86,11 +86,6 @@
return new TextP("notRegex", value);
}
- private static T[] ToGenericArray<T>(ICollection<T> collection)
- {
- return collection?.ToArray() ?? new T[0];
- }
-
/// <inheritdoc />
public override string ToString()
{
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Translator/GroovyTranslator.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Translator/GroovyTranslator.cs
index 867c719..98dc5c4 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Translator/GroovyTranslator.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Translator/GroovyTranslator.cs
@@ -107,7 +107,7 @@
return $".{step.OperatorName}({TranslateArguments(step.Arguments)})";
}
- private string TranslateWithArguments(dynamic[] arguments)
+ private string TranslateWithArguments(dynamic?[] arguments)
{
if (arguments[0] == WithOptions.Tokens)
{
@@ -138,10 +138,10 @@
{ WithOptions.Map, "WithOptions.map" }
};
- private string TranslateArguments(IEnumerable<object> arguments) =>
+ private string TranslateArguments(IEnumerable<object?> arguments) =>
string.Join(", ", arguments.Select(TranslateArgument));
- private string TranslateArgument(object argument)
+ private string TranslateArgument(object? argument)
{
return argument switch
{
@@ -157,7 +157,7 @@
IEnumerable e => TranslateCollection(e),
ITraversal t => TranslateTraversal(t),
AbstractTraversalStrategy strategy => TranslateStrategy(strategy),
- _ => Convert.ToString(argument, CultureInfo.InvariantCulture)
+ _ => Convert.ToString(argument, CultureInfo.InvariantCulture)!
};
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Traverser.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Traverser.cs
index 573e57f..6c241ef 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Traverser.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Traverser.cs
@@ -33,7 +33,7 @@
/// </summary>
/// <param name="obj">The object of the traverser.</param>
/// <param name="bulk">The number of traversers represented in this traverser.</param>
- public Traverser(dynamic obj, long bulk = 1)
+ public Traverser(dynamic? obj, long bulk = 1)
{
Object = obj;
Bulk = bulk;
@@ -42,7 +42,7 @@
/// <summary>
/// Gets the object of this traverser.
/// </summary>
- public dynamic Object { get; }
+ public dynamic? Object { get; }
/// <summary>
/// Gets the number of traversers represented in this traverser.
@@ -50,7 +50,7 @@
public long Bulk { get; internal set; }
/// <inheritdoc />
- public bool Equals(Traverser other)
+ public bool Equals(Traverser? other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
@@ -58,7 +58,7 @@
}
/// <inheritdoc />
- public override bool Equals(object obj)
+ public override bool Equals(object? obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
index 93de0b8..17adcda 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
@@ -42,7 +42,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the V step to that traversal.
/// </summary>
- public static GraphTraversal<object, Vertex> V(params object[] vertexIdsOrElements)
+ public static GraphTraversal<object, Vertex> V(params object?[]? vertexIdsOrElements)
{
return vertexIdsOrElements is { Length: 0 }
? new GraphTraversal<object, Vertex>().V()
@@ -50,6 +50,16 @@
}
/// <summary>
+ /// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the E step to that traversal.
+ /// </summary>
+ public static GraphTraversal<object, Edge> E(params object?[]? edgeIdsOrElements)
+ {
+ return edgeIdsOrElements is { Length: 0 }
+ ? new GraphTraversal<object, Edge>().E()
+ : new GraphTraversal<object, Edge>().E(edgeIdsOrElements);
+ }
+
+ /// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the addE step to that traversal.
/// </summary>
public static GraphTraversal<object, Edge> AddE(string edgeLabel)
@@ -152,7 +162,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the both step to that traversal.
/// </summary>
- public static GraphTraversal<object, Vertex> Both(params string[] edgeLabels)
+ public static GraphTraversal<object, Vertex> Both(params string?[] edgeLabels)
{
return edgeLabels is { Length: 0 }
? new GraphTraversal<object, Vertex>().Both()
@@ -162,7 +172,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the bothE step to that traversal.
/// </summary>
- public static GraphTraversal<object, Edge> BothE(params string[] edgeLabels)
+ public static GraphTraversal<object, Edge> BothE(params string?[] edgeLabels)
{
return edgeLabels is { Length: 0 }
? new GraphTraversal<object, Edge>().BothE()
@@ -180,7 +190,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the branch step to that traversal.
/// </summary>
- public static GraphTraversal<object, E2> Branch<E2>(IFunction function)
+ public static GraphTraversal<object, E2> Branch<E2>(IFunction? function)
{
return new GraphTraversal<object, E2>().Branch<E2>(function);
}
@@ -196,7 +206,7 @@
/// <summary>
/// Adds the call step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public static GraphTraversal<object, E2> Call<E2>(string service)
+ public static GraphTraversal<object, E2> Call<E2>(string? service)
{
return new GraphTraversal<object, E2>().Call<E2>(service);
}
@@ -204,7 +214,7 @@
/// <summary>
/// Adds the call step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public static GraphTraversal<object, E2> Call<E2>(string service, IDictionary<object,object> m)
+ public static GraphTraversal<object, E2> Call<E2>(string? service, IDictionary<object,object>? m)
{
return new GraphTraversal<object, E2>().Call<E2>(service, m);
}
@@ -212,7 +222,7 @@
/// <summary>
/// Adds the call step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public static GraphTraversal<object, E2> Call<E2>(string service, ITraversal t)
+ public static GraphTraversal<object, E2> Call<E2>(string? service, ITraversal? t)
{
return new GraphTraversal<object, E2>().Call<E2>(service, t);
}
@@ -220,7 +230,7 @@
/// <summary>
/// Adds the call step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public static GraphTraversal<object, E2> Call<E2>(string service, IDictionary<object,object> m, ITraversal t)
+ public static GraphTraversal<object, E2> Call<E2>(string? service, IDictionary<object,object>? m, ITraversal? t)
{
return new GraphTraversal<object, E2>().Call<E2>(service, m, t);
}
@@ -306,7 +316,7 @@
/// </summary>
public static GraphTraversal<object, E2> Constant<E2>(E2 a)
{
- return new GraphTraversal<object, E2>().Constant<E2>(a);
+ return new GraphTraversal<object, E2>().Constant(a);
}
/// <summary>
@@ -336,7 +346,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the dedup step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> Dedup(Scope scope, params string[] dedupLabels)
+ public static GraphTraversal<object, object> Dedup(Scope scope, params string?[] dedupLabels)
{
return dedupLabels is { Length: 0 }
? new GraphTraversal<object, object>().Dedup(scope)
@@ -346,7 +356,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the dedup step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> Dedup(params string[] dedupLabels)
+ public static GraphTraversal<object, object> Dedup(params string?[] dedupLabels)
{
return dedupLabels is { Length: 0 }
? new GraphTraversal<object, object>().Dedup()
@@ -372,7 +382,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the elementMap step to that traversal.
/// </summary>
- public static GraphTraversal<object, IDictionary<object, E2>> ElementMap<E2>(params string[] propertyKeys)
+ public static GraphTraversal<object, IDictionary<object, E2>> ElementMap<E2>(params string?[] propertyKeys)
{
return propertyKeys is { Length: 0 }
? new GraphTraversal<object, IDictionary<object, E2>>().ElementMap<E2>()
@@ -414,7 +424,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the fail step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> Fail(string msg)
+ public static GraphTraversal<object, object> Fail(string? msg)
{
return new GraphTraversal<object, object>().Fail(msg);
}
@@ -422,7 +432,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the filter step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> Filter(IPredicate predicate)
+ public static GraphTraversal<object, object> Filter(IPredicate? predicate)
{
return new GraphTraversal<object, object>().Filter(predicate);
}
@@ -438,7 +448,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the flatMap step to that traversal.
/// </summary>
- public static GraphTraversal<object, E2> FlatMap<E2>(IFunction function)
+ public static GraphTraversal<object, E2> FlatMap<E2>(IFunction? function)
{
return new GraphTraversal<object, E2>().FlatMap<E2>(function);
}
@@ -462,9 +472,9 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the fold step to that traversal.
/// </summary>
- public static GraphTraversal<object, E2> Fold<E2>(E2 seed, IBiFunction foldFunction)
+ public static GraphTraversal<object, E2> Fold<E2>(E2 seed, IBiFunction? foldFunction)
{
- return new GraphTraversal<object, E2>().Fold<E2>(seed, foldFunction);
+ return new GraphTraversal<object, E2>().Fold(seed, foldFunction);
}
/// <summary>
@@ -502,7 +512,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the has step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> Has(string propertyKey)
+ public static GraphTraversal<object, object> Has(string? propertyKey)
{
return new GraphTraversal<object, object>().Has(propertyKey);
}
@@ -510,7 +520,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the has step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> Has(string propertyKey, object value)
+ public static GraphTraversal<object, object> Has(string? propertyKey, object? value)
{
return new GraphTraversal<object, object>().Has(propertyKey, value);
}
@@ -518,7 +528,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the has step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> Has(string propertyKey, P predicate)
+ public static GraphTraversal<object, object> Has(string? propertyKey, P? predicate)
{
return new GraphTraversal<object, object>().Has(propertyKey, predicate);
}
@@ -526,7 +536,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the has step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> Has(string label, string propertyKey, object value)
+ public static GraphTraversal<object, object> Has(string? label, string? propertyKey, object? value)
{
return new GraphTraversal<object, object>().Has(label, propertyKey, value);
}
@@ -534,7 +544,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the has step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> Has(string label, string propertyKey, P predicate)
+ public static GraphTraversal<object, object> Has(string? label, string? propertyKey, P? predicate)
{
return new GraphTraversal<object, object>().Has(label, propertyKey, predicate);
}
@@ -542,7 +552,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the has step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> Has(string propertyKey, ITraversal propertyTraversal)
+ public static GraphTraversal<object, object> Has(string? propertyKey, ITraversal propertyTraversal)
{
return new GraphTraversal<object, object>().Has(propertyKey, propertyTraversal);
}
@@ -550,7 +560,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the has step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> Has(T accessor, object value)
+ public static GraphTraversal<object, object> Has(T accessor, object? value)
{
return new GraphTraversal<object, object>().Has(accessor, value);
}
@@ -558,7 +568,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the has step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> Has(T accessor, P predicate)
+ public static GraphTraversal<object, object> Has(T accessor, P? predicate)
{
return new GraphTraversal<object, object>().Has(accessor, predicate);
}
@@ -574,7 +584,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the hasId step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> HasId(object id, params object[] otherIds)
+ public static GraphTraversal<object, object> HasId(object? id, params object?[]? otherIds)
{
return otherIds is { Length: 0 }
? new GraphTraversal<object, object>().HasId(id)
@@ -584,7 +594,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the hasId step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> HasId(P predicate)
+ public static GraphTraversal<object, object> HasId(P? predicate)
{
return new GraphTraversal<object, object>().HasId(predicate);
}
@@ -592,7 +602,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the hasKey step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> HasKey(P predicate)
+ public static GraphTraversal<object, object> HasKey(P? predicate)
{
return new GraphTraversal<object, object>().HasKey(predicate);
}
@@ -600,7 +610,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the hasKey step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> HasKey(string label, params string[] otherLabels)
+ public static GraphTraversal<object, object> HasKey(string? label, params string?[]? otherLabels)
{
return otherLabels is { Length: 0 }
? new GraphTraversal<object, object>().HasKey(label)
@@ -610,7 +620,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the hasLabel step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> HasLabel(P predicate)
+ public static GraphTraversal<object, object> HasLabel(P? predicate)
{
return new GraphTraversal<object, object>().HasLabel(predicate);
}
@@ -618,7 +628,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the hasLabel step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> HasLabel(string label, params string[] otherLabels)
+ public static GraphTraversal<object, object> HasLabel(string? label, params string?[]? otherLabels)
{
return otherLabels is { Length: 0 }
? new GraphTraversal<object, object>().HasLabel(label)
@@ -628,7 +638,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the hasNot step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> HasNot(string propertyKey)
+ public static GraphTraversal<object, object> HasNot(string? propertyKey)
{
return new GraphTraversal<object, object>().HasNot(propertyKey);
}
@@ -636,7 +646,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the hasValue step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> HasValue(object value, params object[] values)
+ public static GraphTraversal<object, object> HasValue(object? value, params object?[]? values)
{
return values is { Length: 0 }
? new GraphTraversal<object, object>().HasValue(value)
@@ -646,7 +656,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the hasValue step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> HasValue(P predicate)
+ public static GraphTraversal<object, object> HasValue(P? predicate)
{
return new GraphTraversal<object, object>().HasValue(predicate);
}
@@ -670,7 +680,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the in step to that traversal.
/// </summary>
- public static GraphTraversal<object, Vertex> In(params string[] edgeLabels)
+ public static GraphTraversal<object, Vertex> In(params string?[] edgeLabels)
{
return edgeLabels is { Length: 0 }
? new GraphTraversal<object, Vertex>().In()
@@ -680,7 +690,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the inE step to that traversal.
/// </summary>
- public static GraphTraversal<object, Edge> InE(params string[] edgeLabels)
+ public static GraphTraversal<object, Edge> InE(params string?[] edgeLabels)
{
return edgeLabels is { Length: 0 }
? new GraphTraversal<object, Edge>().InE()
@@ -706,7 +716,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the inject step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> Inject(params object[] injections)
+ public static GraphTraversal<object, object> Inject(params object?[] injections)
{
return injections is { Length: 0 }
? new GraphTraversal<object, object>().Inject()
@@ -716,7 +726,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the is step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> Is(object value)
+ public static GraphTraversal<object, object> Is(object? value)
{
return new GraphTraversal<object, object>().Is(value);
}
@@ -724,7 +734,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the is step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> Is(P predicate)
+ public static GraphTraversal<object, object> Is(P? predicate)
{
return new GraphTraversal<object, object>().Is(predicate);
}
@@ -780,7 +790,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the loops step to that traversal.
/// </summary>
- public static GraphTraversal<object, int> Loops(string loopName)
+ public static GraphTraversal<object, int> Loops(string? loopName)
{
return new GraphTraversal<object, int>().Loops(loopName);
}
@@ -788,7 +798,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the map step to that traversal.
/// </summary>
- public static GraphTraversal<object, E2> Map<E2>(IFunction function)
+ public static GraphTraversal<object, E2> Map<E2>(IFunction? function)
{
return new GraphTraversal<object, E2>().Map<E2>(function);
}
@@ -862,7 +872,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the mergeE step to that traversal.
/// </summary>
- public static GraphTraversal<object, Edge> MergeE (IDictionary<object,object> m)
+ public static GraphTraversal<object, Edge> MergeE (IDictionary<object,object>? m)
{
return new GraphTraversal<object, Edge>().MergeE(m);
}
@@ -870,7 +880,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the mergeE step to that traversal.
/// </summary>
- public static GraphTraversal<object, Edge> MergeE (ITraversal t)
+ public static GraphTraversal<object, Edge> MergeE (ITraversal? t)
{
return new GraphTraversal<object, Edge>().MergeE(t);
}
@@ -886,7 +896,7 @@
/// <summary>
/// Adds the mergeV step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public static GraphTraversal<object, Vertex> MergeV (IDictionary<object,object> m)
+ public static GraphTraversal<object, Vertex> MergeV (IDictionary<object,object>? m)
{
return new GraphTraversal<object, Vertex>().MergeV(m);
}
@@ -894,7 +904,7 @@
/// <summary>
/// Adds the mergeV step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public static GraphTraversal<object, Vertex> MergeV (ITraversal t)
+ public static GraphTraversal<object, Vertex> MergeV (ITraversal? t)
{
return new GraphTraversal<object, Vertex>().MergeV(t);
}
@@ -968,7 +978,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the out step to that traversal.
/// </summary>
- public static GraphTraversal<object, Vertex> Out(params string[] edgeLabels)
+ public static GraphTraversal<object, Vertex> Out(params string?[] edgeLabels)
{
return edgeLabels is { Length: 0 }
? new GraphTraversal<object, Vertex>().Out()
@@ -978,7 +988,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the outE step to that traversal.
/// </summary>
- public static GraphTraversal<object, Edge> OutE(params string[] edgeLabels)
+ public static GraphTraversal<object, Edge> OutE(params string?[] edgeLabels)
{
return edgeLabels is { Length: 0 }
? new GraphTraversal<object, Edge>().OutE()
@@ -1004,7 +1014,8 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the project step to that traversal.
/// </summary>
- public static GraphTraversal<object, IDictionary<string, E2>> Project<E2>(string projectKey, params string[] projectKeys)
+ public static GraphTraversal<object, IDictionary<string, E2>> Project<E2>(string? projectKey,
+ params string?[] projectKeys)
{
return projectKeys is { Length: 0 }
? new GraphTraversal<object, IDictionary<string, E2>>().Project<E2>(projectKey)
@@ -1014,7 +1025,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the properties step to that traversal.
/// </summary>
- public static GraphTraversal<object, E2> Properties<E2>(params string[] propertyKeys)
+ public static GraphTraversal<object, E2> Properties<E2>(params string?[] propertyKeys)
{
return propertyKeys is { Length: 0 }
? new GraphTraversal<object, E2>().Properties<E2>()
@@ -1024,7 +1035,8 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the property step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> Property(Cardinality cardinality, object key, object value, params object[] keyValues)
+ public static GraphTraversal<object, object> Property(Cardinality cardinality, object? key, object? value,
+ params object?[] keyValues)
{
return keyValues is { Length: 0 }
? new GraphTraversal<object, object>().Property(cardinality, key, value)
@@ -1034,7 +1046,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the property step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> Property(object key, object value, params object[] keyValues)
+ public static GraphTraversal<object, object> Property(object? key, object? value, params object?[] keyValues)
{
return keyValues is { Length: 0 }
? new GraphTraversal<object, object>().Property(key, value)
@@ -1044,7 +1056,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the propertyMap step to that traversal.
/// </summary>
- public static GraphTraversal<object, IDictionary<string, E2>> PropertyMap<E2>(params string[] propertyKeys)
+ public static GraphTraversal<object, IDictionary<string, E2>> PropertyMap<E2>(params string?[] propertyKeys)
{
return propertyKeys is { Length: 0 }
? new GraphTraversal<object, IDictionary<string, E2>>().PropertyMap<E2>()
@@ -1126,7 +1138,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the select step to that traversal.
/// </summary>
- public static GraphTraversal<object, E2> Select<E2>(Pop pop, string selectKey)
+ public static GraphTraversal<object, E2> Select<E2>(Pop pop, string? selectKey)
{
return new GraphTraversal<object, E2>().Select<E2>(pop, selectKey);
}
@@ -1134,11 +1146,13 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the select step to that traversal.
/// </summary>
- public static GraphTraversal<object, IDictionary<string, E2>> Select<E2>(Pop pop, string selectKey1, string selectKey2, params string[] otherSelectKeys)
+ public static GraphTraversal<object, IDictionary<string, E2>> Select<E2>(Pop pop, string? selectKey1,
+ string? selectKey2, params string?[] otherSelectKeys)
{
return otherSelectKeys is { Length: 0 }
? new GraphTraversal<object, IDictionary<string, E2>>().Select<E2>(pop, selectKey1, selectKey2)
- : new GraphTraversal<object, IDictionary<string, E2>>().Select<E2>(pop, selectKey1, selectKey2, otherSelectKeys);
+ : new GraphTraversal<object, IDictionary<string, E2>>().Select<E2>(pop, selectKey1, selectKey2,
+ otherSelectKeys);
}
/// <summary>
@@ -1152,7 +1166,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the select step to that traversal.
/// </summary>
- public static GraphTraversal<object, E2> Select<E2>(string selectKey)
+ public static GraphTraversal<object, E2> Select<E2>(string? selectKey)
{
return new GraphTraversal<object, E2>().Select<E2>(selectKey);
}
@@ -1160,11 +1174,13 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the select step to that traversal.
/// </summary>
- public static GraphTraversal<object, IDictionary<string, E2>> Select<E2>(string selectKey1, string selectKey2, params string[] otherSelectKeys)
+ public static GraphTraversal<object, IDictionary<string, E2>> Select<E2>(string? selectKey1, string? selectKey2,
+ params string?[] otherSelectKeys)
{
return otherSelectKeys is { Length: 0 }
? new GraphTraversal<object, IDictionary<string, E2>>().Select<E2>(selectKey1, selectKey2)
- : new GraphTraversal<object, IDictionary<string, E2>>().Select<E2>(selectKey1, selectKey2, otherSelectKeys);
+ : new GraphTraversal<object, IDictionary<string, E2>>().Select<E2>(selectKey1, selectKey2,
+ otherSelectKeys);
}
/// <summary>
@@ -1178,7 +1194,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the sideEffect step to that traversal.
/// </summary>
- public static GraphTraversal<object, object> SideEffect(IConsumer consumer)
+ public static GraphTraversal<object, object> SideEffect(IConsumer? consumer)
{
return new GraphTraversal<object, object>().SideEffect(consumer);
}
@@ -1298,7 +1314,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the to step to that traversal.
/// </summary>
- public static GraphTraversal<object, Vertex> To(Direction direction, params string[] edgeLabels)
+ public static GraphTraversal<object, Vertex> To(Direction? direction, params string?[] edgeLabels)
{
return edgeLabels is { Length: 0 }
? new GraphTraversal<object, Vertex>().To(direction)
@@ -1308,7 +1324,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the toE step to that traversal.
/// </summary>
- public static GraphTraversal<object, Edge> ToE(Direction direction, params string[] edgeLabels)
+ public static GraphTraversal<object, Edge> ToE(Direction? direction, params string?[] edgeLabels)
{
return edgeLabels is { Length: 0 }
? new GraphTraversal<object, Edge>().ToE(direction)
@@ -1318,7 +1334,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the toV step to that traversal.
/// </summary>
- public static GraphTraversal<object, Vertex> ToV(Direction direction)
+ public static GraphTraversal<object, Vertex> ToV(Direction? direction)
{
return new GraphTraversal<object, Vertex>().ToV(direction);
}
@@ -1384,7 +1400,8 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the valueMap step to that traversal.
/// </summary>
- public static GraphTraversal<object, IDictionary<TKey, TValue>> ValueMap<TKey, TValue>(params string[] propertyKeys)
+ public static GraphTraversal<object, IDictionary<TKey, TValue>> ValueMap<TKey, TValue>(
+ params string?[] propertyKeys)
{
return propertyKeys is { Length: 0 }
? new GraphTraversal<object, IDictionary<TKey, TValue>>().ValueMap<TKey, TValue>()
@@ -1394,7 +1411,8 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the valueMap step to that traversal.
/// </summary>
- public static GraphTraversal<object, IDictionary<TKey, TValue>> ValueMap<TKey, TValue>(bool includeTokens, params string[] propertyKeys)
+ public static GraphTraversal<object, IDictionary<TKey, TValue>> ValueMap<TKey, TValue>(bool includeTokens,
+ params string?[] propertyKeys)
{
return propertyKeys is { Length: 0 }
? new GraphTraversal<object, IDictionary<TKey, TValue>>().ValueMap<TKey, TValue>(includeTokens)
@@ -1404,7 +1422,7 @@
/// <summary>
/// Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the values step to that traversal.
/// </summary>
- public static GraphTraversal<object, E2> Values<E2>(params string[] propertyKeys)
+ public static GraphTraversal<object, E2> Values<E2>(params string?[] propertyKeys)
{
return propertyKeys is { Length: 0 }
? new GraphTraversal<object, E2>().Values<E2>()
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Utils.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Utils.cs
index ed96830..8e13b2d 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Utils.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Utils.cs
@@ -35,7 +35,7 @@
internal static class Utils
{
public static string UserAgent => _userAgent ??= GenerateUserAgent();
- private static string _userAgent;
+ private static string? _userAgent;
/// <summary>
/// Waits the completion of the provided Task.
@@ -49,7 +49,7 @@
}
catch (AggregateException ex)
{
- if (ex.InnerExceptions.Count == 1)
+ if (ex.InnerException != null)
{
ExceptionDispatchInfo.Capture(ex.InnerException).Throw();
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/Edge.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/Edge.cs
index fddbd69..780ac06 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/Edge.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/Edge.cs
@@ -35,7 +35,7 @@
/// <param name="outV">The outgoing/tail vertex of the edge.</param>
/// <param name="label">The label of the edge.</param>
/// <param name="inV">The incoming/head vertex of the edge.</param>
- public Edge(object id, Vertex outV, string label, Vertex inV)
+ public Edge(object? id, Vertex outV, string label, Vertex inV)
: base(id, label)
{
OutV = outV;
@@ -43,14 +43,14 @@
}
/// <summary>
- /// Gets or sets the incoming/head vertex of this edge.
+ /// Gets the incoming/head vertex of this edge.
/// </summary>
- public Vertex InV { get; set; }
+ public Vertex InV { get; }
/// <summary>
- /// Gets or sets the outgoing/tail vertex of this edge.
+ /// Gets the outgoing/tail vertex of this edge.
/// </summary>
- public Vertex OutV { get; set; }
+ public Vertex OutV { get; }
/// <inheritdoc />
public override string ToString()
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/Element.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/Element.cs
index f4fc847..a837447 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/Element.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/Element.cs
@@ -35,7 +35,7 @@
/// </summary>
/// <param name="id">The id of the element.</param>
/// <param name="label">The label of the element.</param>
- protected Element(object id, string label)
+ protected Element(object? id, string label)
{
Id = id;
Label = label;
@@ -44,7 +44,7 @@
/// <summary>
/// Gets the id of this <see cref="Element" />.
/// </summary>
- public object Id { get; }
+ public object? Id { get; }
/// <summary>
/// Gets the label of this <see cref="Element" />.
@@ -52,7 +52,7 @@
public string Label { get; }
/// <inheritdoc />
- public bool Equals(Element other)
+ public bool Equals(Element? other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
@@ -60,7 +60,7 @@
}
/// <inheritdoc />
- public override bool Equals(object obj)
+ public override bool Equals(object? obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
@@ -71,7 +71,7 @@
/// <inheritdoc />
public override int GetHashCode()
{
- return Id.GetHashCode();
+ return Id != null ? Id.GetHashCode() : 0;
}
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/DataType.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/DataType.cs
index ee33cee..b5c5e0c 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/DataType.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/DataType.cs
@@ -108,7 +108,7 @@
}
/// <inheritdoc />
- public bool Equals(DataType other)
+ public bool Equals(DataType? other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
@@ -116,7 +116,7 @@
}
/// <inheritdoc />
- public override bool Equals(object obj)
+ public override bool Equals(object? obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/GraphBinaryMessageSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/GraphBinaryMessageSerializer.cs
index 0ea1435..eeee25d 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/GraphBinaryMessageSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/GraphBinaryMessageSerializer.cs
@@ -49,7 +49,7 @@
/// Initializes a new instance of the <see cref="GraphBinaryMessageSerializer" /> class.
/// </summary>
/// <param name="registry">The <see cref="TypeSerializerRegistry"/> to use for serialization.</param>
- public GraphBinaryMessageSerializer(TypeSerializerRegistry registry = null)
+ public GraphBinaryMessageSerializer(TypeSerializerRegistry? registry = null)
{
_reader = new GraphBinaryReader(registry);
_writer = new GraphBinaryWriter(registry);
@@ -81,7 +81,7 @@
}
/// <inheritdoc />
- public async Task<ResponseMessage<List<object>>> DeserializeMessageAsync(byte[] message,
+ public async Task<ResponseMessage<List<object>>?> DeserializeMessageAsync(byte[] message,
CancellationToken cancellationToken = default)
{
using var stream = new MemoryStream(message);
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/GraphBinaryReader.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/GraphBinaryReader.cs
index 297bb41..6b11360 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/GraphBinaryReader.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/GraphBinaryReader.cs
@@ -38,7 +38,7 @@
/// Initializes a new instance of the <see cref="GraphBinaryReader" /> class.
/// </summary>
/// <param name="registry">The <see cref="TypeSerializerRegistry"/> to use for deserialization.</param>
- public GraphBinaryReader(TypeSerializerRegistry registry = null)
+ public GraphBinaryReader(TypeSerializerRegistry? registry = null)
{
_registry = registry ?? TypeSerializerRegistry.Instance;
}
@@ -47,15 +47,29 @@
/// Reads only the value for a specific type <typeparamref name="T"/>.
/// </summary>
/// <param name="stream">The GraphBinary data to parse.</param>
- /// <param name="nullable">Whether or not the value can be null.</param>
/// <param name="cancellationToken">The token to cancel the operation. The default value is None.</param>
/// <typeparam name="T">The type of the object to read.</typeparam>
/// <returns>The read value.</returns>
- public async Task<object> ReadValueAsync<T>(Stream stream, bool nullable,
+ public async Task<object?> ReadNullableValueAsync<T>(Stream stream,
CancellationToken cancellationToken = default)
{
var typedSerializer = _registry.GetSerializerFor(typeof(T));
- return await typedSerializer.ReadValueAsync(stream, this, nullable, cancellationToken)
+ return await typedSerializer.ReadNullableValueAsync(stream, this, cancellationToken)
+ .ConfigureAwait(false);
+ }
+
+ /// <summary>
+ /// Reads only the value for a specific type <typeparamref name="T"/>.
+ /// </summary>
+ /// <param name="stream">The GraphBinary data to parse.</param>
+ /// <param name="cancellationToken">The token to cancel the operation. The default value is None.</param>
+ /// <typeparam name="T">The type of the object to read.</typeparam>
+ /// <returns>The read value.</returns>
+ public async Task<object> ReadNonNullableValueAsync<T>(Stream stream,
+ CancellationToken cancellationToken = default)
+ {
+ var typedSerializer = _registry.GetSerializerFor(typeof(T));
+ return await typedSerializer.ReadNonNullableValueAsync(stream, this, cancellationToken)
.ConfigureAwait(false);
}
@@ -65,14 +79,14 @@
/// <param name="stream">The GraphBinary data to parse.</param>
/// <param name="cancellationToken">The token to cancel the operation. The default value is None.</param>
/// <returns>The read value.</returns>
- public async Task<object> ReadAsync(Stream stream, CancellationToken cancellationToken = default)
+ public async Task<object?> ReadAsync(Stream stream, CancellationToken cancellationToken = default)
{
var type = DataType.FromTypeCode(await stream.ReadByteAsync(cancellationToken).ConfigureAwait(false));
if (type == DataType.UnspecifiedNull)
{
await stream.ReadByteAsync(cancellationToken).ConfigureAwait(false); // read value byte to advance the index
- return default; // should be null (TODO?)
+ return null;
}
ITypeSerializer typeSerializer;
@@ -82,8 +96,8 @@
}
else
{
- var customTypeName =
- (string)await ReadValueAsync<string>(stream, false, cancellationToken).ConfigureAwait(false);
+ var customTypeName = (string)await ReadNonNullableValueAsync<string>(stream, cancellationToken)
+ .ConfigureAwait(false);
typeSerializer = _registry.GetSerializerForCustomType(customTypeName);
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/GraphBinaryWriter.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/GraphBinaryWriter.cs
index 132707c..876611f 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/GraphBinaryWriter.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/GraphBinaryWriter.cs
@@ -21,6 +21,7 @@
#endregion
+using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
@@ -50,36 +51,46 @@
/// Initializes a new instance of the <see cref="GraphBinaryWriter" /> class.
/// </summary>
/// <param name="registry">The <see cref="TypeSerializerRegistry"/> to use for serialization.</param>
- public GraphBinaryWriter(TypeSerializerRegistry registry = null)
+ public GraphBinaryWriter(TypeSerializerRegistry? registry = null)
{
_registry = registry ?? TypeSerializerRegistry.Instance;
}
/// <summary>
- /// Writes a value without including type information.
+ /// Writes a nullable value without including type information.
/// </summary>
/// <param name="value">The value to write.</param>
/// <param name="stream">The stream to write to.</param>
- /// <param name="nullable">Whether or not the value can be null.</param>
/// <param name="cancellationToken">The token to cancel the operation. The default value is None.</param>
/// <returns>A task that represents the asynchronous write operation.</returns>
- public async Task WriteValueAsync(object value, Stream stream, bool nullable,
+ public async Task WriteNullableValueAsync(object? value, Stream stream,
CancellationToken cancellationToken = default)
{
if (value == null)
{
- if (!nullable)
- {
- throw new IOException("Unexpected null value when nullable is false");
- }
-
await WriteValueFlagNullAsync(stream, cancellationToken).ConfigureAwait(false);
return;
}
var valueType = value.GetType();
var serializer = _registry.GetSerializerFor(valueType);
- await serializer.WriteValueAsync(value, stream, this, nullable, cancellationToken).ConfigureAwait(false);
+ await serializer.WriteNullableValueAsync(value, stream, this, cancellationToken).ConfigureAwait(false);
+ }
+
+ /// <summary>
+ /// Writes a non-nullable value without including type information.
+ /// </summary>
+ /// <param name="value">The value to write.</param>
+ /// <param name="stream">The stream to write to.</param>
+ /// <param name="cancellationToken">The token to cancel the operation. The default value is None.</param>
+ /// <returns>A task that represents the asynchronous write operation.</returns>
+ public async Task WriteNonNullableValueAsync(object value, Stream stream,
+ CancellationToken cancellationToken = default)
+ {
+ if (value == null) throw new IOException($"{nameof(value)} cannot be null");
+ var valueType = value.GetType();
+ var serializer = _registry.GetSerializerFor(valueType);
+ await serializer.WriteNonNullableValueAsync(value, stream, this, cancellationToken).ConfigureAwait(false);
}
/// <summary>
@@ -89,7 +100,7 @@
/// <param name="stream">The stream to write to.</param>
/// <param name="cancellationToken">The token to cancel the operation. The default value is None.</param>
/// <returns>A task that represents the asynchronous write operation.</returns>
- public async Task WriteAsync(object value, Stream stream, CancellationToken cancellationToken = default)
+ public async Task WriteAsync(object? value, Stream stream, CancellationToken cancellationToken = default)
{
if (value == null)
{
@@ -103,7 +114,7 @@
if (serializer is CustomTypeSerializer customTypeSerializer)
{
await stream.WriteAsync(CustomTypeCodeBytes, cancellationToken).ConfigureAwait(false);
- await WriteValueAsync(customTypeSerializer.TypeName, stream, false, cancellationToken)
+ await WriteNonNullableValueAsync(customTypeSerializer.TypeName, stream, cancellationToken)
.ConfigureAwait(false);
await customTypeSerializer.WriteAsync(value, stream, this, cancellationToken).ConfigureAwait(false);
return;
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/ITypeSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/ITypeSerializer.cs
index 6bbe52a..40605dd 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/ITypeSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/ITypeSerializer.cs
@@ -49,15 +49,25 @@
CancellationToken cancellationToken = default);
/// <summary>
- /// Writes the value to a stream, composed by the value flag and the sequence of bytes.
+ /// Writes the nullable value to a stream, composed by the value flag and the sequence of bytes.
/// </summary>
/// <param name="value">The value to write.</param>
/// <param name="stream">The stream to write to.</param>
/// <param name="writer">A <see cref="GraphBinaryWriter"/> that can be used to write nested values.</param>
- /// <param name="nullable">Whether or not the value can be null.</param>
/// <param name="cancellationToken">The token to cancel the operation. The default value is None.</param>
/// <returns>A task that represents the asynchronous write operation.</returns>
- Task WriteValueAsync(object value, Stream stream, GraphBinaryWriter writer, bool nullable,
+ Task WriteNullableValueAsync(object value, Stream stream, GraphBinaryWriter writer,
+ CancellationToken cancellationToken = default);
+
+ /// <summary>
+ /// Writes the non-nullable value to a stream, composed by the value flag and the sequence of bytes.
+ /// </summary>
+ /// <param name="value">The value to write.</param>
+ /// <param name="stream">The stream to write to.</param>
+ /// <param name="writer">A <see cref="GraphBinaryWriter"/> that can be used to write nested values.</param>
+ /// <param name="cancellationToken">The token to cancel the operation. The default value is None.</param>
+ /// <returns>A task that represents the asynchronous write operation.</returns>
+ Task WriteNonNullableValueAsync(object value, Stream stream, GraphBinaryWriter writer,
CancellationToken cancellationToken = default);
/// <summary>
@@ -67,17 +77,26 @@
/// <param name="reader">A <see cref="GraphBinaryReader"/> that can be used to read nested values.</param>
/// <param name="cancellationToken">The token to cancel the operation. The default value is None.</param>
/// <returns>The read value.</returns>
- Task<object> ReadAsync(Stream stream, GraphBinaryReader reader, CancellationToken cancellationToken = default);
+ Task<object?> ReadAsync(Stream stream, GraphBinaryReader reader, CancellationToken cancellationToken = default);
/// <summary>
/// Reads the value from the stream (not the type information).
/// </summary>
/// <param name="stream">The GraphBinary data to parse.</param>
/// <param name="reader">A <see cref="GraphBinaryReader"/> that can be used to read nested values.</param>
- /// <param name="nullable">Whether or not the value can be null.</param>
/// <param name="cancellationToken">The token to cancel the operation. The default value is None.</param>
/// <returns>The read value.</returns>
- Task<object> ReadValueAsync(Stream stream, GraphBinaryReader reader, bool nullable,
+ Task<object?> ReadNullableValueAsync(Stream stream, GraphBinaryReader reader,
+ CancellationToken cancellationToken = default);
+
+ /// <summary>
+ /// Reads the value from the stream (not the type information).
+ /// </summary>
+ /// <param name="stream">The GraphBinary data to parse.</param>
+ /// <param name="reader">A <see cref="GraphBinaryReader"/> that can be used to read nested values.</param>
+ /// <param name="cancellationToken">The token to cancel the operation. The default value is None.</param>
+ /// <returns>The read value.</returns>
+ Task<object> ReadNonNullableValueAsync(Stream stream, GraphBinaryReader reader,
CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/RequestMessageSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/RequestMessageSerializer.cs
index e4bf380..8b489e1 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/RequestMessageSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/RequestMessageSerializer.cs
@@ -45,13 +45,13 @@
CancellationToken cancellationToken = default)
{
await stream.WriteByteAsync(GraphBinaryWriter.VersionByte, cancellationToken).ConfigureAwait(false);
- await writer.WriteValueAsync(requestMessage.RequestId, stream, false, cancellationToken)
+ await writer.WriteNonNullableValueAsync(requestMessage.RequestId, stream, cancellationToken)
.ConfigureAwait(false);
- await writer.WriteValueAsync(requestMessage.Operation, stream, false, cancellationToken)
+ await writer.WriteNonNullableValueAsync(requestMessage.Operation, stream, cancellationToken)
.ConfigureAwait(false);
- await writer.WriteValueAsync(requestMessage.Processor, stream, false, cancellationToken)
+ await writer.WriteNonNullableValueAsync(requestMessage.Processor, stream, cancellationToken)
.ConfigureAwait(false);
- await writer.WriteValueAsync(requestMessage.Arguments, stream, false, cancellationToken)
+ await writer.WriteNonNullableValueAsync(requestMessage.Arguments, stream, cancellationToken)
.ConfigureAwait(false);
}
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/ResponseMessageSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/ResponseMessageSerializer.cs
index 3a0fa6a..e31c7a2 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/ResponseMessageSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/ResponseMessageSerializer.cs
@@ -55,34 +55,23 @@
}
var requestId =
- (Guid?)await reader.ReadValueAsync<Guid>(stream, true, cancellationToken).ConfigureAwait(false);
- var code = (ResponseStatusCode)await reader.ReadValueAsync<int>(stream, false, cancellationToken)
+ (Guid?)await reader.ReadNullableValueAsync<Guid>(stream, cancellationToken).ConfigureAwait(false);
+ var code = (ResponseStatusCode)await reader.ReadNonNullableValueAsync<int>(stream, cancellationToken)
.ConfigureAwait(false);
- var message = (string)await reader.ReadValueAsync<string>(stream, true, cancellationToken)
+ var message = (string?)await reader.ReadNullableValueAsync<string>(stream, cancellationToken)
.ConfigureAwait(false);
var dictObj = await reader
- .ReadValueAsync<Dictionary<string, object>>(stream, false, cancellationToken).ConfigureAwait(false);
+ .ReadNonNullableValueAsync<Dictionary<string, object>>(stream, cancellationToken).ConfigureAwait(false);
var attributes = (Dictionary<string, object>)dictObj;
- var status = new ResponseStatus
- {
- Code = code,
- Message = message,
- Attributes = attributes
- };
- var result = new ResponseResult<List<object>>
- {
- Meta = (Dictionary<string, object>)await reader
- .ReadValueAsync<Dictionary<string, object>>(stream, false, cancellationToken).ConfigureAwait(false),
- Data = (List<object>)await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false)
- };
+ var status = new ResponseStatus(code, attributes, message);
- return new ResponseMessage<List<object>>
- {
- RequestId = requestId,
- Status = status,
- Result = result
- };
+ var meta = (Dictionary<string, object>)await reader
+ .ReadNonNullableValueAsync<Dictionary<string, object>>(stream, cancellationToken).ConfigureAwait(false);
+ var data = (List<object>?)await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false);
+ var result = new ResponseResult<List<object>>(data, meta);
+
+ return new ResponseMessage<List<object>>(requestId, status, result);
}
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/TypeSerializerRegistry.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/TypeSerializerRegistry.cs
index f2ee356..878152b 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/TypeSerializerRegistry.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/TypeSerializerRegistry.cs
@@ -23,6 +23,8 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using System.IO;
using System.Linq;
using System.Numerics;
using Gremlin.Net.Process.Traversal;
@@ -95,7 +97,7 @@
{DataType.Float, SingleTypeSerializers.FloatSerializer},
{DataType.List, new ListSerializer<object>()},
{DataType.Map, new MapSerializer<object, object>()},
- {DataType.Set, new SetSerializer<HashSet<object>, object>()},
+ {DataType.Set, new SetSerializer<HashSet<object?>, object>()},
{DataType.Uuid, new UuidSerializer()},
{DataType.Edge, new EdgeSerializer()},
{DataType.Path, new PathSerializer()},
@@ -169,8 +171,10 @@
if (IsDictionaryType(valueType, out var dictKeyType, out var dictValueType))
{
var serializerType = typeof(MapSerializer<,>).MakeGenericType(dictKeyType, dictValueType);
- var serializer = (ITypeSerializer) Activator.CreateInstance(serializerType);
- _serializerByType[valueType] = serializer;
+ var serializer = (ITypeSerializer?) Activator.CreateInstance(serializerType);
+ _serializerByType[valueType] = serializer ??
+ throw new IOException(
+ $"Cannot create a serializer for the dictionary type {valueType}.");
return serializer;
}
@@ -178,17 +182,21 @@
{
var memberType = valueType.GetGenericArguments()[0];
var serializerType = typeof(SetSerializer<,>).MakeGenericType(valueType, memberType);
- var serializer = (ITypeSerializer) Activator.CreateInstance(serializerType);
- _serializerByType[valueType] = serializer;
+ var serializer = (ITypeSerializer?) Activator.CreateInstance(serializerType);
+ _serializerByType[valueType] = serializer ??
+ throw new IOException(
+ $"Cannot create a serializer for the set type {valueType}.");
return serializer;
}
if (valueType.IsArray)
{
var memberType = valueType.GetElementType();
- var serializerType = typeof(ArraySerializer<>).MakeGenericType(memberType);
- var serializer = (ITypeSerializer) Activator.CreateInstance(serializerType);
- _serializerByType[valueType] = serializer;
+ var serializerType = typeof(ArraySerializer<>).MakeGenericType(memberType!);
+ var serializer = (ITypeSerializer?) Activator.CreateInstance(serializerType);
+ _serializerByType[valueType] = serializer ??
+ throw new IOException(
+ $"Cannot create a serializer for the array type {valueType}.");
return serializer;
}
@@ -196,8 +204,10 @@
{
var memberType = valueType.GetGenericArguments()[0];
var serializerType = typeof(ListSerializer<>).MakeGenericType(memberType);
- var serializer = (ITypeSerializer) Activator.CreateInstance(serializerType);
- _serializerByType[valueType] = serializer;
+ var serializer = (ITypeSerializer?) Activator.CreateInstance(serializerType);
+ _serializerByType[valueType] = serializer ??
+ throw new IOException(
+ $"Cannot create a serializer for the list type {valueType}.");
return serializer;
}
@@ -214,7 +224,8 @@
throw new InvalidOperationException($"No serializer found for type ${valueType}.");
}
- private static bool IsDictionaryType(Type type, out Type keyType, out Type valueType)
+ private static bool IsDictionaryType(Type type, [NotNullWhen(returnValue: true)] out Type? keyType,
+ [NotNullWhen(returnValue: true)] out Type? valueType)
{
var maybeInterfaceType = type
.GetInterfaces()
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/ArraySerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/ArraySerializer.cs
index 4bd85f8..01ef44b 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/ArraySerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/ArraySerializer.cs
@@ -45,7 +45,7 @@
protected override async Task WriteValueAsync(TMember[] value, Stream stream, GraphBinaryWriter writer,
CancellationToken cancellationToken = default)
{
- await writer.WriteValueAsync(value.Length, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(value.Length, stream, cancellationToken).ConfigureAwait(false);
foreach (var item in value)
{
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/BigDecimalSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/BigDecimalSerializer.cs
index 8a3cdc6..f7fd205 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/BigDecimalSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/BigDecimalSerializer.cs
@@ -46,8 +46,8 @@
CancellationToken cancellationToken = default)
{
var (unscaledValue, scale) = GetUnscaledValueAndScale(value);
- await writer.WriteValueAsync(scale, stream, false, cancellationToken).ConfigureAwait(false);
- await writer.WriteValueAsync(unscaledValue, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(scale, stream, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(unscaledValue, stream, cancellationToken).ConfigureAwait(false);
}
private static (BigInteger, int) GetUnscaledValueAndScale(decimal input)
@@ -79,8 +79,9 @@
protected override async Task<decimal> ReadValueAsync(Stream stream, GraphBinaryReader reader,
CancellationToken cancellationToken = default)
{
- var scale = (int)await reader.ReadValueAsync<int>(stream, false, cancellationToken).ConfigureAwait(false);
- var unscaled = (BigInteger)await reader.ReadValueAsync<BigInteger>(stream, false, cancellationToken)
+ var scale = (int)await reader.ReadNonNullableValueAsync<int>(stream, cancellationToken)
+ .ConfigureAwait(false);
+ var unscaled = (BigInteger)await reader.ReadNonNullableValueAsync<BigInteger>(stream, cancellationToken)
.ConfigureAwait(false);
return ConvertScaleAndUnscaledValue(scale, unscaled);
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/BigIntegerSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/BigIntegerSerializer.cs
index efb67c5..08a2953 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/BigIntegerSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/BigIntegerSerializer.cs
@@ -46,7 +46,7 @@
CancellationToken cancellationToken = default)
{
var bytes = value.ToByteArray().Reverse().ToArray();
- await writer.WriteValueAsync(bytes.Length, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(bytes.Length, stream, cancellationToken).ConfigureAwait(false);
await stream.WriteAsync(bytes, cancellationToken).ConfigureAwait(false);
}
@@ -54,7 +54,7 @@
protected override async Task<BigInteger> ReadValueAsync(Stream stream, GraphBinaryReader reader,
CancellationToken cancellationToken = default)
{
- var length = (int)await reader.ReadValueAsync<int>(stream, false, cancellationToken).ConfigureAwait(false);
+ var length = (int)await reader.ReadNonNullableValueAsync<int>(stream, cancellationToken).ConfigureAwait(false);
var bytes = await stream.ReadAsync(length, cancellationToken).ConfigureAwait(false);
return new BigInteger(bytes.Reverse().ToArray());
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/BindingSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/BindingSerializer.cs
index d7ed283..87b884e 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/BindingSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/BindingSerializer.cs
@@ -44,7 +44,7 @@
protected override async Task WriteValueAsync(Binding value, Stream stream, GraphBinaryWriter writer,
CancellationToken cancellationToken = default)
{
- await writer.WriteValueAsync(value.Key, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(value.Key, stream, cancellationToken).ConfigureAwait(false);
await writer.WriteAsync(value.Value, stream, cancellationToken).ConfigureAwait(false);
}
@@ -52,7 +52,7 @@
protected override async Task<Binding> ReadValueAsync(Stream stream, GraphBinaryReader reader,
CancellationToken cancellationToken = default)
{
- var key = (string)await reader.ReadValueAsync<string>(stream, false, cancellationToken)
+ var key = (string)await reader.ReadNonNullableValueAsync<string>(stream, cancellationToken)
.ConfigureAwait(false);
var value = await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false);
return new Binding(key, value);
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/BulkSetSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/BulkSetSerializer.cs
index d1471eb..6bf95cf 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/BulkSetSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/BulkSetSerializer.cs
@@ -56,13 +56,13 @@
protected override async Task<TList> ReadValueAsync(Stream stream, GraphBinaryReader reader,
CancellationToken cancellationToken = default)
{
- var length = (int)await reader.ReadValueAsync<int>(stream, false, cancellationToken).ConfigureAwait(false);
+ var length = (int)await reader.ReadNonNullableValueAsync<int>(stream, cancellationToken).ConfigureAwait(false);
var result = new TList();
for (var i = 0; i < length; i++)
{
var value = await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false);
- var bulk = (long)await reader.ReadValueAsync<long>(stream, false, cancellationToken)
+ var bulk = (long)await reader.ReadNonNullableValueAsync<long>(stream, cancellationToken)
.ConfigureAwait(false);
for (var j = 0; j < bulk; j++)
{
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/ByteBufferSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/ByteBufferSerializer.cs
index e75550f..ca658f1 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/ByteBufferSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/ByteBufferSerializer.cs
@@ -44,7 +44,7 @@
protected override async Task WriteValueAsync(byte[] value, Stream stream, GraphBinaryWriter writer,
CancellationToken cancellationToken = default)
{
- await writer.WriteValueAsync(value.Length, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(value.Length, stream, cancellationToken).ConfigureAwait(false);
await stream.WriteAsync(value, 0, value.Length, cancellationToken).ConfigureAwait(false);
}
@@ -52,7 +52,7 @@
protected override async Task<byte[]> ReadValueAsync(Stream stream, GraphBinaryReader reader,
CancellationToken cancellationToken = default)
{
- var length = (int)await reader.ReadValueAsync<int>(stream, false, cancellationToken).ConfigureAwait(false);
+ var length = (int)await reader.ReadNonNullableValueAsync<int>(stream, cancellationToken).ConfigureAwait(false);
var buffer = new byte[length];
await stream.ReadAsync(buffer, 0, length, cancellationToken).ConfigureAwait(false);
return buffer;
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/ByteCodeSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/ByteCodeSerializer.cs
index e41146c..3f043d1 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/ByteCodeSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/ByteCodeSerializer.cs
@@ -54,21 +54,21 @@
private static async Task WriteInstructionsAsync(IReadOnlyCollection<Instruction> instructions, Stream stream,
GraphBinaryWriter writer, CancellationToken cancellationToken)
{
- await writer.WriteValueAsync(instructions.Count, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(instructions.Count, stream, cancellationToken).ConfigureAwait(false);
foreach (var instruction in instructions)
{
- await writer.WriteValueAsync(instruction.OperatorName, stream, false, cancellationToken)
+ await writer.WriteNonNullableValueAsync(instruction.OperatorName, stream, cancellationToken)
.ConfigureAwait(false);
await WriteArgumentsAsync(instruction.Arguments, stream, writer, cancellationToken)
.ConfigureAwait(false);
}
}
- private static async Task WriteArgumentsAsync(object[] arguments, Stream stream, GraphBinaryWriter writer,
+ private static async Task WriteArgumentsAsync(object?[] arguments, Stream stream, GraphBinaryWriter writer,
CancellationToken cancellationToken)
{
- await writer.WriteValueAsync(arguments.Length, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(arguments.Length, stream, cancellationToken).ConfigureAwait(false);
foreach (var value in arguments)
{
@@ -82,11 +82,11 @@
{
var result = new Bytecode();
- var stepsLength = (int) await reader.ReadValueAsync<int>(stream, false, cancellationToken).ConfigureAwait(false);
+ var stepsLength = (int) await reader.ReadNonNullableValueAsync<int>(stream, cancellationToken).ConfigureAwait(false);
for (var i = 0; i < stepsLength; i++)
{
result.AddStep(
- (string)await reader.ReadValueAsync<string>(stream, false, cancellationToken).ConfigureAwait(false),
+ (string)await reader.ReadNonNullableValueAsync<string>(stream, cancellationToken).ConfigureAwait(false),
await ReadArgumentsAsync(stream, reader, cancellationToken).ConfigureAwait(false));
}
@@ -94,19 +94,19 @@
for (var i = 0; i < sourcesLength; i++)
{
result.AddSource(
- (string)await reader.ReadValueAsync<string>(stream, false, cancellationToken).ConfigureAwait(false),
+ (string)await reader.ReadNonNullableValueAsync<string>(stream, cancellationToken).ConfigureAwait(false),
await ReadArgumentsAsync(stream, reader, cancellationToken).ConfigureAwait(false));
}
return result;
}
- private static async Task<object[]> ReadArgumentsAsync(Stream stream, GraphBinaryReader reader,
+ private static async Task<object?[]> ReadArgumentsAsync(Stream stream, GraphBinaryReader reader,
CancellationToken cancellationToken)
{
var valuesLength =
- (int)await reader.ReadValueAsync<int>(stream, false, cancellationToken).ConfigureAwait(false);
- var values = new object[valuesLength];
+ (int)await reader.ReadNonNullableValueAsync<int>(stream, cancellationToken).ConfigureAwait(false);
+ var values = new object?[valuesLength];
for (var i = 0; i < valuesLength; i++)
{
values[i] = await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false);
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/ClassSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/ClassSerializer.cs
index 55b932f..8dd1763 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/ClassSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/ClassSerializer.cs
@@ -45,7 +45,7 @@
protected override async Task WriteValueAsync(GremlinType value, Stream stream, GraphBinaryWriter writer,
CancellationToken cancellationToken = default)
{
- await writer.WriteValueAsync(value.Fqcn, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(value.Fqcn, stream, cancellationToken).ConfigureAwait(false);
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/CustomTypeSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/CustomTypeSerializer.cs
index 2721c05..8b558ed 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/CustomTypeSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/CustomTypeSerializer.cs
@@ -45,15 +45,23 @@
CancellationToken cancellationToken = default);
/// <inheritdoc />
- public abstract Task WriteValueAsync(object value, Stream stream, GraphBinaryWriter writer, bool nullable,
+ public abstract Task WriteNullableValueAsync(object value, Stream stream, GraphBinaryWriter writer,
CancellationToken cancellationToken = default);
/// <inheritdoc />
- public abstract Task<object> ReadAsync(Stream stream, GraphBinaryReader reader,
+ public abstract Task WriteNonNullableValueAsync(object value, Stream stream, GraphBinaryWriter writer,
CancellationToken cancellationToken = default);
/// <inheritdoc />
- public abstract Task<object> ReadValueAsync(Stream stream, GraphBinaryReader reader, bool nullable,
+ public abstract Task<object?> ReadAsync(Stream stream, GraphBinaryReader reader,
+ CancellationToken cancellationToken = default);
+
+ /// <inheritdoc />
+ public abstract Task<object?> ReadNullableValueAsync(Stream stream, GraphBinaryReader reader,
+ CancellationToken cancellationToken = default);
+
+ /// <inheritdoc />
+ public abstract Task<object> ReadNonNullableValueAsync(Stream stream, GraphBinaryReader reader,
CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/EdgeSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/EdgeSerializer.cs
index eade891..e91cc85 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/EdgeSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/EdgeSerializer.cs
@@ -44,12 +44,12 @@
CancellationToken cancellationToken = default)
{
await writer.WriteAsync(value.Id, stream, cancellationToken).ConfigureAwait(false);
- await writer.WriteValueAsync(value.Label, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(value.Label, stream, cancellationToken).ConfigureAwait(false);
await writer.WriteAsync(value.InV.Id, stream, cancellationToken).ConfigureAwait(false);
- await writer.WriteValueAsync(value.InV.Label, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(value.InV.Label, stream, cancellationToken).ConfigureAwait(false);
await writer.WriteAsync(value.OutV.Id, stream, cancellationToken).ConfigureAwait(false);
- await writer.WriteValueAsync(value.OutV.Label, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(value.OutV.Label, stream, cancellationToken).ConfigureAwait(false);
// Placeholder for the parent vertex
await writer.WriteAsync(null, stream, cancellationToken).ConfigureAwait(false);
@@ -63,13 +63,13 @@
CancellationToken cancellationToken = default)
{
var id = await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false);
- var label = (string)await reader.ReadValueAsync<string>(stream, false, cancellationToken)
+ var label = (string)await reader.ReadNonNullableValueAsync<string>(stream, cancellationToken)
.ConfigureAwait(false);
var inV = new Vertex(await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false),
- (string)await reader.ReadValueAsync<string>(stream, false, cancellationToken).ConfigureAwait(false));
+ (string)await reader.ReadNonNullableValueAsync<string>(stream, cancellationToken).ConfigureAwait(false));
var outV = new Vertex(await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false),
- (string)await reader.ReadValueAsync<string>(stream, false, cancellationToken).ConfigureAwait(false));
+ (string)await reader.ReadNonNullableValueAsync<string>(stream, cancellationToken).ConfigureAwait(false));
// discard possible parent vertex
await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false);
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/EnumSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/EnumSerializer.cs
index 1d94235..69e902d 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/EnumSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/EnumSerializer.cs
@@ -127,7 +127,10 @@
protected override async Task<TEnum> ReadValueAsync(Stream stream, GraphBinaryReader reader,
CancellationToken cancellationToken = default)
{
- var enumValue = (string) await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false);
+ // This should probably be `reader.ReadNonNullableValueAsync<string>(stream, cancellationToken)` instead,
+ // but it's the same in other GLVs and changing this would be a breaking change for the GraphBinary format.
+ var enumValue = (string?) await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false);
+ if (enumValue == null) throw new IOException($"Read null as a value for {DataType}");
return _readFunc.Invoke(enumValue);
}
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/LambdaSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/LambdaSerializer.cs
index 7be1583..f017aee 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/LambdaSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/LambdaSerializer.cs
@@ -44,23 +44,23 @@
protected override async Task WriteValueAsync(ILambda value, Stream stream, GraphBinaryWriter writer,
CancellationToken cancellationToken = default)
{
- await writer.WriteValueAsync(value.Language, stream, false, cancellationToken).ConfigureAwait(false);
- await writer.WriteValueAsync(value.LambdaExpression, stream, false, cancellationToken)
+ await writer.WriteNonNullableValueAsync(value.Language, stream, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(value.LambdaExpression, stream, cancellationToken)
.ConfigureAwait(false);
- await writer.WriteValueAsync(value.Arguments, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(value.Arguments, stream, cancellationToken).ConfigureAwait(false);
}
/// <inheritdoc />
protected override async Task<ILambda> ReadValueAsync(Stream stream, GraphBinaryReader reader,
CancellationToken cancellationToken = default)
{
- var language = (string)await reader.ReadValueAsync<string>(stream, false, cancellationToken)
+ var language = (string)await reader.ReadNonNullableValueAsync<string>(stream, cancellationToken)
.ConfigureAwait(false);
- var expression = (string)await reader.ReadValueAsync<string>(stream, false, cancellationToken)
+ var expression = (string)await reader.ReadNonNullableValueAsync<string>(stream, cancellationToken)
.ConfigureAwait(false);
// discard the arguments
- await reader.ReadValueAsync<int>(stream, false, cancellationToken).ConfigureAwait(false);
+ await reader.ReadNonNullableValueAsync<int>(stream, cancellationToken).ConfigureAwait(false);
return new StringBasedLambda(expression, language);
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/ListSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/ListSerializer.cs
index 05f96e6..d586ecd 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/ListSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/ListSerializer.cs
@@ -32,7 +32,7 @@
/// A generic list serializer.
/// </summary>
/// <typeparam name="TMember">The type of elements in the list.</typeparam>
- public class ListSerializer<TMember> : SimpleTypeSerializer<IList<TMember>>
+ public class ListSerializer<TMember> : SimpleTypeSerializer<IList<TMember?>>
{
/// <summary>
/// Initializes a new instance of the <see cref="ListSerializer{TList}" /> class.
@@ -42,10 +42,10 @@
}
/// <inheritdoc />
- protected override async Task WriteValueAsync(IList<TMember> value, Stream stream, GraphBinaryWriter writer,
+ protected override async Task WriteValueAsync(IList<TMember?> value, Stream stream, GraphBinaryWriter writer,
CancellationToken cancellationToken = default)
{
- await writer.WriteValueAsync(value.Count, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(value.Count, stream, cancellationToken).ConfigureAwait(false);
foreach (var item in value)
{
@@ -54,14 +54,14 @@
}
/// <inheritdoc />
- protected override async Task<IList<TMember>> ReadValueAsync(Stream stream, GraphBinaryReader reader,
+ protected override async Task<IList<TMember?>> ReadValueAsync(Stream stream, GraphBinaryReader reader,
CancellationToken cancellationToken = default)
{
- var length = (int)await reader.ReadValueAsync<int>(stream, false, cancellationToken).ConfigureAwait(false);
- var result = new List<TMember>(length);
+ var length = (int)await reader.ReadNonNullableValueAsync<int>(stream, cancellationToken).ConfigureAwait(false);
+ var result = new List<TMember?>(length);
for (var i = 0; i < length; i++)
{
- result.Add((TMember) await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false));
+ result.Add((TMember?) await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false));
}
return result;
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/MapSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/MapSerializer.cs
index d22526f..868155f 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/MapSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/MapSerializer.cs
@@ -33,7 +33,7 @@
/// </summary>
/// <typeparam name="TKey">The type of keys in the dictionary.</typeparam>
/// <typeparam name="TValue">The type of values in the dictionary.</typeparam>
- public class MapSerializer<TKey, TValue> : SimpleTypeSerializer<IDictionary<TKey, TValue>>
+ public class MapSerializer<TKey, TValue> : SimpleTypeSerializer<IDictionary<TKey, TValue?>> where TKey : notnull
{
/// <summary>
/// Initializes a new instance of the <see cref="MapSerializer{TKey, TValue}" /> class.
@@ -43,10 +43,10 @@
}
/// <inheritdoc />
- protected override async Task WriteValueAsync(IDictionary<TKey, TValue> value, Stream stream,
+ protected override async Task WriteValueAsync(IDictionary<TKey, TValue?> value, Stream stream,
GraphBinaryWriter writer, CancellationToken cancellationToken = default)
{
- await writer.WriteValueAsync(value.Count, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(value.Count, stream, cancellationToken).ConfigureAwait(false);
foreach (var key in value.Keys)
{
@@ -56,16 +56,17 @@
}
/// <inheritdoc />
- protected override async Task<IDictionary<TKey, TValue>> ReadValueAsync(Stream stream, GraphBinaryReader reader,
+ protected override async Task<IDictionary<TKey, TValue?>> ReadValueAsync(Stream stream, GraphBinaryReader reader,
CancellationToken cancellationToken = default)
{
var length = await stream.ReadIntAsync(cancellationToken).ConfigureAwait(false);
- var result = new Dictionary<TKey, TValue>(length);
+ var result = new Dictionary<TKey, TValue?>(length);
for (var i = 0; i < length; i++)
{
- var key = (TKey) await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false);
- var value = (TValue) await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false);
+ var key = (TKey?) await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false);
+ if (key == null) throw new IOException("Read null as the key for a dictionary.");
+ var value = (TValue?) await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false);
result.Add(key, value);
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/PSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/PSerializer.cs
index 4579c6a..d3cbddc 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/PSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/PSerializer.cs
@@ -23,6 +23,7 @@
using System.Collections;
using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
@@ -50,8 +51,8 @@
var argsLength = value.Other == null ? args.Count : args.Count + 1;
- await writer.WriteValueAsync(value.OperatorName, stream, false, cancellationToken).ConfigureAwait(false);
- await writer.WriteValueAsync(argsLength, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(value.OperatorName, stream, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(argsLength, stream, cancellationToken).ConfigureAwait(false);
foreach (var arg in args)
{
@@ -68,12 +69,12 @@
protected override async Task<P> ReadValueAsync(Stream stream, GraphBinaryReader reader,
CancellationToken cancellationToken = default)
{
- var operatorName = (string)await reader.ReadValueAsync<string>(stream, false, cancellationToken)
+ var operatorName = (string)await reader.ReadNonNullableValueAsync<string>(stream, cancellationToken)
.ConfigureAwait(false);
var argsLength =
- (int)await reader.ReadValueAsync<int>(stream, false, cancellationToken).ConfigureAwait(false);
+ (int)await reader.ReadNonNullableValueAsync<int>(stream, cancellationToken).ConfigureAwait(false);
- var args = new object[argsLength];
+ var args = new object?[argsLength];
for (var i = 0; i < argsLength; i++)
{
args[i] = await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false);
@@ -82,23 +83,30 @@
if (operatorName == "and" || operatorName == "or")
{
- return new P(operatorName, (P) args[0], (P) args[1]);
+ return new P(operatorName, SafelyCastToP(args[0]), SafelyCastToP(args[1]));
}
if (operatorName == "not")
{
- return new P(operatorName, (P) args[0]);
+ return new P(operatorName, SafelyCastToP(args[0]));
}
if (argsLength == 1)
{
if (DataType == DataType.TextP)
{
- return new TextP(operatorName, (string) args[0]);
+ return new TextP(operatorName,
+ (string?) args[0] ?? throw new IOException("Read null but expected a string"));
}
return new P(operatorName, args[0]);
}
return new P(operatorName, args);
}
+
+ private static P SafelyCastToP([NotNull] object? pObject)
+ {
+ if (pObject == null) throw new IOException("Read null but expected P");
+ return (P) pObject;
+ }
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/PathSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/PathSerializer.cs
index a9aba98..fa02d5d 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/PathSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/PathSerializer.cs
@@ -53,7 +53,8 @@
CancellationToken cancellationToken = default)
{
var readLabelObjects =
- (List<object>)await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false);
+ (List<object>?)await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false);
+ if (readLabelObjects == null) throw new IOException("Read null, but expected a list of labels");
var labels = new List<ISet<string>>();
foreach (var labelObjectList in readLabelObjects)
{
@@ -65,8 +66,8 @@
labels.Add(labelSet);
}
- var objects = (List<object>) await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false);
-
+ var objects = (List<object?>?) await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false);
+ if (objects == null) throw new IOException("Read null, but expected a list of objects");
return new Path(labels, objects);
}
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/PropertySerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/PropertySerializer.cs
index 08fc6e9..556cd91 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/PropertySerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/PropertySerializer.cs
@@ -30,7 +30,8 @@
/// <summary>
/// A <see cref="Property"/> serializer.
/// </summary>
- public class PropertySerializer : SimpleTypeSerializer<Property>
+ public class
+ PropertySerializer : SimpleTypeSerializer<Property>
{
/// <summary>
/// Initializes a new instance of the <see cref="PropertySerializer" /> class.
@@ -43,7 +44,7 @@
protected override async Task WriteValueAsync(Property value, Stream stream, GraphBinaryWriter writer,
CancellationToken cancellationToken = default)
{
- await writer.WriteValueAsync(value.Key, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(value.Key, stream, cancellationToken).ConfigureAwait(false);
await writer.WriteAsync(value.Value, stream, cancellationToken).ConfigureAwait(false);
// placeholder for the parent element
@@ -55,7 +56,7 @@
CancellationToken cancellationToken = default)
{
var p = new Property(
- (string)await reader.ReadValueAsync<string>(stream, false, cancellationToken).ConfigureAwait(false),
+ (string)await reader.ReadNonNullableValueAsync<string>(stream, cancellationToken).ConfigureAwait(false),
await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false));
// discard parent element
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/SetSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/SetSerializer.cs
index 8983a4c..92a3ddd 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/SetSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/SetSerializer.cs
@@ -36,7 +36,7 @@
/// <typeparam name="TSet">The type of the set to serialize.</typeparam>
/// <typeparam name="TMember">The type of elements in the set.</typeparam>
public class SetSerializer<TSet, TMember> : SimpleTypeSerializer<TSet>
- where TSet : ISet<TMember>, new()
+ where TSet : ISet<TMember?>, new()
{
/// <summary>
/// Initializes a new instance of the <see cref="SetSerializer{TSet,TMember}" /> class.
@@ -52,7 +52,7 @@
var enumerable = (IEnumerable) value;
var list = enumerable.Cast<object>().ToList();
- await writer.WriteValueAsync(list.Count, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(list.Count, stream, cancellationToken).ConfigureAwait(false);
foreach (var item in list)
{
@@ -64,11 +64,11 @@
protected override async Task<TSet> ReadValueAsync(Stream stream, GraphBinaryReader reader,
CancellationToken cancellationToken = default)
{
- var length = (int)await reader.ReadValueAsync<int>(stream, false, cancellationToken).ConfigureAwait(false);
+ var length = (int)await reader.ReadNonNullableValueAsync<int>(stream, cancellationToken).ConfigureAwait(false);
var result = new TSet();
for (var i = 0; i < length; i++)
{
- result.Add((TMember) await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false));
+ result.Add((TMember?) await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false));
}
return result;
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/SimpleTypeSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/SimpleTypeSerializer.cs
index cf6aa7b..172fbe7 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/SimpleTypeSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/SimpleTypeSerializer.cs
@@ -46,34 +46,33 @@
public DataType DataType { get; }
/// <inheritdoc />
- public async Task WriteAsync(object value, Stream stream, GraphBinaryWriter writer,
+ public async Task WriteAsync(object? value, Stream stream, GraphBinaryWriter writer,
CancellationToken cancellationToken = default)
{
- await WriteValueAsync((T) value, stream, writer, true, cancellationToken).ConfigureAwait(false);
+ await WriteNullableValueAsync((T?) value, stream, writer, cancellationToken).ConfigureAwait(false);
}
/// <inheritdoc />
- public async Task WriteValueAsync(object value, Stream stream, GraphBinaryWriter writer, bool nullable,
+ public async Task WriteNullableValueAsync(object? value, Stream stream, GraphBinaryWriter writer,
CancellationToken cancellationToken = default)
{
if (value == null)
{
- if (!nullable)
- {
- throw new IOException("Unexpected null value when nullable is false");
- }
-
await writer.WriteValueFlagNullAsync(stream, cancellationToken).ConfigureAwait(false);
return;
}
- if (nullable)
- {
- await writer.WriteValueFlagNoneAsync(stream, cancellationToken).ConfigureAwait(false);
- }
+ await writer.WriteValueFlagNoneAsync(stream, cancellationToken).ConfigureAwait(false);
await WriteValueAsync((T) value, stream, writer, cancellationToken).ConfigureAwait(false);
}
+
+ /// <inheritdoc />
+ public async Task WriteNonNullableValueAsync(object value, Stream stream, GraphBinaryWriter writer,
+ CancellationToken cancellationToken = default)
+ {
+ await WriteValueAsync((T) value, stream, writer, cancellationToken).ConfigureAwait(false);
+ }
/// <summary>
/// Writes a non-nullable value into a stream.
@@ -87,27 +86,31 @@
CancellationToken cancellationToken = default);
/// <inheritdoc />
- public async Task<object> ReadAsync(Stream stream, GraphBinaryReader reader,
+ public async Task<object?> ReadAsync(Stream stream, GraphBinaryReader reader,
CancellationToken cancellationToken = default)
{
- return await ReadValueAsync(stream, reader, true, cancellationToken).ConfigureAwait(false);
+ return await ReadNullableValueAsync(stream, reader, cancellationToken).ConfigureAwait(false);
}
/// <inheritdoc />
- public async Task<object> ReadValueAsync(Stream stream, GraphBinaryReader reader, bool nullable,
+ public async Task<object?> ReadNullableValueAsync(Stream stream, GraphBinaryReader reader,
CancellationToken cancellationToken = default)
{
- if (nullable)
+ var valueFlag = await stream.ReadByteAsync(cancellationToken).ConfigureAwait(false);
+ if ((valueFlag & 1) == 1)
{
- var valueFlag = await stream.ReadByteAsync(cancellationToken).ConfigureAwait(false);
- if ((valueFlag & 1) == 1)
- {
- return null;
- }
+ return null;
}
return await ReadValueAsync(stream, reader, cancellationToken).ConfigureAwait(false);
}
+
+ /// <inheritdoc />
+ public async Task<object> ReadNonNullableValueAsync(Stream stream, GraphBinaryReader reader,
+ CancellationToken cancellationToken = default)
+ {
+ return (await ReadValueAsync(stream, reader, cancellationToken).ConfigureAwait(false))!;
+ }
/// <summary>
/// Reads a non-nullable value according to the type format.
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/StringSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/StringSerializer.cs
index ae2b9a1..034230a 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/StringSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/StringSerializer.cs
@@ -45,7 +45,7 @@
CancellationToken cancellationToken = default)
{
var bytes = Encoding.UTF8.GetBytes(value);
- await writer.WriteValueAsync(bytes.Length, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(bytes.Length, stream, cancellationToken).ConfigureAwait(false);
await stream.WriteAsync(bytes, cancellationToken).ConfigureAwait(false);
}
@@ -53,7 +53,7 @@
protected override async Task<string> ReadValueAsync(Stream stream, GraphBinaryReader reader,
CancellationToken cancellationToken = default)
{
- var length = (int)await reader.ReadValueAsync<int>(stream, false, cancellationToken).ConfigureAwait(false);
+ var length = (int)await reader.ReadNonNullableValueAsync<int>(stream, cancellationToken).ConfigureAwait(false);
var bytes = new byte[length];
await stream.ReadAsync(bytes, 0, length, cancellationToken).ConfigureAwait(false);
return Encoding.UTF8.GetString(bytes);
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/TraversalSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/TraversalSerializer.cs
index 0b6ba0a..1e00047 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/TraversalSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/TraversalSerializer.cs
@@ -45,7 +45,7 @@
protected override async Task WriteValueAsync(ITraversal value, Stream stream, GraphBinaryWriter writer,
CancellationToken cancellationToken = default)
{
- await writer.WriteValueAsync(value.Bytecode, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(value.Bytecode, stream, cancellationToken).ConfigureAwait(false);
}
/// <summary>
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/TraversalStrategySerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/TraversalStrategySerializer.cs
index 6d7f537..24077fa 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/TraversalStrategySerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/TraversalStrategySerializer.cs
@@ -45,9 +45,9 @@
protected override async Task WriteValueAsync(AbstractTraversalStrategy value, Stream stream,
GraphBinaryWriter writer, CancellationToken cancellationToken = default)
{
- await writer.WriteValueAsync(GremlinType.FromFqcn(value.Fqcn), stream, false, cancellationToken)
+ await writer.WriteNonNullableValueAsync(GremlinType.FromFqcn(value.Fqcn), stream, cancellationToken)
.ConfigureAwait(false);
- await writer.WriteValueAsync(value.Configuration, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(value.Configuration, stream, cancellationToken).ConfigureAwait(false);
}
/// <summary>
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/TraverserSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/TraverserSerializer.cs
index 12ba016..9be8a0c 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/TraverserSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/TraverserSerializer.cs
@@ -44,7 +44,7 @@
protected override async Task WriteValueAsync(Traverser value, Stream stream, GraphBinaryWriter writer,
CancellationToken cancellationToken = default)
{
- await writer.WriteValueAsync(value.Bulk, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(value.Bulk, stream, cancellationToken).ConfigureAwait(false);
await writer.WriteAsync(value.Object, stream, cancellationToken).ConfigureAwait(false);
}
@@ -52,7 +52,7 @@
protected override async Task<Traverser> ReadValueAsync(Stream stream, GraphBinaryReader reader,
CancellationToken cancellationToken = default)
{
- var bulk = (long)await reader.ReadValueAsync<long>(stream, false, cancellationToken).ConfigureAwait(false);
+ var bulk = (long)await reader.ReadNonNullableValueAsync<long>(stream, cancellationToken).ConfigureAwait(false);
var v = await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false);
return new Traverser(v, bulk);
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/TypeSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/TypeSerializer.cs
index c02ba0e..51793da 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/TypeSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/TypeSerializer.cs
@@ -48,8 +48,10 @@
{
if (typeof(AbstractTraversalStrategy).IsAssignableFrom(value))
{
- var strategyInstance = (AbstractTraversalStrategy) Activator.CreateInstance(value);
- await writer.WriteValueAsync(strategyInstance.Fqcn, stream, false, cancellationToken)
+ var strategyInstance = (AbstractTraversalStrategy?)Activator.CreateInstance(value) ??
+ throw new IOException(
+ $"Cannot write the strategy {value} because an instance of that strategy could not be created");
+ await writer.WriteNonNullableValueAsync(strategyInstance.Fqcn, stream, cancellationToken)
.ConfigureAwait(false);
}
else
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/VertexPropertySerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/VertexPropertySerializer.cs
index bc146dc..f986779 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/VertexPropertySerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/VertexPropertySerializer.cs
@@ -44,7 +44,7 @@
CancellationToken cancellationToken = default)
{
await writer.WriteAsync(value.Id, stream, cancellationToken).ConfigureAwait(false);
- await writer.WriteValueAsync(value.Label, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(value.Label, stream, cancellationToken).ConfigureAwait(false);
await writer.WriteAsync(value.Value, stream, cancellationToken).ConfigureAwait(false);
// placeholder for the parent vertex
@@ -60,7 +60,7 @@
CancellationToken cancellationToken = default)
{
var vp = new VertexProperty(await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false),
- (string)await reader.ReadValueAsync<string>(stream, false, cancellationToken).ConfigureAwait(false),
+ (string)await reader.ReadNonNullableValueAsync<string>(stream, cancellationToken).ConfigureAwait(false),
await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false));
// discard the parent vertex
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/VertexSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/VertexSerializer.cs
index c656431..f339407 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/VertexSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphBinary/Types/VertexSerializer.cs
@@ -44,7 +44,7 @@
CancellationToken cancellationToken = default)
{
await writer.WriteAsync(value.Id, stream, cancellationToken).ConfigureAwait(false);
- await writer.WriteValueAsync(value.Label, stream, false, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(value.Label, stream, cancellationToken).ConfigureAwait(false);
await writer.WriteAsync(null, stream, cancellationToken).ConfigureAwait(false);
}
@@ -54,7 +54,7 @@
{
var v = new Vertex(await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false),
- (string)await reader.ReadValueAsync<string>(stream, false, cancellationToken).ConfigureAwait(false));
+ (string)await reader.ReadNonNullableValueAsync<string>(stream, cancellationToken).ConfigureAwait(false));
// discard properties
await reader.ReadAsync(stream, cancellationToken).ConfigureAwait(false);
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/BigIntegerDeserializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/BigIntegerDeserializer.cs
index a3f1ff6..36ea1fd 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/BigIntegerDeserializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/BigIntegerDeserializer.cs
@@ -21,6 +21,7 @@
#endregion
+using System.IO;
using System.Numerics;
using System.Text.Json;
@@ -31,6 +32,7 @@
public dynamic Objectify(JsonElement graphson, GraphSONReader reader)
{
var bigInteger = graphson.ValueKind == JsonValueKind.String ? graphson.GetString() : graphson.GetRawText();
+ if (bigInteger == null) throw new IOException("Read null, but expected a BigInteger string representation");
return BigInteger.Parse(bigInteger);
}
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/BulkSetSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/BulkSetSerializer.cs
index 539224a..8f876b6 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/BulkSetSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/BulkSetSerializer.cs
@@ -42,7 +42,7 @@
// previous versions.
return Enumerable.Range(0, graphsonObject.GetArrayLength() / 2).SelectMany<int, object>(i =>
Enumerable.Repeat<object>(reader.ToObject(graphsonObject[i * 2]),
- (int) reader.ToObject(graphsonObject[i * 2 + 1]))).ToList();
+ (int) reader.ToObject(graphsonObject[i * 2 + 1])!)).ToList();
}
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/ByteBufferDeserializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/ByteBufferDeserializer.cs
index 0feb3a2..adb4efa 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/ByteBufferDeserializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/ByteBufferDeserializer.cs
@@ -21,6 +21,7 @@
#endregion
using System;
+using System.IO;
using System.Text.Json;
namespace Gremlin.Net.Structure.IO.GraphSON
@@ -30,7 +31,8 @@
public dynamic Objectify(JsonElement graphsonObject, GraphSONReader reader)
{
var base64String = graphsonObject.GetString();
- return Convert.FromBase64String(base64String);
+ return Convert.FromBase64String(base64String ??
+ throw new IOException("Read null but expected a base64 byte string"));
}
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/CharConverter.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/CharConverter.cs
index 0c3e539..b86cf15 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/CharConverter.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/CharConverter.cs
@@ -20,6 +20,7 @@
*/
#endregion
+using System.IO;
using System.Text.Json;
namespace Gremlin.Net.Structure.IO.GraphSON
@@ -31,7 +32,7 @@
protected override bool StringifyValue => true;
protected override dynamic FromJsonElement(JsonElement graphson)
{
- var deserializedByte = graphson.GetString();
+ var deserializedByte = graphson.GetString() ?? throw new IOException("Read null but expected a string");
return deserializedByte[0];
}
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/ClassSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/ClassSerializer.cs
index 39d1abe..8bd7353 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/ClassSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/ClassSerializer.cs
@@ -23,6 +23,7 @@
using System;
using System.Collections.Generic;
+using System.IO;
namespace Gremlin.Net.Structure.IO.GraphSON
{
@@ -31,7 +32,8 @@
public Dictionary<string, dynamic> Dictify(dynamic objectData, GraphSONWriter writer)
{
var type = (Type) objectData;
- return writer.ToDict(Activator.CreateInstance(type));
+ return writer.ToDict(Activator.CreateInstance(type) ??
+ throw new IOException($"Cannot write {objectData}. maybe it is not a supported type"));
}
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/DecimalConverter.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/DecimalConverter.cs
index f195522..b4167a6 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/DecimalConverter.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/DecimalConverter.cs
@@ -22,6 +22,7 @@
#endregion
using System.Globalization;
+using System.IO;
using System.Text.Json;
namespace Gremlin.Net.Structure.IO.GraphSON
@@ -35,7 +36,9 @@
{
if (graphson.ValueKind == JsonValueKind.String)
{
- return decimal.Parse(graphson.GetString(), CultureInfo.InvariantCulture);
+ return decimal.Parse(
+ graphson.GetString() ?? throw new IOException("Read null but expected a decimal string"),
+ CultureInfo.InvariantCulture);
}
return graphson.GetDecimal();
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/DirectionDeserializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/DirectionDeserializer.cs
index 34d4f61..6835169 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/DirectionDeserializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/DirectionDeserializer.cs
@@ -21,6 +21,7 @@
#endregion
+using System.IO;
using System.Text.Json;
using Gremlin.Net.Process.Traversal;
@@ -30,7 +31,9 @@
{
public dynamic Objectify(JsonElement graphsonObject, GraphSONReader reader)
{
- return Direction.GetByValue(graphsonObject.GetString());
+ return Direction.GetByValue(graphsonObject.GetString() ??
+ throw new IOException(
+ $"Read null but expected a {nameof(Direction)} string representation"));
}
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/DurationDeserializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/DurationDeserializer.cs
index 2c1d17f..e23c7a5 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/DurationDeserializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/DurationDeserializer.cs
@@ -21,6 +21,7 @@
#endregion
+using System.IO;
using System.Text.Json;
using System.Xml;
@@ -31,7 +32,9 @@
public dynamic Objectify(JsonElement graphsonObject, GraphSONReader reader)
{
var duration = graphsonObject.GetString();
- return XmlConvert.ToTimeSpan(duration);
+ return XmlConvert.ToTimeSpan(duration ??
+ throw new IOException(
+ "Read null but expected a Duration string representation"));
}
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSON2MessageSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSON2MessageSerializer.cs
index c0c36b1..7f9d7bd 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSON2MessageSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSON2MessageSerializer.cs
@@ -35,7 +35,7 @@
/// </summary>
/// <param name="graphSONReader">The <see cref="GraphSON2Reader"/> used to deserialize from GraphSON.</param>
/// <param name="graphSONWriter">The <see cref="GraphSON2Writer"/> used to serialize to GraphSON.</param>
- public GraphSON2MessageSerializer(GraphSON2Reader graphSONReader = null, GraphSON2Writer graphSONWriter = null)
+ public GraphSON2MessageSerializer(GraphSON2Reader? graphSONReader = null, GraphSON2Writer? graphSONWriter = null)
: base(MimeType, graphSONReader ?? new GraphSON2Reader(), graphSONWriter ?? new GraphSON2Writer())
{
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSON3MessageSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSON3MessageSerializer.cs
index abb6a75..bc434c7 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSON3MessageSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSON3MessageSerializer.cs
@@ -35,7 +35,7 @@
/// </summary>
/// <param name="graphSONReader">The <see cref="GraphSON3Reader"/> used to deserialize from GraphSON.</param>
/// <param name="graphSONWriter">The <see cref="GraphSON3Writer"/> used to serialize to GraphSON.</param>
- public GraphSON3MessageSerializer(GraphSON3Reader graphSONReader = null, GraphSON3Writer graphSONWriter = null)
+ public GraphSON3MessageSerializer(GraphSON3Reader? graphSONReader = null, GraphSON3Writer? graphSONWriter = null)
: base(MimeType, graphSONReader ?? new GraphSON3Reader(), graphSONWriter ?? new GraphSON3Writer())
{
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONMessageSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONMessageSerializer.cs
index 4d4ffa1..c9f2b88 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONMessageSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONMessageSerializer.cs
@@ -23,6 +23,7 @@
using System;
using System.Collections.Generic;
+using System.IO;
using System.Text;
using System.Text.Json;
using System.Threading;
@@ -72,17 +73,17 @@
}
/// <inheritdoc />
- public virtual Task<ResponseMessage<List<object>>> DeserializeMessageAsync(byte[] message,
+ public virtual Task<ResponseMessage<List<object>>?> DeserializeMessageAsync(byte[] message,
CancellationToken cancellationToken = default)
{
if (message == null) throw new ArgumentNullException(nameof(message));
if (cancellationToken.CanBeCanceled) cancellationToken.ThrowIfCancellationRequested();
- if (message.Length == 0) return Task.FromResult<ResponseMessage<List<object>>>(null);
+ if (message.Length == 0) return Task.FromResult<ResponseMessage<List<object>>?>(null);
var reader = new Utf8JsonReader(message);
var responseMessage =
JsonSerializer.Deserialize<ResponseMessage<JsonElement>>(ref reader, JsonDeserializingOptions);
- if (responseMessage == null) return Task.FromResult<ResponseMessage<List<object>>>(null);;
+ if (responseMessage == null) return Task.FromResult<ResponseMessage<List<object>>?>(null);
var data = _graphSONReader.ToObject(responseMessage.Result.Data);
return Task.FromResult(CopyMessageWithNewData(responseMessage, data));
@@ -91,16 +92,9 @@
private static ResponseMessage<List<object>> CopyMessageWithNewData(ResponseMessage<JsonElement> origMsg,
dynamic data)
{
- return new ResponseMessage<List<object>>
- {
- RequestId = origMsg.RequestId,
- Status = origMsg.Status,
- Result = new ResponseResult<List<object>>
- {
- Data = data == null ? null : new List<object>(data),
- Meta = origMsg.Result.Meta
- }
- };
+ var result = new ResponseResult<List<object>>(data == null ? null : new List<object>(data),
+ origMsg.Result.Meta);
+ return new ResponseMessage<List<object>>(origMsg.RequestId, origMsg.Status, result);
}
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONReader.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONReader.cs
index 3208966..3e09ec3 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONReader.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONReader.cs
@@ -23,6 +23,7 @@
using System;
using System.Collections.Generic;
+using System.IO;
using System.Linq;
using System.Text.Json;
@@ -36,35 +37,34 @@
/// <summary>
/// Contains the <see cref="IGraphSONDeserializer" /> instances by their type identifier.
/// </summary>
- protected readonly Dictionary<string, IGraphSONDeserializer> Deserializers = new Dictionary
- <string, IGraphSONDeserializer>
- {
- {"g:Traverser", new TraverserReader()},
- {"g:Int32", new Int32Converter()},
- {"g:Int64", new Int64Converter()},
- {"g:Float", new FloatConverter()},
- {"g:Double", new DoubleConverter()},
- {"g:Direction", new DirectionDeserializer()},
- {"g:Merge", new MergeDeserializer()},
- {"g:UUID", new UuidDeserializer()},
- {"g:Date", new DateDeserializer()},
- {"g:Timestamp", new DateDeserializer()},
- {"g:Vertex", new VertexDeserializer()},
- {"g:Edge", new EdgeDeserializer()},
- {"g:Property", new PropertyDeserializer()},
- {"g:VertexProperty", new VertexPropertyDeserializer()},
- {"g:Path", new PathDeserializer()},
- {"g:T", new TDeserializer()},
+ protected readonly Dictionary<string, IGraphSONDeserializer> Deserializers = new()
+ {
+ { "g:Traverser", new TraverserReader() },
+ { "g:Int32", new Int32Converter() },
+ { "g:Int64", new Int64Converter() },
+ { "g:Float", new FloatConverter() },
+ { "g:Double", new DoubleConverter() },
+ { "g:Direction", new DirectionDeserializer() },
+ { "g:Merge", new MergeDeserializer() },
+ { "g:UUID", new UuidDeserializer() },
+ { "g:Date", new DateDeserializer() },
+ { "g:Timestamp", new DateDeserializer() },
+ { "g:Vertex", new VertexDeserializer() },
+ { "g:Edge", new EdgeDeserializer() },
+ { "g:Property", new PropertyDeserializer() },
+ { "g:VertexProperty", new VertexPropertyDeserializer() },
+ { "g:Path", new PathDeserializer() },
+ { "g:T", new TDeserializer() },
- //Extended
- {"gx:BigDecimal", new DecimalConverter()},
- {"gx:Duration", new DurationDeserializer()},
- {"gx:BigInteger", new BigIntegerDeserializer()},
- {"gx:Byte", new ByteConverter()},
- {"gx:ByteBuffer", new ByteBufferDeserializer()},
- {"gx:Char", new CharConverter()},
- {"gx:Int16", new Int16Converter() }
- };
+ //Extended
+ { "gx:BigDecimal", new DecimalConverter() },
+ { "gx:Duration", new DurationDeserializer() },
+ { "gx:BigInteger", new BigIntegerDeserializer() },
+ { "gx:Byte", new ByteConverter() },
+ { "gx:ByteBuffer", new ByteBufferDeserializer() },
+ { "gx:Char", new CharConverter() },
+ { "gx:Int16", new Int16Converter() }
+ };
/// <summary>
/// Initializes a new instance of the <see cref="GraphSONReader" /> class.
@@ -101,7 +101,7 @@
/// </summary>
/// <param name="graphSon">The GraphSON to deserialize.</param>
/// <returns>The deserialized object.</returns>
- public virtual dynamic ToObject(JsonElement graphSon)
+ public virtual dynamic? ToObject(JsonElement graphSon)
{
switch (graphSon.ValueKind)
{
@@ -124,7 +124,9 @@
if (graphSon.TryGetProperty(GraphSONTokens.TypeKey, out var graphSonTypeProperty))
{
- return ReadValueOfType(graphSon, graphSonTypeProperty.GetString());
+ return ReadValueOfType(graphSon,
+ graphSonTypeProperty.GetString() ??
+ throw new IOException("Read GraphSON type key is not a string"));
}
return ReadDictionary(graphSon);
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
index e453efc..5b1725f 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
@@ -24,6 +24,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Numerics;
using System.Text.Encodings.Web;
@@ -39,45 +40,44 @@
/// </summary>
public abstract class GraphSONWriter
{
- private static readonly JsonSerializerOptions _jsonOptions = new JsonSerializerOptions
- {Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping};
-
+ private static readonly JsonSerializerOptions JsonOptions = new()
+ { Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping };
+
/// <summary>
/// Contains the information of serializers by type.
/// </summary>
- protected readonly Dictionary<Type, IGraphSONSerializer> Serializers = new Dictionary
- <Type, IGraphSONSerializer>
- {
- {typeof(ITraversal), new TraversalSerializer()},
- {typeof(Bytecode), new BytecodeSerializer()},
- {typeof(Binding), new BindingSerializer()},
- {typeof(RequestMessage), new RequestMessageSerializer()},
- {typeof(int), new Int32Converter()},
- {typeof(long), new Int64Converter()},
- {typeof(float), new FloatConverter()},
- {typeof(double), new DoubleConverter()},
- {typeof(Guid), new UuidSerializer()},
- {typeof(DateTimeOffset), new DateSerializer()},
- {typeof(Type), new ClassSerializer()},
- {typeof(EnumWrapper), new EnumSerializer()},
- {typeof(P), new PSerializer()},
- {typeof(TextP), new TextPSerializer()},
- {typeof(Vertex), new VertexSerializer()},
- {typeof(Edge), new EdgeSerializer()},
- {typeof(Property), new PropertySerializer()},
- {typeof(VertexProperty), new VertexPropertySerializer()},
- {typeof(AbstractTraversalStrategy), new TraversalStrategySerializer()},
- {typeof(ILambda), new LambdaSerializer()},
+ protected readonly Dictionary<Type, IGraphSONSerializer> Serializers = new()
+ {
+ { typeof(ITraversal), new TraversalSerializer() },
+ { typeof(Bytecode), new BytecodeSerializer() },
+ { typeof(Binding), new BindingSerializer() },
+ { typeof(RequestMessage), new RequestMessageSerializer() },
+ { typeof(int), new Int32Converter() },
+ { typeof(long), new Int64Converter() },
+ { typeof(float), new FloatConverter() },
+ { typeof(double), new DoubleConverter() },
+ { typeof(Guid), new UuidSerializer() },
+ { typeof(DateTimeOffset), new DateSerializer() },
+ { typeof(Type), new ClassSerializer() },
+ { typeof(EnumWrapper), new EnumSerializer() },
+ { typeof(P), new PSerializer() },
+ { typeof(TextP), new TextPSerializer() },
+ { typeof(Vertex), new VertexSerializer() },
+ { typeof(Edge), new EdgeSerializer() },
+ { typeof(Property), new PropertySerializer() },
+ { typeof(VertexProperty), new VertexPropertySerializer() },
+ { typeof(AbstractTraversalStrategy), new TraversalStrategySerializer() },
+ { typeof(ILambda), new LambdaSerializer() },
- //Extended
- {typeof(decimal), new DecimalConverter()},
- {typeof(TimeSpan), new DurationSerializer()},
- {typeof(BigInteger), new BigIntegerSerializer()},
- {typeof(byte), new ByteConverter()},
- {typeof(byte[]), new ByteBufferSerializer()},
- {typeof(char), new CharConverter() },
- {typeof(short), new Int16Converter() }
- };
+ //Extended
+ { typeof(decimal), new DecimalConverter() },
+ { typeof(TimeSpan), new DurationSerializer() },
+ { typeof(BigInteger), new BigIntegerSerializer() },
+ { typeof(byte), new ByteConverter() },
+ { typeof(byte[]), new ByteBufferSerializer() },
+ { typeof(char), new CharConverter() },
+ { typeof(short), new Int16Converter() }
+ };
/// <summary>
/// Initializes a new instance of the <see cref="GraphSONWriter" /> class.
@@ -106,7 +106,7 @@
/// <returns>The serialized GraphSON.</returns>
public virtual string WriteObject(dynamic objectData)
{
- return JsonSerializer.Serialize(ToDict(objectData), _jsonOptions);
+ return JsonSerializer.Serialize(ToDict(objectData), JsonOptions);
}
/// <summary>
@@ -114,7 +114,8 @@
/// </summary>
/// <param name="objectData">The object to transform.</param>
/// <returns>A GraphSON representation of the object ready to be serialized.</returns>
- public dynamic ToDict(dynamic objectData)
+ [return: NotNullIfNotNull("objectData")]
+ public dynamic? ToDict(dynamic? objectData)
{
if (objectData != null)
{
@@ -132,7 +133,7 @@
return objectData;
}
- private IGraphSONSerializer TryGetSerializerFor(Type type)
+ private IGraphSONSerializer? TryGetSerializerFor(Type type)
{
if (Serializers.ContainsKey(type))
{
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/ListSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/ListSerializer.cs
index add8eb5..154010a 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/ListSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/ListSerializer.cs
@@ -21,6 +21,7 @@
#endregion
+using System;
using System.Collections.Generic;
using System.Text.Json;
@@ -28,7 +29,7 @@
{
internal class ListSerializer : IGraphSONDeserializer, IGraphSONSerializer
{
- private static readonly IReadOnlyList<object> EmptyList = new object[0];
+ private static readonly IReadOnlyList<object> EmptyList = Array.Empty<object>();
public dynamic Objectify(JsonElement graphsonObject, GraphSONReader reader)
{
@@ -36,7 +37,7 @@
{
return EmptyList;
}
- var result = new object[graphsonObject.GetArrayLength()];
+ var result = new object?[graphsonObject.GetArrayLength()];
for (var i = 0; i < result.Length; i++)
{
result[i] = reader.ToObject(graphsonObject[i]);
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/MapSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/MapSerializer.cs
index 99165a7..3ba7e3a 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/MapSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/MapSerializer.cs
@@ -36,7 +36,7 @@
{
return new Dictionary<object, object>(0);
}
- var result = new Dictionary<object, object>(graphsonObject.GetArrayLength() / 2);
+ var result = new Dictionary<object, object?>(graphsonObject.GetArrayLength() / 2);
for (var i = 0; i < graphsonObject.GetArrayLength(); i += 2)
{
result[reader.ToObject(graphsonObject[i])] = reader.ToObject(graphsonObject[i + 1]);
@@ -51,7 +51,7 @@
{
throw new InvalidOperationException("Object must implement IDictionary");
}
- var result = new object[map.Count * 2];
+ var result = new object?[map.Count * 2];
var index = 0;
foreach (var key in map.Keys)
{
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/MergeDeserializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/MergeDeserializer.cs
index 26b6869..3a34eb9 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/MergeDeserializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/MergeDeserializer.cs
@@ -21,6 +21,7 @@
#endregion
+using System.IO;
using System.Text.Json;
using Gremlin.Net.Process.Traversal;
@@ -30,7 +31,8 @@
{
public dynamic Objectify(JsonElement graphsonObject, GraphSONReader reader)
{
- return Merge.GetByValue(graphsonObject.GetString());
+ return Merge.GetByValue(graphsonObject.GetString() ??
+ throw new IOException("Read null but expected a Merge value"));
}
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/NumberConverter.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/NumberConverter.cs
index 4492685..b12c494 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/NumberConverter.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/NumberConverter.cs
@@ -27,7 +27,7 @@
namespace Gremlin.Net.Structure.IO.GraphSON
{
- internal abstract class NumberConverter<T> : IGraphSONDeserializer, IGraphSONSerializer
+ internal abstract class NumberConverter<T> : IGraphSONDeserializer, IGraphSONSerializer where T : notnull
{
protected abstract string GraphSONTypeName { get; }
protected virtual string Prefix => "g";
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/Path3Deserializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/Path3Deserializer.cs
index d05663b..6e35321 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/Path3Deserializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/Path3Deserializer.cs
@@ -22,6 +22,7 @@
#endregion
using System.Collections.Generic;
+using System.IO;
using System.Linq;
using System.Text.Json;
@@ -32,12 +33,14 @@
public dynamic Objectify(JsonElement graphsonObject, GraphSONReader reader)
{
// "labels" is a object[] where each item is ISet<object>
- var labelProperty = (object[])reader.ToObject(graphsonObject.GetProperty("labels"));
+ var labelProperty = (object[]?)reader.ToObject(graphsonObject.GetProperty("labels"));
+ if (labelProperty == null) throw new IOException($"Could not read the labels for the {nameof(Path)}");
var labels = labelProperty
.Select(x => new HashSet<string>(((ISet<object>)x).Cast<string>()))
.ToList<ISet<string>>();
// "objects" is an object[]
- object[] objects = reader.ToObject(graphsonObject.GetProperty("objects"));
+ object?[] objects = reader.ToObject(graphsonObject.GetProperty("objects")) ??
+ throw new IOException($"Could not read the objects for the {nameof(Path)}");
return new Path(labels, objects);
}
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/PathDeserializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/PathDeserializer.cs
index 3a37f66..baa9722 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/PathDeserializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/PathDeserializer.cs
@@ -22,6 +22,7 @@
#endregion
using System.Collections.Generic;
+using System.IO;
using System.Linq;
using System.Text.Json;
@@ -34,7 +35,8 @@
var labels =
graphsonObject.GetProperty("labels").EnumerateArray()
.Select(readObjLabels =>
- new HashSet<string>(readObjLabels.EnumerateArray().Select(l => l.GetString())))
+ new HashSet<string>(readObjLabels.EnumerateArray().Select(l =>
+ l.GetString() ?? throw new IOException("Read null but expected a Path label"))))
.ToList<ISet<string>>();
var objects = graphsonObject.GetProperty("objects").EnumerateArray().Select(o => reader.ToObject(o))
.ToList();
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/PropertySerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/PropertySerializer.cs
index 0a7e6f8..d668442 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/PropertySerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/PropertySerializer.cs
@@ -22,6 +22,7 @@
#endregion
using System.Collections.Generic;
+using System.IO;
namespace Gremlin.Net.Structure.IO.GraphSON
{
@@ -40,23 +41,25 @@
return GraphSONUtil.ToTypedValue(nameof(Property), valueDict);
}
- private dynamic CreateElementDict(Element element, GraphSONWriter writer)
+ private dynamic? CreateElementDict(Element? element, GraphSONWriter writer)
{
if (element == null)
return null;
var serializedElement = writer.ToDict(element);
+ if (serializedElement == null)
+ {
+ throw new IOException(
+ $"Could not write the {nameof(Property.Element)} of this {nameof(Property)}, {nameof(Property.Element)}: {element}");
+ }
Dictionary<string, dynamic> elementDict = serializedElement;
if (elementDict.ContainsKey(GraphSONTokens.ValueKey))
{
var elementValueSerialized = elementDict[GraphSONTokens.ValueKey];
Dictionary<string, dynamic> elementValueDict = elementValueSerialized;
- if (elementValueDict != null)
- {
- elementValueDict.Remove("outVLabel");
- elementValueDict.Remove("inVLabel");
- elementValueDict.Remove("properties");
- elementValueDict.Remove("value");
- }
+ elementValueDict.Remove("outVLabel");
+ elementValueDict.Remove("inVLabel");
+ elementValueDict.Remove("properties");
+ elementValueDict.Remove("value");
}
return serializedElement;
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/SetSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/SetSerializer.cs
index 590392e..fce7465 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/SetSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/SetSerializer.cs
@@ -36,7 +36,7 @@
return new HashSet<object>();
}
// ISet<object>
- return new HashSet<object>(graphsonObject.EnumerateArray().Select(reader.ToObject));
+ return new HashSet<object?>(graphsonObject.EnumerateArray().Select(reader.ToObject));
}
public Dictionary<string, dynamic> Dictify(dynamic objectData, GraphSONWriter writer)
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/TDeserializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/TDeserializer.cs
index efbc542..270d36a 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/TDeserializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/TDeserializer.cs
@@ -21,6 +21,7 @@
#endregion
+using System.IO;
using System.Text.Json;
using Gremlin.Net.Process.Traversal;
@@ -30,7 +31,8 @@
{
public dynamic Objectify(JsonElement graphsonObject, GraphSONReader reader)
{
- return T.GetByValue(graphsonObject.GetString());
+ return T.GetByValue(graphsonObject.GetString()??
+ throw new IOException($"Read null but expected a {nameof(T)} string representation"));
}
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/UuidDeserializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/UuidDeserializer.cs
index 58caac7..8e64236 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/UuidDeserializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/UuidDeserializer.cs
@@ -22,6 +22,7 @@
#endregion
using System;
+using System.IO;
using System.Text.Json;
namespace Gremlin.Net.Structure.IO.GraphSON
@@ -31,7 +32,7 @@
public dynamic Objectify(JsonElement graphsonObject, GraphSONReader reader)
{
var uuidString = graphsonObject.GetString();
-
+ if (uuidString == null) throw new IOException("Read null but expected a GUID string representation");
return Guid.Parse(uuidString);
}
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/VertexPropertySerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/VertexPropertySerializer.cs
index 12cc7ac..6000d35 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/VertexPropertySerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/VertexPropertySerializer.cs
@@ -34,9 +34,12 @@
{
{"id", writer.ToDict(vertexProperty.Id)},
{"label", vertexProperty.Label},
- {"value", writer.ToDict(vertexProperty.Value)},
- {"vertex", writer.ToDict(vertexProperty.Vertex.Id)}
+ {"value", writer.ToDict(vertexProperty.Value)}
};
+ if (vertexProperty.Vertex != null)
+ {
+ valueDict.Add("vertex", writer.ToDict(vertexProperty.Vertex.Id));
+ }
return GraphSONUtil.ToTypedValue(nameof(VertexProperty), valueDict);
}
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/Path.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/Path.cs
index d205a88..682aad3 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/Path.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/Path.cs
@@ -24,6 +24,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Gremlin.Net.Process.Traversal;
@@ -36,17 +37,17 @@
/// In abstraction, any Path implementation maintains two lists: a list of sets of labels and a list of objects.
/// The list of labels are the labels of the steps traversed. The list of objects are the objects traversed.
/// </remarks>
- public class Path : IReadOnlyList<object>, IEquatable<Path>
+ public class Path : IReadOnlyList<object?>, IEquatable<Path>
{
/// <summary>
/// Initializes a new instance of the <see cref="Path" /> class.
/// </summary>
/// <param name="labels">The labels associated with the path</param>
/// <param name="objects">The objects in the <see cref="Path" />.</param>
- public Path(IList<ISet<string>> labels, IList<object> objects)
+ public Path(IList<ISet<string>> labels, IList<object?> objects)
{
- Labels = labels;
- Objects = objects;
+ Labels = labels ?? throw new ArgumentNullException(nameof(labels));
+ Objects = objects ?? throw new ArgumentNullException(nameof(objects));
}
/// <summary>
@@ -57,7 +58,7 @@
/// <summary>
/// Gets an ordered list of the objects in the <see cref="Path" />.
/// </summary>
- public IList<object> Objects { get; }
+ public IList<object?> Objects { get; }
/// <summary>
/// Gets the object associated with the particular label of the path.
@@ -70,15 +71,15 @@
{
get
{
- var objFound = TryGetValue(label, out object obj);
+ var objFound = TryGetValue(label, out var obj);
if (!objFound)
throw new KeyNotFoundException($"The step with label {label} does not exist");
- return obj;
+ return obj!;
}
}
/// <inheritdoc />
- public bool Equals(Path other)
+ public bool Equals(Path? other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
@@ -90,7 +91,7 @@
/// </summary>
/// <param name="index">The index of the path</param>
/// <returns>The object associated with the index of the path</returns>
- public dynamic this[int index] => Objects[index];
+ public dynamic? this[int index] => Objects[index];
/// <summary>
/// Gets the number of steps in the path.
@@ -131,7 +132,7 @@
/// <param name="label">The label of the path.</param>
/// <param name="value">The object associated with the label of the path.</param>
/// <returns>True, if an object was found for the label.</returns>
- public bool TryGetValue(string label, out object value)
+ public bool TryGetValue(string label, [NotNullWhen(true)] out object? value)
{
value = null;
for (var i = 0; i < Labels.Count; i++)
@@ -139,43 +140,38 @@
if (!Labels[i].Contains(label)) continue;
if (value == null)
value = Objects[i];
- else if (value.GetType() == typeof(List<object>))
- ((List<object>) value).Add(Objects[i]);
+ else if (value.GetType() == typeof(List<object?>))
+ ((List<object?>) value).Add(Objects[i]);
else
- value = new List<object> {value, Objects[i]};
+ value = new List<object?> {value, Objects[i]};
}
return value != null;
}
- private bool ObjectsEqual(ICollection<object> otherObjects)
+ private bool ObjectsEqual(ICollection<object?> otherObjects)
{
- if (Objects == null)
- return otherObjects == null;
return Objects.SequenceEqual(otherObjects);
}
private bool LabelsEqual(ICollection<ISet<string>> otherLabels)
{
- if (Labels == null)
- return otherLabels == null;
if (Labels.Count != otherLabels.Count)
return false;
- using (var enumOther = otherLabels.GetEnumerator())
- using (var enumThis = Labels.GetEnumerator())
+ using var enumOther = otherLabels.GetEnumerator();
+ using var enumThis = Labels.GetEnumerator();
+ while (enumOther.MoveNext() && enumThis.MoveNext())
{
- while (enumOther.MoveNext() && enumThis.MoveNext())
+ if (!enumOther.Current.SequenceEqual(enumThis.Current))
{
- if (!enumOther.Current.SequenceEqual(enumThis.Current))
- {
- return false;
- }
+ return false;
}
}
+
return true;
}
/// <inheritdoc />
- public override bool Equals(object obj)
+ public override bool Equals(object? obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
@@ -189,13 +185,12 @@
unchecked
{
var hashCode = 19;
- if (Labels != null)
- hashCode = Labels.Where(objLabels => objLabels != null)
- .Aggregate(hashCode,
- (current1, objLabels) => objLabels.Aggregate(current1,
- (current, label) => current * 31 + label.GetHashCode()));
- if (Objects != null)
- hashCode = Objects.Aggregate(hashCode, (current, obj) => current * 31 + obj.GetHashCode());
+ hashCode = Labels
+ .Aggregate(hashCode,
+ (current1, objLabels) => objLabels.Aggregate(current1,
+ (current, label) => current * 31 + label.GetHashCode()));
+ hashCode = Objects.Aggregate(hashCode,
+ (current, obj) => current * 31 + (obj == null ? 0 : obj.GetHashCode()));
return hashCode;
}
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/Property.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/Property.cs
index b2adee7..291287d 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/Property.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/Property.cs
@@ -36,7 +36,7 @@
/// <param name="key">The key of the property.</param>
/// <param name="value">The value of the property.</param>
/// <param name="element">The (optional) element that the property is associated with.</param>
- public Property(string key, dynamic value, Element element = null)
+ public Property(string key, dynamic? value, Element? element = null)
{
Key = key;
Value = value;
@@ -51,15 +51,15 @@
/// <summary>
/// Gets the value of the property.
/// </summary>
- public dynamic Value { get; }
+ public dynamic? Value { get; }
/// <summary>
/// Gets the element that this property is associated with.
/// </summary>
- public Element Element { get; }
+ public Element? Element { get; }
/// <inheritdoc />
- public bool Equals(Property other)
+ public bool Equals(Property? other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
@@ -73,7 +73,7 @@
}
/// <inheritdoc />
- public override bool Equals(object obj)
+ public override bool Equals(object? obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/Vertex.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/Vertex.cs
index f667d26..b48fe15 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/Vertex.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/Vertex.cs
@@ -38,7 +38,7 @@
/// </summary>
/// <param name="id">The id of the vertex.</param>
/// <param name="label">The label of the vertex.</param>
- public Vertex(object id, string label = DefaultLabel)
+ public Vertex(object? id, string label = DefaultLabel)
: base(id, label)
{
}
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/VertexProperty.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/VertexProperty.cs
index a8dd943..a01aaa9 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/VertexProperty.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/VertexProperty.cs
@@ -35,7 +35,7 @@
/// <param name="label">The label of the vertex property.</param>
/// <param name="value">The id of the vertex property.</param>
/// <param name="vertex">The (optional) <see cref="Vertex" /> that owns this <see cref="VertexProperty" />.</param>
- public VertexProperty(object id, string label, dynamic value, Vertex vertex = null)
+ public VertexProperty(object? id, string label, dynamic? value, Vertex? vertex = null)
: base(id, label)
{
Value = value;
@@ -45,12 +45,12 @@
/// <summary>
/// The value of this <see cref="VertexProperty" />.
/// </summary>
- public dynamic Value { get; }
+ public dynamic? Value { get; }
/// <summary>
/// The <see cref="Vertex" /> that owns this <see cref="VertexProperty" />.
/// </summary>
- public Vertex Vertex { get; }
+ public Vertex? Vertex { get; }
/// <summary>
/// The key of this <see cref="VertexProperty" />.
diff --git a/gremlin-dotnet/src/pom.xml b/gremlin-dotnet/src/pom.xml
index fac6c1e..17ffc84 100644
--- a/gremlin-dotnet/src/pom.xml
+++ b/gremlin-dotnet/src/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>gremlin-dotnet</artifactId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-dotnet-source</artifactId>
<name>Apache TinkerPop :: Gremlin.Net - Source</name>
diff --git a/gremlin-dotnet/test/Gremlin.Net.Benchmarks/Gremlin.Net.Benchmarks.csproj b/gremlin-dotnet/test/Gremlin.Net.Benchmarks/Gremlin.Net.Benchmarks.csproj
index 6be47d5..79c3e1b 100644
--- a/gremlin-dotnet/test/Gremlin.Net.Benchmarks/Gremlin.Net.Benchmarks.csproj
+++ b/gremlin-dotnet/test/Gremlin.Net.Benchmarks/Gremlin.Net.Benchmarks.csproj
@@ -3,6 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
+ <Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/gremlin-dotnet/test/Gremlin.Net.Benchmarks/MessageSerializerBenchmarks.cs b/gremlin-dotnet/test/Gremlin.Net.Benchmarks/MessageSerializerBenchmarks.cs
index 500929a..45be90e 100644
--- a/gremlin-dotnet/test/Gremlin.Net.Benchmarks/MessageSerializerBenchmarks.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.Benchmarks/MessageSerializerBenchmarks.cs
@@ -86,22 +86,22 @@
.ConfigureAwait(false);
[Benchmark]
- public async Task<ResponseMessage<List<object>>> TestReadSmallResponseMessageBinary() =>
+ public async Task<ResponseMessage<List<object>>?> TestReadSmallResponseMessageBinary() =>
await BinaryMessageSerializer.DeserializeMessageAsync(TestMessages.SmallBinaryResponseMessageBytes)
.ConfigureAwait(false);
[Benchmark]
- public async Task<ResponseMessage<List<object>>> TestReadSmallResponseMessageGraphSON3() =>
+ public async Task<ResponseMessage<List<object>>?> TestReadSmallResponseMessageGraphSON3() =>
await GraphSON3MessageSerializer.DeserializeMessageAsync(TestMessages.SmallGraphSON3ResponseMessageBytes)
.ConfigureAwait(false);
[Benchmark]
- public async Task<ResponseMessage<List<object>>> TestReadBigResponseMessageBinary() =>
+ public async Task<ResponseMessage<List<object>>?> TestReadBigResponseMessageBinary() =>
await BinaryMessageSerializer.DeserializeMessageAsync(TestMessages.BigBinaryResponseMessageBytes)
.ConfigureAwait(false);
[Benchmark]
- public async Task<ResponseMessage<List<object>>> TestReadBigResponseMessageGraphSON3() =>
+ public async Task<ResponseMessage<List<object>>?> TestReadBigResponseMessageGraphSON3() =>
await GraphSON3MessageSerializer.DeserializeMessageAsync(TestMessages.BigGraphSON3ResponseMessageBytes)
.ConfigureAwait(false);
}
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Docs/Reference/IntroTests.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Docs/Reference/IntroTests.cs
index 1d45514..f360c75 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Docs/Reference/IntroTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Docs/Reference/IntroTests.cs
@@ -62,7 +62,7 @@
var peopleMarkoKnows = g.V().Has("person", "name", "marko").Out("knows").ToList();
// end::basicGremlinMarkoKnows[]
- Assert.Equal("person", marko.Label);
+ Assert.Equal("person", marko!.Label);
Assert.Equal(2, peopleMarkoKnows.Count);
}
}
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/ConnectionPoolTests.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/ConnectionPoolTests.cs
index c4f5f7c..d35c3e3 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/ConnectionPoolTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/ConnectionPoolTests.cs
@@ -34,7 +34,7 @@
public class ConnectionPoolTests
{
private readonly RequestMessageProvider _requestMessageProvider = new RequestMessageProvider();
- private static readonly string TestHost = ConfigProvider.Configuration["TestServerIpAddress"];
+ private static readonly string TestHost = ConfigProvider.Configuration["TestServerIpAddress"]!;
private static readonly int TestPort = Convert.ToInt32(ConfigProvider.Configuration["TestServerPort"]);
private async Task ExecuteMultipleLongRunningRequestsInParallel(IGremlinClient gremlinClient, int nrRequests,
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/DriverRemoteConnectionTests.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/DriverRemoteConnectionTests.cs
index 74730c4..f0461c1 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/DriverRemoteConnectionTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/DriverRemoteConnectionTests.cs
@@ -34,7 +34,7 @@
public class DriverRemoteConnectionTests
{
- private static readonly string TestHost = ConfigProvider.Configuration["TestServerIpAddress"];
+ private static readonly string TestHost = ConfigProvider.Configuration["TestServerIpAddress"]!;
private static readonly int TestPort = Convert.ToInt32(ConfigProvider.Configuration["TestServerPort"]);
[Fact]
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientAuthenticationTests.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientAuthenticationTests.cs
index e56e282..978e5e2 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientAuthenticationTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientAuthenticationTests.cs
@@ -35,14 +35,14 @@
{
public class GremlinClientAuthenticationTests
{
- private static readonly string TestHost = ConfigProvider.Configuration["TestServerIpAddress"];
+ private static readonly string TestHost = ConfigProvider.Configuration["TestServerIpAddress"]!;
private static readonly int TestPort = Convert.ToInt32(ConfigProvider.Configuration["TestSecureServerPort"]);
private readonly RequestMessageProvider _requestMessageProvider = new RequestMessageProvider();
public static bool IgnoreCertificateValidationLiveDangerouslyWheeeeeeee(
object sender,
- X509Certificate certificate,
- X509Chain chain,
+ X509Certificate? certificate,
+ X509Chain? chain,
SslPolicyErrors sslPolicyErrors)
{
return true;
@@ -51,7 +51,7 @@
[Fact]
public async Task ShouldThrowForMissingCredentials()
{
- ClientWebSocketOptions optionsSet = null;
+ ClientWebSocketOptions? optionsSet = null;
var webSocketConfiguration =
new Action<ClientWebSocketOptions>(options =>
{
@@ -75,7 +75,7 @@
[InlineData("stephen", "wrongPassword")]
public async Task ShouldThrowForWrongCredentials(string username, string password)
{
- ClientWebSocketOptions optionsSet = null;
+ ClientWebSocketOptions? optionsSet = null;
var webSocketConfiguration =
new Action<ClientWebSocketOptions>(options =>
{
@@ -98,7 +98,7 @@
public async Task ScriptShouldBeEvaluatedAndResultReturnedForCorrectCredentials(string requestMsg,
string expectedResponse)
{
- ClientWebSocketOptions optionsSet = null;
+ ClientWebSocketOptions? optionsSet = null;
var webSocketConfiguration =
new Action<ClientWebSocketOptions>(options =>
{
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientTests.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientTests.cs
index 454f837..b7223ec 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientTests.cs
@@ -38,8 +38,8 @@
{
public class GremlinClientTests
{
- private readonly RequestMessageProvider _requestMessageProvider = new RequestMessageProvider();
- private static readonly string TestHost = ConfigProvider.Configuration["TestServerIpAddress"];
+ private readonly RequestMessageProvider _requestMessageProvider = new();
+ private static readonly string TestHost = ConfigProvider.Configuration["TestServerIpAddress"]!;
private static readonly int TestPort = Convert.ToInt32(ConfigProvider.Configuration["TestServerPort"]);
[Theory]
@@ -67,7 +67,7 @@
var response = await gremlinClient.SubmitWithSingleResultAsync<string>(requestMsg);
- Assert.Equal(responseMsgSize, response.Length);
+ Assert.Equal(responseMsgSize, response!.Length);
}
}
@@ -246,7 +246,7 @@
public async Task ShouldConfigureWebSocketOptionsAsSpecified()
{
var gremlinServer = new GremlinServer(TestHost, TestPort);
- ClientWebSocketOptions optionsSet = null;
+ ClientWebSocketOptions? optionsSet = null;
var expectedKeepAliveInterval = TimeSpan.FromMilliseconds(11);
var webSocketConfiguration =
new Action<ClientWebSocketOptions>(options =>
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/MessagesTests.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/MessagesTests.cs
index 6d6ca72..5a39b7d 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/MessagesTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/MessagesTests.cs
@@ -35,8 +35,8 @@
{
public class MessagesTests
{
- private readonly RequestMessageProvider _requestMessageProvider = new RequestMessageProvider();
- private static readonly string TestHost = ConfigProvider.Configuration["TestServerIpAddress"];
+ private readonly RequestMessageProvider _requestMessageProvider = new();
+ private static readonly string TestHost = ConfigProvider.Configuration["TestServerIpAddress"]!;
private static readonly int TestPort = Convert.ToInt32(ConfigProvider.Configuration["TestServerPort"]);
[Fact]
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/MockedLoggerExtensions.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/MockedLoggerExtensions.cs
index e966876..6cad68c 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/MockedLoggerExtensions.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/MockedLoggerExtensions.cs
@@ -34,14 +34,14 @@
{
mockedLogger.Verify(
m => m.Log(expectedLogLevel, It.IsAny<EventId>(),
- It.Is<It.IsAnyType>((o, _) => o.ToString().Contains(logMessagePart)), null,
- It.IsAny<Func<It.IsAnyType, Exception, string>>()), Times.Once);
+ It.Is<It.IsAnyType>((o, _) => o.ToString()!.Contains(logMessagePart)), null,
+ It.IsAny<Func<It.IsAnyType, Exception?, string>>()), Times.Once);
}
public static void VerifyNothingWasLogged(this Mock<ILogger> mockedLogger)
{
mockedLogger.Verify(
m => m.Log(It.IsAny<LogLevel>(), It.IsAny<EventId>(), It.IsAny<It.IsAnyType>(), It.IsAny<Exception>(),
- It.IsAny<Func<It.IsAnyType, Exception, string>>()), Times.Never);
+ It.IsAny<Func<It.IsAnyType, Exception?, string>>()), Times.Never);
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs
index fc6bceb..a63b8d9 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs
@@ -42,30 +42,30 @@
{
internal class CommonSteps : StepDefinition
{
- private GraphTraversalSource _g;
- private string _graphName;
- private readonly IDictionary<string, object> _parameters = new Dictionary<string, object>();
- private ITraversal _traversal;
- private object[] _result;
- private Exception _error = null;
+ private GraphTraversalSource? _g;
+ private string? _graphName;
+ private readonly IDictionary<string, object?> _parameters = new Dictionary<string, object?>();
+ private ITraversal? _traversal;
+ private object?[]? _result;
+ private Exception? _error;
private static readonly JsonSerializerOptions JsonDeserializingOptions =
new() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase };
public static ScenarioData ScenarioData { get; set; } = new ScenarioData(new GraphSON3MessageSerializer());
- private static readonly IDictionary<Regex, Func<string, string, object>> Parsers =
- new Dictionary<string, Func<string, string, object>>
+ private static readonly IDictionary<Regex, Func<string, string, object?>> Parsers =
+ new Dictionary<string, Func<string, string, object?>>
{
{@"vp\[(.+)\]", ToVertexProperty},
{@"d\[(.*)\]\.([bsilfdmn])", ToNumber},
{@"D\[(.+)\]", ToDirection},
{@"v\[(.+)\]", ToVertex},
{@"v\[(.+)\]\.id", (x, graphName) => ToVertex(x, graphName).Id},
- {@"v\[(.+)\]\.sid", (x, graphName) => ToVertex(x, graphName).Id.ToString()},
+ {@"v\[(.+)\]\.sid", (x, graphName) => ToVertex(x, graphName).Id!.ToString()},
{@"e\[(.+)\]", ToEdge},
{@"e\[(.+)\].id", (x, graphName) => ToEdge(x, graphName).Id},
- {@"e\[(.+)\].sid", (x, graphName) => ToEdge(x, graphName).Id.ToString()},
+ {@"e\[(.+)\].sid", (x, graphName) => ToEdge(x, graphName).Id!.ToString()},
{@"p\[(.+)\]", ToPath},
{@"l\[(.*)\]", ToList},
{@"s\[(.*)\]", ToSet},
@@ -108,14 +108,14 @@
[Given("using the parameter (\\w+) defined as \"(.*)\"")]
public void UsingParameter(string name, string value)
{
- var parsedValue = ParseValue(value.Replace("\\\"", "\""), _graphName);
+ var parsedValue = ParseValue(value.Replace("\\\"", "\""), _graphName!);
_parameters.Add(name, parsedValue);
}
[Given("using the parameter (\\w+) of P.(\\w+)\\(\"(.*)\"\\)")]
public void UsingParameterP(string name, string pval, string value)
{
- var parsedValue = ParseValue(value.Replace("\\\"", "\""), _graphName);
+ var parsedValue = ParseValue(value.Replace("\\\"", "\""), _graphName!);
_parameters.Add(name, new P(pval, parsedValue));
}
@@ -127,20 +127,20 @@
throw new InvalidOperationException("g should be a traversal source");
}
- if (ScenarioData.CurrentFeature.Tags.Select(t => t.Name).ToList().Contains("@GraphComputerOnly"))
+ if (ScenarioData.CurrentFeature!.Tags.Any(t => t.Name == "@GraphComputerOnly"))
{
_g = _g.WithComputer();
}
_traversal =
- Gremlin.UseTraversal(ScenarioData.CurrentScenario.Name, _g, _parameters);
+ Gremlin.UseTraversal(ScenarioData.CurrentScenario!.Name, _g, _parameters);
}
[Given("the graph initializer of")]
public void InitTraversal(string traversalText)
{
var traversal =
- Gremlin.UseTraversal(ScenarioData.CurrentScenario.Name, _g, _parameters);
+ Gremlin.UseTraversal(ScenarioData.CurrentScenario!.Name, _g, _parameters);
traversal.Iterate();
// We may have modified the so-called `empty` graph
@@ -226,13 +226,13 @@
switch (comparison) {
case "containing":
- Assert.Equal(true, _error.Message.Contains(expectedMessage));
+ Assert.Contains(expectedMessage, _error.Message);
break;
case "starting":
- Assert.Equal(true, _error.Message.StartsWith(expectedMessage));
+ Assert.StartsWith(expectedMessage, _error.Message);
break;
case "ending":
- Assert.Equal(true, _error.Message.EndsWith(expectedMessage));
+ Assert.EndsWith(expectedMessage, _error.Message);
break;
default:
throw new NotSupportedException(
@@ -244,15 +244,15 @@
}
[Then("the result should be (\\w+)")]
- public void AssertResult(string characterizedAs, DataTable table = null)
+ public void AssertResult(string characterizedAs, DataTable? table = null)
{
- assertThatNoErrorWasThrown();
+ AssertThatNoErrorWasThrown();
var ordered = characterizedAs == "ordered";
switch (characterizedAs)
{
case "empty":
- Assert.Empty(_result);
+ Assert.Empty(_result!);
return;
case "ordered":
case "unordered":
@@ -260,16 +260,16 @@
Assert.NotNull(table);
var rows = table.Rows.ToArray();
Assert.Equal("result", rows[0].Cells.First().Value);
- var expected = rows.Skip(1).Select(x => ParseValue(x.Cells.First().Value, _graphName));
+ var expected = rows.Skip(1).Select(x => ParseValue(x.Cells.First().Value, _graphName!));
if (ordered)
{
- Assert.Equal(expected, _result);
+ Assert.Equal(expected, _result!);
}
else
{
var expectedArray = expected.ToArray();
- foreach (var resultItem in _result)
+ foreach (var resultItem in _result!)
{
if (resultItem is Dictionary<object, object> resultItemDict)
{
@@ -284,7 +284,7 @@
Assert.True(expectedArrayContainsResultDictionary);
}
else if (resultItem is double resultItemDouble &&
- expectedArray.Select(e => e.GetType()).Any(t => t == typeof(decimal)))
+ expectedArray.Select(e => e!.GetType()).Any(t => t == typeof(decimal)))
{
// Java seems to use BigDecimal by default sometimes where .NET uses double, but we only
// care for the value not its type here. So we just convert these to decimal (equivalent
@@ -310,15 +310,15 @@
[Then("the result should have a count of (\\d+)")]
public void AssertCount(int count)
{
- assertThatNoErrorWasThrown();
+ AssertThatNoErrorWasThrown();
- Assert.Equal(count, _result.Length);
+ Assert.Equal(count, _result!.Length);
}
[Then("the graph should return (\\d+) for count of (.+)")]
public void AssertTraversalCount(int expectedCount, string traversalText)
{
- assertThatNoErrorWasThrown();
+ AssertThatNoErrorWasThrown();
if (traversalText.StartsWith("\""))
{
@@ -326,7 +326,7 @@
}
var traversal =
- Gremlin.UseTraversal(ScenarioData.CurrentScenario.Name, _g, _parameters);
+ Gremlin.UseTraversal(ScenarioData.CurrentScenario!.Name, _g, _parameters);
var count = 0;
while (traversal.MoveNext())
@@ -342,7 +342,7 @@
}
- private void assertThatNoErrorWasThrown()
+ private void AssertThatNoErrorWasThrown()
{
if (_error != null) throw _error;
}
@@ -350,7 +350,7 @@
private static object ToMap(string stringMap, string graphName)
{
var jsonMap = JsonSerializer.Deserialize<JsonElement>(stringMap, JsonDeserializingOptions);
- return ParseMapValue(jsonMap, graphName);
+ return ParseMapValue(jsonMap, graphName)!;
}
private static object ToLambda(string stringLambda, string graphName)
@@ -374,13 +374,13 @@
stringNumber.Substring(0, stringNumber.Length - 1));
}
- private static object ParseMapValue(JsonElement value, string graphName)
+ private static object? ParseMapValue(JsonElement value, string graphName)
{
switch (value.ValueKind)
{
case JsonValueKind.Object:
{
- return value.EnumerateObject().ToDictionary(property => ParseValue(property.Name, graphName),
+ return value.EnumerateObject().ToDictionary(property => ParseValue(property.Name, graphName)!,
property => ParseMapValue(property.Value, graphName));
}
case JsonValueKind.Array:
@@ -402,7 +402,7 @@
throw new ArgumentOutOfRangeException(nameof(value), value, "Not a supported number type");
}
case JsonValueKind.String:
- return ParseValue(value.GetString(), graphName);
+ return ParseValue(value.GetString()!, graphName);
case JsonValueKind.True:
return true;
case JsonValueKind.False:
@@ -415,16 +415,16 @@
}
}
- private static ISet<object> ToSet(string stringSet, string graphName)
+ private static ISet<object?> ToSet(string stringSet, string graphName)
{
- return new HashSet<object>(ToList(stringSet, graphName));
+ return new HashSet<object?>(ToList(stringSet, graphName));
}
- private static IList<object> ToList(string stringList, string graphName)
+ private static IList<object?> ToList(string stringList, string graphName)
{
if (stringList == "")
{
- return new List<object>(0);
+ return new List<object?>(0);
}
return stringList.Split(',').Select(x => ParseValue(x, graphName)).ToList();
}
@@ -453,13 +453,14 @@
private static Path ToPath(string value, string graphName)
{
- return new Path(new List<ISet<string>>(0), value.Split(',').Select(x => ParseValue(x, graphName)).ToList());
+ return new Path(new List<ISet<string>>(0),
+ value.Split(',').Select(x => ParseValue(x, graphName)).ToList());
}
- private static object ParseValue(string stringValue, string graphName)
+ private static object? ParseValue(string stringValue, string graphName)
{
- Func<string, string, object> parser = null;
- string extractedValue = null;
+ Func<string, string, object?>? parser = null;
+ string? extractedValue = null;
foreach (var kv in Parsers)
{
var match = kv.Key.Match(stringValue);
@@ -474,7 +475,7 @@
break;
}
}
- return parser != null ? parser(extractedValue, graphName) : stringValue;
+ return parser != null ? parser(extractedValue!, graphName) : stringValue;
}
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index e95a922..db03e1f 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@ -119,7 +119,7 @@
}
StepBlock? currentStep = null;
- StepDefinition stepDefinition = null;
+ StepDefinition? stepDefinition = null;
foreach (var step in scenario.Steps)
{
var previousStep = currentStep;
@@ -243,13 +243,13 @@
}
}
- private Exception ExecuteStep(StepDefinition instance, StepBlock stepBlock, Step step)
+ private Exception? ExecuteStep(StepDefinition instance, StepBlock stepBlock, Step step)
{
var attribute = Attributes[stepBlock];
var methodAndParameters = instance.GetType().GetMethods()
.Select(m =>
{
- var attr = (BddAttribute) m.GetCustomAttribute(attribute);
+ var attr = (BddAttribute?) m.GetCustomAttribute(attribute);
if (attr == null)
{
@@ -260,7 +260,7 @@
{
return null;
}
- var parameters = new List<object>();
+ var parameters = new List<object?>();
for (var i = 1; i < match.Groups.Count; i++)
{
parameters.Add(match.Groups[i].Value);
@@ -363,7 +363,7 @@
{
throw new InvalidOperationException($"No step definition class matches Given '{stepText}'");
}
- return (StepDefinition) Activator.CreateInstance(type);
+ return (StepDefinition) Activator.CreateInstance(type)!;
}
private ICollection<Type> GetStepDefinitionTypes()
@@ -396,9 +396,9 @@
{
var codeBaseUrl = new Uri(GetType().GetTypeInfo().Assembly.Location);
var codeBasePath = Uri.UnescapeDataString(codeBaseUrl.AbsolutePath);
- DirectoryInfo rootDir = null;
- for (var dir = Directory.GetParent(Path.GetDirectoryName(codeBasePath));
- dir.Parent != null;
+ DirectoryInfo? rootDir = null;
+ for (var dir = Directory.GetParent(Path.GetDirectoryName(codeBasePath)!);
+ dir!.Parent != null;
dir = dir.Parent)
{
if (dir.Name == "gremlin-dotnet" && dir.GetFiles("pom.xml").Length == 1)
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
index 9e1f59f..b7c3c84 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
@@ -27,6 +27,7 @@
//* Do NOT edit this file directly - generated by build/generate.groovy
//********************************************************************************
+#nullable disable
using System;
using System.Collections.Generic;
@@ -498,6 +499,12 @@
{"g_E_sampleX1X_count", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.E().Sample(1).Count()}},
{"g_V_sampleX1X_byXageX_count", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Sample(1).By("age").Count()}},
{"g_V_order_byXnoX_count", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Order().By("no").Count()}},
+ {"g_V_EX11X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().E(p["eid11"])}},
+ {"g_EX11X_E", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.E(p["eid11"]).E()}},
+ {"g_V_EXnullX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().E(null)}},
+ {"g_V_EXlistXnullXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().E(p["xx1"])}},
+ {"g_injectX1X_EX11_nullX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.Inject(1).E(p["eid11"],null)}},
+ {"g_injectX1X_coalesceXEX_hasLabelXtestsX_addEXtestsX_from_V_hasXnameX_XjoshXX_toXV_hasXnameX_XvadasXXX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.AddV("person").Property("name","josh").AddV("person").Property("name","vadas"), (g,p) =>g.Inject(1).Coalesce<object>(__.E().HasLabel("tests"),__.AddE("tests").From(__.V().Has("name","josh")).To(__.V().Has("name","vadas"))), (g,p) =>g.E().HasLabel("tests")}},
{"g_V_properties_element", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["xx1"]).Properties<object>().Element().Limit<object>(1)}},
{"g_E_properties_element", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.E(p["xx1"]).Properties<object>().Element().Limit<object>(1)}},
{"g_V_properties_properties_element_element", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["xx1"]).Properties<object>().Properties<object>().Element().Element().Limit<object>(1)}},
@@ -1131,3 +1138,5 @@
}
}
+#nullable restore
+
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
index a2a0d48..8b6f94f 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
@@ -37,7 +37,7 @@
private static string GetMessage(IgnoreReason reason)
{
- string reasonSuffix = null;
+ string? reasonSuffix = null;
switch (reason)
{
case IgnoreReason.NoReason:
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/ScenarioData.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/ScenarioData.cs
index b7660c3..1c8be14 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/ScenarioData.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/ScenarioData.cs
@@ -52,8 +52,8 @@
private readonly RemoteConnectionFactory _connectionFactory;
- public Scenario CurrentScenario;
- public Feature CurrentFeature;
+ public Scenario? CurrentScenario;
+ public Feature? CurrentFeature;
public ScenarioDataPerGraph GetByGraphName(string name)
{
@@ -109,7 +109,7 @@
// Property name might not exist and C# doesn't support "null" keys in Dictionary
if (g.V().Count().Next() == g.V().Has("name").Count().Next())
{
- return g.V().Group<string, object>().By("name").By(__.Tail<Vertex>()).Next()
+ return g.V().Group<string, object>().By("name").By(__.Tail<Vertex>()).Next()!
.ToDictionary(kv => kv.Key, kv => (Vertex) kv.Value);
}
else
@@ -128,7 +128,7 @@
return g.E().Group<string, Edge>()
.By(lambda)
.By(__.Tail<object>())
- .Next();
+ .Next()!;
}
catch (ResponseException)
{
@@ -191,7 +191,7 @@
return g.V().Properties<VertexProperty>().Group<string, VertexProperty>()
.By(lambda)
.By(__.Tail<object>())
- .Next();
+ .Next()!;
}
catch (ResponseException)
{
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gremlin.Net.IntegrationTest.csproj b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gremlin.Net.IntegrationTest.csproj
index f34523a..61ee31c 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gremlin.Net.IntegrationTest.csproj
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gremlin.Net.IntegrationTest.csproj
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
+ <Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<None Update="appsettings.json">
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Remote/RemoteStrategyTests.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Remote/RemoteStrategyTests.cs
index f01116d..33b4ab4 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Remote/RemoteStrategyTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Remote/RemoteStrategyTests.cs
@@ -34,7 +34,7 @@
{
public class RemoteStrategyTests
{
- private static readonly string TestHost = ConfigProvider.Configuration["TestServerIpAddress"];
+ private static readonly string TestHost = ConfigProvider.Configuration["TestServerIpAddress"]!;
private static readonly int TestPort = Convert.ToInt32(ConfigProvider.Configuration["TestServerPort"]);
[Fact]
@@ -93,5 +93,7 @@
TraversalStrategies.Add(traversalStrategy);
Bytecode = bytecode;
}
+
+ public override Bytecode Bytecode { get; }
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/BytecodeGeneration/BytecodeGenerationTests.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/BytecodeGeneration/BytecodeGenerationTests.cs
index adac06b..cea8e23 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/BytecodeGeneration/BytecodeGenerationTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/BytecodeGeneration/BytecodeGenerationTests.cs
@@ -110,7 +110,7 @@
[Fact]
public void AnonymousTraversal_OutXnullX()
{
- Assert.Throws<ArgumentNullException>(() => __.Out(null));
+ Assert.Throws<ArgumentNullException>(() => __.Out(null!));
}
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/BytecodeGeneration/StrategiesTests.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/BytecodeGeneration/StrategiesTests.cs
index 3a76a84..24c5e63 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/BytecodeGeneration/StrategiesTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/BytecodeGeneration/StrategiesTests.cs
@@ -90,7 +90,7 @@
Assert.Equal("withStrategies", bytecode.SourceInstructions[0].OperatorName);
Assert.Equal(new MatchAlgorithmStrategy(), bytecode.SourceInstructions[0].Arguments[0]);
Assert.Contains("greedy",
- ((MatchAlgorithmStrategy) bytecode.SourceInstructions[0].Arguments[0]).Configuration.Values);
+ ((MatchAlgorithmStrategy) bytecode.SourceInstructions[0].Arguments[0]!).Configuration.Values);
}
[Fact]
@@ -118,8 +118,9 @@
Assert.Single(bytecode.SourceInstructions[0].Arguments);
Assert.Equal("withStrategies", bytecode.SourceInstructions[0].OperatorName);
Assert.Equal(new ReadOnlyStrategy(), bytecode.SourceInstructions[0].Arguments[0]);
- Assert.Equal("ReadOnlyStrategy", bytecode.SourceInstructions[0].Arguments[0].ToString());
- Assert.Equal(new ReadOnlyStrategy().GetHashCode(), bytecode.SourceInstructions[0].Arguments[0].GetHashCode());
+ Assert.Equal("ReadOnlyStrategy", bytecode.SourceInstructions[0].Arguments[0]!.ToString());
+ Assert.Equal(new ReadOnlyStrategy().GetHashCode(),
+ bytecode.SourceInstructions[0].Arguments[0]!.GetHashCode());
Assert.Equal(0, g.TraversalStrategies.Count);
}
@@ -150,9 +151,9 @@
Assert.Single(bytecode.SourceInstructions[0].Arguments);
Assert.Equal("withStrategies", bytecode.SourceInstructions[0].OperatorName);
Assert.Equal(new SubgraphStrategy(), bytecode.SourceInstructions[0].Arguments[0]);
- SubgraphStrategy strategy = bytecode.SourceInstructions[0].Arguments[0];
- Assert.Equal(typeof(GraphTraversal<object, object>), strategy.Configuration["vertices"].GetType());
- ITraversal traversal = strategy.Configuration["vertices"];
+ SubgraphStrategy strategy = bytecode.SourceInstructions[0].Arguments[0]!;
+ Assert.Equal(typeof(GraphTraversal<object, object>), strategy.Configuration["vertices"]!.GetType());
+ ITraversal traversal = strategy.Configuration["vertices"]!;
Assert.Equal("has", traversal.Bytecode.StepInstructions[0].OperatorName);
Assert.Equal(new List<string> {"name", "marko"}, traversal.Bytecode.StepInstructions[0].Arguments);
Assert.Equal(false, strategy.Configuration["checkAdjacentVertices"]);
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/DriverRemoteConnection/GraphTraversalTests.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/DriverRemoteConnection/GraphTraversalTests.cs
index 262ffea..73cbff3 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/DriverRemoteConnection/GraphTraversalTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/DriverRemoteConnection/GraphTraversalTests.cs
@@ -84,7 +84,7 @@
var vertex = g.V(1).Next();
Assert.Equal(new Vertex(1), vertex);
- Assert.Equal(1, vertex.Id);
+ Assert.Equal(1, vertex!.Id);
}
[Fact]
@@ -143,7 +143,7 @@
var shortestPath =
g.V(5).Repeat(__.Both().SimplePath()).Until(__.HasId(6)).Limit<Vertex>(1).Path().Next();
- Assert.Equal(4, shortestPath.Count);
+ Assert.Equal(4, shortestPath!.Count);
Assert.Equal(new Vertex(6), shortestPath[3]);
}
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/DriverRemoteConnection/RemoteConnectionFactory.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/DriverRemoteConnection/RemoteConnectionFactory.cs
index 8fe6c2e..f5aa498 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/DriverRemoteConnection/RemoteConnectionFactory.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Process/Traversal/DriverRemoteConnection/RemoteConnectionFactory.cs
@@ -32,13 +32,13 @@
{
internal class RemoteConnectionFactory : IDisposable
{
- private static readonly string TestHost = ConfigProvider.Configuration["TestServerIpAddress"];
+ private static readonly string TestHost = ConfigProvider.Configuration["TestServerIpAddress"]!;
private static readonly int TestPort = Convert.ToInt32(ConfigProvider.Configuration["TestServerPort"]);
private readonly IList<DriverRemoteConnectionImpl> _connections = new List<DriverRemoteConnectionImpl>();
private readonly IMessageSerializer _messageSerializer;
- public RemoteConnectionFactory(IMessageSerializer messageSerializer = null)
+ public RemoteConnectionFactory(IMessageSerializer? messageSerializer = null)
{
_messageSerializer = messageSerializer ?? new GraphSON3MessageSerializer();
}
diff --git a/gremlin-dotnet/test/Gremlin.Net.Template.IntegrationTest/Gremlin.Net.Template.IntegrationTest.csproj b/gremlin-dotnet/test/Gremlin.Net.Template.IntegrationTest/Gremlin.Net.Template.IntegrationTest.csproj
index b7eba8d..2f38cff 100644
--- a/gremlin-dotnet/test/Gremlin.Net.Template.IntegrationTest/Gremlin.Net.Template.IntegrationTest.csproj
+++ b/gremlin-dotnet/test/Gremlin.Net.Template.IntegrationTest/Gremlin.Net.Template.IntegrationTest.csproj
@@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
+ <Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git a/gremlin-dotnet/test/Gremlin.Net.Template.IntegrationTest/ServiceTests.cs b/gremlin-dotnet/test/Gremlin.Net.Template.IntegrationTest/ServiceTests.cs
index 1faa0b8..faef08e 100644
--- a/gremlin-dotnet/test/Gremlin.Net.Template.IntegrationTest/ServiceTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.Template.IntegrationTest/ServiceTests.cs
@@ -34,7 +34,7 @@
{
public class ServiceTests
{
- private static readonly string TestHost = ConfigProvider.Configuration["TestServerIpAddress"];
+ private static readonly string TestHost = ConfigProvider.Configuration["TestServerIpAddress"]!;
private static readonly int TestPort = Convert.ToInt32(ConfigProvider.Configuration["TestServerPort"]);
private const string TestTraversalSource = "gmodern";
@@ -48,7 +48,7 @@
var creators = service.FindCreatorsOfSoftware("lop");
- Assert.Equal(new List<string> {"marko", "josh", "peter"}, creators);
+ Assert.Equal(new List<string?> {"marko", "josh", "peter"}, creators);
}
}
diff --git a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Driver/ConnectionPoolTests.cs b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Driver/ConnectionPoolTests.cs
index 0fbc02a..e5711b0 100644
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Driver/ConnectionPoolTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Driver/ConnectionPoolTests.cs
@@ -27,6 +27,7 @@
using System.Threading.Tasks;
using Gremlin.Net.Driver;
using Gremlin.Net.Driver.Exceptions;
+using Gremlin.Net.Driver.Messages;
using Microsoft.Extensions.Logging.Abstractions;
using Moq;
using Xunit;
@@ -188,7 +189,8 @@
fakedConnection.Setup(f => f.IsOpen).Returns(false);
mockedConnectionFactory.Setup(m => m.CreateConnection()).Returns(OpenConnection);
- await returnedConnection.SubmitAsync<bool>(null, CancellationToken.None);
+ await returnedConnection.SubmitAsync<bool>(RequestMessage.Build(string.Empty).Create(),
+ CancellationToken.None);
returnedConnection.Dispose();
Assert.Equal(1, pool.NrConnections);
diff --git a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Driver/ConnectionTests.cs b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Driver/ConnectionTests.cs
index 44c7105..26e483a 100644
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Driver/ConnectionTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Driver/ConnectionTests.cs
@@ -294,10 +294,8 @@
var fakeMessageSerializer = new Mock<IMessageSerializer>();
var receivedBytes = new byte[] { 1, 2, 3 };
var messageToCancel = RequestMessage.Build(string.Empty).Create();
- var receivedMessage = new ResponseMessage<List<object>>
- {
- RequestId = messageToCancel.RequestId, Status = new ResponseStatus { Code = ResponseStatusCode.Success }
- };
+ var receivedMessage = new ResponseMessage<List<object>>(messageToCancel.RequestId,
+ new ResponseStatus(ResponseStatusCode.Success), new ResponseResult<List<object>>(null));
fakeMessageSerializer.Setup(f => f.DeserializeMessageAsync(receivedBytes, It.IsAny<CancellationToken>()))
.ReturnsAsync(receivedMessage);
var fakeWebSocketConnection = new Mock<IWebSocketConnection>();
@@ -316,14 +314,14 @@
}
private static Connection GetConnection(IMock<IClientWebSocket> mockedClientWebSocket,
- IMessageSerializer messageSerializer = null, Uri uri = null)
+ IMessageSerializer? messageSerializer = null, Uri? uri = null)
{
return GetConnection(new WebSocketConnection(mockedClientWebSocket.Object, new WebSocketSettings()),
messageSerializer, uri);
}
private static Connection GetConnection(IWebSocketConnection webSocketConnection,
- IMessageSerializer messageSerializer = null, Uri uri = null)
+ IMessageSerializer? messageSerializer = null, Uri? uri = null)
{
uri ??= new Uri("wss://localhost:8182");
messageSerializer ??= new GraphBinaryMessageSerializer();
@@ -336,9 +334,10 @@
sessionId: null);
}
- private static async Task AssertExpectedConnectionClosedException(WebSocketCloseStatus? expectedCloseStatus, string expectedCloseDescription, Func<Task> func)
+ private static async Task AssertExpectedConnectionClosedException(WebSocketCloseStatus? expectedCloseStatus,
+ string? expectedCloseDescription, Func<Task> func)
{
- ConnectionClosedException exception = await Assert.ThrowsAsync<ConnectionClosedException>(func);
+ var exception = await Assert.ThrowsAsync<ConnectionClosedException>(func);
Assert.Equal(expectedCloseStatus, exception.Status);
Assert.Equal(expectedCloseDescription, exception.Description);
}
diff --git a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Driver/DriverRemoteConnectionTests.cs b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Driver/DriverRemoteConnectionTests.cs
index 7ed9c96..8780cf9 100644
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Driver/DriverRemoteConnectionTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Driver/DriverRemoteConnectionTests.cs
@@ -45,7 +45,7 @@
[Fact]
public void ShouldThrowWhenGivenNullAsGremlinClient()
{
- Assert.Throws<ArgumentNullException>(() => new DriverRemoteConnection(null));
+ Assert.Throws<ArgumentNullException>(() => new DriverRemoteConnection(null!));
}
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Driver/GraphSONMessageSerializerTests.cs b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Driver/GraphSONMessageSerializerTests.cs
index 6b7951f..6aae175 100644
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Driver/GraphSONMessageSerializerTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Driver/GraphSONMessageSerializerTests.cs
@@ -36,7 +36,7 @@
{
var sut = CreateMessageSerializer();
- await Assert.ThrowsAsync<ArgumentNullException>(()=> sut.DeserializeMessageAsync(null));
+ await Assert.ThrowsAsync<ArgumentNullException>(()=> sut.DeserializeMessageAsync(null!));
}
[Fact]
diff --git a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Gremlin.Net.UnitTest.csproj b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Gremlin.Net.UnitTest.csproj
index 24de96a..e0cac86 100644
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Gremlin.Net.UnitTest.csproj
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Gremlin.Net.UnitTest.csproj
@@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
+ <Nullable>enable</Nullable>
<AssemblyOriginatorKeyFile>../../build/tinkerpop.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition="'$(OS)' != 'Windows_NT'">true</PublicSign>
diff --git a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/BytecodeTests.cs b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/BytecodeTests.cs
index d9ab4a7..1f91af6 100644
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/BytecodeTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/BytecodeTests.cs
@@ -62,7 +62,7 @@
bytecode.AddStep("someStep", new Dictionary<string, object> {{"someKey", b.Of("valVariable", "valValue")}});
var arg = bytecode.StepInstructions[0].Arguments[0] as IDictionary;
- Assert.Equal(new Binding("valVariable", "valValue"), arg["someKey"]);
+ Assert.Equal(new Binding("valVariable", "valValue"), arg!["someKey"]);
}
[Fact]
@@ -74,7 +74,7 @@
bytecode.AddStep("someStep", new Dictionary<string, object> {{b.Of("keyVariable", "keyValue"), 1234}});
var arg = bytecode.StepInstructions[0].Arguments[0];
- var binding = ((Dictionary<object, object>) arg).Keys.First() as Binding;
+ var binding = ((Dictionary<object, object>) arg!).Keys.First() as Binding;
Assert.Equal(new Binding("keyVariable", "keyValue"), binding);
}
@@ -87,7 +87,7 @@
bytecode.AddStep("someStep", new List<string> {"test", b.Of("listVariable", "listValue")});
var arg = bytecode.StepInstructions[0].Arguments[0] as IList;
- Assert.Equal(new Binding("listVariable", "listValue"), arg[1]);
+ Assert.Equal(new Binding("listVariable", "listValue"), arg![1]);
}
[Fact]
@@ -99,7 +99,7 @@
bytecode.AddStep("someStep", new HashSet<string> { "test", b.Of("setVariable", "setValue") });
var arg = bytecode.StepInstructions[0].Arguments[0] as ISet<object>;
- Assert.Equal(new Binding("setVariable", "setValue"), arg.ToList()[1]);
+ Assert.Equal(new Binding("setVariable", "setValue"), arg!.ToList()[1]);
}
[Fact]
@@ -133,7 +133,7 @@
bytecode.AddSource("someSource", new Dictionary<string, object> { { "someKey", b.Of("valVariable", "valValue") } });
var arg = bytecode.SourceInstructions[0].Arguments[0] as IDictionary;
- Assert.Equal(new Binding("valVariable", "valValue"), arg["someKey"]);
+ Assert.Equal(new Binding("valVariable", "valValue"), arg!["someKey"]);
}
[Fact]
@@ -145,7 +145,7 @@
bytecode.AddSource("someSource", new Dictionary<string, object> { { b.Of("keyVariable", "keyValue"), 1234 } });
var arg = bytecode.SourceInstructions[0].Arguments[0];
- var binding = ((Dictionary<object, object>)arg).Keys.First() as Binding;
+ var binding = ((Dictionary<object, object>)arg!).Keys.First() as Binding;
Assert.Equal(new Binding("keyVariable", "keyValue"), binding);
}
@@ -158,7 +158,7 @@
bytecode.AddSource("someSource", new List<string> { "test", b.Of("listVariable", "listValue") });
var arg = bytecode.SourceInstructions[0].Arguments[0] as IList;
- Assert.Equal(new Binding("listVariable", "listValue"), arg[1]);
+ Assert.Equal(new Binding("listVariable", "listValue"), arg![1]);
}
[Fact]
@@ -170,7 +170,7 @@
bytecode.AddSource("someSource", new HashSet<string> { "test", b.Of("setVariable", "setValue") });
var arg = bytecode.SourceInstructions[0].Arguments[0] as ISet<object>;
- Assert.Equal(new Binding("setVariable", "setValue"), arg.ToList()[1]);
+ Assert.Equal(new Binding("setVariable", "setValue"), arg!.ToList()[1]);
}
[Fact]
diff --git a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/GraphTraversalSourceTests.cs b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/GraphTraversalSourceTests.cs
index b08cf6f..98a5fce 100644
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/GraphTraversalSourceTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/GraphTraversalSourceTests.cs
@@ -22,7 +22,10 @@
#endregion
using System;
+using Gremlin.Net.Driver.Remote;
+using Gremlin.Net.Process.Remote;
using Gremlin.Net.Process.Traversal;
+using Moq;
using Xunit;
namespace Gremlin.Net.UnitTest.Process.Traversal
@@ -57,7 +60,7 @@
{
var gLocal = AnonymousTraversalSource.Traversal();
- var gRemote = gLocal.WithRemote(null);
+ var gRemote = gLocal.WithRemote(Mock.Of<IRemoteConnection>());
Assert.Equal(0, gLocal.TraversalStrategies.Count);
Assert.Equal(1, gRemote.TraversalStrategies.Count);
diff --git a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/TestTraversal.cs b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/TestTraversal.cs
index 51aac86..d618aec 100644
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/TestTraversal.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/TestTraversal.cs
@@ -29,7 +29,7 @@
{
public class TestTraversal : DefaultTraversal<object, object>
{
- public TestTraversal(List<object> traverserObjs)
+ public TestTraversal(List<object?> traverserObjs)
{
var traversers = new List<Traverser>(traverserObjs.Count);
traverserObjs.ForEach(o => traversers.Add(new Traverser(o)));
@@ -37,7 +37,7 @@
Bytecode = new Bytecode();
}
- public TestTraversal(IReadOnlyList<object> traverserObjs, IReadOnlyList<long> traverserBulks)
+ public TestTraversal(IReadOnlyList<object?> traverserObjs, IReadOnlyList<long> traverserBulks)
{
var traversers = new List<Traverser>(traverserObjs.Count);
traversers.AddRange(traverserObjs.Select((t, i) => new Traverser(t, traverserBulks[i])));
@@ -49,5 +49,7 @@
{
TraversalStrategies = traversalStrategies;
}
+
+ public override Bytecode Bytecode { get; } = new();
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/TestTraversalStrategy.cs b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/TestTraversalStrategy.cs
index 5a23409..697b285 100644
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/TestTraversalStrategy.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/TestTraversalStrategy.cs
@@ -37,12 +37,12 @@
_traversers = traversersToAddOnApplication;
}
- public void Apply<S, E>(ITraversal<S, E> traversal)
+ public void Apply<TStart, TEnd>(ITraversal<TStart, TEnd> traversal)
{
traversal.Traversers = _traversers;
}
- public Task ApplyAsync<S, E>(ITraversal<S, E> traversal, CancellationToken cancellationToken)
+ public Task ApplyAsync<TStart, TEnd>(ITraversal<TStart, TEnd> traversal, CancellationToken cancellationToken)
{
traversal.Traversers = _traversers;
return Task.CompletedTask;
diff --git a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/Translator/GroovyTranslatorTests.cs b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/Translator/GroovyTranslatorTests.cs
index 0d4a56a..057e4f5 100644
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/Translator/GroovyTranslatorTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/Translator/GroovyTranslatorTests.cs
@@ -420,6 +420,7 @@
{ _g.V().Has("runways", P.Inside(3, 5)), "g.V().has('runways', P.inside([3, 5]))" },
{ _g.V("44").OutE().ElementMap<object>(), "g.V('44').outE().elementMap()" },
{ _g.V("44").ValueMap<object, object>().By(__.Unfold<object>()), "g.V('44').valueMap().by(__.unfold())" },
+ { _g.V().E("1"), "g.V().E('1')" },
// TODO: Support WithOptions
{
@@ -485,7 +486,7 @@
}
}
- private void AssertTranslation(string expectedTranslation, params object[] objs)
+ private void AssertTranslation(string expectedTranslation, params object?[]? objs)
{
AssertTraversalTranslation($"g.inject({expectedTranslation})", _g.Inject(objs));
}
diff --git a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/TraversalTests.cs b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/TraversalTests.cs
index 5f87dff..0ed745b 100644
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/TraversalTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Process/Traversal/TraversalTests.cs
@@ -36,7 +36,7 @@
[InlineData("test")]
public void ShouldReturnAvailableTraverserObjWhenNextIsCalled(object traverserObj)
{
- var traversal = new TestTraversal(new List<object> {traverserObj});
+ var traversal = new TestTraversal(new List<object?> {traverserObj});
var actualObj = traversal.Next();
@@ -49,7 +49,7 @@
[InlineData("test")]
public void ShouldCheckHasNext(object traverserObj)
{
- var traversal = new TestTraversal(new List<object> {traverserObj});
+ var traversal = new TestTraversal(new List<object?> {traverserObj});
Assert.True(traversal.HasNext());
Assert.True(traversal.HasNext());
@@ -66,7 +66,7 @@
[InlineData(10)]
public void ShouldReturnCorrectNrOfResultObjsWhenNextIsCalledWithAmountArgument(int nrOfResults)
{
- var objs = new List<object>(20);
+ var objs = new List<object?>(20);
for (var i = 0; i < 20; i++)
objs.Add(i);
var traversal = new TestTraversal(objs);
@@ -79,9 +79,9 @@
Assert.Equal(objs[i], traversedObjsList[i]);
}
- private List<object> UnfoldBulks(IReadOnlyList<object> objs, IReadOnlyList<long> bulks)
+ private List<object?> UnfoldBulks(IReadOnlyList<object?> objs, IReadOnlyList<long> bulks)
{
- var unfoldedObjs = new List<object>();
+ var unfoldedObjs = new List<object?>();
for (var traverserIdx = 0; traverserIdx < objs.Count; traverserIdx++)
for (var currentBulkObjIdx = 0; currentBulkObjIdx < bulks[traverserIdx]; currentBulkObjIdx++)
unfoldedObjs.Add(objs[traverserIdx]);
@@ -91,7 +91,7 @@
[Fact]
public void ShouldDrainAllTraversersWhenIterateIsCalled()
{
- var someObjs = new List<object> {1, 2, 3};
+ var someObjs = new List<object?> {1, 2, 3};
var traversal = new TestTraversal(someObjs);
var drainedTraversal = traversal.Iterate();
@@ -103,7 +103,7 @@
public void ShouldReturnNullWhenNextIsCalledAndNoTraverserIsAvailable()
{
var expectedFirstObj = 1;
- var traversal = new TestTraversal(new List<object> {expectedFirstObj});
+ var traversal = new TestTraversal(new List<object?> {expectedFirstObj});
var actualFirstObj = traversal.Next();
var actualSecondObj = traversal.Next();
@@ -115,18 +115,18 @@
[Fact]
public void ShouldReturnTraversalsTraverserWhenNextTraverserIsCalled()
{
- var someObjs = new List<object> {1, 2, 3};
+ var someObjs = new List<object?> {1, 2, 3};
var traversal = new TestTraversal(someObjs);
var traverser = traversal.NextTraverser();
- Assert.Equal(traversal.Traversers.First(), traverser);
+ Assert.Equal(traversal.Traversers!.First(), traverser);
}
[Fact]
public void ShouldThrowNotSupportedExceptionWhenResetIsCalled()
{
- var someObjs = new List<object> {1, 2, 3};
+ var someObjs = new List<object?> {1, 2, 3};
var traversal = new TestTraversal(someObjs);
Assert.Throws<NotSupportedException>(() => traversal.Reset());
@@ -135,7 +135,7 @@
[Fact]
public void ShouldReturnAllTraverserObjsWhenToListIsCalled()
{
- var expectedObjs = new List<object> {1, 2, 3};
+ var expectedObjs = new List<object?> {1, 2, 3};
var traversal = new TestTraversal(expectedObjs);
var traversedObjs = traversal.ToList();
@@ -146,13 +146,13 @@
[Fact]
public void ShouldReturnAllTraverserObjWithoutDuplicatesWhenToSetIsCalled()
{
- var traverserObjs = new List<object> {1, 1, 2, 3};
+ var traverserObjs = new List<object?> {1, 1, 2, 3};
var traversal = new TestTraversal(traverserObjs);
var traversedObjSet = traversal.ToSet();
Assert.Equal(3, traversedObjSet.Count);
- Assert.Equal(new HashSet<object>(traverserObjs), traversedObjSet);
+ Assert.Equal(new HashSet<object?>(traverserObjs), traversedObjSet);
}
[Fact]
@@ -170,7 +170,7 @@
[Fact]
public void ShouldBeUnfoldTraverserBulksWhenToListIsCalled()
{
- var objs = new List<object> {1, 2, 3};
+ var objs = new List<object?> {1, 2, 3};
var bulks = new List<long> {3, 2, 1};
var traversal = new TestTraversal(objs, bulks);
diff --git a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphBinary/GraphBinaryMessageSerializerTests.cs b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphBinary/GraphBinaryMessageSerializerTests.cs
index 5510678..e175300 100644
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphBinary/GraphBinaryMessageSerializerTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphBinary/GraphBinaryMessageSerializerTests.cs
@@ -77,7 +77,7 @@
var serializer = CreateMessageSerializer();
await Assert.ThrowsAsync<TaskCanceledException>(async () =>
- await serializer.SerializeMessageAsync(RequestMessage.Build(default).Create(),
+ await serializer.SerializeMessageAsync(RequestMessage.Build(string.Empty).Create(),
new CancellationToken(true)));
}
diff --git a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphBinary/GraphBinaryTests.cs b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphBinary/GraphBinaryTests.cs
index 31b512a..47a190b 100644
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphBinary/GraphBinaryTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphBinary/GraphBinaryTests.cs
@@ -26,11 +26,13 @@
using System.Globalization;
using System.IO;
using System.Numerics;
+using System.Threading;
using System.Threading.Tasks;
using Gremlin.Net.Process.Traversal;
using Gremlin.Net.Structure;
using Gremlin.Net.Structure.IO.GraphBinary;
using Xunit;
+using Barrier = Gremlin.Net.Process.Traversal.Barrier;
using Path = Gremlin.Net.Structure.Path;
namespace Gremlin.Net.UnitTest.Structure.IO.GraphBinary
@@ -76,7 +78,7 @@
var writer = CreateGraphBinaryWriter();
var serializationStream = new MemoryStream();
- await writer.WriteValueAsync(value, serializationStream, false);
+ await writer.WriteNonNullableValueAsync(value, serializationStream);
var serBytes = serializationStream.ToArray();
Assert.Equal(expected, serBytes);
@@ -270,9 +272,9 @@
var reader = CreateGraphBinaryReader();
var serializationStream = new MemoryStream();
- await writer.WriteValueAsync(expected, serializationStream, false);
+ await writer.WriteNonNullableValueAsync(expected, serializationStream);
serializationStream.Position = 0;
- var actual = await reader.ReadValueAsync<HashSet<string>>(serializationStream, false);
+ var actual = await reader.ReadNonNullableValueAsync<HashSet<string>>(serializationStream);
Assert.Equal(expected, actual);
Assert.Equal(expected.GetType(), actual.GetType());
@@ -349,9 +351,9 @@
var reader = CreateGraphBinaryReader();
var serializationStream = new MemoryStream();
- await writer.WriteValueAsync(expected, serializationStream, false);
+ await writer.WriteNonNullableValueAsync(expected, serializationStream);
serializationStream.Position = 0;
- var actual = await reader.ReadValueAsync<Dictionary<string, int>>(serializationStream, false);
+ var actual = await reader.ReadNonNullableValueAsync<Dictionary<string, int>>(serializationStream);
Assert.Equal(expected, actual);
Assert.Equal(expected.GetType(), actual.GetType());
@@ -379,7 +381,7 @@
var writer = CreateGraphBinaryWriter();
var serializationStream = new MemoryStream();
- await writer.WriteValueAsync(toSerialize, serializationStream, false);
+ await writer.WriteNonNullableValueAsync(toSerialize, serializationStream);
var expected = new byte[]
{0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff};
@@ -402,13 +404,12 @@
}
[Fact]
- public async Task TestVertexWithNullLabel()
+ public async Task WriteNonNullableValueShouldThrowForNullValue()
{
- var expected = new Vertex(123, null);
var writer = CreateGraphBinaryWriter();
var serializationStream = new MemoryStream();
-
- await Assert.ThrowsAsync<IOException>(() => writer.WriteAsync(expected, serializationStream));
+
+ await Assert.ThrowsAsync<IOException>(() => writer.WriteNonNullableValueAsync(null!, serializationStream));
}
[Fact]
@@ -433,7 +434,7 @@
new Path(
new List<ISet<string>>
{new HashSet<string> {"a", "b"}, new HashSet<string> {"c", "d"}, new HashSet<string> {"e"}},
- new List<object> {1, 2, 3});
+ new List<object?> {1, 2, 3});
var writer = CreateGraphBinaryWriter();
var reader = CreateGraphBinaryReader();
var serializationStream = new MemoryStream();
@@ -668,9 +669,9 @@
await writer.WriteAsync(expected, serializationStream);
serializationStream.Position = 0;
- var actual = (Bytecode) await reader.ReadAsync(serializationStream);
+ var actual = (Bytecode?) await reader.ReadAsync(serializationStream);
- Assert.Equal(expected.SourceInstructions, actual.SourceInstructions);
+ Assert.Equal(expected.SourceInstructions, actual!.SourceInstructions);
Assert.Equal(expected.StepInstructions, actual.StepInstructions);
}
@@ -800,9 +801,9 @@
await writer.WriteAsync(expected, serializationStream);
serializationStream.Position = 0;
- var actual = (StringBasedLambda) await reader.ReadAsync(serializationStream);
+ var actual = (StringBasedLambda?) await reader.ReadAsync(serializationStream);
- Assert.Equal(expected.Language, actual.Language);
+ Assert.Equal(expected.Language, actual!.Language);
Assert.Equal(expected.LambdaExpression, actual.LambdaExpression);
Assert.Equal(expected.Arguments, actual.Arguments);
}
@@ -817,9 +818,9 @@
await writer.WriteAsync(expected, serializationStream);
serializationStream.Position = 0;
- var actual = (P) await reader.ReadAsync(serializationStream);
+ var actual = (P?) await reader.ReadAsync(serializationStream);
- Assert.Equal(expected.OperatorName, actual.OperatorName);
+ Assert.Equal(expected.OperatorName, actual!.OperatorName);
Assert.Equal(expected.Other, actual.Other);
Assert.Equal(expected.Value, actual.Value);
}
@@ -834,9 +835,9 @@
await writer.WriteAsync(expected, serializationStream);
serializationStream.Position = 0;
- var actual = (P) await reader.ReadAsync(serializationStream);
+ var actual = (P?) await reader.ReadAsync(serializationStream);
- Assert.Equal(expected.OperatorName, actual.OperatorName);
+ Assert.Equal(expected.OperatorName, actual!.OperatorName);
Assert.Equal(expected.Other, actual.Other);
Assert.Equal(expected.Value, actual.Value);
}
@@ -851,9 +852,9 @@
await writer.WriteAsync(expected, serializationStream);
serializationStream.Position = 0;
- var actual = (P) await reader.ReadAsync(serializationStream);
+ var actual = (P?) await reader.ReadAsync(serializationStream);
- Assert.Equal(expected.ToString(), actual.ToString());
+ Assert.Equal(expected.ToString(), actual!.ToString());
}
[Fact]
@@ -866,9 +867,9 @@
await writer.WriteAsync(expected, serializationStream);
serializationStream.Position = 0;
- var actual = (TextP) await reader.ReadAsync(serializationStream);
+ var actual = (TextP?) await reader.ReadAsync(serializationStream);
- Assert.Equal(expected.OperatorName, actual.OperatorName);
+ Assert.Equal(expected.OperatorName, actual!.OperatorName);
Assert.Equal(expected.Other, actual.Other);
Assert.Equal(expected.Value, actual.Value);
}
@@ -883,9 +884,9 @@
await writer.WriteAsync(expected, serializationStream);
serializationStream.Position = 0;
- var actual = (Traverser) await reader.ReadAsync(serializationStream);
+ var actual = (Traverser?) await reader.ReadAsync(serializationStream);
- Assert.Equal(expected.Object, actual.Object);
+ Assert.Equal(expected.Object, actual!.Object);
Assert.Equal(expected.Bulk, actual.Bulk);
}
diff --git a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphBinary/Types/Sample/SamplePerson.cs b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphBinary/Types/Sample/SamplePerson.cs
index e474f30..40627c8 100644
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphBinary/Types/Sample/SamplePerson.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphBinary/Types/Sample/SamplePerson.cs
@@ -36,14 +36,14 @@
public string Name { get; }
public DateTimeOffset BirthDate { get; }
- public bool Equals(SamplePerson other)
+ public bool Equals(SamplePerson? other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return Name == other.Name && BirthDate.Equals(other.BirthDate);
}
- public override bool Equals(object obj)
+ public override bool Equals(object? obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
diff --git a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphBinary/Types/Sample/SamplePersonSerializer.cs b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphBinary/Types/Sample/SamplePersonSerializer.cs
index 4924808..172d167 100644
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphBinary/Types/Sample/SamplePersonSerializer.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphBinary/Types/Sample/SamplePersonSerializer.cs
@@ -40,26 +40,38 @@
{
// Write {custom type info}, {value_flag} and {value}
await stream.WriteAsync(_typeInfoBytes, cancellationToken).ConfigureAwait(false);
- await WriteValueAsync(value, stream, writer, true, cancellationToken);
+ await WriteNullableValueAsync(value, stream, writer, cancellationToken);
}
- public override async Task WriteValueAsync(object value, Stream stream, GraphBinaryWriter writer, bool nullable,
+ public override async Task WriteNullableValueAsync(object value, Stream stream, GraphBinaryWriter writer,
CancellationToken cancellationToken = default)
{
if (value == null)
{
- if (!nullable)
- {
- throw new IOException("Unexpected null value when nullable is false");
- }
-
await writer.WriteValueFlagNullAsync(stream, cancellationToken).ConfigureAwait(false);
return;
}
- if (nullable)
+ await writer.WriteValueFlagNoneAsync(stream, cancellationToken).ConfigureAwait(false);
+
+ var samplePerson = (SamplePerson)value;
+ var name = samplePerson.Name;
+
+ // value_length = name_byte_length + name_bytes + long
+ await stream.WriteIntAsync(4 + Encoding.UTF8.GetBytes(name).Length + 8, cancellationToken)
+ .ConfigureAwait(false);
+
+ await writer.WriteNonNullableValueAsync(name, stream, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(samplePerson.BirthDate, stream, cancellationToken)
+ .ConfigureAwait(false);
+ }
+
+ public override async Task WriteNonNullableValueAsync(object value, Stream stream, GraphBinaryWriter writer,
+ CancellationToken cancellationToken = default)
+ {
+ if (value == null)
{
- await writer.WriteValueFlagNoneAsync(stream, cancellationToken).ConfigureAwait(false);
+ throw new IOException("Unexpected null value when nullable is false");
}
var samplePerson = (SamplePerson)value;
@@ -69,12 +81,12 @@
await stream.WriteIntAsync(4 + Encoding.UTF8.GetBytes(name).Length + 8, cancellationToken)
.ConfigureAwait(false);
- await writer.WriteValueAsync(name, stream, false, cancellationToken).ConfigureAwait(false);
- await writer.WriteValueAsync(samplePerson.BirthDate, stream, false, cancellationToken)
+ await writer.WriteNonNullableValueAsync(name, stream, cancellationToken).ConfigureAwait(false);
+ await writer.WriteNonNullableValueAsync(samplePerson.BirthDate, stream, cancellationToken)
.ConfigureAwait(false);
}
- public override async Task<object> ReadAsync(Stream stream, GraphBinaryReader reader,
+ public override async Task<object?> ReadAsync(Stream stream, GraphBinaryReader reader,
CancellationToken cancellationToken = default)
{
// {custom type info}, {value_flag} and {value}
@@ -84,19 +96,16 @@
throw new IOException("{custom_type_info} should not be provided for this custom type");
}
- return await ReadValueAsync(stream, reader, true, cancellationToken).ConfigureAwait(false);
+ return await ReadNullableValueAsync(stream, reader, cancellationToken).ConfigureAwait(false);
}
- public override async Task<object> ReadValueAsync(Stream stream, GraphBinaryReader reader, bool nullable,
+ public override async Task<object?> ReadNullableValueAsync(Stream stream, GraphBinaryReader reader,
CancellationToken cancellationToken = default)
{
- if (nullable)
+ var valueFlag = await stream.ReadByteAsync(cancellationToken).ConfigureAwait(false);
+ if ((valueFlag & 1) == 1)
{
- var valueFlag = await stream.ReadByteAsync(cancellationToken).ConfigureAwait(false);
- if ((valueFlag & 1) == 1)
- {
- return null;
- }
+ return null;
}
// Read the byte length of the value bytes
@@ -112,10 +121,35 @@
throw new IOException($"Not enough readable bytes: {valueLength} (expected: {stream.Length})");
}
- var name = (string)await reader.ReadValueAsync<string>(stream, false, cancellationToken)
+ var name = (string)await reader.ReadNonNullableValueAsync<string>(stream, cancellationToken)
.ConfigureAwait(false);
var birthDate =
- (DateTimeOffset)await reader.ReadValueAsync<DateTimeOffset>(stream, false, cancellationToken)
+ (DateTimeOffset)await reader.ReadNonNullableValueAsync<DateTimeOffset>(stream, cancellationToken)
+ .ConfigureAwait(false);
+
+ return new SamplePerson(name, birthDate);
+ }
+
+ public override async Task<object> ReadNonNullableValueAsync(Stream stream, GraphBinaryReader reader,
+ CancellationToken cancellationToken = default)
+ {
+ // Read the byte length of the value bytes
+ var valueLength = await stream.ReadIntAsync(cancellationToken).ConfigureAwait(false);
+
+ if (valueLength <= 0)
+ {
+ throw new IOException($"Unexpected value length: {valueLength}");
+ }
+
+ if (valueLength > stream.Length)
+ {
+ throw new IOException($"Not enough readable bytes: {valueLength} (expected: {stream.Length})");
+ }
+
+ var name = (string)await reader.ReadNonNullableValueAsync<string>(stream, cancellationToken)
+ .ConfigureAwait(false);
+ var birthDate =
+ (DateTimeOffset)await reader.ReadNonNullableValueAsync<DateTimeOffset>(stream, cancellationToken)
.ConfigureAwait(false);
return new SamplePerson(name, birthDate);
diff --git a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphBinary/Types/Sample/SamplePersonSerializerTests.cs b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphBinary/Types/Sample/SamplePersonSerializerTests.cs
index 09ea734..e023a91 100644
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphBinary/Types/Sample/SamplePersonSerializerTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphBinary/Types/Sample/SamplePersonSerializerTests.cs
@@ -43,15 +43,13 @@
await writer.WriteAsync(expected, serializationStream);
serializationStream.Position = 0;
- var actual = (SamplePerson) await reader.ReadAsync(serializationStream);
+ var actual = (SamplePerson?) await reader.ReadAsync(serializationStream);
Assert.Equal(expected, actual);
}
-
- [Theory]
- [InlineData(false)]
- [InlineData(true)]
- public async Task ReadValueAndWriteValueShouldBeSymmetric(bool nullable)
+
+ [Fact]
+ public async Task ReadNullableValueAndWriteNullableValueShouldBeSymmetric()
{
var expected = new SamplePerson("Olivia", new DateTimeOffset(2010, 4, 29, 5, 30, 3, TimeSpan.FromHours(1)));
var registry = TypeSerializerRegistry.Build()
@@ -60,9 +58,27 @@
var reader = CreateGraphBinaryReader(registry);
var serializationStream = new MemoryStream();
- await writer.WriteValueAsync(expected, serializationStream, nullable).ConfigureAwait(false);
+ await writer.WriteNullableValueAsync(expected, serializationStream).ConfigureAwait(false);
serializationStream.Position = 0;
- var actual = (SamplePerson)await reader.ReadValueAsync<SamplePerson>(serializationStream, nullable)
+ var actual = (SamplePerson?)await reader.ReadNullableValueAsync<SamplePerson>(serializationStream)
+ .ConfigureAwait(false);
+
+ Assert.Equal(expected, actual);
+ }
+
+ [Fact]
+ public async Task ReadNonNullableValueAndWriteNonNullableValueShouldBeSymmetric()
+ {
+ var expected = new SamplePerson("Olivia", new DateTimeOffset(2010, 4, 29, 5, 30, 3, TimeSpan.FromHours(1)));
+ var registry = TypeSerializerRegistry.Build()
+ .AddCustomType(typeof(SamplePerson), new SamplePersonSerializer()).Create();
+ var writer = CreateGraphBinaryWriter(registry);
+ var reader = CreateGraphBinaryReader(registry);
+ var serializationStream = new MemoryStream();
+
+ await writer.WriteNonNullableValueAsync(expected, serializationStream).ConfigureAwait(false);
+ serializationStream.Position = 0;
+ var actual = (SamplePerson)await reader.ReadNonNullableValueAsync<SamplePerson>(serializationStream)
.ConfigureAwait(false);
Assert.Equal(expected, actual);
diff --git a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/BytecodeGraphSONSerializerTests.cs b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/BytecodeGraphSONSerializerTests.cs
index ad78334..da6a6a7 100644
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/BytecodeGraphSONSerializerTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/BytecodeGraphSONSerializerTests.cs
@@ -163,5 +163,7 @@
Bytecode = bytecode;
IsAnonymous = true;
}
+
+ public override Bytecode Bytecode { get; }
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSON3MessageSerializerTests.cs b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSON3MessageSerializerTests.cs
index df75dc2..d1b593b 100644
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSON3MessageSerializerTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSON3MessageSerializerTests.cs
@@ -38,7 +38,7 @@
var serializer = CreateMessageSerializer();
await Assert.ThrowsAsync<OperationCanceledException>(async () =>
- await serializer.SerializeMessageAsync(RequestMessage.Build(default).Create(),
+ await serializer.SerializeMessageAsync(RequestMessage.Build(string.Empty).Create(),
new CancellationToken(true)));
}
diff --git a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSONReaderTests.cs b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSONReaderTests.cs
index 2c33a1e..82aeeb0 100644
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSONReaderTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSONReaderTests.cs
@@ -74,7 +74,7 @@
var jsonElement = JsonSerializer.Deserialize<JsonElement>(graphSON);
var deserializedValue = reader.ToObject(jsonElement);
- Assert.Equal("test", deserializedValue.Value);
+ Assert.Equal("test", deserializedValue!.Value);
}
[Fact]
@@ -118,7 +118,7 @@
var jsonElement = JsonSerializer.Deserialize<JsonElement>(serializedDict);
var deserializedValue = reader.ToObject(jsonElement);
- var expectedDict = new Dictionary<string, dynamic>
+ var expectedDict = new Dictionary<string, dynamic?>
{
{"age", new List<object> {29}},
{"name", new List<object> {"marko"}},
@@ -136,7 +136,7 @@
var reader = CreateStandardGraphSONReader(version);
var jsonElement = JsonSerializer.Deserialize<JsonElement>(graphSon);
- Edge readEdge = reader.ToObject(jsonElement);
+ Edge readEdge = reader.ToObject(jsonElement)!;
Assert.Equal((long) 17, readEdge.Id);
Assert.Equal("knows", readEdge.Label);
@@ -286,7 +286,7 @@
var jsonElement = JsonSerializer.Deserialize<JsonElement>(serializedValue);
var deserializedValue = reader.ToObject(jsonElement);
- Assert.Equal(new List<object> {5, 6, null}, deserializedValue);
+ Assert.Equal(new List<object?> {5, 6, null}, deserializedValue);
}
[Theory, MemberData(nameof(Versions))]
@@ -296,7 +296,7 @@
var reader = CreateStandardGraphSONReader(version);
var jsonElement = JsonSerializer.Deserialize<JsonElement>(graphSon);
- T readT = reader.ToObject(jsonElement);
+ T readT = reader.ToObject(jsonElement)!;
Assert.Equal(T.Label, readT);
}
@@ -333,7 +333,7 @@
var reader = CreateStandardGraphSONReader(2);
var jsonElement = JsonSerializer.Deserialize<JsonElement>(graphSon);
- Path readPath = reader.ToObject(jsonElement);
+ Path readPath = reader.ToObject(jsonElement)!;
Assert.Equal("path[v[1], v[3], lop]", readPath.ToString());
Assert.Equal(new Vertex(1), readPath[0]);
@@ -351,7 +351,7 @@
var reader = CreateStandardGraphSONReader(3);
var jsonElement = JsonSerializer.Deserialize<JsonElement>(graphSon);
- Path readPath = reader.ToObject(jsonElement);
+ Path readPath = reader.ToObject(jsonElement)!;
Assert.Equal("path[v[5]]", readPath.ToString());
Assert.Equal(new Vertex(5L), readPath[0]);
@@ -370,13 +370,13 @@
var reader = CreateStandardGraphSONReader(version);
var jsonElement = JsonSerializer.Deserialize<JsonElement>(graphSon);
- Property readProperty = reader.ToObject(jsonElement);
+ Property readProperty = reader.ToObject(jsonElement)!;
Assert.Equal("aKey", readProperty.Key);
Assert.Equal((long) 17, readProperty.Value);
- Assert.Equal(typeof(Edge), readProperty.Element.GetType());
+ Assert.Equal(typeof(Edge), readProperty.Element!.GetType());
var edge = readProperty.Element as Edge;
- Assert.Equal((long) 122, edge.Id);
+ Assert.Equal((long) 122, edge!.Id);
Assert.Equal("knows", edge.Label);
Assert.Equal("x", edge.InV.Id);
Assert.Equal("y", edge.OutV.Id);
@@ -415,7 +415,7 @@
var reader = CreateStandardGraphSONReader(version);
var jsonElement = JsonSerializer.Deserialize<JsonElement>(graphSon);
- VertexProperty readVertexProperty = reader.ToObject(jsonElement);
+ VertexProperty readVertexProperty = reader.ToObject(jsonElement)!;
Assert.Equal("anId", readVertexProperty.Id);
Assert.Equal("aKey", readVertexProperty.Label);
@@ -431,7 +431,7 @@
var reader = CreateStandardGraphSONReader(version);
var jsonElement = JsonSerializer.Deserialize<JsonElement>(graphSon);
- VertexProperty readVertexProperty = reader.ToObject(jsonElement);
+ VertexProperty readVertexProperty = reader.ToObject(jsonElement)!;
Assert.Equal(1, readVertexProperty.Id);
Assert.Equal("name", readVertexProperty.Label);
@@ -460,7 +460,7 @@
var reader = CreateStandardGraphSONReader(version);
var jsonElement = JsonSerializer.Deserialize<JsonElement>(graphSon);
- Vertex deserializedValue = reader.ToObject(jsonElement);
+ Vertex deserializedValue = reader.ToObject(jsonElement)!;
Assert.Equal("person", deserializedValue.Label);
}
@@ -473,11 +473,11 @@
var reader = CreateStandardGraphSONReader(version);
var jsonElement = JsonSerializer.Deserialize<JsonElement>(graphSon);
- Vertex readVertex = reader.ToObject(jsonElement);
+ Vertex readVertex = reader.ToObject(jsonElement)!;
Assert.Equal(new Vertex(1), readVertex);
Assert.Equal("person", readVertex.Label);
- Assert.Equal(typeof(int), readVertex.Id.GetType());
+ Assert.Equal(typeof(int), readVertex.Id!.GetType());
}
[Theory, MemberData(nameof(VersionsSupportingCollections))]
@@ -576,7 +576,7 @@
var reader = CreateStandardGraphSONReader(version);
var jsonElement = JsonSerializer.Deserialize<JsonElement>(json);
- Traverser deserializedValue = reader.ToObject(jsonElement);
+ Traverser deserializedValue = reader.ToObject(jsonElement)!;
Assert.Equal(10, deserializedValue.Bulk);
Assert.Equal(1, deserializedValue.Object);
diff --git a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSONWriterTests.cs b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSONWriterTests.cs
index 9247831..3a42823 100644
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSONWriterTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/GraphSONWriterTests.cs
@@ -295,7 +295,7 @@
public void ShouldSerializeGList(int version)
{
var writer = CreateGraphSONWriter(version);
- var list = new List<object> {5, 6, null};
+ var list = new List<object?> {5, 6, null};
var serializedGraphSON = writer.WriteObject(list);
@@ -552,7 +552,7 @@
internal class TestGraphSONSerializer : IGraphSONSerializer
{
- public string TestNamespace { get; set; }
+ public string? TestNamespace { get; set; }
public Dictionary<string, dynamic> Dictify(dynamic objectData, GraphSONWriter writer)
{
diff --git a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/TestClass.cs b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/TestClass.cs
index 13d1bca..1fba943 100644
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/TestClass.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/IO/GraphSON/TestClass.cs
@@ -25,6 +25,6 @@
{
internal class TestClass
{
- public dynamic Value { get; set; }
+ public dynamic? Value { get; set; }
}
}
\ No newline at end of file
diff --git a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/PathTests.cs b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/PathTests.cs
index 6df92ba..a996df1 100644
--- a/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/PathTests.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.UnitTest/Structure/PathTests.cs
@@ -40,7 +40,7 @@
new HashSet<string> {"c", "b"},
new HashSet<string>()
};
- var objects = new List<object> {1, new Vertex(1), "hello"};
+ var objects = new List<object?> {1, new Vertex(1), "hello"};
var path = new Path(labels, objects);
@@ -57,7 +57,7 @@
new HashSet<string> {"c", "b"},
new HashSet<string>()
};
- var path = new Path(labels, new List<object>());
+ var path = new Path(labels, new List<object?>());
var containsKey = path.ContainsKey("c");
@@ -73,7 +73,7 @@
new HashSet<string> {"c", "b"},
new HashSet<string>()
};
- var path = new Path(labels, new List<object>());
+ var path = new Path(labels, new List<object?>());
var containsKey = path.ContainsKey("z");
@@ -83,7 +83,7 @@
[Fact]
public void ShouldReturnCountOfObjectsForCountProperty()
{
- var objects = new List<object> {1, new Vertex(1), "hello"};
+ var objects = new List<object?> {1, new Vertex(1), "hello"};
var path = new Path(new List<ISet<string>>(), objects);
var count = path.Count;
@@ -94,7 +94,7 @@
[Fact]
public void ShouldEnumeratorObjectsIntoListWhenToListIsCalled()
{
- var objects = new List<object> {1, new Vertex(1), "hello"};
+ var objects = new List<object?> {1, new Vertex(1), "hello"};
var path = new Path(new List<ISet<string>>(), objects);
var enumeratedObj = path.ToList();
@@ -112,7 +112,7 @@
new HashSet<string> {"a", "b"},
new HashSet<string> {"c", "b"},
new HashSet<string>()
- }, new List<object> {1, new Vertex(1), "hello"});
+ }, new List<object?> {1, new Vertex(1), "hello"});
var secondPath =
new Path(
new List<ISet<string>>
@@ -120,7 +120,7 @@
new HashSet<string> {"a", "b"},
new HashSet<string> {"c", "b"},
new HashSet<string>()
- }, new List<object> {1, new Vertex(1), "hello"});
+ }, new List<object?> {1, new Vertex(1), "hello"});
var equals = firstPath.Equals(secondPath);
@@ -137,7 +137,7 @@
new HashSet<string> {"a", "b"},
new HashSet<string> {"c", "b"},
new HashSet<string>()
- }, new List<object> {1, new Vertex(1), "hello"});
+ }, new List<object?> {1, new Vertex(1), "hello"});
var secondPath =
new Path(
new List<ISet<string>>
@@ -145,7 +145,7 @@
new HashSet<string> {"a"},
new HashSet<string> {"c", "b"},
new HashSet<string>()
- }, new List<object> {1, new Vertex(1), "hello"});
+ }, new List<object?> {1, new Vertex(1), "hello"});
var equals = firstPath.Equals(secondPath);
@@ -162,7 +162,7 @@
new HashSet<string> {"a", "b"},
new HashSet<string> {"c", "b"},
new HashSet<string>()
- }, new List<object> {1, new Vertex(1), "hello"});
+ }, new List<object?> {1, new Vertex(1), "hello"});
var secondPath =
new Path(
new List<ISet<string>>
@@ -170,7 +170,7 @@
new HashSet<string> {"a", "b"},
new HashSet<string> {"c", "b"},
new HashSet<string>()
- }, new List<object> {3, new Vertex(1), "hello"});
+ }, new List<object?> {3, new Vertex(1), "hello"});
var equals = firstPath.Equals(secondPath);
@@ -187,7 +187,7 @@
new HashSet<string> {"a", "b"},
new HashSet<string> {"c", "b"},
new HashSet<string>()
- }, new List<object> { 1, new Vertex(1), "hello" });
+ }, new List<object?> { 1, new Vertex(1), "hello" });
object secondPath =
new Path(
new List<ISet<string>>
@@ -195,7 +195,7 @@
new HashSet<string> {"a", "b"},
new HashSet<string> {"c", "b"},
new HashSet<string>()
- }, new List<object> { 1, new Vertex(1), "hello" });
+ }, new List<object?> { 1, new Vertex(1), "hello" });
var equals = firstPath.Equals(secondPath);
@@ -212,7 +212,7 @@
new HashSet<string> {"a", "b"},
new HashSet<string> {"c", "b"},
new HashSet<string>()
- }, new List<object> { 1, new Vertex(1), "hello" });
+ }, new List<object?> { 1, new Vertex(1), "hello" });
object secondPath =
new Path(
new List<ISet<string>>
@@ -220,7 +220,7 @@
new HashSet<string> {"a"},
new HashSet<string> {"c", "b"},
new HashSet<string>()
- }, new List<object> { 1, new Vertex(1), "hello" });
+ }, new List<object?> { 1, new Vertex(1), "hello" });
var equals = firstPath.Equals(secondPath);
@@ -237,7 +237,7 @@
new HashSet<string> {"a", "b"},
new HashSet<string> {"c", "b"},
new HashSet<string>()
- }, new List<object> { 1, new Vertex(1), "hello" });
+ }, new List<object?> { 1, new Vertex(1), "hello" });
object secondPath =
new Path(
new List<ISet<string>>
@@ -245,7 +245,7 @@
new HashSet<string> {"a", "b"},
new HashSet<string> {"c", "b"},
new HashSet<string>()
- }, new List<object> { 3, new Vertex(1), "hello" });
+ }, new List<object?> { 3, new Vertex(1), "hello" });
var equals = firstPath.Equals(secondPath);
@@ -255,7 +255,7 @@
[Fact]
public void ShouldReturnFalseForEqualsWhereOtherIsNull()
{
- var path = new Path(new List<ISet<string>> {new HashSet<string> {"a", "b"},}, new List<object> {1});
+ var path = new Path(new List<ISet<string>> { new HashSet<string> { "a", "b" }, }, new List<object?> { 1 });
var equals = path.Equals(null);
@@ -272,7 +272,7 @@
new HashSet<string> {"a", "b"},
new HashSet<string> {"c", "b"},
new HashSet<string>()
- }, new List<object> { 1, new Vertex(1), "hello" });
+ }, new List<object?> { 1, new Vertex(1), "hello" });
var secondPath =
new Path(
new List<ISet<string>>
@@ -280,7 +280,7 @@
new HashSet<string> {"a", "b"},
new HashSet<string> {"c", "b"},
new HashSet<string>()
- }, new List<object> { 1, new Vertex(1), "hello" });
+ }, new List<object?> { 1, new Vertex(1), "hello" });
var firstHashCode = firstPath.GetHashCode();
var secondHashCode = secondPath.GetHashCode();
@@ -291,7 +291,7 @@
[Fact]
public void ShouldThrowWhenInvalidIndexIsAccessed()
{
- var objects = new List<object> {1, new Vertex(1), "hello"};
+ var objects = new List<object?> {1, new Vertex(1), "hello"};
var path = new Path(new List<ISet<string>>(), objects);
Assert.Throws<ArgumentOutOfRangeException>(() => path[3]);
@@ -300,7 +300,7 @@
[Fact]
public void ShouldReturnObjectsByTheirIndex()
{
- var objects = new List<object> {1, new Vertex(1), "hello"};
+ var objects = new List<object?> {1, new Vertex(1), "hello"};
var path = new Path(new List<ISet<string>>(), objects);
Assert.Equal(1, path[0]);
@@ -317,7 +317,7 @@
new HashSet<string> {"c", "b"},
new HashSet<string>()
};
- var objects = new List<object> {1, new Vertex(1), "hello"};
+ var objects = new List<object?> {1, new Vertex(1), "hello"};
var path = new Path(labels, objects);
var bObjects = path["b"];
@@ -334,7 +334,7 @@
new HashSet<string> {"c", "b"},
new HashSet<string>()
};
- var objects = new List<object> {1, new Vertex(1), "hello"};
+ var objects = new List<object?> {1, new Vertex(1), "hello"};
var path = new Path(labels, objects);
Assert.Equal(1, path["a"]);
@@ -345,7 +345,7 @@
[Fact]
public void ShouldThrowWhenUnknownKeyIsAccessed()
{
- var path = new Path(new List<ISet<string>>(), new List<object>());
+ var path = new Path(new List<ISet<string>>(), new List<object?>());
Assert.Throws<KeyNotFoundException>(() => path["unknownKey"]);
}
@@ -359,7 +359,7 @@
new HashSet<string> {"c", "b"},
new HashSet<string>()
};
- var objects = new List<object> {1, new Vertex(1), "hello"};
+ var objects = new List<object?> {1, new Vertex(1), "hello"};
var path = new Path(labels, objects);
var pathStr = path.ToString();
@@ -376,10 +376,10 @@
new HashSet<string> {"c", "b"},
new HashSet<string>()
};
- var objects = new List<object> {1, new Vertex(1), "hello"};
+ var objects = new List<object?> {1, new Vertex(1), "hello"};
var path = new Path(labels, objects);
- var success = path.TryGetValue("b", out object actualObj);
+ var success = path.TryGetValue("b", out object? actualObj);
Assert.True(success);
Assert.Equal(new List<object> {1, new Vertex(1)}, actualObj);
@@ -394,10 +394,10 @@
new HashSet<string> {"c", "b"},
new HashSet<string>()
};
- var objects = new List<object> {1, new Vertex(1), "hello"};
+ var objects = new List<object?> {1, new Vertex(1), "hello"};
var path = new Path(labels, objects);
- var success = path.TryGetValue("b", out object actualObj);
+ var success = path.TryGetValue("b", out var actualObj);
Assert.True(success);
Assert.Equal(new Vertex(1), actualObj);
@@ -406,9 +406,9 @@
[Fact]
public void ShouldReturnFalseForTryGetWhenUnknownKeyIsProvided()
{
- var path = new Path(new List<ISet<string>>(), new List<object>());
+ var path = new Path(new List<ISet<string>>(), new List<object?>());
- var success = path.TryGetValue("unknownKey", out object _);
+ var success = path.TryGetValue("unknownKey", out _);
Assert.False(success);
}
diff --git a/gremlin-dotnet/test/pom.xml b/gremlin-dotnet/test/pom.xml
index a8d751f..66ab0f7 100644
--- a/gremlin-dotnet/test/pom.xml
+++ b/gremlin-dotnet/test/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>gremlin-dotnet</artifactId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-dotnet-tests</artifactId>
<name>Apache TinkerPop :: Gremlin.Net - Tests</name>
diff --git a/gremlin-driver/pom.xml b/gremlin-driver/pom.xml
index 97246a6..8c21eef 100644
--- a/gremlin-driver/pom.xml
+++ b/gremlin-driver/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>tinkerpop</artifactId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-driver</artifactId>
<name>Apache TinkerPop :: Gremlin Driver</name>
@@ -32,6 +32,11 @@
<version>${project.version}</version>
</dependency>
<dependency>
+ <groupId>org.apache.tinkerpop</groupId>
+ <artifactId>gremlin-util</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>${netty.version}</version>
@@ -60,6 +65,12 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.apache.tinkerpop</groupId>
+ <artifactId>gremlin-socket-server</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/WebSocketClientBehaviorIntegrateTest.java b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/WebSocketClientBehaviorIntegrateTest.java
index aa6672c..6fbc3f6 100644
--- a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/WebSocketClientBehaviorIntegrateTest.java
+++ b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/WebSocketClientBehaviorIntegrateTest.java
@@ -33,6 +33,8 @@
import org.apache.tinkerpop.gremlin.driver.ser.Serializers;
import org.apache.tinkerpop.gremlin.structure.Vertex;
+import java.io.IOException;
+import java.nio.file.FileSystems;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
@@ -54,8 +56,14 @@
private static LogCaptor logCaptor;
+ private final SocketServerSettings settings;
+
private SimpleSocketServer server;
+ public WebSocketClientBehaviorIntegrateTest() throws IOException {
+ settings = SocketServerSettings.read(FileSystems.getDefault().getPath("..","gremlin-tools", "gremlin-socket-server", "conf", "test-ws-gremlin.yaml"));
+ }
+
@BeforeClass
public static void setupLogCaptor() {
logCaptor = LogCaptor.forRoot();
@@ -70,12 +78,12 @@
public void setUp() throws InterruptedException {
logCaptor.clearLogs();
- server = new SimpleSocketServer();
+ server = new SimpleSocketServer(settings);
if (name.getMethodName().equals("shouldAttemptHandshakeForLongerThanDefaultNettySslHandshakeTimeout") ||
name.getMethodName().equals("shouldPrintCorrectErrorForRegularWebSocketHandshakeTimeout")) {
server.start(new TestWSNoOpInitializer());
} else {
- server.start(new TestWSGremlinInitializer());
+ server.start(new TestWSGremlinInitializer(settings));
}
}
@@ -90,7 +98,7 @@
*/
@Test
public void shouldIncludeUserAgentInHandshakeRequest() {
- final Cluster cluster = Cluster.build("localhost").port(SimpleSocketServer.PORT)
+ final Cluster cluster = Cluster.build("localhost").port(settings.PORT)
.minConnectionPoolSize(1)
.maxConnectionPoolSize(1)
.serializer(Serializers.GRAPHSON_V2D0)
@@ -99,7 +107,7 @@
// trigger the testing server to return captured user agent
String returnedUserAgent = client.submit("1", RequestOptions.build()
- .overrideRequestId(TestWSGremlinInitializer.USER_AGENT_REQUEST_ID).create()).one().getString();
+ .overrideRequestId(settings.USER_AGENT_REQUEST_ID).create()).one().getString();
assertEquals(UserAgent.USER_AGENT, returnedUserAgent);
}
@@ -108,7 +116,7 @@
*/
@Test
public void shouldNotIncludeUserAgentInHandshakeRequestIfDisabled() {
- final Cluster cluster = Cluster.build("localhost").port(SimpleSocketServer.PORT)
+ final Cluster cluster = Cluster.build("localhost").port(settings.PORT)
.minConnectionPoolSize(1)
.maxConnectionPoolSize(1)
.serializer(Serializers.GRAPHSON_V2D0)
@@ -118,7 +126,7 @@
// trigger the testing server to return captured user agent
String returnedUserAgent = client.submit("1", RequestOptions.build()
- .overrideRequestId(TestWSGremlinInitializer.USER_AGENT_REQUEST_ID).create()).one().getString();
+ .overrideRequestId(settings.USER_AGENT_REQUEST_ID).create()).one().getString();
assertEquals("", returnedUserAgent);
}
@@ -143,7 +151,7 @@
// pool used just for the purpose of initializing the hosts).
final Cluster cluster = Cluster.build("localhost").
addContactPoint("localhost").
- addContactPoint("localhost").port(SimpleSocketServer.PORT).
+ addContactPoint("localhost").port(settings.PORT).
workerPoolSize(1).
minConnectionPoolSize(32).maxConnectionPoolSize(32).create();
@@ -180,7 +188,7 @@
*/
@Test
public void shouldRemoveConnectionFromPoolWhenServerClose_WithNoPendingRequests() throws InterruptedException {
- final Cluster cluster = Cluster.build("localhost").port(SimpleSocketServer.PORT)
+ final Cluster cluster = Cluster.build("localhost").port(settings.PORT)
.minConnectionPoolSize(1)
.maxConnectionPoolSize(1)
.serializer(Serializers.GRAPHSON_V2D0)
@@ -199,7 +207,7 @@
// trigger the testing server to send a WS close frame
Vertex v = client.submit("1", RequestOptions.build()
- .overrideRequestId(TestWSGremlinInitializer.SINGLE_VERTEX_DELAYED_CLOSE_CONNECTION_REQUEST_ID).create())
+ .overrideRequestId(settings.SINGLE_VERTEX_DELAYED_CLOSE_CONNECTION_REQUEST_ID).create())
.one().getVertex();
assertNotNull(v);
@@ -216,7 +224,7 @@
// assert sanity after connection replacement
v = client.submit("1",
- RequestOptions.build().overrideRequestId(TestWSGremlinInitializer.SINGLE_VERTEX_REQUEST_ID).create())
+ RequestOptions.build().overrideRequestId(settings.SINGLE_VERTEX_REQUEST_ID).create())
.one().getVertex();
assertNotNull(v);
}
@@ -227,7 +235,7 @@
*/
@Test
public void shouldRemoveConnectionFromPoolWhenServerClose_WithPendingRequests() throws InterruptedException, ExecutionException {
- final Cluster cluster = Cluster.build("localhost").port(SimpleSocketServer.PORT)
+ final Cluster cluster = Cluster.build("localhost").port(settings.PORT)
.minConnectionPoolSize(1)
.maxConnectionPoolSize(1)
.serializer(Serializers.GRAPHSON_V2D0)
@@ -244,9 +252,9 @@
// Send two requests in flight. Both should error out.
final CompletableFuture<ResultSet> req1 = client.submitAsync("1", RequestOptions.build()
- .overrideRequestId(TestWSGremlinInitializer.CLOSE_CONNECTION_REQUEST_ID).create());
+ .overrideRequestId(settings.CLOSE_CONNECTION_REQUEST_ID).create());
final CompletableFuture<ResultSet> req2 = client.submitAsync("1", RequestOptions.build()
- .overrideRequestId(TestWSGremlinInitializer.CLOSE_CONNECTION_REQUEST_ID_2).create());
+ .overrideRequestId(settings.CLOSE_CONNECTION_REQUEST_ID_2).create());
// assert both are sent on same connection
@@ -264,7 +272,7 @@
// assert sanity after connection replacement
final Vertex v = client.submit("1",
- RequestOptions.build().overrideRequestId(TestWSGremlinInitializer.SINGLE_VERTEX_REQUEST_ID).create())
+ RequestOptions.build().overrideRequestId(settings.SINGLE_VERTEX_REQUEST_ID).create())
.one().getVertex();
assertNotNull(v);
}
@@ -275,7 +283,7 @@
*/
@Test
public void shouldNotCreateReplacementConnectionWhenClientClosesConnection() throws ExecutionException, InterruptedException {
- final Cluster cluster = Cluster.build("localhost").port(SimpleSocketServer.PORT)
+ final Cluster cluster = Cluster.build("localhost").port(settings.PORT)
.minConnectionPoolSize(1)
.maxConnectionPoolSize(1)
.serializer(Serializers.GRAPHSON_V2D0)
@@ -308,7 +316,7 @@
*/
@Test
public void shouldAttemptHandshakeForLongerThanDefaultNettySslHandshakeTimeout() {
- final Cluster cluster = Cluster.build("localhost").port(SimpleSocketServer.PORT)
+ final Cluster cluster = Cluster.build("localhost").port(settings.PORT)
.minConnectionPoolSize(1)
.maxConnectionPoolSize(1)
.connectionSetupTimeoutMillis(20000) // needs to be larger than 10000ms.
@@ -337,7 +345,7 @@
*/
@Test
public void shouldPrintCorrectErrorForRegularWebSocketHandshakeTimeout() {
- final Cluster cluster = Cluster.build("localhost").port(SimpleSocketServer.PORT)
+ final Cluster cluster = Cluster.build("localhost").port(settings.PORT)
.minConnectionPoolSize(1)
.maxConnectionPoolSize(1)
.connectionSetupTimeoutMillis(100)
diff --git a/gremlin-go/driver/anonymousTraversal.go b/gremlin-go/driver/anonymousTraversal.go
index a9475c6..37fda56 100644
--- a/gremlin-go/driver/anonymousTraversal.go
+++ b/gremlin-go/driver/anonymousTraversal.go
@@ -45,6 +45,8 @@
type AnonymousTraversal interface {
// T__ creates an empty GraphTraversal.
T__(args ...interface{}) *GraphTraversal
+ // E adds the e step to the GraphTraversal.
+ E(args ...interface{}) *GraphTraversal
// V adds the v step to the GraphTraversal.
V(args ...interface{}) *GraphTraversal
// AddE adds the addE step to the GraphTraversal.
@@ -278,6 +280,11 @@
return anonymousTraversal.Inject(args...)
}
+// E adds the e step to the GraphTraversal.
+func (anonymousTraversal *anonymousTraversal) E(args ...interface{}) *GraphTraversal {
+ return anonymousTraversal.graphTraversal().E(args...)
+}
+
// V adds the v step to the GraphTraversal.
func (anonymousTraversal *anonymousTraversal) V(args ...interface{}) *GraphTraversal {
return anonymousTraversal.graphTraversal().V(args...)
diff --git a/gremlin-go/driver/cucumber/gremlin.go b/gremlin-go/driver/cucumber/gremlin.go
index 88a5be9..5770e44 100644
--- a/gremlin-go/driver/cucumber/gremlin.go
+++ b/gremlin-go/driver/cucumber/gremlin.go
@@ -469,6 +469,12 @@
"g_E_sampleX1X_count": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.E().Sample(1).Count()}},
"g_V_sampleX1X_byXageX_count": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Sample(1).By("age").Count()}},
"g_V_order_byXnoX_count": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Order().By("no").Count()}},
+ "g_V_EX11X": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().E(p["eid11"])}},
+ "g_EX11X_E": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.E(p["eid11"]).E()}},
+ "g_V_EXnullX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().E(nil)}},
+ "g_V_EXlistXnullXX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().E(p["xx1"])}},
+ "g_injectX1X_EX11_nullX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.Inject(1).E(p["eid11"], nil)}},
+ "g_injectX1X_coalesceXEX_hasLabelXtestsX_addEXtestsX_from_V_hasXnameX_XjoshXX_toXV_hasXnameX_XvadasXXX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.AddV("person").Property("name", "josh").AddV("person").Property("name", "vadas")}, func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.Inject(1).Coalesce(gremlingo.T__.E().HasLabel("tests"), gremlingo.T__.AddE("tests").From(gremlingo.T__.V().Has("name", "josh")).To(gremlingo.T__.V().Has("name", "vadas")))}, func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.E().HasLabel("tests")}},
"g_V_properties_element": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V(p["xx1"]).Properties().Element().Limit(1)}},
"g_E_properties_element": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.E(p["xx1"]).Properties().Element().Limit(1)}},
"g_V_properties_properties_element_element": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V(p["xx1"]).Properties().Properties().Element().Element().Limit(1)}},
diff --git a/gremlin-go/driver/graphTraversal.go b/gremlin-go/driver/graphTraversal.go
index d398650..c63dea3 100644
--- a/gremlin-go/driver/graphTraversal.go
+++ b/gremlin-go/driver/graphTraversal.go
@@ -58,6 +58,12 @@
return g
}
+// E adds the e step to the GraphTraversal.
+func (g *GraphTraversal) E(args ...interface{}) *GraphTraversal {
+ g.Bytecode.AddStep("E", args...)
+ return g
+}
+
// AddE adds the addE step to the GraphTraversal.
func (g *GraphTraversal) AddE(args ...interface{}) *GraphTraversal {
g.Bytecode.AddStep("addE", args...)
diff --git a/gremlin-go/pom.xml b/gremlin-go/pom.xml
index 4359cd9..cc3db4d 100644
--- a/gremlin-go/pom.xml
+++ b/gremlin-go/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>tinkerpop</artifactId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-go</artifactId>
<name>Apache TinkerPop :: Gremlin Go</name>
diff --git a/gremlin-groovy/pom.xml b/gremlin-groovy/pom.xml
index fc1fc89..2d5d46f 100644
--- a/gremlin-groovy/pom.xml
+++ b/gremlin-groovy/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>tinkerpop</artifactId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-groovy</artifactId>
<name>Apache TinkerPop :: Gremlin Groovy</name>
diff --git a/gremlin-javascript/pom.xml b/gremlin-javascript/pom.xml
index 66a04d7..37150e2 100644
--- a/gremlin-javascript/pom.xml
+++ b/gremlin-javascript/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>tinkerpop</artifactId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-javascript</artifactId>
<name>Apache TinkerPop :: Gremlin Javascript</name>
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/connection.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/connection.js
index acaeab4..8aadb33 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/connection.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/connection.js
@@ -68,7 +68,6 @@
* @param {Boolean} [options.pingEnabled] Setup ping interval. Defaults to: true.
* @param {Number} [options.pingInterval] Ping request interval in ms if ping enabled. Defaults to: 60000.
* @param {Number} [options.pongTimeout] Timeout of pong response in ms after sending a ping. Defaults to: 30000.
- * @param {Boolean} [options.connectOnStartup] Deprecated and non-functional. Open websocket on startup.
* @constructor
*/
constructor(url, options) {
@@ -104,12 +103,6 @@
this._pingEnabled = this.options.pingEnabled === false ? false : true;
this._pingIntervalDelay = this.options.pingInterval || pingIntervalDelay;
this._pongTimeoutDelay = this.options.pongTimeout || pongTimeoutDelay;
-
- if (this.options.connectOnStartup) {
- console.warn(
- 'connectOnStartup is now deprecated and non-functional. To open a connection, please call open() after instantiating connection object.',
- );
- }
}
/**
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js
index 292439e..60b03cc 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/process/graph-traversal.js
@@ -365,6 +365,16 @@
}
/**
+ * Graph traversal E method.
+ * @param {...Object} args
+ * @returns {GraphTraversal}
+ */
+ E(...args) {
+ this.bytecode.addStep('E', args);
+ return this;
+ }
+
+ /**
* Graph traversal addE method.
* @param {...Object} args
* @returns {GraphTraversal}
@@ -1443,6 +1453,7 @@
* @type {Object}
*/
const statics = {
+ E: (...args) => callOnEmptyTraversal('E', args),
V: (...args) => callOnEmptyTraversal('V', args),
addE: (...args) => callOnEmptyTraversal('addE', args),
addV: (...args) => callOnEmptyTraversal('addV', args),
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/package-lock.json b/gremlin-javascript/src/main/javascript/gremlin-javascript/package-lock.json
index 1dae26f..f8e7da2 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/package-lock.json
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "gremlin",
- "version": "3.6.2-alpha1",
+ "version": "3.7.0-alpha1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "gremlin",
- "version": "3.6.2-alpha1",
+ "version": "3.7.0-alpha1",
"license": "Apache-2.0",
"dependencies": {
"ws": "^8.11.0"
@@ -17,13 +17,13 @@
"colors": "1.4.0",
"cross-env": "^7.0.3",
"cucumber": "~6.0.7",
- "eslint": "^8.21.0",
+ "eslint": "^8.23.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"grunt": "^1.5.3",
"grunt-cli": "~1.4.3",
"grunt-jsdoc": "~2.4.1",
- "mocha": "^10.0.0",
+ "mocha": "^10.1.0",
"prettier": "^2.7.1"
},
"engines": {
@@ -56,14 +56,14 @@
}
},
"node_modules/@eslint/eslintrc": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz",
- "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==",
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz",
+ "integrity": "sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==",
"dev": true,
"dependencies": {
"ajv": "^6.12.4",
"debug": "^4.3.2",
- "espree": "^9.3.2",
+ "espree": "^9.4.0",
"globals": "^13.15.0",
"ignore": "^5.2.0",
"import-fresh": "^3.2.1",
@@ -73,6 +73,9 @@
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
}
},
"node_modules/@eslint/eslintrc/node_modules/argparse": {
@@ -129,6 +132,19 @@
"url": "https://github.com/sponsors/nzakas"
}
},
+ "node_modules/@humanwhocodes/module-importer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
+ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
+ "dev": true,
+ "engines": {
+ "node": ">=12.22"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/nzakas"
+ }
+ },
"node_modules/@humanwhocodes/object-schema": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz",
@@ -192,12 +208,6 @@
"integrity": "sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==",
"dev": true
},
- "node_modules/@ungap/promise-all-settled": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz",
- "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==",
- "dev": true
- },
"node_modules/abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
@@ -934,14 +944,15 @@
}
},
"node_modules/eslint": {
- "version": "8.21.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.21.0.tgz",
- "integrity": "sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA==",
+ "version": "8.23.1",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.1.tgz",
+ "integrity": "sha512-w7C1IXCc6fNqjpuYd0yPlcTKKmHlHHktRkzmBPZ+7cvNBQuiNjx0xaMTjAJGCafJhQkrFJooREv0CtrVzmHwqg==",
"dev": true,
"dependencies": {
- "@eslint/eslintrc": "^1.3.0",
+ "@eslint/eslintrc": "^1.3.2",
"@humanwhocodes/config-array": "^0.10.4",
"@humanwhocodes/gitignore-to-minimatch": "^1.0.2",
+ "@humanwhocodes/module-importer": "^1.0.1",
"ajv": "^6.10.0",
"chalk": "^4.0.0",
"cross-spawn": "^7.0.2",
@@ -951,13 +962,12 @@
"eslint-scope": "^7.1.1",
"eslint-utils": "^3.0.0",
"eslint-visitor-keys": "^3.3.0",
- "espree": "^9.3.3",
+ "espree": "^9.4.0",
"esquery": "^1.4.0",
"esutils": "^2.0.2",
"fast-deep-equal": "^3.1.3",
"file-entry-cache": "^6.0.1",
"find-up": "^5.0.0",
- "functional-red-black-tree": "^1.0.1",
"glob-parent": "^6.0.1",
"globals": "^13.15.0",
"globby": "^11.1.0",
@@ -966,6 +976,7 @@
"import-fresh": "^3.0.0",
"imurmurhash": "^0.1.4",
"is-glob": "^4.0.0",
+ "js-sdsl": "^4.1.4",
"js-yaml": "^4.1.0",
"json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.4.1",
@@ -976,8 +987,7 @@
"regexpp": "^3.2.0",
"strip-ansi": "^6.0.1",
"strip-json-comments": "^3.1.0",
- "text-table": "^0.2.0",
- "v8-compile-cache": "^2.0.3"
+ "text-table": "^0.2.0"
},
"bin": {
"eslint": "bin/eslint.js"
@@ -1208,9 +1218,9 @@
}
},
"node_modules/espree": {
- "version": "9.3.3",
- "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz",
- "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==",
+ "version": "9.4.0",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz",
+ "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==",
"dev": true,
"dependencies": {
"acorn": "^8.8.0",
@@ -1568,12 +1578,6 @@
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
"dev": true
},
- "node_modules/functional-red-black-tree": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
- "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
- "dev": true
- },
"node_modules/get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
@@ -2240,6 +2244,12 @@
"node": ">=0.10.0"
}
},
+ "node_modules/js-sdsl": {
+ "version": "4.1.4",
+ "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.4.tgz",
+ "integrity": "sha512-Y2/yD55y5jteOAmY50JbUZYwk3CP3wnLPEZnlR1w9oKhITrBEtAxwuWKebFf8hMrPMgbYwFoWK/lH2sBkErELw==",
+ "dev": true
+ },
"node_modules/js-yaml": {
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
@@ -2665,12 +2675,11 @@
}
},
"node_modules/mocha": {
- "version": "10.0.0",
- "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz",
- "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==",
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.1.0.tgz",
+ "integrity": "sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==",
"dev": true,
"dependencies": {
- "@ungap/promise-all-settled": "1.1.2",
"ansi-colors": "4.1.1",
"browser-stdout": "1.3.1",
"chokidar": "3.5.3",
@@ -3736,12 +3745,6 @@
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
"dev": true
},
- "node_modules/v8-compile-cache": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
- "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==",
- "dev": true
- },
"node_modules/v8flags": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz",
@@ -3968,14 +3971,14 @@
}
},
"@eslint/eslintrc": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz",
- "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==",
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz",
+ "integrity": "sha512-AXYd23w1S/bv3fTs3Lz0vjiYemS08jWkI3hYyS9I1ry+0f+Yjs1wm+sU0BS8qDOPrBIkp4qHYC16I8uVtpLajQ==",
"dev": true,
"requires": {
"ajv": "^6.12.4",
"debug": "^4.3.2",
- "espree": "^9.3.2",
+ "espree": "^9.4.0",
"globals": "^13.15.0",
"ignore": "^5.2.0",
"import-fresh": "^3.2.1",
@@ -4027,6 +4030,12 @@
"integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==",
"dev": true
},
+ "@humanwhocodes/module-importer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
+ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
+ "dev": true
+ },
"@humanwhocodes/object-schema": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz",
@@ -4081,12 +4090,6 @@
"integrity": "sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==",
"dev": true
},
- "@ungap/promise-all-settled": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz",
- "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==",
- "dev": true
- },
"abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
@@ -4662,14 +4665,15 @@
"dev": true
},
"eslint": {
- "version": "8.21.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.21.0.tgz",
- "integrity": "sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA==",
+ "version": "8.23.1",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.1.tgz",
+ "integrity": "sha512-w7C1IXCc6fNqjpuYd0yPlcTKKmHlHHktRkzmBPZ+7cvNBQuiNjx0xaMTjAJGCafJhQkrFJooREv0CtrVzmHwqg==",
"dev": true,
"requires": {
- "@eslint/eslintrc": "^1.3.0",
+ "@eslint/eslintrc": "^1.3.2",
"@humanwhocodes/config-array": "^0.10.4",
"@humanwhocodes/gitignore-to-minimatch": "^1.0.2",
+ "@humanwhocodes/module-importer": "^1.0.1",
"ajv": "^6.10.0",
"chalk": "^4.0.0",
"cross-spawn": "^7.0.2",
@@ -4679,13 +4683,12 @@
"eslint-scope": "^7.1.1",
"eslint-utils": "^3.0.0",
"eslint-visitor-keys": "^3.3.0",
- "espree": "^9.3.3",
+ "espree": "^9.4.0",
"esquery": "^1.4.0",
"esutils": "^2.0.2",
"fast-deep-equal": "^3.1.3",
"file-entry-cache": "^6.0.1",
"find-up": "^5.0.0",
- "functional-red-black-tree": "^1.0.1",
"glob-parent": "^6.0.1",
"globals": "^13.15.0",
"globby": "^11.1.0",
@@ -4694,6 +4697,7 @@
"import-fresh": "^3.0.0",
"imurmurhash": "^0.1.4",
"is-glob": "^4.0.0",
+ "js-sdsl": "^4.1.4",
"js-yaml": "^4.1.0",
"json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.4.1",
@@ -4704,8 +4708,7 @@
"regexpp": "^3.2.0",
"strip-ansi": "^6.0.1",
"strip-json-comments": "^3.1.0",
- "text-table": "^0.2.0",
- "v8-compile-cache": "^2.0.3"
+ "text-table": "^0.2.0"
},
"dependencies": {
"ansi-styles": {
@@ -4857,9 +4860,9 @@
"dev": true
},
"espree": {
- "version": "9.3.3",
- "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz",
- "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==",
+ "version": "9.4.0",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz",
+ "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==",
"dev": true,
"requires": {
"acorn": "^8.8.0",
@@ -5135,12 +5138,6 @@
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
"dev": true
},
- "functional-red-black-tree": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
- "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
- "dev": true
- },
"get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
@@ -5633,6 +5630,12 @@
"integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
"dev": true
},
+ "js-sdsl": {
+ "version": "4.1.4",
+ "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.4.tgz",
+ "integrity": "sha512-Y2/yD55y5jteOAmY50JbUZYwk3CP3wnLPEZnlR1w9oKhITrBEtAxwuWKebFf8hMrPMgbYwFoWK/lH2sBkErELw==",
+ "dev": true
+ },
"js-yaml": {
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
@@ -5967,12 +5970,11 @@
"dev": true
},
"mocha": {
- "version": "10.0.0",
- "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz",
- "integrity": "sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA==",
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.1.0.tgz",
+ "integrity": "sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==",
"dev": true,
"requires": {
- "@ungap/promise-all-settled": "1.1.2",
"ansi-colors": "4.1.1",
"browser-stdout": "1.3.1",
"chokidar": "3.5.3",
@@ -6764,12 +6766,6 @@
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
"dev": true
},
- "v8-compile-cache": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
- "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==",
- "dev": true
- },
"v8flags": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz",
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/package.json b/gremlin-javascript/src/main/javascript/gremlin-javascript/package.json
index afee1cd..e1047b6 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/package.json
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/package.json
@@ -1,6 +1,6 @@
{
"name": "gremlin",
- "version": "3.6.2-alpha1",
+ "version": "3.7.0-alpha1",
"description": "JavaScript Gremlin Language Variant",
"author": "Apache TinkerPop team",
"keywords": [
@@ -22,13 +22,13 @@
"colors": "1.4.0",
"cross-env": "^7.0.3",
"cucumber": "~6.0.7",
- "eslint": "^8.21.0",
+ "eslint": "^8.23.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"grunt": "^1.5.3",
"grunt-cli": "~1.4.3",
"grunt-jsdoc": "~2.4.1",
- "mocha": "^10.0.0",
+ "mocha": "^10.1.0",
"prettier": "^2.7.1"
},
"repository": {
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js
index 64979d7..300565d 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js
@@ -488,6 +488,12 @@
g_E_sampleX1X_count: [function({g}) { return g.E().sample(1).count() }],
g_V_sampleX1X_byXageX_count: [function({g}) { return g.V().sample(1).by("age").count() }],
g_V_order_byXnoX_count: [function({g}) { return g.V().order().by("no").count() }],
+ g_V_EX11X: [function({g, eid11}) { return g.V().E(eid11) }],
+ g_EX11X_E: [function({g, eid11}) { return g.E(eid11).E() }],
+ g_V_EXnullX: [function({g}) { return g.V().E(null) }],
+ g_V_EXlistXnullXX: [function({g, xx1}) { return g.V().E(xx1) }],
+ g_injectX1X_EX11_nullX: [function({g, eid11}) { return g.inject(1).E(eid11,null) }],
+ g_injectX1X_coalesceXEX_hasLabelXtestsX_addEXtestsX_from_V_hasXnameX_XjoshXX_toXV_hasXnameX_XvadasXXX: [function({g}) { return g.addV("person").property("name","josh").addV("person").property("name","vadas") }, function({g}) { return g.inject(1).coalesce(__.E().hasLabel("tests"),__.addE("tests").from_(__.V().has("name","josh")).to(__.V().has("name","vadas"))) }, function({g}) { return g.E().hasLabel("tests") }],
g_V_properties_element: [function({g, xx1}) { return g.V(xx1).properties().element().limit(1) }],
g_E_properties_element: [function({g, xx1}) { return g.E(xx1).properties().element().limit(1) }],
g_V_properties_properties_element_element: [function({g, xx1}) { return g.V(xx1).properties().properties().element().element().limit(1) }],
diff --git a/gremlin-language/pom.xml b/gremlin-language/pom.xml
index 051abf5..61224f8 100644
--- a/gremlin-language/pom.xml
+++ b/gremlin-language/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>tinkerpop</artifactId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-language</artifactId>
diff --git a/gremlin-language/src/main/antlr4/Gremlin.g4 b/gremlin-language/src/main/antlr4/Gremlin.g4
index 33a94d4..7d9893e 100644
--- a/gremlin-language/src/main/antlr4/Gremlin.g4
+++ b/gremlin-language/src/main/antlr4/Gremlin.g4
@@ -176,6 +176,7 @@
traversalMethod
: traversalMethod_V
+ | traversalMethod_E
| traversalMethod_addE
| traversalMethod_addV
| traversalMethod_mergeE
@@ -286,6 +287,10 @@
: 'V' LPAREN genericLiteralList RPAREN
;
+traversalMethod_E
+ : 'E' LPAREN genericLiteralList RPAREN
+ ;
+
traversalMethod_addE
: 'addE' LPAREN stringBasedLiteral RPAREN #traversalMethod_addE_String
| 'addE' LPAREN nestedTraversal RPAREN #traversalMethod_addE_Traversal
diff --git a/gremlin-python/pom.xml b/gremlin-python/pom.xml
index c13f1e1..adb76b7 100644
--- a/gremlin-python/pom.xml
+++ b/gremlin-python/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>tinkerpop</artifactId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-python</artifactId>
<name>Apache TinkerPop :: Gremlin Python</name>
diff --git a/gremlin-python/src/main/python/gremlin_python/process/graph_traversal.py b/gremlin-python/src/main/python/gremlin_python/process/graph_traversal.py
index c090ada..6905b06 100644
--- a/gremlin-python/src/main/python/gremlin_python/process/graph_traversal.py
+++ b/gremlin-python/src/main/python/gremlin_python/process/graph_traversal.py
@@ -274,6 +274,10 @@
self.bytecode.add_step("V", *args)
return self
+ def E(self, *args):
+ self.bytecode.add_step("E", *args)
+ return self
+
def addE(self, *args):
warnings.warn(
"gremlin_python.process.GraphTraversal.addE will be replaced by "
@@ -927,6 +931,10 @@
return __.inject(*args)
@classmethod
+ def E(cls, *args):
+ return cls.graph_traversal(None, None, Bytecode()).E(*args)
+
+ @classmethod
def V(cls, *args):
return cls.graph_traversal(None, None, Bytecode()).V(*args)
@@ -1582,6 +1590,10 @@
return session
+def E(*args):
+ return __.E(*args)
+
+
def V(*args):
return __.V(*args)
diff --git a/gremlin-python/src/main/python/radish/gremlin.py b/gremlin-python/src/main/python/radish/gremlin.py
index d46e491..11986a5 100644
--- a/gremlin-python/src/main/python/radish/gremlin.py
+++ b/gremlin-python/src/main/python/radish/gremlin.py
@@ -470,6 +470,12 @@
'g_E_sampleX1X_count': [(lambda g:g.E().sample(1).count())],
'g_V_sampleX1X_byXageX_count': [(lambda g:g.V().sample(1).by('age').count())],
'g_V_order_byXnoX_count': [(lambda g:g.V().order().by('no').count())],
+ 'g_V_EX11X': [(lambda g, eid11=None:g.V().E(eid11))],
+ 'g_EX11X_E': [(lambda g, eid11=None:g.E(eid11).E())],
+ 'g_V_EXnullX': [(lambda g:g.V().E(None))],
+ 'g_V_EXlistXnullXX': [(lambda g, xx1=None:g.V().E(xx1))],
+ 'g_injectX1X_EX11_nullX': [(lambda g, eid11=None:g.inject(1).E(eid11,None))],
+ 'g_injectX1X_coalesceXEX_hasLabelXtestsX_addEXtestsX_from_V_hasXnameX_XjoshXX_toXV_hasXnameX_XvadasXXX': [(lambda g:g.addV('person').property('name','josh').addV('person').property('name','vadas')), (lambda g:g.inject(1).coalesce(__.E().hasLabel('tests'),__.addE('tests').from_(__.V().has('name','josh')).to(__.V().has('name','vadas')))), (lambda g:g.E().hasLabel('tests'))],
'g_V_properties_element': [(lambda g, xx1=None:g.V(xx1).properties().element()[0:1])],
'g_E_properties_element': [(lambda g, xx1=None:g.E(xx1).properties().element()[0:1])],
'g_V_properties_properties_element_element': [(lambda g, xx1=None:g.V(xx1).properties().properties().element().element()[0:1])],
diff --git a/gremlin-python/src/main/python/setup.py b/gremlin-python/src/main/python/setup.py
index cbc9f40..08ea183 100644
--- a/gremlin-python/src/main/python/setup.py
+++ b/gremlin-python/src/main/python/setup.py
@@ -46,7 +46,7 @@
install_requires = [
'nest_asyncio',
- 'aiohttp>=3.8.0,<=3.8.1',
+ 'aiohttp>=3.8.0,<4.0.0',
'aenum>=1.4.5,<4.0.0',
'isodate>=0.6.0,<1.0.0'
]
diff --git a/gremlin-python/src/main/python/tests/process/test_translator.py b/gremlin-python/src/main/python/tests/process/test_translator.py
index e0230d6..61db50a 100644
--- a/gremlin-python/src/main/python/tests/process/test_translator.py
+++ b/gremlin-python/src/main/python/tests/process/test_translator.py
@@ -350,6 +350,12 @@
# 98
tests.append([g.withComputer().V().shortestPath().with_(ShortestPath.target, __.has('name','peter')),
"g.withStrategies(new VertexProgramStrategy()).V().shortestPath().with('~tinkerpop.shortestPath.target',__.has('name','peter'))"])
+ # 99
+ tests.append([g.V().coalesce(__.E(),__.addE('person')),
+ "g.V().coalesce(__.E(),__.addE('person'))"])
+ # 100
+ tests.append([g.inject(1).E(),
+ "g.inject(1).E()"])
tlr = Translator().of('g')
diff --git a/gremlin-server/pom.xml b/gremlin-server/pom.xml
index 7d3017f..9a265db 100644
--- a/gremlin-server/pom.xml
+++ b/gremlin-server/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>tinkerpop</artifactId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-server</artifactId>
<name>Apache TinkerPop :: Gremlin Server</name>
@@ -46,6 +46,11 @@
</dependency>
<dependency>
<groupId>org.apache.tinkerpop</groupId>
+ <artifactId>gremlin-util</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tinkerpop</groupId>
<artifactId>gremlin-groovy</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/gremlin-server/src/main/static/NOTICE b/gremlin-server/src/main/static/NOTICE
index 7da4672..ab0d875 100644
--- a/gremlin-server/src/main/static/NOTICE
+++ b/gremlin-server/src/main/static/NOTICE
@@ -64,3 +64,8 @@
Netty 4.1.85
------------------------------------------------------------------------
Copyright 2014 The Netty Project
+
+------------------------------------------------------------------------
+Objenesis 3.3 - shaded in gremlin-shaded to org.apache.tinkerpop.shaded.objenesis
+------------------------------------------------------------------------
+Copyright 2006-2022 Joe Walnes, Henri Tremblay, Leonardo Mesquita
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/driver/remote/GraphBinaryRemoteGraphComputerProvider.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/driver/remote/GraphBinaryRemoteGraphComputerProvider.java
index 8b1cfea..6701b9f 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/driver/remote/GraphBinaryRemoteGraphComputerProvider.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/driver/remote/GraphBinaryRemoteGraphComputerProvider.java
@@ -56,6 +56,10 @@
method = "g_VX1X_V_valuesXnameX",
reason = "Mid-traversal V()/E() is currently not supported on GraphComputer")
@Graph.OptOut(
+ test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.EdgeTest",
+ method = "*",
+ reason = "Mid-traversal V()/E() is currently not supported on GraphComputer")
+@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.InjectTest",
method = "*",
reason = "The inject() step is not supported by GraphComputer")
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/driver/remote/GraphSONRemoteGraphComputerProvider.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/driver/remote/GraphSONRemoteGraphComputerProvider.java
index 68588ce..77e58d7 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/driver/remote/GraphSONRemoteGraphComputerProvider.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/driver/remote/GraphSONRemoteGraphComputerProvider.java
@@ -56,6 +56,10 @@
method = "g_VX1X_V_valuesXnameX",
reason = "Mid-traversal V()/E() is currently not supported on GraphComputer")
@Graph.OptOut(
+ test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.EdgeTest",
+ method = "*",
+ reason = "Mid-traversal V()/E() is currently not supported on GraphComputer")
+@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.InjectTest",
method = "*",
reason = "The inject() step is not supported by GraphComputer")
diff --git a/gremlin-shaded/pom.xml b/gremlin-shaded/pom.xml
index 8ca39e9..622f80f 100644
--- a/gremlin-shaded/pom.xml
+++ b/gremlin-shaded/pom.xml
@@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>tinkerpop</artifactId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-shaded</artifactId>
<name>Apache TinkerPop :: Gremlin Shaded</name>
diff --git a/gremlin-test/pom.xml b/gremlin-test/pom.xml
index f7837ed..40caddf 100644
--- a/gremlin-test/pom.xml
+++ b/gremlin-test/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>tinkerpop</artifactId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-test</artifactId>
<name>Apache TinkerPop :: Gremlin Test</name>
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/EdgeTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/EdgeTest.java
new file mode 100644
index 0000000..61ca5f6
--- /dev/null
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/EdgeTest.java
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tinkerpop.gremlin.process.traversal.step.map;
+
+import org.apache.tinkerpop.gremlin.FeatureRequirement;
+import org.apache.tinkerpop.gremlin.LoadGraphWith;
+import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
+import org.apache.tinkerpop.gremlin.process.GremlinProcessRunner;
+import org.apache.tinkerpop.gremlin.process.traversal.P;
+import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
+import org.apache.tinkerpop.gremlin.structure.Edge;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.GRATEFUL;
+import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.MODERN;
+import static org.junit.Assert.assertEquals;
+
+/**
+ * @author Valentyn Kahamlyk
+ */
+@RunWith(GremlinProcessRunner.class)
+public abstract class EdgeTest extends AbstractGremlinProcessTest {
+
+ public abstract Traversal<Vertex, Edge> get_g_V_EX11X(final Object e11Id);
+
+ public abstract Traversal<Edge, Edge> get_g_EX11X_E(final Object e11Id);
+
+ public abstract Traversal<Vertex, Edge> get_g_V_EXnullX();
+
+ public abstract Traversal<Integer, Edge> get_g_injectX1X_EX11_nullX(final Object e11Id);
+
+ public abstract Traversal<Integer, Edge> get_g_injectX1X_coalesceXEX_hasLabelXtestsX_addEXtestsX_from_V_hasXnameX_XjoshXX_toXV_hasXnameX_XvadasXXX();
+
+ @Test
+ @LoadGraphWith(MODERN)
+ public void g_V_EX11X() {
+ final Object edgeId = convertToEdgeId("josh", "created", "lop");
+ final Traversal<Vertex, Edge> traversal = get_g_V_EX11X(edgeId);
+ printTraversalForm(traversal);
+ int counter = 0;
+ final Set<Edge> edges = new HashSet<>();
+ while (traversal.hasNext()) {
+ counter++;
+ edges.add(traversal.next());
+ }
+ assertEquals(6, edges.size());
+ assertEquals(6, counter);
+ }
+
+ @Test
+ @LoadGraphWith(MODERN)
+ public void g_EX11X_E() {
+ final Object edgeId = convertToEdgeId("josh", "created", "lop");
+ final Traversal<Edge, Edge> traversal = get_g_EX11X_E(edgeId);
+ printTraversalForm(traversal);
+ int counter = 0;
+ final Set<Edge> edges = new HashSet<>();
+ while (traversal.hasNext()) {
+ counter++;
+ edges.add(traversal.next());
+ }
+ assertEquals(6, edges.size());
+ assertEquals(6, counter);
+ }
+
+ @Test
+ @LoadGraphWith(MODERN)
+ public void g_V_EXnullX() {
+ final Traversal<Vertex, Edge> traversal = get_g_V_EXnullX();
+ printTraversalForm(traversal);
+ int counter = 0;
+ final Set<Edge> edges = new HashSet<>();
+ while (traversal.hasNext()) {
+ counter++;
+ edges.add(traversal.next());
+ }
+ assertEquals(0, edges.size());
+ assertEquals(0, counter);
+ }
+
+ @Test
+ @LoadGraphWith(MODERN)
+ public void g_injectX1X_EX11_nullX() {
+ final Object edgeId = convertToEdgeId("josh", "created", "lop");
+ final Traversal<Integer, Edge> traversal = get_g_injectX1X_EX11_nullX(edgeId);
+ printTraversalForm(traversal);
+ int counter = 0;
+ final Set<Edge> edges = new HashSet<>();
+ while (traversal.hasNext()) {
+ counter++;
+ edges.add(traversal.next());
+ }
+ assertEquals(1, edges.size());
+ assertEquals(1, counter);
+ }
+
+ @Test
+ @LoadGraphWith(MODERN)
+ public void g_injectX1X_coalesceXEX_hasLabelXtestsX_addEXtestsX_from_V_hasXnameX_XjoshXX_toXV_hasXnameX_XvadasXXX() {
+ final Traversal<Integer, Edge> traversal = get_g_injectX1X_coalesceXEX_hasLabelXtestsX_addEXtestsX_from_V_hasXnameX_XjoshXX_toXV_hasXnameX_XvadasXXX();
+ printTraversalForm(traversal);
+ int counter = 0;
+ final Set<Edge> edges = new HashSet<>();
+ while (traversal.hasNext()) {
+ counter++;
+ edges.add(traversal.next());
+ }
+ assertEquals(1, edges.size());
+ assertEquals(1, counter);
+ }
+
+ public static class Traversals extends EdgeTest {
+
+ @Override
+ public Traversal<Vertex, Edge> get_g_V_EX11X(final Object e11Id) { return g.V().E(e11Id); }
+
+ @Override
+ public Traversal<Edge, Edge> get_g_EX11X_E(final Object e11Id) {
+ return g.E(e11Id).E();
+ }
+
+ @Override
+ public Traversal<Vertex, Edge> get_g_V_EXnullX() { return g.V().E(null); }
+
+ @Override
+ public Traversal<Integer, Edge> get_g_injectX1X_EX11_nullX(final Object e11Id) { return g.inject(1).E(e11Id,null); }
+
+ @Override
+ public Traversal<Integer, Edge> get_g_injectX1X_coalesceXEX_hasLabelXtestsX_addEXtestsX_from_V_hasXnameX_XjoshXX_toXV_hasXnameX_XvadasXXX() {
+ return g.inject(1).coalesce(__.E().hasLabel("tests"), __.addE("tests").from(__.V().has("name","josh")).to(__.V().has("name","vadas")));
+ }
+ }
+}
diff --git a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/Edge.feature b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/Edge.feature
new file mode 100644
index 0000000..f3d9232
--- /dev/null
+++ b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/Edge.feature
@@ -0,0 +1,99 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+@StepClassMap @StepE
+Feature: Step - E()
+
+ Scenario: g_V_EX11X
+ Given the modern graph
+ And using the parameter eid11 defined as "e[josh-created->lop].id"
+ And the traversal of
+ """
+ g.V().E(eid11)
+ """
+ When iterated to list
+ Then the result should be unordered
+ | result |
+ | e[josh-created->lop] |
+ | e[josh-created->lop] |
+ | e[josh-created->lop] |
+ | e[josh-created->lop] |
+ | e[josh-created->lop] |
+ | e[josh-created->lop] |
+
+ Scenario: g_EX11X_E
+ Given the modern graph
+ And using the parameter eid11 defined as "e[josh-created->lop].id"
+ And the traversal of
+ """
+ g.E(eid11).E()
+ """
+ When iterated to list
+ Then the result should be unordered
+ | result |
+ | e[marko-created->lop] |
+ | e[marko-knows->josh] |
+ | e[marko-knows->vadas] |
+ | e[peter-created->lop] |
+ | e[josh-created->lop] |
+ | e[josh-created->ripple] |
+
+ Scenario: g_V_EXnullX
+ Given the modern graph
+ And the traversal of
+ """
+ g.V().E(null)
+ """
+ When iterated to list
+ Then the result should be empty
+
+ Scenario: g_V_EXlistXnullXX
+ Given the modern graph
+ And using the parameter xx1 defined as "l[null]"
+ And the traversal of
+ """
+ g.V().E(xx1)
+ """
+ When iterated to list
+ Then the result should be empty
+
+ Scenario: g_injectX1X_EX11_nullX
+ Given the modern graph
+ And using the parameter eid11 defined as "e[josh-created->lop].id"
+ And the traversal of
+ """
+ g.inject(1).E(eid11,null)
+ """
+ When iterated to list
+ Then the result should be unordered
+ | result |
+ | e[josh-created->lop] |
+
+ Scenario: g_injectX1X_coalesceXEX_hasLabelXtestsX_addEXtestsX_from_V_hasXnameX_XjoshXX_toXV_hasXnameX_XvadasXXX
+ Given the empty graph
+ And the graph initializer of
+ """
+ g.addV("person").property("name", "josh").
+ addV("person").property("name", "vadas")
+ """
+ And the traversal of
+ """
+ g.inject(1).coalesce(E().hasLabel("tests"), addE("tests").from(V().has("name","josh")).to(V().has("name","vadas")))
+ """
+ When iterated to list
+ Then the result should have a count of 1
+ And the graph should return 1 for count of "g.E().hasLabel(\"tests\")"
diff --git a/gremlin-tools/gremlin-benchmark/pom.xml b/gremlin-tools/gremlin-benchmark/pom.xml
index fb303f6..24b7b1f 100644
--- a/gremlin-tools/gremlin-benchmark/pom.xml
+++ b/gremlin-tools/gremlin-benchmark/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>gremlin-tools</artifactId>
<groupId>org.apache.tinkerpop</groupId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-benchmark</artifactId>
diff --git a/gremlin-tools/gremlin-coverage/pom.xml b/gremlin-tools/gremlin-coverage/pom.xml
index 6ea2967..c3faf00 100644
--- a/gremlin-tools/gremlin-coverage/pom.xml
+++ b/gremlin-tools/gremlin-coverage/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>gremlin-tools</artifactId>
<groupId>org.apache.tinkerpop</groupId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-coverage</artifactId>
<name>Apache TinkerPop :: Gremlin Coverage</name>
diff --git a/gremlin-tools/gremlin-io-test/pom.xml b/gremlin-tools/gremlin-io-test/pom.xml
index 63df466..494bf39 100644
--- a/gremlin-tools/gremlin-io-test/pom.xml
+++ b/gremlin-tools/gremlin-io-test/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>gremlin-tools</artifactId>
<groupId>org.apache.tinkerpop</groupId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-io-test</artifactId>
<name>Apache TinkerPop :: Gremlin IO Test</name>
diff --git a/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphbinary/GraphBinaryCompatibility.java b/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphbinary/GraphBinaryCompatibility.java
index f58b968..8bd9f95 100644
--- a/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphbinary/GraphBinaryCompatibility.java
+++ b/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphbinary/GraphBinaryCompatibility.java
@@ -63,7 +63,9 @@
V1_3_5_4("3.5.4", "1.0", "v1"),
V1_3_6_0("3.6.0", "1.0", "v1"),
- V1_3_6_1("3.6.1", "1.0", "v1");
+ V1_3_6_1("3.6.1", "1.0", "v1"),
+
+ V1_3_7_0("3.7.0", "1.0", "v1");
private static final String SEP = File.separator;
diff --git a/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONCompatibility.java b/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONCompatibility.java
index 2b70eb4..3d2605b 100644
--- a/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONCompatibility.java
+++ b/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONCompatibility.java
@@ -185,7 +185,12 @@
V1D0_3_6_1("3.6.1", "1.0", "v1d0"),
V2D0_PARTIAL_3_6_1("3.6.1", "2.0", "v2d0-partial"),
V2D0_NO_TYPE_3_6_1("3.6.1", "2.0", "v2d0-no-types"),
- V3D0_PARTIAL_3_6_1("3.6.1", "3.0", "v3d0");
+ V3D0_PARTIAL_3_6_1("3.6.1", "3.0", "v3d0"),
+
+ V1D0_3_7_0("3.7.0", "1.0", "v1d0"),
+ V2D0_PARTIAL_3_7_0("3.7.0", "2.0", "v2d0-partial"),
+ V2D0_NO_TYPE_3_7_0("3.7.0", "2.0", "v2d0-no-types"),
+ V3D0_PARTIAL_3_7_0("3.7.0", "3.0", "v3d0");
private static final String SEP = File.separator;
diff --git a/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphbinary/GraphBinaryCompatibilityTest.java b/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphbinary/GraphBinaryCompatibilityTest.java
index 4d22cc9..61e9a39 100644
--- a/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphbinary/GraphBinaryCompatibilityTest.java
+++ b/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphbinary/GraphBinaryCompatibilityTest.java
@@ -66,6 +66,8 @@
{GraphBinaryCompatibility.V1_3_6_0, readerV1, writerV1 },
{GraphBinaryCompatibility.V1_3_6_1, readerV1, writerV1 },
+ {GraphBinaryCompatibility.V1_3_7_0, readerV1, writerV1 },
+
});
}
diff --git a/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypedCompatibilityTest.java b/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypedCompatibilityTest.java
index 24e5059..acdc983 100644
--- a/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypedCompatibilityTest.java
+++ b/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypedCompatibilityTest.java
@@ -127,6 +127,9 @@
{GraphSONCompatibility.V2D0_PARTIAL_3_6_1, mapperV2 },
{GraphSONCompatibility.V3D0_PARTIAL_3_6_1, mapperV3 },
+ {GraphSONCompatibility.V2D0_PARTIAL_3_7_0, mapperV2 },
+ {GraphSONCompatibility.V3D0_PARTIAL_3_7_0, mapperV3 },
+
});
}
diff --git a/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONUntypedCompatibilityTest.java b/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONUntypedCompatibilityTest.java
index 7af8530..35abf8c 100644
--- a/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONUntypedCompatibilityTest.java
+++ b/gremlin-tools/gremlin-io-test/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONUntypedCompatibilityTest.java
@@ -135,6 +135,9 @@
{GraphSONCompatibility.V1D0_3_6_1, mapperV1 },
{GraphSONCompatibility.V2D0_NO_TYPE_3_6_1, mapperV2 },
+ {GraphSONCompatibility.V1D0_3_7_0, mapperV1 },
+ {GraphSONCompatibility.V2D0_NO_TYPE_3_7_0, mapperV2 },
+
});
}
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/barrier-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/barrier-v1.gbin
new file mode 100644
index 0000000..f905861
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/barrier-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/bigdecimal-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/bigdecimal-v1.gbin
new file mode 100644
index 0000000..921d957
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/bigdecimal-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/biginteger-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/biginteger-v1.gbin
new file mode 100644
index 0000000..d841fbe
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/biginteger-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/binding-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/binding-v1.gbin
new file mode 100644
index 0000000..79620eb
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/binding-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/bulkset-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/bulkset-v1.gbin
new file mode 100644
index 0000000..4542906
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/bulkset-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/byte-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/byte-v1.gbin
new file mode 100644
index 0000000..af9544f
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/byte-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/bytebuffer-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/bytebuffer-v1.gbin
new file mode 100644
index 0000000..39793d2
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/bytebuffer-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/bytecode-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/bytecode-v1.gbin
new file mode 100644
index 0000000..bc76c2e
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/bytecode-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/cardinality-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/cardinality-v1.gbin
new file mode 100644
index 0000000..3c875a5
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/cardinality-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/char-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/char-v1.gbin
new file mode 100644
index 0000000..b9d97e6
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/char-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/class-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/class-v1.gbin
new file mode 100644
index 0000000..6be272d
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/class-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/column-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/column-v1.gbin
new file mode 100644
index 0000000..c6805c8
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/column-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/date-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/date-v1.gbin
new file mode 100644
index 0000000..e68e17a
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/date-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/direction-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/direction-v1.gbin
new file mode 100644
index 0000000..3caaba3
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/direction-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/double-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/double-v1.gbin
new file mode 100644
index 0000000..e538a62
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/double-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/duration-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/duration-v1.gbin
new file mode 100644
index 0000000..7ffa3ad
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/duration-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/edge-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/edge-v1.gbin
new file mode 100644
index 0000000..086e85d
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/edge-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/float-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/float-v1.gbin
new file mode 100644
index 0000000..322772c
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/float-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/inetaddress-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/inetaddress-v1.gbin
new file mode 100644
index 0000000..b613ddb
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/inetaddress-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/instant-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/instant-v1.gbin
new file mode 100644
index 0000000..3335532
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/instant-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/integer-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/integer-v1.gbin
new file mode 100644
index 0000000..7dc246a
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/integer-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/lambda-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/lambda-v1.gbin
new file mode 100644
index 0000000..b0e98f9
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/lambda-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/list-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/list-v1.gbin
new file mode 100644
index 0000000..1aa405d
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/list-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/localdate-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/localdate-v1.gbin
new file mode 100644
index 0000000..2c9e211
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/localdate-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/localdatetime-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/localdatetime-v1.gbin
new file mode 100644
index 0000000..2e0c83c
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/localdatetime-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/localtime-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/localtime-v1.gbin
new file mode 100644
index 0000000..05785c6
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/localtime-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/long-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/long-v1.gbin
new file mode 100644
index 0000000..cee0083
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/long-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/map-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/map-v1.gbin
new file mode 100644
index 0000000..46cd9e2
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/map-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/metrics-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/metrics-v1.gbin
new file mode 100644
index 0000000..dea77a5
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/metrics-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/monthday-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/monthday-v1.gbin
new file mode 100644
index 0000000..c128263
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/monthday-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/offsetdatetime-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/offsetdatetime-v1.gbin
new file mode 100644
index 0000000..4b2aabb
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/offsetdatetime-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/offsettime-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/offsettime-v1.gbin
new file mode 100644
index 0000000..a4c8c5b
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/offsettime-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/operator-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/operator-v1.gbin
new file mode 100644
index 0000000..84717cc
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/operator-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/order-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/order-v1.gbin
new file mode 100644
index 0000000..311b6ad
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/order-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/p-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/p-v1.gbin
new file mode 100644
index 0000000..ac60799
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/p-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/pand-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/pand-v1.gbin
new file mode 100644
index 0000000..3237c94
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/pand-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/path-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/path-v1.gbin
new file mode 100644
index 0000000..ba075ac
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/path-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/period-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/period-v1.gbin
new file mode 100644
index 0000000..f7dab35
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/period-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/pick-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/pick-v1.gbin
new file mode 100644
index 0000000..77aca2f
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/pick-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/pop-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/pop-v1.gbin
new file mode 100644
index 0000000..f698c94
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/pop-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/por-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/por-v1.gbin
new file mode 100644
index 0000000..7c0b3ab
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/por-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/property-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/property-v1.gbin
new file mode 100644
index 0000000..ddc34e5
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/property-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/pwithin-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/pwithin-v1.gbin
new file mode 100644
index 0000000..5ad30a9
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/pwithin-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/pwithout-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/pwithout-v1.gbin
new file mode 100644
index 0000000..5b195db
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/pwithout-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/scope-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/scope-v1.gbin
new file mode 100644
index 0000000..534b956
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/scope-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/set-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/set-v1.gbin
new file mode 100644
index 0000000..02df059
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/set-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/short-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/short-v1.gbin
new file mode 100644
index 0000000..e1d2d7d
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/short-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/t-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/t-v1.gbin
new file mode 100644
index 0000000..a6376db
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/t-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/textp-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/textp-v1.gbin
new file mode 100644
index 0000000..c796468
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/textp-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/timestamp-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/timestamp-v1.gbin
new file mode 100644
index 0000000..4fc4e5e
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/timestamp-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/tinkergraph-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/tinkergraph-v1.gbin
new file mode 100644
index 0000000..a0a76d1
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/tinkergraph-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/traversalmetrics-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/traversalmetrics-v1.gbin
new file mode 100644
index 0000000..c947e62
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/traversalmetrics-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/traverser-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/traverser-v1.gbin
new file mode 100644
index 0000000..8e47cc0
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/traverser-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/uuid-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/uuid-v1.gbin
new file mode 100644
index 0000000..7f1775d
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/uuid-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/vertex-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/vertex-v1.gbin
new file mode 100644
index 0000000..7fb9d65
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/vertex-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/vertexproperty-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/vertexproperty-v1.gbin
new file mode 100644
index 0000000..89f0329
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/vertexproperty-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/year-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/year-v1.gbin
new file mode 100644
index 0000000..1fe0c74
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/year-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/yearmonth-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/yearmonth-v1.gbin
new file mode 100644
index 0000000..481a121
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/yearmonth-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/zoneoffset-v1.gbin b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/zoneoffset-v1.gbin
new file mode 100644
index 0000000..2867c97
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary/_3_7_0/zoneoffset-v1.gbin
Binary files differ
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationchallenge-v1d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationchallenge-v1d0.json
new file mode 100644
index 0000000..8c5b82c
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationchallenge-v1d0.json
@@ -0,0 +1,12 @@
+{
+ "requestId" : "41d2e28a-20a4-4ab0-b379-d810dede3786",
+ "status" : {
+ "message" : "",
+ "code" : 407,
+ "attributes" : { }
+ },
+ "result" : {
+ "data" : null,
+ "meta" : { }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationchallenge-v2d0-no-types.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationchallenge-v2d0-no-types.json
new file mode 100644
index 0000000..8c5b82c
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationchallenge-v2d0-no-types.json
@@ -0,0 +1,12 @@
+{
+ "requestId" : "41d2e28a-20a4-4ab0-b379-d810dede3786",
+ "status" : {
+ "message" : "",
+ "code" : 407,
+ "attributes" : { }
+ },
+ "result" : {
+ "data" : null,
+ "meta" : { }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationchallenge-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationchallenge-v2d0-partial.json
new file mode 100644
index 0000000..8c5b82c
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationchallenge-v2d0-partial.json
@@ -0,0 +1,12 @@
+{
+ "requestId" : "41d2e28a-20a4-4ab0-b379-d810dede3786",
+ "status" : {
+ "message" : "",
+ "code" : 407,
+ "attributes" : { }
+ },
+ "result" : {
+ "data" : null,
+ "meta" : { }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationchallenge-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationchallenge-v3d0.json
new file mode 100644
index 0000000..d1734c6
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationchallenge-v3d0.json
@@ -0,0 +1,18 @@
+{
+ "requestId" : "41d2e28a-20a4-4ab0-b379-d810dede3786",
+ "status" : {
+ "message" : "",
+ "code" : 407,
+ "attributes" : {
+ "@type" : "g:Map",
+ "@value" : [ ]
+ }
+ },
+ "result" : {
+ "data" : null,
+ "meta" : {
+ "@type" : "g:Map",
+ "@value" : [ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationresponse-v1d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationresponse-v1d0.json
new file mode 100644
index 0000000..838e1fd
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationresponse-v1d0.json
@@ -0,0 +1,9 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "authentication",
+ "processor" : "",
+ "args" : {
+ "saslMechanism" : "PLAIN",
+ "sasl" : "AHN0ZXBocGhlbgBwYXNzd29yZA=="
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationresponse-v2d0-no-types.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationresponse-v2d0-no-types.json
new file mode 100644
index 0000000..838e1fd
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationresponse-v2d0-no-types.json
@@ -0,0 +1,9 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "authentication",
+ "processor" : "",
+ "args" : {
+ "saslMechanism" : "PLAIN",
+ "sasl" : "AHN0ZXBocGhlbgBwYXNzd29yZA=="
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationresponse-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationresponse-v2d0-partial.json
new file mode 100644
index 0000000..838e1fd
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationresponse-v2d0-partial.json
@@ -0,0 +1,9 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "authentication",
+ "processor" : "",
+ "args" : {
+ "saslMechanism" : "PLAIN",
+ "sasl" : "AHN0ZXBocGhlbgBwYXNzd29yZA=="
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationresponse-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationresponse-v3d0.json
new file mode 100644
index 0000000..daceca2
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/authenticationresponse-v3d0.json
@@ -0,0 +1,9 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "authentication",
+ "processor" : "",
+ "args" : {
+ "@type" : "g:Map",
+ "@value" : [ "saslMechanism", "PLAIN", "sasl", "AHN0ZXBocGhlbgBwYXNzd29yZA==" ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/barrier-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/barrier-v2d0-partial.json
new file mode 100644
index 0000000..7ddccdd
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/barrier-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Barrier",
+ "@value" : "normSack"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/barrier-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/barrier-v3d0.json
new file mode 100644
index 0000000..7ddccdd
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/barrier-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Barrier",
+ "@value" : "normSack"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bigdecimal-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bigdecimal-v2d0-partial.json
new file mode 100644
index 0000000..475337c
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bigdecimal-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:BigDecimal",
+ "@value" : 123456789987654321123456789987654321
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bigdecimal-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bigdecimal-v3d0.json
new file mode 100644
index 0000000..475337c
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bigdecimal-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:BigDecimal",
+ "@value" : 123456789987654321123456789987654321
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/biginteger-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/biginteger-v2d0-partial.json
new file mode 100644
index 0000000..58e6114
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/biginteger-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:BigInteger",
+ "@value" : 123456789987654321123456789987654321
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/biginteger-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/biginteger-v3d0.json
new file mode 100644
index 0000000..58e6114
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/biginteger-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:BigInteger",
+ "@value" : 123456789987654321123456789987654321
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/binding-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/binding-v2d0-partial.json
new file mode 100644
index 0000000..579b8c7
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/binding-v2d0-partial.json
@@ -0,0 +1,10 @@
+{
+ "@type" : "g:Binding",
+ "@value" : {
+ "key" : "x",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/binding-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/binding-v3d0.json
new file mode 100644
index 0000000..579b8c7
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/binding-v3d0.json
@@ -0,0 +1,10 @@
+{
+ "@type" : "g:Binding",
+ "@value" : {
+ "key" : "x",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bulkset-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bulkset-v2d0-partial.json
new file mode 100644
index 0000000..c844975
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bulkset-v2d0-partial.json
@@ -0,0 +1 @@
+[ "marko", "josh", "josh" ]
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bulkset-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bulkset-v3d0.json
new file mode 100644
index 0000000..c216a36
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bulkset-v3d0.json
@@ -0,0 +1,10 @@
+{
+ "@type" : "g:BulkSet",
+ "@value" : [ "marko", {
+ "@type" : "g:Int64",
+ "@value" : 1
+ }, "josh", {
+ "@type" : "g:Int64",
+ "@value" : 2
+ } ]
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/byte-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/byte-v2d0-partial.json
new file mode 100644
index 0000000..979625b
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/byte-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:Byte",
+ "@value" : 1
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/byte-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/byte-v3d0.json
new file mode 100644
index 0000000..979625b
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/byte-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:Byte",
+ "@value" : 1
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bytebuffer-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bytebuffer-v2d0-partial.json
new file mode 100644
index 0000000..5724115
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bytebuffer-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:ByteBuffer",
+ "@value" : "c29tZSBieXRlcyBmb3IgeW91"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bytebuffer-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bytebuffer-v3d0.json
new file mode 100644
index 0000000..5724115
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bytebuffer-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:ByteBuffer",
+ "@value" : "c29tZSBieXRlcyBmb3IgeW91"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bytecode-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bytecode-v2d0-partial.json
new file mode 100644
index 0000000..269d277
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bytecode-v2d0-partial.json
@@ -0,0 +1,6 @@
+{
+ "@type" : "g:Bytecode",
+ "@value" : {
+ "step" : [ [ "V" ], [ "hasLabel", "person" ], [ "out" ], [ "in" ], [ "tree" ] ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bytecode-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bytecode-v3d0.json
new file mode 100644
index 0000000..269d277
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/bytecode-v3d0.json
@@ -0,0 +1,6 @@
+{
+ "@type" : "g:Bytecode",
+ "@value" : {
+ "step" : [ [ "V" ], [ "hasLabel", "person" ], [ "out" ], [ "in" ], [ "tree" ] ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/cardinality-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/cardinality-v2d0-partial.json
new file mode 100644
index 0000000..834e64e
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/cardinality-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Cardinality",
+ "@value" : "list"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/cardinality-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/cardinality-v3d0.json
new file mode 100644
index 0000000..834e64e
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/cardinality-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Cardinality",
+ "@value" : "list"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/char-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/char-v2d0-partial.json
new file mode 100644
index 0000000..8f27e9d
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/char-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:Char",
+ "@value" : "x"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/char-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/char-v3d0.json
new file mode 100644
index 0000000..8f27e9d
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/char-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:Char",
+ "@value" : "x"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/class-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/class-v2d0-partial.json
new file mode 100644
index 0000000..80f15a2
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/class-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Class",
+ "@value" : "java.io.File"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/class-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/class-v3d0.json
new file mode 100644
index 0000000..80f15a2
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/class-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Class",
+ "@value" : "java.io.File"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/column-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/column-v2d0-partial.json
new file mode 100644
index 0000000..0b3a56e
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/column-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Column",
+ "@value" : "keys"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/column-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/column-v3d0.json
new file mode 100644
index 0000000..0b3a56e
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/column-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Column",
+ "@value" : "keys"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/date-v2d0-no-types.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/date-v2d0-no-types.json
new file mode 100644
index 0000000..03b71a0
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/date-v2d0-no-types.json
@@ -0,0 +1 @@
+1481750076295
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/date-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/date-v2d0-partial.json
new file mode 100644
index 0000000..cf4007a
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/date-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Date",
+ "@value" : 1481750076295
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/date-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/date-v3d0.json
new file mode 100644
index 0000000..cf4007a
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/date-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Date",
+ "@value" : 1481750076295
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/direction-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/direction-v2d0-partial.json
new file mode 100644
index 0000000..78cb7e4
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/direction-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Direction",
+ "@value" : "OUT"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/direction-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/direction-v3d0.json
new file mode 100644
index 0000000..78cb7e4
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/direction-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Direction",
+ "@value" : "OUT"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/double-v2d0-no-types.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/double-v2d0-no-types.json
new file mode 100644
index 0000000..e772e62
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/double-v2d0-no-types.json
@@ -0,0 +1 @@
+100.0
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/double-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/double-v2d0-partial.json
new file mode 100644
index 0000000..9ae4964
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/double-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Double",
+ "@value" : 100.0
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/double-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/double-v3d0.json
new file mode 100644
index 0000000..9ae4964
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/double-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Double",
+ "@value" : 100.0
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/duration-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/duration-v2d0-partial.json
new file mode 100644
index 0000000..05c0ce9
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/duration-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:Duration",
+ "@value" : "PT120H"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/duration-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/duration-v3d0.json
new file mode 100644
index 0000000..05c0ce9
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/duration-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:Duration",
+ "@value" : "PT120H"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/edge-v1d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/edge-v1d0.json
new file mode 100644
index 0000000..0f7f168
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/edge-v1d0.json
@@ -0,0 +1,12 @@
+{
+ "id" : 13,
+ "label" : "develops",
+ "type" : "edge",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 10,
+ "outV" : 1,
+ "properties" : {
+ "since" : 2009
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/edge-v2d0-no-types.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/edge-v2d0-no-types.json
new file mode 100644
index 0000000..a8e73db
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/edge-v2d0-no-types.json
@@ -0,0 +1,14 @@
+{
+ "id" : 13,
+ "label" : "develops",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 10,
+ "outV" : 1,
+ "properties" : {
+ "since" : {
+ "key" : "since",
+ "value" : 2009
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/edge-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/edge-v2d0-partial.json
new file mode 100644
index 0000000..ba1c52e
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/edge-v2d0-partial.json
@@ -0,0 +1,32 @@
+{
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 13
+ },
+ "label" : "develops",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
+ "properties" : {
+ "since" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "since",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 2009
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/edge-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/edge-v3d0.json
new file mode 100644
index 0000000..ba1c52e
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/edge-v3d0.json
@@ -0,0 +1,32 @@
+{
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 13
+ },
+ "label" : "develops",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
+ "properties" : {
+ "since" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "since",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 2009
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/float-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/float-v2d0-partial.json
new file mode 100644
index 0000000..7179aaf
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/float-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Float",
+ "@value" : 100.0
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/float-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/float-v3d0.json
new file mode 100644
index 0000000..7179aaf
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/float-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Float",
+ "@value" : 100.0
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/inetaddress-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/inetaddress-v2d0-partial.json
new file mode 100644
index 0000000..fba98c0
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/inetaddress-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:InetAddress",
+ "@value" : "localhost"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/inetaddress-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/inetaddress-v3d0.json
new file mode 100644
index 0000000..fba98c0
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/inetaddress-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:InetAddress",
+ "@value" : "localhost"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/instant-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/instant-v2d0-partial.json
new file mode 100644
index 0000000..3749741
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/instant-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:Instant",
+ "@value" : "2016-12-14T16:39:19.349Z"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/instant-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/instant-v3d0.json
new file mode 100644
index 0000000..3749741
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/instant-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:Instant",
+ "@value" : "2016-12-14T16:39:19.349Z"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/integer-v2d0-no-types.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/integer-v2d0-no-types.json
new file mode 100644
index 0000000..105d7d9
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/integer-v2d0-no-types.json
@@ -0,0 +1 @@
+100
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/integer-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/integer-v2d0-partial.json
new file mode 100644
index 0000000..750ce7a
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/integer-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Int32",
+ "@value" : 100
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/integer-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/integer-v3d0.json
new file mode 100644
index 0000000..750ce7a
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/integer-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Int32",
+ "@value" : 100
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/lambda-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/lambda-v2d0-partial.json
new file mode 100644
index 0000000..5be179b
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/lambda-v2d0-partial.json
@@ -0,0 +1,8 @@
+{
+ "@type" : "g:Lambda",
+ "@value" : {
+ "script" : "{ it.get() }",
+ "language" : "gremlin-groovy",
+ "arguments" : 1
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/lambda-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/lambda-v3d0.json
new file mode 100644
index 0000000..5be179b
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/lambda-v3d0.json
@@ -0,0 +1,8 @@
+{
+ "@type" : "g:Lambda",
+ "@value" : {
+ "script" : "{ it.get() }",
+ "language" : "gremlin-groovy",
+ "arguments" : 1
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/list-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/list-v3d0.json
new file mode 100644
index 0000000..b714e2d
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/list-v3d0.json
@@ -0,0 +1,7 @@
+{
+ "@type" : "g:List",
+ "@value" : [ {
+ "@type" : "g:Int32",
+ "@value" : 1
+ }, "person", true ]
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/localdate-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/localdate-v2d0-partial.json
new file mode 100644
index 0000000..36fb81d
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/localdate-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:LocalDate",
+ "@value" : "2016-01-01"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/localdate-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/localdate-v3d0.json
new file mode 100644
index 0000000..36fb81d
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/localdate-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:LocalDate",
+ "@value" : "2016-01-01"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/localdatetime-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/localdatetime-v2d0-partial.json
new file mode 100644
index 0000000..2d83668
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/localdatetime-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:LocalDateTime",
+ "@value" : "2016-01-01T12:30"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/localdatetime-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/localdatetime-v3d0.json
new file mode 100644
index 0000000..2d83668
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/localdatetime-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:LocalDateTime",
+ "@value" : "2016-01-01T12:30"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/localtime-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/localtime-v2d0-partial.json
new file mode 100644
index 0000000..eff65a7
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/localtime-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:LocalTime",
+ "@value" : "12:30:45"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/localtime-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/localtime-v3d0.json
new file mode 100644
index 0000000..eff65a7
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/localtime-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:LocalTime",
+ "@value" : "12:30:45"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/long-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/long-v2d0-partial.json
new file mode 100644
index 0000000..84b9a23
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/long-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Int64",
+ "@value" : 100
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/long-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/long-v3d0.json
new file mode 100644
index 0000000..84b9a23
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/long-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Int64",
+ "@value" : 100
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/map-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/map-v3d0.json
new file mode 100644
index 0000000..7ad59c9
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/map-v3d0.json
@@ -0,0 +1,25 @@
+{
+ "@type" : "g:Map",
+ "@value" : [ {
+ "@type" : "g:Date",
+ "@value" : 1481750076295
+ }, "red", {
+ "@type" : "g:List",
+ "@value" : [ {
+ "@type" : "g:Int32",
+ "@value" : 1
+ }, {
+ "@type" : "g:Int32",
+ "@value" : 2
+ }, {
+ "@type" : "g:Int32",
+ "@value" : 3
+ } ]
+ }, {
+ "@type" : "g:Date",
+ "@value" : 1481750076295
+ }, "test", {
+ "@type" : "g:Int32",
+ "@value" : 123
+ } ]
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/metrics-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/metrics-v2d0-partial.json
new file mode 100644
index 0000000..7b1e964
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/metrics-v2d0-partial.json
@@ -0,0 +1,54 @@
+{
+ "@type" : "g:Metrics",
+ "@value" : {
+ "dur" : {
+ "@type" : "g:Double",
+ "@value" : 100.0
+ },
+ "counts" : {
+ "traverserCount" : {
+ "@type" : "g:Int64",
+ "@value" : 4
+ },
+ "elementCount" : {
+ "@type" : "g:Int64",
+ "@value" : 4
+ }
+ },
+ "name" : "TinkerGraphStep(vertex,[~label.eq(person)])",
+ "annotations" : {
+ "percentDur" : {
+ "@type" : "g:Double",
+ "@value" : 25.0
+ }
+ },
+ "id" : "7.0.0()",
+ "metrics" : [ {
+ "@type" : "g:Metrics",
+ "@value" : {
+ "dur" : {
+ "@type" : "g:Double",
+ "@value" : 100.0
+ },
+ "counts" : {
+ "traverserCount" : {
+ "@type" : "g:Int64",
+ "@value" : 7
+ },
+ "elementCount" : {
+ "@type" : "g:Int64",
+ "@value" : 7
+ }
+ },
+ "name" : "VertexStep(OUT,vertex)",
+ "annotations" : {
+ "percentDur" : {
+ "@type" : "g:Double",
+ "@value" : 25.0
+ }
+ },
+ "id" : "3.0.0()"
+ }
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/metrics-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/metrics-v3d0.json
new file mode 100644
index 0000000..f6e678b
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/metrics-v3d0.json
@@ -0,0 +1,52 @@
+{
+ "@type" : "g:Metrics",
+ "@value" : {
+ "@type" : "g:Map",
+ "@value" : [ "dur", {
+ "@type" : "g:Double",
+ "@value" : 100.0
+ }, "counts", {
+ "@type" : "g:Map",
+ "@value" : [ "traverserCount", {
+ "@type" : "g:Int64",
+ "@value" : 4
+ }, "elementCount", {
+ "@type" : "g:Int64",
+ "@value" : 4
+ } ]
+ }, "name", "TinkerGraphStep(vertex,[~label.eq(person)])", "annotations", {
+ "@type" : "g:Map",
+ "@value" : [ "percentDur", {
+ "@type" : "g:Double",
+ "@value" : 25.0
+ } ]
+ }, "id", "7.0.0()", "metrics", {
+ "@type" : "g:List",
+ "@value" : [ {
+ "@type" : "g:Metrics",
+ "@value" : {
+ "@type" : "g:Map",
+ "@value" : [ "dur", {
+ "@type" : "g:Double",
+ "@value" : 100.0
+ }, "counts", {
+ "@type" : "g:Map",
+ "@value" : [ "traverserCount", {
+ "@type" : "g:Int64",
+ "@value" : 7
+ }, "elementCount", {
+ "@type" : "g:Int64",
+ "@value" : 7
+ } ]
+ }, "name", "VertexStep(OUT,vertex)", "annotations", {
+ "@type" : "g:Map",
+ "@value" : [ "percentDur", {
+ "@type" : "g:Double",
+ "@value" : 25.0
+ } ]
+ }, "id", "3.0.0()" ]
+ }
+ } ]
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/monthday-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/monthday-v2d0-partial.json
new file mode 100644
index 0000000..5da5914
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/monthday-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:MonthDay",
+ "@value" : "--01-01"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/monthday-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/monthday-v3d0.json
new file mode 100644
index 0000000..5da5914
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/monthday-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:MonthDay",
+ "@value" : "--01-01"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/offsetdatetime-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/offsetdatetime-v2d0-partial.json
new file mode 100644
index 0000000..03f45cd
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/offsetdatetime-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:OffsetDateTime",
+ "@value" : "2007-12-03T10:15:30+01:00"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/offsetdatetime-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/offsetdatetime-v3d0.json
new file mode 100644
index 0000000..03f45cd
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/offsetdatetime-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:OffsetDateTime",
+ "@value" : "2007-12-03T10:15:30+01:00"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/offsettime-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/offsettime-v2d0-partial.json
new file mode 100644
index 0000000..b124953
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/offsettime-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:OffsetTime",
+ "@value" : "10:15:30+01:00"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/offsettime-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/offsettime-v3d0.json
new file mode 100644
index 0000000..b124953
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/offsettime-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:OffsetTime",
+ "@value" : "10:15:30+01:00"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/operator-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/operator-v2d0-partial.json
new file mode 100644
index 0000000..14c1400
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/operator-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Operator",
+ "@value" : "sum"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/operator-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/operator-v3d0.json
new file mode 100644
index 0000000..14c1400
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/operator-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Operator",
+ "@value" : "sum"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/order-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/order-v2d0-partial.json
new file mode 100644
index 0000000..4be0432
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/order-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Order",
+ "@value" : "shuffle"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/order-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/order-v3d0.json
new file mode 100644
index 0000000..4be0432
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/order-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Order",
+ "@value" : "shuffle"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/p-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/p-v2d0-partial.json
new file mode 100644
index 0000000..5bdfb3b
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/p-v2d0-partial.json
@@ -0,0 +1,10 @@
+{
+ "@type" : "g:P",
+ "@value" : {
+ "predicate" : "gt",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 0
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/p-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/p-v3d0.json
new file mode 100644
index 0000000..5bdfb3b
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/p-v3d0.json
@@ -0,0 +1,10 @@
+{
+ "@type" : "g:P",
+ "@value" : {
+ "predicate" : "gt",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 0
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pand-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pand-v2d0-partial.json
new file mode 100644
index 0000000..c271958
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pand-v2d0-partial.json
@@ -0,0 +1,25 @@
+{
+ "@type" : "g:P",
+ "@value" : {
+ "predicate" : "and",
+ "value" : [ {
+ "@type" : "g:P",
+ "@value" : {
+ "predicate" : "gt",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 0
+ }
+ }
+ }, {
+ "@type" : "g:P",
+ "@value" : {
+ "predicate" : "lt",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ }
+ }
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pand-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pand-v3d0.json
new file mode 100644
index 0000000..c271958
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pand-v3d0.json
@@ -0,0 +1,25 @@
+{
+ "@type" : "g:P",
+ "@value" : {
+ "predicate" : "and",
+ "value" : [ {
+ "@type" : "g:P",
+ "@value" : {
+ "predicate" : "gt",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 0
+ }
+ }
+ }, {
+ "@type" : "g:P",
+ "@value" : {
+ "predicate" : "lt",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ }
+ }
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/path-v1d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/path-v1d0.json
new file mode 100644
index 0000000..2eee883
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/path-v1d0.json
@@ -0,0 +1,62 @@
+{
+ "labels" : [ [ ], [ ], [ ] ],
+ "objects" : [ {
+ "id" : 1,
+ "label" : "person",
+ "type" : "vertex",
+ "properties" : {
+ "name" : [ {
+ "id" : 0,
+ "value" : "marko"
+ } ],
+ "location" : [ {
+ "id" : 6,
+ "value" : "san diego",
+ "properties" : {
+ "startTime" : 1997,
+ "endTime" : 2001
+ }
+ }, {
+ "id" : 7,
+ "value" : "santa cruz",
+ "properties" : {
+ "startTime" : 2001,
+ "endTime" : 2004
+ }
+ }, {
+ "id" : 8,
+ "value" : "brussels",
+ "properties" : {
+ "startTime" : 2004,
+ "endTime" : 2005
+ }
+ }, {
+ "id" : 9,
+ "value" : "santa fe",
+ "properties" : {
+ "startTime" : 2005
+ }
+ } ]
+ }
+ }, {
+ "id" : 10,
+ "label" : "software",
+ "type" : "vertex",
+ "properties" : {
+ "name" : [ {
+ "id" : 4,
+ "value" : "gremlin"
+ } ]
+ }
+ }, {
+ "id" : 11,
+ "label" : "software",
+ "type" : "vertex",
+ "properties" : {
+ "name" : [ {
+ "id" : 5,
+ "value" : "tinkergraph"
+ } ]
+ }
+ } ]
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/path-v2d0-no-types.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/path-v2d0-no-types.json
new file mode 100644
index 0000000..a592d2f
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/path-v2d0-no-types.json
@@ -0,0 +1,13 @@
+{
+ "labels" : [ [ ], [ ], [ ] ],
+ "objects" : [ {
+ "id" : 1,
+ "label" : "person"
+ }, {
+ "id" : 10,
+ "label" : "software"
+ }, {
+ "id" : 11,
+ "label" : "software"
+ } ]
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/path-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/path-v2d0-partial.json
new file mode 100644
index 0000000..9ccaa00
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/path-v2d0-partial.json
@@ -0,0 +1,34 @@
+{
+ "@type" : "g:Path",
+ "@value" : {
+ "labels" : [ [ ], [ ], [ ] ],
+ "objects" : [ {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
+ "label" : "person"
+ }
+ }, {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ },
+ "label" : "software"
+ }
+ }, {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 11
+ },
+ "label" : "software"
+ }
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/path-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/path-v3d0.json
new file mode 100644
index 0000000..216b393
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/path-v3d0.json
@@ -0,0 +1,49 @@
+{
+ "@type" : "g:Path",
+ "@value" : {
+ "labels" : {
+ "@type" : "g:List",
+ "@value" : [ {
+ "@type" : "g:Set",
+ "@value" : [ ]
+ }, {
+ "@type" : "g:Set",
+ "@value" : [ ]
+ }, {
+ "@type" : "g:Set",
+ "@value" : [ ]
+ } ]
+ },
+ "objects" : {
+ "@type" : "g:List",
+ "@value" : [ {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
+ "label" : "person"
+ }
+ }, {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ },
+ "label" : "software"
+ }
+ }, {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 11
+ },
+ "label" : "software"
+ }
+ } ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/period-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/period-v2d0-partial.json
new file mode 100644
index 0000000..20438a1
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/period-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:Period",
+ "@value" : "P1Y6M15D"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/period-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/period-v3d0.json
new file mode 100644
index 0000000..20438a1
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/period-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:Period",
+ "@value" : "P1Y6M15D"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pick-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pick-v2d0-partial.json
new file mode 100644
index 0000000..3ca2f2e
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pick-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Pick",
+ "@value" : "any"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pick-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pick-v3d0.json
new file mode 100644
index 0000000..3ca2f2e
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pick-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Pick",
+ "@value" : "any"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pop-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pop-v2d0-partial.json
new file mode 100644
index 0000000..271515f
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pop-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Pop",
+ "@value" : "all"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pop-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pop-v3d0.json
new file mode 100644
index 0000000..271515f
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pop-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Pop",
+ "@value" : "all"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/por-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/por-v2d0-partial.json
new file mode 100644
index 0000000..71fcb7d
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/por-v2d0-partial.json
@@ -0,0 +1,31 @@
+{
+ "@type" : "g:P",
+ "@value" : {
+ "predicate" : "or",
+ "value" : [ {
+ "@type" : "g:P",
+ "@value" : {
+ "predicate" : "gt",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 0
+ }
+ }
+ }, {
+ "@type" : "g:P",
+ "@value" : {
+ "predicate" : "within",
+ "value" : [ {
+ "@type" : "g:Int32",
+ "@value" : -1
+ }, {
+ "@type" : "g:Int32",
+ "@value" : -10
+ }, {
+ "@type" : "g:Int32",
+ "@value" : -100
+ } ]
+ }
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/por-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/por-v3d0.json
new file mode 100644
index 0000000..a71b1cf
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/por-v3d0.json
@@ -0,0 +1,34 @@
+{
+ "@type" : "g:P",
+ "@value" : {
+ "predicate" : "or",
+ "value" : [ {
+ "@type" : "g:P",
+ "@value" : {
+ "predicate" : "gt",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 0
+ }
+ }
+ }, {
+ "@type" : "g:P",
+ "@value" : {
+ "predicate" : "within",
+ "value" : {
+ "@type" : "g:List",
+ "@value" : [ {
+ "@type" : "g:Int32",
+ "@value" : -1
+ }, {
+ "@type" : "g:Int32",
+ "@value" : -10
+ }, {
+ "@type" : "g:Int32",
+ "@value" : -100
+ } ]
+ }
+ }
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/property-v1d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/property-v1d0.json
new file mode 100644
index 0000000..c051c0a
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/property-v1d0.json
@@ -0,0 +1,4 @@
+{
+ "key" : "since",
+ "value" : 2009
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/property-v2d0-no-types.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/property-v2d0-no-types.json
new file mode 100644
index 0000000..c051c0a
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/property-v2d0-no-types.json
@@ -0,0 +1,4 @@
+{
+ "key" : "since",
+ "value" : 2009
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/property-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/property-v2d0-partial.json
new file mode 100644
index 0000000..296fe32
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/property-v2d0-partial.json
@@ -0,0 +1,10 @@
+{
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "since",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 2009
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/property-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/property-v3d0.json
new file mode 100644
index 0000000..296fe32
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/property-v3d0.json
@@ -0,0 +1,10 @@
+{
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "since",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 2009
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pwithin-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pwithin-v2d0-partial.json
new file mode 100644
index 0000000..afa3826
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pwithin-v2d0-partial.json
@@ -0,0 +1,10 @@
+{
+ "@type" : "g:P",
+ "@value" : {
+ "predicate" : "within",
+ "value" : [ {
+ "@type" : "g:Int32",
+ "@value" : 1
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pwithin-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pwithin-v3d0.json
new file mode 100644
index 0000000..83f99cc
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pwithin-v3d0.json
@@ -0,0 +1,13 @@
+{
+ "@type" : "g:P",
+ "@value" : {
+ "predicate" : "within",
+ "value" : {
+ "@type" : "g:List",
+ "@value" : [ {
+ "@type" : "g:Int32",
+ "@value" : 1
+ } ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pwithout-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pwithout-v2d0-partial.json
new file mode 100644
index 0000000..8c2291b
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pwithout-v2d0-partial.json
@@ -0,0 +1,13 @@
+{
+ "@type" : "g:P",
+ "@value" : {
+ "predicate" : "without",
+ "value" : [ {
+ "@type" : "g:Int32",
+ "@value" : 1
+ }, {
+ "@type" : "g:Int32",
+ "@value" : 2
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pwithout-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pwithout-v3d0.json
new file mode 100644
index 0000000..9a16890
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/pwithout-v3d0.json
@@ -0,0 +1,16 @@
+{
+ "@type" : "g:P",
+ "@value" : {
+ "predicate" : "without",
+ "value" : {
+ "@type" : "g:List",
+ "@value" : [ {
+ "@type" : "g:Int32",
+ "@value" : 1
+ }, {
+ "@type" : "g:Int32",
+ "@value" : 2
+ } ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/scope-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/scope-v2d0-partial.json
new file mode 100644
index 0000000..4a74af0
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/scope-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Scope",
+ "@value" : "local"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/scope-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/scope-v3d0.json
new file mode 100644
index 0000000..4a74af0
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/scope-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Scope",
+ "@value" : "local"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionclose-v1d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionclose-v1d0.json
new file mode 100644
index 0000000..ac825e8
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionclose-v1d0.json
@@ -0,0 +1,8 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "close",
+ "processor" : "session",
+ "args" : {
+ "session" : "unique-session-identifier"
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionclose-v2d0-no-types.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionclose-v2d0-no-types.json
new file mode 100644
index 0000000..ac825e8
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionclose-v2d0-no-types.json
@@ -0,0 +1,8 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "close",
+ "processor" : "session",
+ "args" : {
+ "session" : "unique-session-identifier"
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionclose-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionclose-v2d0-partial.json
new file mode 100644
index 0000000..ac825e8
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionclose-v2d0-partial.json
@@ -0,0 +1,8 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "close",
+ "processor" : "session",
+ "args" : {
+ "session" : "unique-session-identifier"
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionclose-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionclose-v3d0.json
new file mode 100644
index 0000000..4be1ccd
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionclose-v3d0.json
@@ -0,0 +1,9 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "close",
+ "processor" : "session",
+ "args" : {
+ "@type" : "g:Map",
+ "@value" : [ "session", "unique-session-identifier" ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessioneval-v1d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessioneval-v1d0.json
new file mode 100644
index 0000000..8bce82f
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessioneval-v1d0.json
@@ -0,0 +1,13 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "eval",
+ "processor" : "session",
+ "args" : {
+ "gremlin" : "g.V(x)",
+ "language" : "gremlin-groovy",
+ "session" : "unique-session-identifier",
+ "bindings" : {
+ "x" : 1
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessioneval-v2d0-no-types.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessioneval-v2d0-no-types.json
new file mode 100644
index 0000000..8bce82f
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessioneval-v2d0-no-types.json
@@ -0,0 +1,13 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "eval",
+ "processor" : "session",
+ "args" : {
+ "gremlin" : "g.V(x)",
+ "language" : "gremlin-groovy",
+ "session" : "unique-session-identifier",
+ "bindings" : {
+ "x" : 1
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessioneval-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessioneval-v2d0-partial.json
new file mode 100644
index 0000000..8ff8b96
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessioneval-v2d0-partial.json
@@ -0,0 +1,16 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "eval",
+ "processor" : "session",
+ "args" : {
+ "gremlin" : "g.V(x)",
+ "language" : "gremlin-groovy",
+ "session" : "unique-session-identifier",
+ "bindings" : {
+ "x" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessioneval-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessioneval-v3d0.json
new file mode 100644
index 0000000..301c393
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessioneval-v3d0.json
@@ -0,0 +1,15 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "eval",
+ "processor" : "session",
+ "args" : {
+ "@type" : "g:Map",
+ "@value" : [ "gremlin", "g.V(x)", "language", "gremlin-groovy", "session", "unique-session-identifier", "bindings", {
+ "@type" : "g:Map",
+ "@value" : [ "x", {
+ "@type" : "g:Int32",
+ "@value" : 1
+ } ]
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionevalaliased-v1d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionevalaliased-v1d0.json
new file mode 100644
index 0000000..5f4ef46
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionevalaliased-v1d0.json
@@ -0,0 +1,16 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "eval",
+ "processor" : "session",
+ "args" : {
+ "gremlin" : "social.V(x)",
+ "language" : "gremlin-groovy",
+ "aliases" : {
+ "g" : "social"
+ },
+ "session" : "unique-session-identifier",
+ "bindings" : {
+ "x" : 1
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionevalaliased-v2d0-no-types.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionevalaliased-v2d0-no-types.json
new file mode 100644
index 0000000..5f4ef46
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionevalaliased-v2d0-no-types.json
@@ -0,0 +1,16 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "eval",
+ "processor" : "session",
+ "args" : {
+ "gremlin" : "social.V(x)",
+ "language" : "gremlin-groovy",
+ "aliases" : {
+ "g" : "social"
+ },
+ "session" : "unique-session-identifier",
+ "bindings" : {
+ "x" : 1
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionevalaliased-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionevalaliased-v2d0-partial.json
new file mode 100644
index 0000000..394e5d3
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionevalaliased-v2d0-partial.json
@@ -0,0 +1,19 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "eval",
+ "processor" : "session",
+ "args" : {
+ "gremlin" : "social.V(x)",
+ "language" : "gremlin-groovy",
+ "aliases" : {
+ "g" : "social"
+ },
+ "session" : "unique-session-identifier",
+ "bindings" : {
+ "x" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionevalaliased-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionevalaliased-v3d0.json
new file mode 100644
index 0000000..7448160
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionevalaliased-v3d0.json
@@ -0,0 +1,18 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "eval",
+ "processor" : "session",
+ "args" : {
+ "@type" : "g:Map",
+ "@value" : [ "gremlin", "social.V(x)", "language", "gremlin-groovy", "aliases", {
+ "@type" : "g:Map",
+ "@value" : [ "g", "social" ]
+ }, "session", "unique-session-identifier", "bindings", {
+ "@type" : "g:Map",
+ "@value" : [ "x", {
+ "@type" : "g:Int32",
+ "@value" : 1
+ } ]
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlesseval-v1d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlesseval-v1d0.json
new file mode 100644
index 0000000..8c9a807
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlesseval-v1d0.json
@@ -0,0 +1,12 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "eval",
+ "processor" : "",
+ "args" : {
+ "gremlin" : "g.V(x)",
+ "language" : "gremlin-groovy",
+ "bindings" : {
+ "x" : 1
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlesseval-v2d0-no-types.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlesseval-v2d0-no-types.json
new file mode 100644
index 0000000..8c9a807
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlesseval-v2d0-no-types.json
@@ -0,0 +1,12 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "eval",
+ "processor" : "",
+ "args" : {
+ "gremlin" : "g.V(x)",
+ "language" : "gremlin-groovy",
+ "bindings" : {
+ "x" : 1
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlesseval-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlesseval-v2d0-partial.json
new file mode 100644
index 0000000..81e2f6c
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlesseval-v2d0-partial.json
@@ -0,0 +1,15 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "eval",
+ "processor" : "",
+ "args" : {
+ "gremlin" : "g.V(x)",
+ "language" : "gremlin-groovy",
+ "bindings" : {
+ "x" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlesseval-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlesseval-v3d0.json
new file mode 100644
index 0000000..dc8c8e6
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlesseval-v3d0.json
@@ -0,0 +1,15 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "eval",
+ "processor" : "",
+ "args" : {
+ "@type" : "g:Map",
+ "@value" : [ "gremlin", "g.V(x)", "language", "gremlin-groovy", "bindings", {
+ "@type" : "g:Map",
+ "@value" : [ "x", {
+ "@type" : "g:Int32",
+ "@value" : 1
+ } ]
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlessevalaliased-v1d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlessevalaliased-v1d0.json
new file mode 100644
index 0000000..59f0c6c
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlessevalaliased-v1d0.json
@@ -0,0 +1,15 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "eval",
+ "processor" : "",
+ "args" : {
+ "gremlin" : "social.V(x)",
+ "language" : "gremlin-groovy",
+ "aliases" : {
+ "g" : "social"
+ },
+ "bindings" : {
+ "x" : 1
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlessevalaliased-v2d0-no-types.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlessevalaliased-v2d0-no-types.json
new file mode 100644
index 0000000..59f0c6c
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlessevalaliased-v2d0-no-types.json
@@ -0,0 +1,15 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "eval",
+ "processor" : "",
+ "args" : {
+ "gremlin" : "social.V(x)",
+ "language" : "gremlin-groovy",
+ "aliases" : {
+ "g" : "social"
+ },
+ "bindings" : {
+ "x" : 1
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlessevalaliased-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlessevalaliased-v2d0-partial.json
new file mode 100644
index 0000000..0f6a54e
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlessevalaliased-v2d0-partial.json
@@ -0,0 +1,18 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "eval",
+ "processor" : "",
+ "args" : {
+ "gremlin" : "social.V(x)",
+ "language" : "gremlin-groovy",
+ "aliases" : {
+ "g" : "social"
+ },
+ "bindings" : {
+ "x" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlessevalaliased-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlessevalaliased-v3d0.json
new file mode 100644
index 0000000..fc03a37
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/sessionlessevalaliased-v3d0.json
@@ -0,0 +1,18 @@
+{
+ "requestId" : "cb682578-9d92-4499-9ebc-5c6aa73c5397",
+ "op" : "eval",
+ "processor" : "",
+ "args" : {
+ "@type" : "g:Map",
+ "@value" : [ "gremlin", "social.V(x)", "language", "gremlin-groovy", "aliases", {
+ "@type" : "g:Map",
+ "@value" : [ "g", "social" ]
+ }, "bindings", {
+ "@type" : "g:Map",
+ "@value" : [ "x", {
+ "@type" : "g:Int32",
+ "@value" : 1
+ } ]
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/set-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/set-v3d0.json
new file mode 100644
index 0000000..32deea2
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/set-v3d0.json
@@ -0,0 +1,7 @@
+{
+ "@type" : "g:Set",
+ "@value" : [ {
+ "@type" : "g:Int32",
+ "@value" : 1
+ }, "person", true ]
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/short-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/short-v2d0-partial.json
new file mode 100644
index 0000000..c68f5cd
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/short-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:Int16",
+ "@value" : 100
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/short-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/short-v3d0.json
new file mode 100644
index 0000000..c68f5cd
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/short-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:Int16",
+ "@value" : 100
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/standardresult-v1d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/standardresult-v1d0.json
new file mode 100644
index 0000000..9b93727
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/standardresult-v1d0.json
@@ -0,0 +1,50 @@
+{
+ "requestId" : "41d2e28a-20a4-4ab0-b379-d810dede3786",
+ "status" : {
+ "message" : "",
+ "code" : 200,
+ "attributes" : { }
+ },
+ "result" : {
+ "data" : [ {
+ "id" : 1,
+ "label" : "person",
+ "type" : "vertex",
+ "properties" : {
+ "name" : [ {
+ "id" : 0,
+ "value" : "marko"
+ } ],
+ "location" : [ {
+ "id" : 6,
+ "value" : "san diego",
+ "properties" : {
+ "startTime" : 1997,
+ "endTime" : 2001
+ }
+ }, {
+ "id" : 7,
+ "value" : "santa cruz",
+ "properties" : {
+ "startTime" : 2001,
+ "endTime" : 2004
+ }
+ }, {
+ "id" : 8,
+ "value" : "brussels",
+ "properties" : {
+ "startTime" : 2004,
+ "endTime" : 2005
+ }
+ }, {
+ "id" : 9,
+ "value" : "santa fe",
+ "properties" : {
+ "startTime" : 2005
+ }
+ } ]
+ }
+ } ],
+ "meta" : { }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/standardresult-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/standardresult-v2d0-partial.json
new file mode 100644
index 0000000..857c6db
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/standardresult-v2d0-partial.json
@@ -0,0 +1,111 @@
+{
+ "requestId" : "41d2e28a-20a4-4ab0-b379-d810dede3786",
+ "status" : {
+ "message" : "",
+ "code" : 200,
+ "attributes" : { }
+ },
+ "result" : {
+ "data" : [ {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
+ "label" : "person",
+ "properties" : {
+ "name" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 0
+ },
+ "value" : "marko",
+ "label" : "name"
+ }
+ } ],
+ "location" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 6
+ },
+ "value" : "san diego",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 1997
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2001
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 7
+ },
+ "value" : "santa cruz",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2001
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2004
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 8
+ },
+ "value" : "brussels",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2004
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2005
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 9
+ },
+ "value" : "santa fe",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2005
+ }
+ }
+ }
+ } ]
+ }
+ }
+ } ],
+ "meta" : { }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/standardresult-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/standardresult-v3d0.json
new file mode 100644
index 0000000..dfca400
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/standardresult-v3d0.json
@@ -0,0 +1,120 @@
+{
+ "requestId" : "41d2e28a-20a4-4ab0-b379-d810dede3786",
+ "status" : {
+ "message" : "",
+ "code" : 200,
+ "attributes" : {
+ "@type" : "g:Map",
+ "@value" : [ ]
+ }
+ },
+ "result" : {
+ "data" : {
+ "@type" : "g:List",
+ "@value" : [ {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
+ "label" : "person",
+ "properties" : {
+ "name" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 0
+ },
+ "value" : "marko",
+ "label" : "name"
+ }
+ } ],
+ "location" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 6
+ },
+ "value" : "san diego",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 1997
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2001
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 7
+ },
+ "value" : "santa cruz",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2001
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2004
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 8
+ },
+ "value" : "brussels",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2004
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2005
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 9
+ },
+ "value" : "santa fe",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2005
+ }
+ }
+ }
+ } ]
+ }
+ }
+ } ]
+ },
+ "meta" : {
+ "@type" : "g:Map",
+ "@value" : [ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/t-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/t-v2d0-partial.json
new file mode 100644
index 0000000..9693983
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/t-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:T",
+ "@value" : "label"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/t-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/t-v3d0.json
new file mode 100644
index 0000000..9693983
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/t-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:T",
+ "@value" : "label"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/textp-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/textp-v2d0-partial.json
new file mode 100644
index 0000000..2820989
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/textp-v2d0-partial.json
@@ -0,0 +1,7 @@
+{
+ "@type" : "g:TextP",
+ "@value" : {
+ "predicate" : "containing",
+ "value" : "ark"
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/textp-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/textp-v3d0.json
new file mode 100644
index 0000000..2820989
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/textp-v3d0.json
@@ -0,0 +1,7 @@
+{
+ "@type" : "g:TextP",
+ "@value" : {
+ "predicate" : "containing",
+ "value" : "ark"
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/timestamp-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/timestamp-v2d0-partial.json
new file mode 100644
index 0000000..1ca0e17
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/timestamp-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Timestamp",
+ "@value" : 1481750076295
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/timestamp-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/timestamp-v3d0.json
new file mode 100644
index 0000000..1ca0e17
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/timestamp-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:Timestamp",
+ "@value" : 1481750076295
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/tinkergraph-v1d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/tinkergraph-v1d0.json
new file mode 100644
index 0000000..13719f6
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/tinkergraph-v1d0.json
@@ -0,0 +1,313 @@
+{
+ "vertices" : [ {
+ "id" : 1,
+ "label" : "person",
+ "type" : "vertex",
+ "properties" : {
+ "name" : [ {
+ "id" : 0,
+ "value" : "marko"
+ } ],
+ "location" : [ {
+ "id" : 6,
+ "value" : "san diego",
+ "properties" : {
+ "startTime" : 1997,
+ "endTime" : 2001
+ }
+ }, {
+ "id" : 7,
+ "value" : "santa cruz",
+ "properties" : {
+ "startTime" : 2001,
+ "endTime" : 2004
+ }
+ }, {
+ "id" : 8,
+ "value" : "brussels",
+ "properties" : {
+ "startTime" : 2004,
+ "endTime" : 2005
+ }
+ }, {
+ "id" : 9,
+ "value" : "santa fe",
+ "properties" : {
+ "startTime" : 2005
+ }
+ } ]
+ }
+ }, {
+ "id" : 7,
+ "label" : "person",
+ "type" : "vertex",
+ "properties" : {
+ "name" : [ {
+ "id" : 1,
+ "value" : "stephen"
+ } ],
+ "location" : [ {
+ "id" : 10,
+ "value" : "centreville",
+ "properties" : {
+ "startTime" : 1990,
+ "endTime" : 2000
+ }
+ }, {
+ "id" : 11,
+ "value" : "dulles",
+ "properties" : {
+ "startTime" : 2000,
+ "endTime" : 2006
+ }
+ }, {
+ "id" : 12,
+ "value" : "purcellville",
+ "properties" : {
+ "startTime" : 2006
+ }
+ } ]
+ }
+ }, {
+ "id" : 8,
+ "label" : "person",
+ "type" : "vertex",
+ "properties" : {
+ "name" : [ {
+ "id" : 2,
+ "value" : "matthias"
+ } ],
+ "location" : [ {
+ "id" : 13,
+ "value" : "bremen",
+ "properties" : {
+ "startTime" : 2004,
+ "endTime" : 2007
+ }
+ }, {
+ "id" : 14,
+ "value" : "baltimore",
+ "properties" : {
+ "startTime" : 2007,
+ "endTime" : 2011
+ }
+ }, {
+ "id" : 15,
+ "value" : "oakland",
+ "properties" : {
+ "startTime" : 2011,
+ "endTime" : 2014
+ }
+ }, {
+ "id" : 16,
+ "value" : "seattle",
+ "properties" : {
+ "startTime" : 2014
+ }
+ } ]
+ }
+ }, {
+ "id" : 9,
+ "label" : "person",
+ "type" : "vertex",
+ "properties" : {
+ "name" : [ {
+ "id" : 3,
+ "value" : "daniel"
+ } ],
+ "location" : [ {
+ "id" : 17,
+ "value" : "spremberg",
+ "properties" : {
+ "startTime" : 1982,
+ "endTime" : 2005
+ }
+ }, {
+ "id" : 18,
+ "value" : "kaiserslautern",
+ "properties" : {
+ "startTime" : 2005,
+ "endTime" : 2009
+ }
+ }, {
+ "id" : 19,
+ "value" : "aachen",
+ "properties" : {
+ "startTime" : 2009
+ }
+ } ]
+ }
+ }, {
+ "id" : 10,
+ "label" : "software",
+ "type" : "vertex",
+ "properties" : {
+ "name" : [ {
+ "id" : 4,
+ "value" : "gremlin"
+ } ]
+ }
+ }, {
+ "id" : 11,
+ "label" : "software",
+ "type" : "vertex",
+ "properties" : {
+ "name" : [ {
+ "id" : 5,
+ "value" : "tinkergraph"
+ } ]
+ }
+ } ],
+ "edges" : [ {
+ "id" : 13,
+ "label" : "develops",
+ "type" : "edge",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 10,
+ "outV" : 1,
+ "properties" : {
+ "since" : 2009
+ }
+ }, {
+ "id" : 14,
+ "label" : "develops",
+ "type" : "edge",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 11,
+ "outV" : 1,
+ "properties" : {
+ "since" : 2010
+ }
+ }, {
+ "id" : 15,
+ "label" : "uses",
+ "type" : "edge",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 10,
+ "outV" : 1,
+ "properties" : {
+ "skill" : 4
+ }
+ }, {
+ "id" : 16,
+ "label" : "uses",
+ "type" : "edge",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 11,
+ "outV" : 1,
+ "properties" : {
+ "skill" : 5
+ }
+ }, {
+ "id" : 17,
+ "label" : "develops",
+ "type" : "edge",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 10,
+ "outV" : 7,
+ "properties" : {
+ "since" : 2010
+ }
+ }, {
+ "id" : 18,
+ "label" : "develops",
+ "type" : "edge",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 11,
+ "outV" : 7,
+ "properties" : {
+ "since" : 2011
+ }
+ }, {
+ "id" : 19,
+ "label" : "uses",
+ "type" : "edge",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 10,
+ "outV" : 7,
+ "properties" : {
+ "skill" : 5
+ }
+ }, {
+ "id" : 20,
+ "label" : "uses",
+ "type" : "edge",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 11,
+ "outV" : 7,
+ "properties" : {
+ "skill" : 4
+ }
+ }, {
+ "id" : 21,
+ "label" : "develops",
+ "type" : "edge",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 10,
+ "outV" : 8,
+ "properties" : {
+ "since" : 2012
+ }
+ }, {
+ "id" : 22,
+ "label" : "uses",
+ "type" : "edge",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 10,
+ "outV" : 8,
+ "properties" : {
+ "skill" : 3
+ }
+ }, {
+ "id" : 23,
+ "label" : "uses",
+ "type" : "edge",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 11,
+ "outV" : 8,
+ "properties" : {
+ "skill" : 3
+ }
+ }, {
+ "id" : 24,
+ "label" : "uses",
+ "type" : "edge",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 10,
+ "outV" : 9,
+ "properties" : {
+ "skill" : 5
+ }
+ }, {
+ "id" : 25,
+ "label" : "uses",
+ "type" : "edge",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 11,
+ "outV" : 9,
+ "properties" : {
+ "skill" : 3
+ }
+ }, {
+ "id" : 26,
+ "label" : "traverses",
+ "type" : "edge",
+ "inVLabel" : "software",
+ "outVLabel" : "software",
+ "inV" : 11,
+ "outV" : 10
+ } ]
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/tinkergraph-v2d0-no-types.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/tinkergraph-v2d0-no-types.json
new file mode 100644
index 0000000..94ad061
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/tinkergraph-v2d0-no-types.json
@@ -0,0 +1,352 @@
+{
+ "vertices" : [ {
+ "id" : 1,
+ "label" : "person",
+ "properties" : {
+ "name" : [ {
+ "id" : 0,
+ "value" : "marko",
+ "label" : "name"
+ } ],
+ "location" : [ {
+ "id" : 6,
+ "value" : "san diego",
+ "label" : "location",
+ "properties" : {
+ "startTime" : 1997,
+ "endTime" : 2001
+ }
+ }, {
+ "id" : 7,
+ "value" : "santa cruz",
+ "label" : "location",
+ "properties" : {
+ "startTime" : 2001,
+ "endTime" : 2004
+ }
+ }, {
+ "id" : 8,
+ "value" : "brussels",
+ "label" : "location",
+ "properties" : {
+ "startTime" : 2004,
+ "endTime" : 2005
+ }
+ }, {
+ "id" : 9,
+ "value" : "santa fe",
+ "label" : "location",
+ "properties" : {
+ "startTime" : 2005
+ }
+ } ]
+ }
+ }, {
+ "id" : 7,
+ "label" : "person",
+ "properties" : {
+ "name" : [ {
+ "id" : 1,
+ "value" : "stephen",
+ "label" : "name"
+ } ],
+ "location" : [ {
+ "id" : 10,
+ "value" : "centreville",
+ "label" : "location",
+ "properties" : {
+ "startTime" : 1990,
+ "endTime" : 2000
+ }
+ }, {
+ "id" : 11,
+ "value" : "dulles",
+ "label" : "location",
+ "properties" : {
+ "startTime" : 2000,
+ "endTime" : 2006
+ }
+ }, {
+ "id" : 12,
+ "value" : "purcellville",
+ "label" : "location",
+ "properties" : {
+ "startTime" : 2006
+ }
+ } ]
+ }
+ }, {
+ "id" : 8,
+ "label" : "person",
+ "properties" : {
+ "name" : [ {
+ "id" : 2,
+ "value" : "matthias",
+ "label" : "name"
+ } ],
+ "location" : [ {
+ "id" : 13,
+ "value" : "bremen",
+ "label" : "location",
+ "properties" : {
+ "startTime" : 2004,
+ "endTime" : 2007
+ }
+ }, {
+ "id" : 14,
+ "value" : "baltimore",
+ "label" : "location",
+ "properties" : {
+ "startTime" : 2007,
+ "endTime" : 2011
+ }
+ }, {
+ "id" : 15,
+ "value" : "oakland",
+ "label" : "location",
+ "properties" : {
+ "startTime" : 2011,
+ "endTime" : 2014
+ }
+ }, {
+ "id" : 16,
+ "value" : "seattle",
+ "label" : "location",
+ "properties" : {
+ "startTime" : 2014
+ }
+ } ]
+ }
+ }, {
+ "id" : 9,
+ "label" : "person",
+ "properties" : {
+ "name" : [ {
+ "id" : 3,
+ "value" : "daniel",
+ "label" : "name"
+ } ],
+ "location" : [ {
+ "id" : 17,
+ "value" : "spremberg",
+ "label" : "location",
+ "properties" : {
+ "startTime" : 1982,
+ "endTime" : 2005
+ }
+ }, {
+ "id" : 18,
+ "value" : "kaiserslautern",
+ "label" : "location",
+ "properties" : {
+ "startTime" : 2005,
+ "endTime" : 2009
+ }
+ }, {
+ "id" : 19,
+ "value" : "aachen",
+ "label" : "location",
+ "properties" : {
+ "startTime" : 2009
+ }
+ } ]
+ }
+ }, {
+ "id" : 10,
+ "label" : "software",
+ "properties" : {
+ "name" : [ {
+ "id" : 4,
+ "value" : "gremlin",
+ "label" : "name"
+ } ]
+ }
+ }, {
+ "id" : 11,
+ "label" : "software",
+ "properties" : {
+ "name" : [ {
+ "id" : 5,
+ "value" : "tinkergraph",
+ "label" : "name"
+ } ]
+ }
+ } ],
+ "edges" : [ {
+ "id" : 13,
+ "label" : "develops",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 10,
+ "outV" : 1,
+ "properties" : {
+ "since" : {
+ "key" : "since",
+ "value" : 2009
+ }
+ }
+ }, {
+ "id" : 14,
+ "label" : "develops",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 11,
+ "outV" : 1,
+ "properties" : {
+ "since" : {
+ "key" : "since",
+ "value" : 2010
+ }
+ }
+ }, {
+ "id" : 15,
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 10,
+ "outV" : 1,
+ "properties" : {
+ "skill" : {
+ "key" : "skill",
+ "value" : 4
+ }
+ }
+ }, {
+ "id" : 16,
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 11,
+ "outV" : 1,
+ "properties" : {
+ "skill" : {
+ "key" : "skill",
+ "value" : 5
+ }
+ }
+ }, {
+ "id" : 17,
+ "label" : "develops",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 10,
+ "outV" : 7,
+ "properties" : {
+ "since" : {
+ "key" : "since",
+ "value" : 2010
+ }
+ }
+ }, {
+ "id" : 18,
+ "label" : "develops",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 11,
+ "outV" : 7,
+ "properties" : {
+ "since" : {
+ "key" : "since",
+ "value" : 2011
+ }
+ }
+ }, {
+ "id" : 19,
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 10,
+ "outV" : 7,
+ "properties" : {
+ "skill" : {
+ "key" : "skill",
+ "value" : 5
+ }
+ }
+ }, {
+ "id" : 20,
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 11,
+ "outV" : 7,
+ "properties" : {
+ "skill" : {
+ "key" : "skill",
+ "value" : 4
+ }
+ }
+ }, {
+ "id" : 21,
+ "label" : "develops",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 10,
+ "outV" : 8,
+ "properties" : {
+ "since" : {
+ "key" : "since",
+ "value" : 2012
+ }
+ }
+ }, {
+ "id" : 22,
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 10,
+ "outV" : 8,
+ "properties" : {
+ "skill" : {
+ "key" : "skill",
+ "value" : 3
+ }
+ }
+ }, {
+ "id" : 23,
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 11,
+ "outV" : 8,
+ "properties" : {
+ "skill" : {
+ "key" : "skill",
+ "value" : 3
+ }
+ }
+ }, {
+ "id" : 24,
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 10,
+ "outV" : 9,
+ "properties" : {
+ "skill" : {
+ "key" : "skill",
+ "value" : 5
+ }
+ }
+ }, {
+ "id" : 25,
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : 11,
+ "outV" : 9,
+ "properties" : {
+ "skill" : {
+ "key" : "skill",
+ "value" : 3
+ }
+ }
+ }, {
+ "id" : 26,
+ "label" : "traverses",
+ "inVLabel" : "software",
+ "outVLabel" : "software",
+ "inV" : 11,
+ "outV" : 10
+ } ]
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/tinkergraph-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/tinkergraph-v2d0-partial.json
new file mode 100644
index 0000000..24e95ed
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/tinkergraph-v2d0-partial.json
@@ -0,0 +1,829 @@
+{
+ "@type" : "tinker:graph",
+ "@value" : {
+ "vertices" : [ {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
+ "label" : "person",
+ "properties" : {
+ "name" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 0
+ },
+ "value" : "marko",
+ "label" : "name"
+ }
+ } ],
+ "location" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 6
+ },
+ "value" : "san diego",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 1997
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2001
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 7
+ },
+ "value" : "santa cruz",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2001
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2004
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 8
+ },
+ "value" : "brussels",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2004
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2005
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 9
+ },
+ "value" : "santa fe",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2005
+ }
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 7
+ },
+ "label" : "person",
+ "properties" : {
+ "name" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 1
+ },
+ "value" : "stephen",
+ "label" : "name"
+ }
+ } ],
+ "location" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 10
+ },
+ "value" : "centreville",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 1990
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2000
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 11
+ },
+ "value" : "dulles",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2000
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2006
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 12
+ },
+ "value" : "purcellville",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2006
+ }
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 8
+ },
+ "label" : "person",
+ "properties" : {
+ "name" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 2
+ },
+ "value" : "matthias",
+ "label" : "name"
+ }
+ } ],
+ "location" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 13
+ },
+ "value" : "bremen",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2004
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2007
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 14
+ },
+ "value" : "baltimore",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2007
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2011
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 15
+ },
+ "value" : "oakland",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2011
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2014
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 16
+ },
+ "value" : "seattle",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2014
+ }
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 9
+ },
+ "label" : "person",
+ "properties" : {
+ "name" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 3
+ },
+ "value" : "daniel",
+ "label" : "name"
+ }
+ } ],
+ "location" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 17
+ },
+ "value" : "spremberg",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 1982
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2005
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 18
+ },
+ "value" : "kaiserslautern",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2005
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2009
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 19
+ },
+ "value" : "aachen",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2009
+ }
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ },
+ "label" : "software",
+ "properties" : {
+ "name" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 4
+ },
+ "value" : "gremlin",
+ "label" : "name"
+ }
+ } ]
+ }
+ }
+ }, {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 11
+ },
+ "label" : "software",
+ "properties" : {
+ "name" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 5
+ },
+ "value" : "tinkergraph",
+ "label" : "name"
+ }
+ } ]
+ }
+ }
+ } ],
+ "edges" : [ {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 13
+ },
+ "label" : "develops",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
+ "properties" : {
+ "since" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "since",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 2009
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 14
+ },
+ "label" : "develops",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 11
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
+ "properties" : {
+ "since" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "since",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 2010
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 15
+ },
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
+ "properties" : {
+ "skill" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "skill",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 4
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 16
+ },
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 11
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
+ "properties" : {
+ "skill" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "skill",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 5
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 17
+ },
+ "label" : "develops",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 7
+ },
+ "properties" : {
+ "since" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "since",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 2010
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 18
+ },
+ "label" : "develops",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 11
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 7
+ },
+ "properties" : {
+ "since" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "since",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 2011
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 19
+ },
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 7
+ },
+ "properties" : {
+ "skill" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "skill",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 5
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 20
+ },
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 11
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 7
+ },
+ "properties" : {
+ "skill" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "skill",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 4
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 21
+ },
+ "label" : "develops",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 8
+ },
+ "properties" : {
+ "since" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "since",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 2012
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 22
+ },
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 8
+ },
+ "properties" : {
+ "skill" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "skill",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 3
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 23
+ },
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 11
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 8
+ },
+ "properties" : {
+ "skill" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "skill",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 3
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 24
+ },
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 9
+ },
+ "properties" : {
+ "skill" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "skill",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 5
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 25
+ },
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 11
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 9
+ },
+ "properties" : {
+ "skill" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "skill",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 3
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 26
+ },
+ "label" : "traverses",
+ "inVLabel" : "software",
+ "outVLabel" : "software",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 11
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ }
+ }
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/tinkergraph-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/tinkergraph-v3d0.json
new file mode 100644
index 0000000..24e95ed
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/tinkergraph-v3d0.json
@@ -0,0 +1,829 @@
+{
+ "@type" : "tinker:graph",
+ "@value" : {
+ "vertices" : [ {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
+ "label" : "person",
+ "properties" : {
+ "name" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 0
+ },
+ "value" : "marko",
+ "label" : "name"
+ }
+ } ],
+ "location" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 6
+ },
+ "value" : "san diego",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 1997
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2001
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 7
+ },
+ "value" : "santa cruz",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2001
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2004
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 8
+ },
+ "value" : "brussels",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2004
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2005
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 9
+ },
+ "value" : "santa fe",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2005
+ }
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 7
+ },
+ "label" : "person",
+ "properties" : {
+ "name" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 1
+ },
+ "value" : "stephen",
+ "label" : "name"
+ }
+ } ],
+ "location" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 10
+ },
+ "value" : "centreville",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 1990
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2000
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 11
+ },
+ "value" : "dulles",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2000
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2006
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 12
+ },
+ "value" : "purcellville",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2006
+ }
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 8
+ },
+ "label" : "person",
+ "properties" : {
+ "name" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 2
+ },
+ "value" : "matthias",
+ "label" : "name"
+ }
+ } ],
+ "location" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 13
+ },
+ "value" : "bremen",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2004
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2007
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 14
+ },
+ "value" : "baltimore",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2007
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2011
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 15
+ },
+ "value" : "oakland",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2011
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2014
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 16
+ },
+ "value" : "seattle",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2014
+ }
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 9
+ },
+ "label" : "person",
+ "properties" : {
+ "name" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 3
+ },
+ "value" : "daniel",
+ "label" : "name"
+ }
+ } ],
+ "location" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 17
+ },
+ "value" : "spremberg",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 1982
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2005
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 18
+ },
+ "value" : "kaiserslautern",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2005
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2009
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 19
+ },
+ "value" : "aachen",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2009
+ }
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ },
+ "label" : "software",
+ "properties" : {
+ "name" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 4
+ },
+ "value" : "gremlin",
+ "label" : "name"
+ }
+ } ]
+ }
+ }
+ }, {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 11
+ },
+ "label" : "software",
+ "properties" : {
+ "name" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 5
+ },
+ "value" : "tinkergraph",
+ "label" : "name"
+ }
+ } ]
+ }
+ }
+ } ],
+ "edges" : [ {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 13
+ },
+ "label" : "develops",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
+ "properties" : {
+ "since" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "since",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 2009
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 14
+ },
+ "label" : "develops",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 11
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
+ "properties" : {
+ "since" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "since",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 2010
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 15
+ },
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
+ "properties" : {
+ "skill" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "skill",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 4
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 16
+ },
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 11
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
+ "properties" : {
+ "skill" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "skill",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 5
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 17
+ },
+ "label" : "develops",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 7
+ },
+ "properties" : {
+ "since" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "since",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 2010
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 18
+ },
+ "label" : "develops",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 11
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 7
+ },
+ "properties" : {
+ "since" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "since",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 2011
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 19
+ },
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 7
+ },
+ "properties" : {
+ "skill" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "skill",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 5
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 20
+ },
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 11
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 7
+ },
+ "properties" : {
+ "skill" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "skill",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 4
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 21
+ },
+ "label" : "develops",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 8
+ },
+ "properties" : {
+ "since" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "since",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 2012
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 22
+ },
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 8
+ },
+ "properties" : {
+ "skill" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "skill",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 3
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 23
+ },
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 11
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 8
+ },
+ "properties" : {
+ "skill" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "skill",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 3
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 24
+ },
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 9
+ },
+ "properties" : {
+ "skill" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "skill",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 5
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 25
+ },
+ "label" : "uses",
+ "inVLabel" : "software",
+ "outVLabel" : "person",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 11
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 9
+ },
+ "properties" : {
+ "skill" : {
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "skill",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 3
+ }
+ }
+ }
+ }
+ }
+ }, {
+ "@type" : "g:Edge",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 26
+ },
+ "label" : "traverses",
+ "inVLabel" : "software",
+ "outVLabel" : "software",
+ "inV" : {
+ "@type" : "g:Int32",
+ "@value" : 11
+ },
+ "outV" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ }
+ }
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/traversalmetrics-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/traversalmetrics-v2d0-partial.json
new file mode 100644
index 0000000..fdd18a4
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/traversalmetrics-v2d0-partial.json
@@ -0,0 +1,114 @@
+{
+ "@type" : "g:TraversalMetrics",
+ "@value" : {
+ "dur" : {
+ "@type" : "g:Double",
+ "@value" : 0.004
+ },
+ "metrics" : [ {
+ "@type" : "g:Metrics",
+ "@value" : {
+ "dur" : {
+ "@type" : "g:Double",
+ "@value" : 100.0
+ },
+ "counts" : {
+ "traverserCount" : {
+ "@type" : "g:Int64",
+ "@value" : 4
+ },
+ "elementCount" : {
+ "@type" : "g:Int64",
+ "@value" : 4
+ }
+ },
+ "name" : "TinkerGraphStep(vertex,[~label.eq(person)])",
+ "annotations" : {
+ "percentDur" : {
+ "@type" : "g:Double",
+ "@value" : 25.0
+ }
+ },
+ "id" : "7.0.0()"
+ }
+ }, {
+ "@type" : "g:Metrics",
+ "@value" : {
+ "dur" : {
+ "@type" : "g:Double",
+ "@value" : 100.0
+ },
+ "counts" : {
+ "traverserCount" : {
+ "@type" : "g:Int64",
+ "@value" : 13
+ },
+ "elementCount" : {
+ "@type" : "g:Int64",
+ "@value" : 13
+ }
+ },
+ "name" : "VertexStep(OUT,vertex)",
+ "annotations" : {
+ "percentDur" : {
+ "@type" : "g:Double",
+ "@value" : 25.0
+ }
+ },
+ "id" : "2.0.0()"
+ }
+ }, {
+ "@type" : "g:Metrics",
+ "@value" : {
+ "dur" : {
+ "@type" : "g:Double",
+ "@value" : 100.0
+ },
+ "counts" : {
+ "traverserCount" : {
+ "@type" : "g:Int64",
+ "@value" : 7
+ },
+ "elementCount" : {
+ "@type" : "g:Int64",
+ "@value" : 7
+ }
+ },
+ "name" : "VertexStep(OUT,vertex)",
+ "annotations" : {
+ "percentDur" : {
+ "@type" : "g:Double",
+ "@value" : 25.0
+ }
+ },
+ "id" : "3.0.0()"
+ }
+ }, {
+ "@type" : "g:Metrics",
+ "@value" : {
+ "dur" : {
+ "@type" : "g:Double",
+ "@value" : 100.0
+ },
+ "counts" : {
+ "traverserCount" : {
+ "@type" : "g:Int64",
+ "@value" : 1
+ },
+ "elementCount" : {
+ "@type" : "g:Int64",
+ "@value" : 1
+ }
+ },
+ "name" : "TreeStep",
+ "annotations" : {
+ "percentDur" : {
+ "@type" : "g:Double",
+ "@value" : 25.0
+ }
+ },
+ "id" : "4.0.0()"
+ }
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/traversalmetrics-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/traversalmetrics-v3d0.json
new file mode 100644
index 0000000..46f7636
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/traversalmetrics-v3d0.json
@@ -0,0 +1,109 @@
+{
+ "@type" : "g:TraversalMetrics",
+ "@value" : {
+ "@type" : "g:Map",
+ "@value" : [ "dur", {
+ "@type" : "g:Double",
+ "@value" : 0.004
+ }, "metrics", {
+ "@type" : "g:List",
+ "@value" : [ {
+ "@type" : "g:Metrics",
+ "@value" : {
+ "@type" : "g:Map",
+ "@value" : [ "dur", {
+ "@type" : "g:Double",
+ "@value" : 100.0
+ }, "counts", {
+ "@type" : "g:Map",
+ "@value" : [ "traverserCount", {
+ "@type" : "g:Int64",
+ "@value" : 4
+ }, "elementCount", {
+ "@type" : "g:Int64",
+ "@value" : 4
+ } ]
+ }, "name", "TinkerGraphStep(vertex,[~label.eq(person)])", "annotations", {
+ "@type" : "g:Map",
+ "@value" : [ "percentDur", {
+ "@type" : "g:Double",
+ "@value" : 25.0
+ } ]
+ }, "id", "7.0.0()" ]
+ }
+ }, {
+ "@type" : "g:Metrics",
+ "@value" : {
+ "@type" : "g:Map",
+ "@value" : [ "dur", {
+ "@type" : "g:Double",
+ "@value" : 100.0
+ }, "counts", {
+ "@type" : "g:Map",
+ "@value" : [ "traverserCount", {
+ "@type" : "g:Int64",
+ "@value" : 13
+ }, "elementCount", {
+ "@type" : "g:Int64",
+ "@value" : 13
+ } ]
+ }, "name", "VertexStep(OUT,vertex)", "annotations", {
+ "@type" : "g:Map",
+ "@value" : [ "percentDur", {
+ "@type" : "g:Double",
+ "@value" : 25.0
+ } ]
+ }, "id", "2.0.0()" ]
+ }
+ }, {
+ "@type" : "g:Metrics",
+ "@value" : {
+ "@type" : "g:Map",
+ "@value" : [ "dur", {
+ "@type" : "g:Double",
+ "@value" : 100.0
+ }, "counts", {
+ "@type" : "g:Map",
+ "@value" : [ "traverserCount", {
+ "@type" : "g:Int64",
+ "@value" : 7
+ }, "elementCount", {
+ "@type" : "g:Int64",
+ "@value" : 7
+ } ]
+ }, "name", "VertexStep(OUT,vertex)", "annotations", {
+ "@type" : "g:Map",
+ "@value" : [ "percentDur", {
+ "@type" : "g:Double",
+ "@value" : 25.0
+ } ]
+ }, "id", "3.0.0()" ]
+ }
+ }, {
+ "@type" : "g:Metrics",
+ "@value" : {
+ "@type" : "g:Map",
+ "@value" : [ "dur", {
+ "@type" : "g:Double",
+ "@value" : 100.0
+ }, "counts", {
+ "@type" : "g:Map",
+ "@value" : [ "traverserCount", {
+ "@type" : "g:Int64",
+ "@value" : 1
+ }, "elementCount", {
+ "@type" : "g:Int64",
+ "@value" : 1
+ } ]
+ }, "name", "TreeStep", "annotations", {
+ "@type" : "g:Map",
+ "@value" : [ "percentDur", {
+ "@type" : "g:Double",
+ "@value" : 25.0
+ } ]
+ }, "id", "4.0.0()" ]
+ }
+ } ]
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/traverser-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/traverser-v2d0-partial.json
new file mode 100644
index 0000000..a59a29e
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/traverser-v2d0-partial.json
@@ -0,0 +1,109 @@
+{
+ "@type" : "g:Traverser",
+ "@value" : {
+ "bulk" : {
+ "@type" : "g:Int64",
+ "@value" : 1
+ },
+ "value" : {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
+ "label" : "person",
+ "properties" : {
+ "name" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 0
+ },
+ "value" : "marko",
+ "label" : "name"
+ }
+ } ],
+ "location" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 6
+ },
+ "value" : "san diego",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 1997
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2001
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 7
+ },
+ "value" : "santa cruz",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2001
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2004
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 8
+ },
+ "value" : "brussels",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2004
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2005
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 9
+ },
+ "value" : "santa fe",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2005
+ }
+ }
+ }
+ } ]
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/traverser-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/traverser-v3d0.json
new file mode 100644
index 0000000..a59a29e
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/traverser-v3d0.json
@@ -0,0 +1,109 @@
+{
+ "@type" : "g:Traverser",
+ "@value" : {
+ "bulk" : {
+ "@type" : "g:Int64",
+ "@value" : 1
+ },
+ "value" : {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
+ "label" : "person",
+ "properties" : {
+ "name" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 0
+ },
+ "value" : "marko",
+ "label" : "name"
+ }
+ } ],
+ "location" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 6
+ },
+ "value" : "san diego",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 1997
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2001
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 7
+ },
+ "value" : "santa cruz",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2001
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2004
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 8
+ },
+ "value" : "brussels",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2004
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2005
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 9
+ },
+ "value" : "santa fe",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2005
+ }
+ }
+ }
+ } ]
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/uuid-v2d0-no-types.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/uuid-v2d0-no-types.json
new file mode 100644
index 0000000..b36ff96
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/uuid-v2d0-no-types.json
@@ -0,0 +1 @@
+"41d2e28a-20a4-4ab0-b379-d810dede3786"
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/uuid-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/uuid-v2d0-partial.json
new file mode 100644
index 0000000..1cf09f0
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/uuid-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:UUID",
+ "@value" : "41d2e28a-20a4-4ab0-b379-d810dede3786"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/uuid-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/uuid-v3d0.json
new file mode 100644
index 0000000..1cf09f0
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/uuid-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "g:UUID",
+ "@value" : "41d2e28a-20a4-4ab0-b379-d810dede3786"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertex-v1d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertex-v1d0.json
new file mode 100644
index 0000000..a885f58
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertex-v1d0.json
@@ -0,0 +1,39 @@
+{
+ "id" : 1,
+ "label" : "person",
+ "type" : "vertex",
+ "properties" : {
+ "name" : [ {
+ "id" : 0,
+ "value" : "marko"
+ } ],
+ "location" : [ {
+ "id" : 6,
+ "value" : "san diego",
+ "properties" : {
+ "startTime" : 1997,
+ "endTime" : 2001
+ }
+ }, {
+ "id" : 7,
+ "value" : "santa cruz",
+ "properties" : {
+ "startTime" : 2001,
+ "endTime" : 2004
+ }
+ }, {
+ "id" : 8,
+ "value" : "brussels",
+ "properties" : {
+ "startTime" : 2004,
+ "endTime" : 2005
+ }
+ }, {
+ "id" : 9,
+ "value" : "santa fe",
+ "properties" : {
+ "startTime" : 2005
+ }
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertex-v2d0-no-types.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertex-v2d0-no-types.json
new file mode 100644
index 0000000..8e6155f
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertex-v2d0-no-types.json
@@ -0,0 +1,43 @@
+{
+ "id" : 1,
+ "label" : "person",
+ "properties" : {
+ "name" : [ {
+ "id" : 0,
+ "value" : "marko",
+ "label" : "name"
+ } ],
+ "location" : [ {
+ "id" : 6,
+ "value" : "san diego",
+ "label" : "location",
+ "properties" : {
+ "startTime" : 1997,
+ "endTime" : 2001
+ }
+ }, {
+ "id" : 7,
+ "value" : "santa cruz",
+ "label" : "location",
+ "properties" : {
+ "startTime" : 2001,
+ "endTime" : 2004
+ }
+ }, {
+ "id" : 8,
+ "value" : "brussels",
+ "label" : "location",
+ "properties" : {
+ "startTime" : 2004,
+ "endTime" : 2005
+ }
+ }, {
+ "id" : 9,
+ "value" : "santa fe",
+ "label" : "location",
+ "properties" : {
+ "startTime" : 2005
+ }
+ } ]
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertex-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertex-v2d0-partial.json
new file mode 100644
index 0000000..f102230
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertex-v2d0-partial.json
@@ -0,0 +1,100 @@
+{
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
+ "label" : "person",
+ "properties" : {
+ "name" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 0
+ },
+ "value" : "marko",
+ "label" : "name"
+ }
+ } ],
+ "location" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 6
+ },
+ "value" : "san diego",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 1997
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2001
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 7
+ },
+ "value" : "santa cruz",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2001
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2004
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 8
+ },
+ "value" : "brussels",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2004
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2005
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 9
+ },
+ "value" : "santa fe",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2005
+ }
+ }
+ }
+ } ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertex-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertex-v3d0.json
new file mode 100644
index 0000000..f102230
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertex-v3d0.json
@@ -0,0 +1,100 @@
+{
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
+ "label" : "person",
+ "properties" : {
+ "name" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 0
+ },
+ "value" : "marko",
+ "label" : "name"
+ }
+ } ],
+ "location" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 6
+ },
+ "value" : "san diego",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 1997
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2001
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 7
+ },
+ "value" : "santa cruz",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2001
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2004
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 8
+ },
+ "value" : "brussels",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2004
+ },
+ "endTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2005
+ }
+ }
+ }
+ }, {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 9
+ },
+ "value" : "santa fe",
+ "label" : "location",
+ "properties" : {
+ "startTime" : {
+ "@type" : "g:Int32",
+ "@value" : 2005
+ }
+ }
+ }
+ } ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertexproperty-v1d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertexproperty-v1d0.json
new file mode 100644
index 0000000..74025a8
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertexproperty-v1d0.json
@@ -0,0 +1,5 @@
+{
+ "id" : 0,
+ "value" : "marko",
+ "label" : "name"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertexproperty-v2d0-no-types.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertexproperty-v2d0-no-types.json
new file mode 100644
index 0000000..74025a8
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertexproperty-v2d0-no-types.json
@@ -0,0 +1,5 @@
+{
+ "id" : 0,
+ "value" : "marko",
+ "label" : "name"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertexproperty-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertexproperty-v2d0-partial.json
new file mode 100644
index 0000000..af184b1
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertexproperty-v2d0-partial.json
@@ -0,0 +1,11 @@
+{
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 0
+ },
+ "value" : "marko",
+ "label" : "name"
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertexproperty-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertexproperty-v3d0.json
new file mode 100644
index 0000000..af184b1
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/vertexproperty-v3d0.json
@@ -0,0 +1,11 @@
+{
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 0
+ },
+ "value" : "marko",
+ "label" : "name"
+ }
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/year-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/year-v2d0-partial.json
new file mode 100644
index 0000000..ff420bc
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/year-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:Year",
+ "@value" : "2016"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/year-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/year-v3d0.json
new file mode 100644
index 0000000..ff420bc
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/year-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:Year",
+ "@value" : "2016"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/yearmonth-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/yearmonth-v2d0-partial.json
new file mode 100644
index 0000000..98a5e27
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/yearmonth-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:YearMonth",
+ "@value" : "2016-06"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/yearmonth-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/yearmonth-v3d0.json
new file mode 100644
index 0000000..98a5e27
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/yearmonth-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:YearMonth",
+ "@value" : "2016-06"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/zoneddatetime-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/zoneddatetime-v2d0-partial.json
new file mode 100644
index 0000000..367fc47
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/zoneddatetime-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:ZonedDateTime",
+ "@value" : "2016-12-23T12:12:24.000000036+02:00[GMT+02:00]"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/zoneddatetime-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/zoneddatetime-v3d0.json
new file mode 100644
index 0000000..367fc47
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/zoneddatetime-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:ZonedDateTime",
+ "@value" : "2016-12-23T12:12:24.000000036+02:00[GMT+02:00]"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/zoneoffset-v2d0-partial.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/zoneoffset-v2d0-partial.json
new file mode 100644
index 0000000..8591794
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/zoneoffset-v2d0-partial.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:ZoneOffset",
+ "@value" : "+03:06:09"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/zoneoffset-v3d0.json b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/zoneoffset-v3d0.json
new file mode 100644
index 0000000..8591794
--- /dev/null
+++ b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_7_0/zoneoffset-v3d0.json
@@ -0,0 +1,4 @@
+{
+ "@type" : "gx:ZoneOffset",
+ "@value" : "+03:06:09"
+}
\ No newline at end of file
diff --git a/gremlin-tools/gremlin-socket-server/Dockerfile b/gremlin-tools/gremlin-socket-server/Dockerfile
new file mode 100644
index 0000000..9eef686
--- /dev/null
+++ b/gremlin-tools/gremlin-socket-server/Dockerfile
@@ -0,0 +1,37 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+FROM alpine
+
+LABEL maintainer="dev@tinkerpop.apache.org"
+
+ARG SOCKET_SERVER_DIR
+ARG SOCKET_SERVER_VERSION
+
+RUN apk add --no-cache --update \
+ bash \
+ openjdk11-jdk
+
+COPY ${SOCKET_SERVER_DIR}/gremlin-socket-server-${SOCKET_SERVER_VERSION}.jar /opt/gremlin-socket-server/gremlin-socket-server.jar
+COPY ${SOCKET_SERVER_DIR}/libs/ /opt/gremlin-socket-server/libs/
+COPY ${SOCKET_SERVER_DIR}/../conf/ opt/gremlin-socket-server/conf/
+
+WORKDIR /opt/gremlin-socket-server
+
+EXPOSE 45943
+
+ENTRYPOINT ["java","-jar","gremlin-socket-server.jar"]
diff --git a/gremlin-tools/gremlin-socket-server/conf/test-ws-gremlin.yaml b/gremlin-tools/gremlin-socket-server/conf/test-ws-gremlin.yaml
new file mode 100644
index 0000000..c3498d9
--- /dev/null
+++ b/gremlin-tools/gremlin-socket-server/conf/test-ws-gremlin.yaml
@@ -0,0 +1,48 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# This file is to be used to configure an instance of Gremlin-Socket-Server as
+# well as any driver trying to run tests against it.
+# Gremlin-Socket-Server listens for requests with the specific request ids below
+# and triggers response behavior accordingly. Driver's should use the request id
+# corresponding with the desired behavior whenever sending a request to
+# gremlin-socket-server.
+
+# Port exposed by gremlin-socket-server
+PORT: 45943
+
+# If a request with this ID comes to the server, the server responds back with a single
+# vertex picked from Modern graph.
+SINGLE_VERTEX_REQUEST_ID: 6457272A-4018-4538-B9AE-08DD5DDC0AA1
+
+# If a request with this ID comes to the server, the server responds back with a single
+# vertex picked from Modern graph. After a 2 second delay, server sends a Close WebSocket
+# frame on the same connection.
+SINGLE_VERTEX_DELAYED_CLOSE_CONNECTION_REQUEST_ID: 3cb39c94-9454-4398-8430-03485d08bdae
+
+# Server waits for 1 second, then responds with a 500 error status code
+FAILED_AFTER_DELAY_REQUEST_ID: edf79c8b-1d32-4102-a5d2-a5feeca40864
+
+# Server waits for 1 second then responds with a close web socket frame
+CLOSE_CONNECTION_REQUEST_ID: 0150143b-00f9-48a7-a268-28142d902e18
+
+# Same as CLOSE_CONNECTION_REQUEST_ID
+CLOSE_CONNECTION_REQUEST_ID_2: 3c4cf18a-c7f2-4dad-b9bf-5c701eb33000
+
+# If a request with this ID comes to the server, the server responds with the user agent (if any)
+# that was captured during the web socket handshake.
+USER_AGENT_REQUEST_ID: 20ad7bfb-4abf-d7f4-f9d3-9f1d55bee4ad
diff --git a/gremlin-tools/gremlin-socket-server/pom.xml b/gremlin-tools/gremlin-socket-server/pom.xml
new file mode 100644
index 0000000..b1051e1
--- /dev/null
+++ b/gremlin-tools/gremlin-socket-server/pom.xml
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>gremlin-tools</artifactId>
+ <groupId>org.apache.tinkerpop</groupId>
+ <version>3.7.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>gremlin-socket-server</artifactId>
+ <name>Apache TinkerPop :: Gremlin Socket Server</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tinkerpop</groupId>
+ <artifactId>gremlin-util</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tinkerpop</groupId>
+ <artifactId>tinkergraph-gremlin</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.netty</groupId>
+ <artifactId>netty-all</artifactId>
+ <version>${netty.version}</version>
+ </dependency>
+ <!-- LOGGING -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy</artifactId>
+ <version>${groovy.version}</version>
+ <classifier>indy</classifier>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-json</artifactId>
+ <version>${groovy.version}</version>
+ <classifier>indy</classifier>
+ <exclusions>
+ <!-- exclude non-indy type -->
+ <exclusion>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy</artifactId>
+ </exclusion>
+ </exclusions>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+
+ <properties>
+ <!--
+ provides a way to convert maven.exec.skip value to skipImageBuild for use in skipping image building for testing
+ under incompatible platforms
+ -->
+ <maven.exec.skip>false</maven.exec.skip> <!-- default -->
+ <skipImageBuild>${maven.exec.skip}</skipImageBuild>
+ </properties>
+
+ <build>
+ <directory>${basedir}/target</directory>
+ <finalName>${project.artifactId}-${project.version}</finalName>
+ <testSourceDirectory>${basedir}/src/test/java</testSourceDirectory>
+ <resources>
+ <resource>
+ <directory>${basedir}/src/main/resources
+ </directory>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>
+ ${project.build.directory}/libs
+ </outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>3.2.0</version>
+ <configuration>
+ <archive>
+ <manifest>
+ <mainClass>org.apache.tinkerpop.gremlin.driver.SocketServerRunner</mainClass>
+ <addClasspath>true</addClasspath>
+ <classpathPrefix>libs/</classpathPrefix>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ </plugin>
+ <!--
+ gremlin socket server image will be generated on each build as language variants will need the latest to do
+ their work.
+ -->
+ <plugin>
+ <artifactId>exec-maven-plugin</artifactId>
+ <groupId>org.codehaus.mojo</groupId>
+ <version>1.2.1</version>
+ <executions>
+ <execution>
+ <id>build-image</id>
+ <phase>install</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <skip>${skipImageBuild}</skip>
+ <executable>docker</executable>
+ <arguments>
+ <argument>build</argument>
+ <argument>-f</argument>
+ <argument>./Dockerfile</argument>
+ <argument>--build-arg</argument>
+ <argument>SOCKET_SERVER_DIR=target/</argument>
+ <argument>--build-arg</argument>
+ <argument>SOCKET_SERVER_VERSION=${project.version}</argument>
+ <argument>-t</argument>
+ <argument>tinkerpop/gremlin-socket-server:${project.version}</argument>
+ <argument>.</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <execution>
+ <id>remove-dangling-images</id>
+ <phase>install</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <skip>${skipImageBuild}</skip>
+ <executable>docker</executable>
+ <arguments>
+ <argument>image</argument>
+ <argument>prune</argument>
+ <argument>--filter</argument>
+ <argument>label=maintainer=dev@tinkerpop.apache.org</argument>
+ <argument>-f</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/NoOpWebSocketServerHandler.java b/gremlin-tools/gremlin-socket-server/src/main/java/org/apache/tinkerpop/gremlin/driver/NoOpWebSocketServerHandler.java
similarity index 100%
rename from gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/NoOpWebSocketServerHandler.java
rename to gremlin-tools/gremlin-socket-server/src/main/java/org/apache/tinkerpop/gremlin/driver/NoOpWebSocketServerHandler.java
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/SimpleSocketServer.java b/gremlin-tools/gremlin-socket-server/src/main/java/org/apache/tinkerpop/gremlin/driver/SimpleSocketServer.java
similarity index 83%
rename from gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/SimpleSocketServer.java
rename to gremlin-tools/gremlin-socket-server/src/main/java/org/apache/tinkerpop/gremlin/driver/SimpleSocketServer.java
index 84eaf4a..20b3bea 100644
--- a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/SimpleSocketServer.java
+++ b/gremlin-tools/gremlin-socket-server/src/main/java/org/apache/tinkerpop/gremlin/driver/SimpleSocketServer.java
@@ -29,13 +29,18 @@
import io.netty.handler.logging.LoggingHandler;
/**
- * Simple Netty Server
+ * A Simple Netty Server intended to be used as a base for gremlin test servers.
+ * Server behavior is defined by the {@link ChannelInitializer} passed in the start method.
*/
public class SimpleSocketServer {
- public static final int PORT = 45940;
+ private final SocketServerSettings settings;
private EventLoopGroup bossGroup;
private EventLoopGroup workerGroup;
+ public SimpleSocketServer(final SocketServerSettings settings) {
+ this.settings = settings;
+ }
+
public Channel start(final ChannelInitializer<SocketChannel> channelInitializer) throws InterruptedException {
bossGroup = new NioEventLoopGroup(1);
workerGroup = new NioEventLoopGroup();
@@ -44,7 +49,7 @@
.channel(NioServerSocketChannel.class)
.handler(new LoggingHandler(LogLevel.INFO))
.childHandler(channelInitializer);
- return b.bind(PORT).sync().channel();
+ return b.bind(settings.PORT).sync().channel();
}
public void stop() {
diff --git a/gremlin-tools/gremlin-socket-server/src/main/java/org/apache/tinkerpop/gremlin/driver/SocketServerRunner.java b/gremlin-tools/gremlin-socket-server/src/main/java/org/apache/tinkerpop/gremlin/driver/SocketServerRunner.java
new file mode 100644
index 0000000..ef50899
--- /dev/null
+++ b/gremlin-tools/gremlin-socket-server/src/main/java/org/apache/tinkerpop/gremlin/driver/SocketServerRunner.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.driver;
+
+import io.netty.channel.Channel;
+
+import java.io.IOException;
+import java.nio.file.FileSystems;
+
+/**
+ * A simple main class to create and run a SimpleSocketServer
+ */
+public class SocketServerRunner {
+
+ public static void main(final String[] args) throws InterruptedException, IOException {
+ final SocketServerSettings settings = SocketServerSettings.read(FileSystems.getDefault().getPath("conf", "test-ws-gremlin.yaml"));
+ final SimpleSocketServer server = new SimpleSocketServer(settings);
+ final Channel channel = server.start(new TestWSGremlinInitializer(settings));
+ while(channel.isOpen()) {
+ Thread.sleep(1000);
+ }
+ }
+
+}
diff --git a/gremlin-tools/gremlin-socket-server/src/main/java/org/apache/tinkerpop/gremlin/driver/SocketServerSettings.java b/gremlin-tools/gremlin-socket-server/src/main/java/org/apache/tinkerpop/gremlin/driver/SocketServerSettings.java
new file mode 100644
index 0000000..9800de0
--- /dev/null
+++ b/gremlin-tools/gremlin-socket-server/src/main/java/org/apache/tinkerpop/gremlin/driver/SocketServerSettings.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.driver;
+
+import org.yaml.snakeyaml.Yaml;
+import org.yaml.snakeyaml.constructor.Constructor;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.Objects;
+import java.util.UUID;
+
+/**
+ * Encapsulates all constants that are needed by SimpleSocketServer. UUID request id constants are used
+ * to coordinate custom response behavior between a test client and the server.
+ */
+public class SocketServerSettings {
+ public int PORT = 0;
+
+ /**
+ * If a request with this ID comes to the server, the server responds back with a single vertex picked from Modern
+ * graph.
+ */
+ public UUID SINGLE_VERTEX_REQUEST_ID = null;
+
+ /**
+ * If a request with this ID comes to the server, the server responds back with a single vertex picked from Modern
+ * graph. After a 2 second delay, server sends a Close WebSocket frame on the same connection.
+ */
+ public UUID SINGLE_VERTEX_DELAYED_CLOSE_CONNECTION_REQUEST_ID = null;
+
+ /**
+ * Server waits for 1 second, then responds with a 500 error status code
+ */
+ public UUID FAILED_AFTER_DELAY_REQUEST_ID = null;
+
+ /**
+ * Server waits for 1 second then responds with a close web socket frame
+ */
+ public UUID CLOSE_CONNECTION_REQUEST_ID = null;
+
+ /**
+ * Same as CLOSE_CONNECTION_REQUEST_ID
+ */
+ public UUID CLOSE_CONNECTION_REQUEST_ID_2 = null;
+
+ /**
+ * If a request with this ID comes to the server, the server responds with the user agent (if any) that was captured
+ * during the web socket handshake.
+ */
+ public UUID USER_AGENT_REQUEST_ID = null;
+
+ public static SocketServerSettings read(final Path confFilePath) throws IOException {
+ return read(Files.newInputStream(confFilePath));
+ }
+
+ public static SocketServerSettings read(final InputStream confInputStream) {
+ Objects.requireNonNull(confInputStream);
+ final Yaml yaml = new Yaml(new Constructor(SocketServerSettings.class));
+ return yaml.load(confInputStream);
+ }
+}
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/TestHttpServerInitializer.java b/gremlin-tools/gremlin-socket-server/src/main/java/org/apache/tinkerpop/gremlin/driver/TestHttpServerInitializer.java
similarity index 100%
rename from gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/TestHttpServerInitializer.java
rename to gremlin-tools/gremlin-socket-server/src/main/java/org/apache/tinkerpop/gremlin/driver/TestHttpServerInitializer.java
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/TestWSGremlinInitializer.java b/gremlin-tools/gremlin-socket-server/src/main/java/org/apache/tinkerpop/gremlin/driver/TestWSGremlinInitializer.java
similarity index 69%
rename from gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/TestWSGremlinInitializer.java
rename to gremlin-tools/gremlin-socket-server/src/main/java/org/apache/tinkerpop/gremlin/driver/TestWSGremlinInitializer.java
index 44d314c..da2e5aa 100644
--- a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/TestWSGremlinInitializer.java
+++ b/gremlin-tools/gremlin-socket-server/src/main/java/org/apache/tinkerpop/gremlin/driver/TestWSGremlinInitializer.java
@@ -46,43 +46,25 @@
/**
* Initializer which partially mimics the Gremlin Server. This initializer injects a handler in the
* server pipeline that can be modified to send the desired response for a test case.
+ * This handler identifies incoming requests with ids matching those in {@link SocketServerSettings}
+ * and delivers the response which corresponds to the request id.
*/
public class TestWSGremlinInitializer extends TestWebSocketServerInitializer {
private static final Logger logger = LoggerFactory.getLogger(TestWSGremlinInitializer.class);
- /**
- * If a request with this ID comes to the server, the server responds back with a single vertex picked from Modern
- * graph.
- */
- public static final UUID SINGLE_VERTEX_REQUEST_ID =
- UUID.fromString("6457272A-4018-4538-B9AE-08DD5DDC0AA1");
- /**
- * If a request with this ID comes to the server, the server responds back with a single vertex picked from Modern
- * graph. After some delay, server sends a Close WebSocket frame on the same connection.
- */
- public static final UUID SINGLE_VERTEX_DELAYED_CLOSE_CONNECTION_REQUEST_ID =
- UUID.fromString("3cb39c94-9454-4398-8430-03485d08bdae");
+ private final SocketServerSettings settings;
- public static final UUID FAILED_AFTER_DELAY_REQUEST_ID =
- UUID.fromString("edf79c8b-1d32-4102-a5d2-a5feeca40864");
- public static final UUID CLOSE_CONNECTION_REQUEST_ID =
- UUID.fromString("0150143b-00f9-48a7-a268-28142d902e18");
- public static final UUID CLOSE_CONNECTION_REQUEST_ID_2 =
- UUID.fromString("3c4cf18a-c7f2-4dad-b9bf-5c701eb33000");
- public static final UUID RESPONSE_CONTAINS_SERVER_ERROR_REQUEST_ID =
- UUID.fromString("0d333b1d-6e91-4807-b915-50b9ad721d20");
- /**
- * If a request with this ID comes to the server, the server responds with the user agent (if any) that was captured
- * during the web socket handshake.
- */
- public static final UUID USER_AGENT_REQUEST_ID =
- UUID.fromString("20ad7bfb-4abf-d7f4-f9d3-9f1d55bee4ad");
+ private final String USER_AGENT_HEADER = "User-Agent";
/**
* Gremlin serializer used for serializing/deserializing the request/response. This should be same as client.
*/
private static final GraphSONMessageSerializerV2d0 SERIALIZER = new GraphSONMessageSerializerV2d0();
+ public TestWSGremlinInitializer(final SocketServerSettings settings) {
+ this.settings = settings;
+ }
+
@Override
public void postInit(ChannelPipeline pipeline) {
pipeline.addLast(new ClientTestConfigurableHandler());
@@ -91,8 +73,9 @@
/**
* Handler introduced in the server pipeline to configure expected response for test cases.
*/
- private static class ClientTestConfigurableHandler extends MessageToMessageDecoder<BinaryWebSocketFrame> {
+ private class ClientTestConfigurableHandler extends MessageToMessageDecoder<BinaryWebSocketFrame> {
private String userAgent = "";
+
@Override
protected void decode(final ChannelHandlerContext ctx, final BinaryWebSocketFrame frame, final List<Object> objects)
throws Exception {
@@ -111,40 +94,37 @@
}
final RequestMessage msg = SERIALIZER.deserializeRequest(messageBytes.discardReadBytes());
- if (msg.getRequestId().equals(SINGLE_VERTEX_DELAYED_CLOSE_CONNECTION_REQUEST_ID)) {
+ if (msg.getRequestId().equals(settings.SINGLE_VERTEX_DELAYED_CLOSE_CONNECTION_REQUEST_ID)) {
logger.info("sending vertex result frame");
ctx.channel().writeAndFlush(new TextWebSocketFrame(returnSingleVertexResponse(
- SINGLE_VERTEX_DELAYED_CLOSE_CONNECTION_REQUEST_ID)));
+ settings.SINGLE_VERTEX_DELAYED_CLOSE_CONNECTION_REQUEST_ID)));
logger.info("waiting for 2 sec");
Thread.sleep(2000);
logger.info("sending close frame");
ctx.channel().writeAndFlush(new CloseWebSocketFrame());
- } else if (msg.getRequestId().equals(SINGLE_VERTEX_REQUEST_ID)) {
+ } else if (msg.getRequestId().equals(settings.SINGLE_VERTEX_REQUEST_ID)) {
logger.info("sending vertex result frame");
- ctx.channel().writeAndFlush(new TextWebSocketFrame(returnSingleVertexResponse(SINGLE_VERTEX_REQUEST_ID)));
- } else if (msg.getRequestId().equals(FAILED_AFTER_DELAY_REQUEST_ID)) {
- logger.info("waiting for 2 sec");
+ ctx.channel().writeAndFlush(new TextWebSocketFrame(returnSingleVertexResponse(settings.SINGLE_VERTEX_REQUEST_ID)));
+ } else if (msg.getRequestId().equals(settings.FAILED_AFTER_DELAY_REQUEST_ID)) {
+ logger.info("waiting for 1 sec");
Thread.sleep(1000);
final ResponseMessage responseMessage = ResponseMessage.build(msg)
.code(ResponseStatusCode.SERVER_ERROR)
.statusAttributeException(new RuntimeException()).create();
ctx.channel().writeAndFlush(new TextWebSocketFrame(SERIALIZER.serializeResponseAsString(responseMessage)));
- } else if (msg.getRequestId().equals(CLOSE_CONNECTION_REQUEST_ID)) {
- Thread.sleep(1000);
- ctx.channel().writeAndFlush(new CloseWebSocketFrame());
- } else if (msg.getRequestId().equals(RESPONSE_CONTAINS_SERVER_ERROR_REQUEST_ID)) {
+ } else if (msg.getRequestId().equals(settings.CLOSE_CONNECTION_REQUEST_ID) || msg.getRequestId().equals(settings.CLOSE_CONNECTION_REQUEST_ID_2)) {
Thread.sleep(1000);
ctx.channel().writeAndFlush(new CloseWebSocketFrame());
}
- else if (msg.getRequestId().equals(USER_AGENT_REQUEST_ID)) {
- ctx.channel().writeAndFlush(new TextWebSocketFrame(returnSimpleStringResponse(USER_AGENT_REQUEST_ID, userAgent)));
+ else if (msg.getRequestId().equals(settings.USER_AGENT_REQUEST_ID)) {
+ ctx.channel().writeAndFlush(new TextWebSocketFrame(returnSimpleStringResponse(settings.USER_AGENT_REQUEST_ID, userAgent)));
}
}
private String returnSingleVertexResponse(final UUID requestID) throws SerializationException {
final TinkerGraph graph = TinkerFactory.createClassic();
final GraphTraversalSource g = graph.traversal();
- final Vertex t = g.V().limit(1).next();
+ final Vertex[] t = {g.V().limit(1).next()};
return SERIALIZER.serializeResponseAsString(ResponseMessage.build(requestID).result(t).create());
}
@@ -165,8 +145,8 @@
if(evt instanceof WebSocketServerProtocolHandler.HandshakeComplete) {
WebSocketServerProtocolHandler.HandshakeComplete handshake = (WebSocketServerProtocolHandler.HandshakeComplete) evt;
HttpHeaders requestHeaders = handshake.requestHeaders();
- if(requestHeaders.contains(UserAgent.USER_AGENT_HEADER_NAME)) {
- userAgent = requestHeaders.get(UserAgent.USER_AGENT_HEADER_NAME);
+ if(requestHeaders.contains(USER_AGENT_HEADER)) {
+ userAgent = requestHeaders.get(USER_AGENT_HEADER);
}
else {
ctx.fireUserEventTriggered(evt);
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/TestWSNoOpInitializer.java b/gremlin-tools/gremlin-socket-server/src/main/java/org/apache/tinkerpop/gremlin/driver/TestWSNoOpInitializer.java
similarity index 100%
rename from gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/TestWSNoOpInitializer.java
rename to gremlin-tools/gremlin-socket-server/src/main/java/org/apache/tinkerpop/gremlin/driver/TestWSNoOpInitializer.java
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/TestWebSocketServerInitializer.java b/gremlin-tools/gremlin-socket-server/src/main/java/org/apache/tinkerpop/gremlin/driver/TestWebSocketServerInitializer.java
similarity index 100%
rename from gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/TestWebSocketServerInitializer.java
rename to gremlin-tools/gremlin-socket-server/src/main/java/org/apache/tinkerpop/gremlin/driver/TestWebSocketServerInitializer.java
diff --git a/gremlin-tools/pom.xml b/gremlin-tools/pom.xml
index f5cc62f..e5ac3d4 100644
--- a/gremlin-tools/pom.xml
+++ b/gremlin-tools/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>tinkerpop</artifactId>
<groupId>org.apache.tinkerpop</groupId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlin-tools</artifactId>
@@ -31,6 +31,7 @@
<module>gremlin-benchmark</module>
<module>gremlin-coverage</module>
<module>gremlin-io-test</module>
+ <module>gremlin-socket-server</module>
</modules>
<build>
diff --git a/gremlin-util/pom.xml b/gremlin-util/pom.xml
new file mode 100644
index 0000000..b8f5818
--- /dev/null
+++ b/gremlin-util/pom.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>tinkerpop</artifactId>
+ <groupId>org.apache.tinkerpop</groupId>
+ <version>3.7.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>gremlin-util</artifactId>
+ <name>Apache TinkerPop :: Gremlin Util</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tinkerpop</groupId>
+ <artifactId>gremlin-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.netty</groupId>
+ <artifactId>netty-all</artifactId>
+ <version>${netty.version}</version>
+ </dependency>
+ <!-- LOGGING -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ </dependency>
+ <!-- TEST -->
+ <dependency>
+ <groupId>org.apache.tinkerpop</groupId>
+ <artifactId>gremlin-test</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tinkerpop</groupId>
+ <artifactId>tinkergraph-gremlin</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-module-junit4</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-api-mockito2</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/MessageSerializer.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/MessageSerializer.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/MessageSerializer.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/MessageSerializer.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Tokens.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/Tokens.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Tokens.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/Tokens.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/message/RequestMessage.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/message/RequestMessage.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/message/RequestMessage.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/message/RequestMessage.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/message/ResponseMessage.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/message/ResponseMessage.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/message/ResponseMessage.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/message/ResponseMessage.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/message/ResponseResult.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/message/ResponseResult.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/message/ResponseResult.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/message/ResponseResult.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/message/ResponseStatus.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/message/ResponseStatus.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/message/ResponseStatus.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/message/ResponseStatus.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/message/ResponseStatusCode.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/message/ResponseStatusCode.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/message/ResponseStatusCode.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/message/ResponseStatusCode.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGraphSONMessageSerializerV1d0.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGraphSONMessageSerializerV1d0.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGraphSONMessageSerializerV1d0.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGraphSONMessageSerializerV1d0.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGraphSONMessageSerializerV2d0.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGraphSONMessageSerializerV2d0.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGraphSONMessageSerializerV2d0.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractGraphSONMessageSerializerV2d0.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractMessageSerializer.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractMessageSerializer.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractMessageSerializer.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/AbstractMessageSerializer.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphBinaryMessageSerializerV1.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphBinaryMessageSerializerV1.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphBinaryMessageSerializerV1.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphBinaryMessageSerializerV1.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV2d0.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV2d0.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV2d0.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV2d0.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV2d0.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV2d0.java
similarity index 98%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV2d0.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV2d0.java
index 6717a00..232fea9 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV2d0.java
+++ b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV2d0.java
@@ -30,8 +30,6 @@
import org.slf4j.LoggerFactory;
import java.nio.ByteBuffer;
-import java.util.Map;
-import java.util.UUID;
/**
* Serialize results to JSON with version 2.0.x schema and the extended module.
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV3d0.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV3d0.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV3d0.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV3d0.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/MessageTextSerializer.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/MessageTextSerializer.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/MessageTextSerializer.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/MessageTextSerializer.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/NettyBuffer.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/NettyBuffer.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/NettyBuffer.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/NettyBuffer.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/NettyBufferFactory.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/NettyBufferFactory.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/NettyBufferFactory.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/NettyBufferFactory.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/RequestMessageGryoSerializer.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/RequestMessageGryoSerializer.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/RequestMessageGryoSerializer.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/RequestMessageGryoSerializer.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/ResponseMessageGryoSerializer.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/ResponseMessageGryoSerializer.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/ResponseMessageGryoSerializer.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/ResponseMessageGryoSerializer.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/SerTokens.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/SerTokens.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/SerTokens.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/SerTokens.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/SerializationException.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/SerializationException.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/SerializationException.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/SerializationException.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/Serializers.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/Serializers.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/Serializers.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/Serializers.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/RequestMessageSerializer.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/RequestMessageSerializer.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/RequestMessageSerializer.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/RequestMessageSerializer.java
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/ResponseMessageSerializer.java b/gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/ResponseMessageSerializer.java
similarity index 100%
rename from gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/ResponseMessageSerializer.java
rename to gremlin-util/src/main/java/org/apache/tinkerpop/gremlin/driver/ser/binary/ResponseMessageSerializer.java
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/MockitoHamcrestMatcherAdapter.java b/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/MockitoHamcrestMatcherAdapter.java
similarity index 100%
rename from gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/MockitoHamcrestMatcherAdapter.java
rename to gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/MockitoHamcrestMatcherAdapter.java
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/message/ResponseStatusCodeTest.java b/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/message/ResponseStatusCodeTest.java
similarity index 100%
rename from gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/message/ResponseStatusCodeTest.java
rename to gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/message/ResponseStatusCodeTest.java
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0Test.java b/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0Test.java
similarity index 100%
rename from gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0Test.java
rename to gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV1d0Test.java
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV2d0Test.java b/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV2d0Test.java
similarity index 100%
rename from gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV2d0Test.java
rename to gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerGremlinV2d0Test.java
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0Test.java b/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0Test.java
similarity index 100%
rename from gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0Test.java
rename to gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV1d0Test.java
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV2d0Test.java b/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV2d0Test.java
similarity index 100%
rename from gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV2d0Test.java
rename to gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV2d0Test.java
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV3d0Test.java b/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV3d0Test.java
similarity index 100%
rename from gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV3d0Test.java
rename to gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/GraphSONMessageSerializerV3d0Test.java
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/NettyBufferFactoryTest.java b/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/NettyBufferFactoryTest.java
similarity index 99%
rename from gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/NettyBufferFactoryTest.java
rename to gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/NettyBufferFactoryTest.java
index 223b289..479f561 100644
--- a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/NettyBufferFactoryTest.java
+++ b/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/NettyBufferFactoryTest.java
@@ -27,7 +27,6 @@
import org.junit.AfterClass;
import org.junit.Test;
-import java.io.IOException;
import java.io.OutputStream;
import java.nio.ByteBuffer;
import java.util.ArrayList;
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryMessageSerializerV1Test.java b/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryMessageSerializerV1Test.java
similarity index 100%
rename from gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryMessageSerializerV1Test.java
rename to gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryMessageSerializerV1Test.java
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryReaderWriterRoundTripTest.java b/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryReaderWriterRoundTripTest.java
similarity index 100%
rename from gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryReaderWriterRoundTripTest.java
rename to gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/GraphBinaryReaderWriterRoundTripTest.java
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/TypeSerializerFailureTests.java b/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/TypeSerializerFailureTests.java
similarity index 100%
rename from gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/TypeSerializerFailureTests.java
rename to gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/TypeSerializerFailureTests.java
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/TypeSerializerRegistryTest.java b/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/TypeSerializerRegistryTest.java
similarity index 100%
rename from gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/TypeSerializerRegistryTest.java
rename to gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/TypeSerializerRegistryTest.java
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/CharSerializerTest.java b/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/CharSerializerTest.java
similarity index 100%
rename from gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/CharSerializerTest.java
rename to gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/CharSerializerTest.java
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/sample/SamplePerson.java b/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/sample/SamplePerson.java
similarity index 100%
rename from gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/sample/SamplePerson.java
rename to gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/sample/SamplePerson.java
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/sample/SamplePersonSerializer.java b/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/sample/SamplePersonSerializer.java
similarity index 100%
rename from gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/sample/SamplePersonSerializer.java
rename to gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/sample/SamplePersonSerializer.java
diff --git a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/sample/SamplePersonSerializerTest.java b/gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/sample/SamplePersonSerializerTest.java
similarity index 100%
rename from gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/sample/SamplePersonSerializerTest.java
rename to gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/driver/ser/binary/types/sample/SamplePersonSerializerTest.java
diff --git a/gremlint/package-lock.json b/gremlint/package-lock.json
index 34b42d0..ebd23bb 100644
--- a/gremlint/package-lock.json
+++ b/gremlint/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "gremlint",
- "version": "3.6.2-alpha1",
+ "version": "3.7.0-alpha1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "gremlint",
- "version": "3.6.2-alpha1",
+ "version": "3.7.0-alpha1",
"license": "Apache-2.0",
"devDependencies": {
"@types/jest": "^27.5.0",
diff --git a/gremlint/package.json b/gremlint/package.json
index 8d4961f..b0cf6ce 100644
--- a/gremlint/package.json
+++ b/gremlint/package.json
@@ -1,6 +1,6 @@
{
"name": "gremlint",
- "version": "3.6.2-alpha1",
+ "version": "3.7.0-alpha1",
"description": "Linter/code formatter for Gremlin",
"main": "lib/index.js",
"types": "lib/index.d.ts",
diff --git a/gremlint/pom.xml b/gremlint/pom.xml
index 09b58ec..f025249 100644
--- a/gremlint/pom.xml
+++ b/gremlint/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>tinkerpop</artifactId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>gremlint</artifactId>
<name>Apache TinkerPop :: Gremlint</name>
diff --git a/hadoop-gremlin/pom.xml b/hadoop-gremlin/pom.xml
index 3eef1b2..fe08a6b 100644
--- a/hadoop-gremlin/pom.xml
+++ b/hadoop-gremlin/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>tinkerpop</artifactId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>hadoop-gremlin</artifactId>
<name>Apache TinkerPop :: Hadoop Gremlin</name>
diff --git a/neo4j-gremlin/pom.xml b/neo4j-gremlin/pom.xml
index 5abb151..c5b1516 100644
--- a/neo4j-gremlin/pom.xml
+++ b/neo4j-gremlin/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>tinkerpop</artifactId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>neo4j-gremlin</artifactId>
<name>Apache TinkerPop :: Neo4j Gremlin</name>
diff --git a/pom.xml b/pom.xml
index 5f05d61..d8692f9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,11 +21,11 @@
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
- <version>21</version>
+ <version>27</version>
</parent>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>tinkerpop</artifactId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Apache TinkerPop</name>
<description>A Graph Computing Framework</description>
@@ -143,6 +143,7 @@
<module>gremlin-archetype</module>
<module>gremlin-tools</module>
<module>gremlint</module>
+ <module>gremlin-util</module>
</modules>
<scm>
<connection>scm:git:git@github.com:apache/tinkerpop.git</connection>
@@ -156,7 +157,7 @@
<commons.configuration.version>2.8.0</commons.configuration.version>
<commons.lang.version>2.6</commons.lang.version>
<commons.io.version>2.8.0</commons.io.version>
- <commons.lang3.version>3.11</commons.lang3.version>
+ <commons.lang3.version>3.12.0</commons.lang3.version>
<commons.text.version>1.10.0</commons.text.version>
<cucumber.version>6.11.0</cucumber.version>
<exp4j.version>0.4.8</exp4j.version>
@@ -371,6 +372,7 @@
<manifestEntries>
<version>${project.version}</version>
<hash>${buildNumber}</hash>
+ <tinkerpop-version>${project.version}</tinkerpop-version>
</manifestEntries>
</archive>
</configuration>
@@ -506,7 +508,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
- <version>2.8.2</version>
+ <version>3.0.0</version>
</plugin>
<!-- reverted surefire to 2.21.0 for performance reasons. 2.22.2 required forkCount=1 and
reuseForks=true which seemed to more the double the build time. there are only milestone
@@ -777,7 +779,7 @@
<dependency>
<groupId>org.objenesis</groupId>
<artifactId>objenesis</artifactId>
- <version>2.4</version>
+ <version>3.3</version>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
diff --git a/spark-gremlin/pom.xml b/spark-gremlin/pom.xml
index 9662ff0..024b337 100644
--- a/spark-gremlin/pom.xml
+++ b/spark-gremlin/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>tinkerpop</artifactId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>spark-gremlin</artifactId>
<name>Apache TinkerPop :: Spark Gremlin</name>
diff --git a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureIntegrateTest.java b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureIntegrateTest.java
index 9fb7169..a5f8d1b 100644
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureIntegrateTest.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureIntegrateTest.java
@@ -59,7 +59,7 @@
@RunWith(Cucumber.class)
@CucumberOptions(
- tags = "not @RemoteOnly and not @StepDrop and not @StepV and not @StepIndex and not @StepInject and " +
+ tags = "not @RemoteOnly and not @StepDrop and not @StepV and not @StepE and not @StepIndex and not @StepInject and " +
"not @GraphComputerVerificationOneBulk and not @GraphComputerVerificationStrategyNotSupported and " +
"not @GraphComputerVerificationMidVNotSupported and not @GraphComputerVerificationElementSupported and " +
"not @GraphComputerVerificationInjectionNotSupported and " +
diff --git a/sparql-gremlin/pom.xml b/sparql-gremlin/pom.xml
index 23de932..24a572c 100644
--- a/sparql-gremlin/pom.xml
+++ b/sparql-gremlin/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>tinkerpop</artifactId>
<groupId>org.apache.tinkerpop</groupId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>sparql-gremlin</artifactId>
<name>Apache TinkerPop :: SPARQL Gremlin</name>
diff --git a/tinkergraph-gremlin/pom.xml b/tinkergraph-gremlin/pom.xml
index 63f3b98..aa37252 100644
--- a/tinkergraph-gremlin/pom.xml
+++ b/tinkergraph-gremlin/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>tinkerpop</artifactId>
- <version>3.6.2-SNAPSHOT</version>
+ <version>3.7.0-SNAPSHOT</version>
</parent>
<artifactId>tinkergraph-gremlin</artifactId>
<name>Apache TinkerPop :: TinkerGraph Gremlin</name>
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphWorld.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphWorld.java
index 7a02c0a..2e2ab7c 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphWorld.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphWorld.java
@@ -116,6 +116,7 @@
"@StepDrop",
"@StepInject",
"@StepV",
+ "@StepE",
"@GraphComputerVerificationOneBulk",
"@GraphComputerVerificationStrategyNotSupported",
"@GraphComputerVerificationMidVNotSupported",