gremlin 3.8.0 → 4.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -4
- package/build/cjs/driver/auth.cjs +69 -0
- package/build/cjs/driver/auth.d.cts +9 -0
- package/build/cjs/driver/client.cjs +134 -0
- package/build/cjs/driver/client.d.cts +85 -0
- package/build/cjs/driver/connection.cjs +250 -0
- package/build/cjs/driver/connection.d.cts +63 -0
- package/build/cjs/driver/driver-remote-connection.cjs +141 -0
- package/build/cjs/driver/driver-remote-connection.d.cts +33 -0
- package/build/cjs/driver/remote-connection.cjs +75 -0
- package/build/cjs/driver/remote-connection.d.cts +72 -0
- package/build/cjs/driver/request-message.cjs +157 -0
- package/build/cjs/driver/request-message.d.cts +49 -0
- package/build/cjs/driver/response-error.cjs +45 -0
- package/build/cjs/driver/response-error.d.cts +13 -0
- package/build/cjs/driver/result-set.cjs +111 -0
- package/build/cjs/driver/result-set.d.cts +29 -0
- package/build/cjs/index.cjs +125 -0
- package/build/cjs/index.d.cts +393 -0
- package/build/cjs/language/grammar/GremlinLexer.cjs +1851 -0
- package/build/cjs/language/grammar/GremlinLexer.d.cts +340 -0
- package/build/cjs/language/grammar/GremlinListener.cjs +4490 -0
- package/build/cjs/language/grammar/GremlinListener.d.cts +4898 -0
- package/build/cjs/language/grammar/GremlinParser.cjs +35244 -0
- package/build/cjs/language/grammar/GremlinParser.d.cts +5881 -0
- package/build/cjs/language/index.cjs +48 -0
- package/build/cjs/language/index.d.cts +12 -0
- package/build/cjs/language/translator/AnonymizedTranslateVisitor.cjs +157 -0
- package/build/cjs/language/translator/AnonymizedTranslateVisitor.d.cts +36 -0
- package/build/cjs/language/translator/DotNetTranslateVisitor.cjs +826 -0
- package/build/cjs/language/translator/DotNetTranslateVisitor.d.cts +155 -0
- package/build/cjs/language/translator/GoTranslateVisitor.cjs +339 -0
- package/build/cjs/language/translator/GoTranslateVisitor.d.cts +31 -0
- package/build/cjs/language/translator/GremlinTranslator.cjs +96 -0
- package/build/cjs/language/translator/GremlinTranslator.d.cts +18 -0
- package/build/cjs/language/translator/GroovyTranslateVisitor.cjs +287 -0
- package/build/cjs/language/translator/GroovyTranslateVisitor.d.cts +34 -0
- package/build/cjs/language/translator/JavaTranslateVisitor.cjs +247 -0
- package/build/cjs/language/translator/JavaTranslateVisitor.d.cts +23 -0
- package/build/cjs/language/translator/JavascriptTranslateVisitor.cjs +220 -0
- package/build/cjs/language/translator/JavascriptTranslateVisitor.d.cts +25 -0
- package/build/cjs/language/translator/PythonTranslateVisitor.cjs +304 -0
- package/build/cjs/language/translator/PythonTranslateVisitor.d.cts +28 -0
- package/build/cjs/language/translator/TranslateVisitor.cjs +389 -0
- package/build/cjs/language/translator/TranslateVisitor.d.cts +91 -0
- package/build/cjs/language/translator/Translation.cjs +47 -0
- package/build/cjs/language/translator/Translation.d.cts +13 -0
- package/build/cjs/language/translator/Translator.cjs +46 -0
- package/build/cjs/language/translator/Translator.d.cts +24 -0
- package/build/cjs/language/translator/TranslatorException.cjs +31 -0
- package/build/cjs/language/translator/TranslatorException.d.cts +6 -0
- package/build/cjs/process/anonymous-traversal.cjs +78 -0
- package/build/cjs/process/anonymous-traversal.d.cts +40 -0
- package/build/cjs/process/graph-traversal.cjs +1702 -0
- package/build/cjs/process/graph-traversal.d.cts +1134 -0
- package/build/cjs/process/gremlin-lang.cjs +196 -0
- package/build/cjs/process/gremlin-lang.d.cts +15 -0
- package/build/cjs/process/transaction.cjs +69 -0
- package/build/cjs/process/transaction.d.cts +34 -0
- package/build/cjs/process/traversal-strategy.cjs +360 -0
- package/build/cjs/process/traversal-strategy.d.cts +211 -0
- package/build/cjs/process/traversal.cjs +482 -0
- package/build/cjs/process/traversal.d.cts +186 -0
- package/build/cjs/structure/graph.cjs +157 -0
- package/build/cjs/structure/graph.d.cts +57 -0
- package/build/cjs/structure/io/binary/GraphBinary.cjs +148 -0
- package/build/cjs/structure/io/binary/GraphBinary.d.cts +91 -0
- package/build/cjs/structure/io/binary/internals/AnySerializer.cjs +80 -0
- package/build/cjs/structure/io/binary/internals/AnySerializer.d.cts +8 -0
- package/build/cjs/structure/io/binary/internals/ArraySerializer.cjs +139 -0
- package/build/cjs/structure/io/binary/internals/ArraySerializer.d.cts +15 -0
- package/build/cjs/structure/io/binary/internals/BigIntegerSerializer.cjs +136 -0
- package/build/cjs/structure/io/binary/internals/BigIntegerSerializer.d.cts +14 -0
- package/build/cjs/structure/io/binary/internals/BinarySerializer.cjs +112 -0
- package/build/cjs/structure/io/binary/internals/BinarySerializer.d.cts +11 -0
- package/build/cjs/structure/io/binary/internals/BooleanSerializer.cjs +93 -0
- package/build/cjs/structure/io/binary/internals/BooleanSerializer.d.cts +11 -0
- package/build/cjs/structure/io/binary/internals/ByteSerializer.cjs +88 -0
- package/build/cjs/structure/io/binary/internals/ByteSerializer.d.cts +10 -0
- package/build/cjs/structure/io/binary/internals/DataType.cjs +63 -0
- package/build/cjs/structure/io/binary/internals/DataType.d.cts +35 -0
- package/build/cjs/structure/io/binary/internals/DateTimeSerializer.cjs +139 -0
- package/build/cjs/structure/io/binary/internals/DateTimeSerializer.d.cts +15 -0
- package/build/cjs/structure/io/binary/internals/DoubleSerializer.cjs +91 -0
- package/build/cjs/structure/io/binary/internals/DoubleSerializer.d.cts +11 -0
- package/build/cjs/structure/io/binary/internals/EdgeSerializer.cjs +201 -0
- package/build/cjs/structure/io/binary/internals/EdgeSerializer.d.cts +20 -0
- package/build/cjs/structure/io/binary/internals/EnumSerializer.cjs +127 -0
- package/build/cjs/structure/io/binary/internals/EnumSerializer.d.cts +24 -0
- package/build/cjs/structure/io/binary/internals/FloatSerializer.cjs +91 -0
- package/build/cjs/structure/io/binary/internals/FloatSerializer.d.cts +11 -0
- package/build/cjs/structure/io/binary/internals/GraphBinaryReader.cjs +97 -0
- package/build/cjs/structure/io/binary/internals/GraphBinaryReader.d.cts +19 -0
- package/build/cjs/structure/io/binary/internals/GraphBinaryWriter.cjs +85 -0
- package/build/cjs/structure/io/binary/internals/GraphBinaryWriter.d.cts +9 -0
- package/build/cjs/structure/io/binary/internals/IntSerializer.cjs +103 -0
- package/build/cjs/structure/io/binary/internals/IntSerializer.d.cts +13 -0
- package/build/cjs/structure/io/binary/internals/LongSerializer.cjs +95 -0
- package/build/cjs/structure/io/binary/internals/LongSerializer.d.cts +11 -0
- package/build/cjs/structure/io/binary/internals/MapSerializer.cjs +144 -0
- package/build/cjs/structure/io/binary/internals/MapSerializer.d.cts +13 -0
- package/build/cjs/structure/io/binary/internals/MarkerSerializer.cjs +63 -0
- package/build/cjs/structure/io/binary/internals/MarkerSerializer.d.cts +8 -0
- package/build/cjs/structure/io/binary/internals/NumberSerializationStrategy.cjs +66 -0
- package/build/cjs/structure/io/binary/internals/NumberSerializationStrategy.d.cts +9 -0
- package/build/cjs/structure/io/binary/internals/PathSerializer.cjs +113 -0
- package/build/cjs/structure/io/binary/internals/PathSerializer.d.cts +15 -0
- package/build/cjs/structure/io/binary/internals/PropertySerializer.cjs +130 -0
- package/build/cjs/structure/io/binary/internals/PropertySerializer.d.cts +15 -0
- package/build/cjs/structure/io/binary/internals/SetSerializer.cjs +138 -0
- package/build/cjs/structure/io/binary/internals/SetSerializer.d.cts +15 -0
- package/build/cjs/structure/io/binary/internals/ShortSerializer.cjs +91 -0
- package/build/cjs/structure/io/binary/internals/ShortSerializer.d.cts +11 -0
- package/build/cjs/structure/io/binary/internals/StringSerializer.cjs +107 -0
- package/build/cjs/structure/io/binary/internals/StringSerializer.d.cts +11 -0
- package/{lib/driver/auth/authenticator.js → build/cjs/structure/io/binary/internals/StubSerializer.cjs} +14 -20
- package/build/cjs/structure/io/binary/internals/StubSerializer.d.cts +7 -0
- package/build/cjs/structure/io/binary/internals/UnspecifiedNullSerializer.cjs +70 -0
- package/build/cjs/structure/io/binary/internals/UnspecifiedNullSerializer.d.cts +11 -0
- package/build/cjs/structure/io/binary/internals/UuidSerializer.cjs +109 -0
- package/build/cjs/structure/io/binary/internals/UuidSerializer.d.cts +14 -0
- package/build/cjs/structure/io/binary/internals/VertexPropertySerializer.cjs +163 -0
- package/build/cjs/structure/io/binary/internals/VertexPropertySerializer.d.cts +15 -0
- package/build/cjs/structure/io/binary/internals/VertexSerializer.cjs +128 -0
- package/build/cjs/structure/io/binary/internals/VertexSerializer.d.cts +17 -0
- package/build/cjs/structure/io/binary/internals/utils.cjs +53 -0
- package/build/cjs/structure/io/binary/internals/utils.d.cts +6 -0
- package/build/cjs/utils.cjs +142 -0
- package/build/cjs/utils.d.cts +20 -0
- package/build/esm/driver/auth.d.ts +9 -0
- package/build/esm/driver/auth.js +65 -0
- package/build/esm/driver/client.d.ts +85 -0
- package/build/esm/driver/client.js +128 -0
- package/build/esm/driver/connection.d.ts +63 -0
- package/build/esm/driver/connection.js +211 -0
- package/build/esm/driver/driver-remote-connection.d.ts +33 -0
- package/build/esm/driver/driver-remote-connection.js +102 -0
- package/build/esm/driver/remote-connection.d.ts +72 -0
- package/build/esm/driver/remote-connection.js +69 -0
- package/build/esm/driver/request-message.d.ts +49 -0
- package/build/esm/driver/request-message.js +152 -0
- package/build/esm/driver/response-error.d.ts +13 -0
- package/{lib → build/esm}/driver/response-error.js +21 -26
- package/build/esm/driver/result-set.d.ts +29 -0
- package/build/esm/driver/result-set.js +75 -0
- package/build/esm/index.d.ts +393 -0
- package/{index.js → build/esm/index.js} +22 -32
- package/build/esm/language/grammar/GremlinLexer.d.ts +340 -0
- package/build/esm/language/grammar/GremlinLexer.js +1814 -0
- package/build/esm/language/grammar/GremlinListener.d.ts +4898 -0
- package/build/esm/language/grammar/GremlinListener.js +4486 -0
- package/build/esm/language/grammar/GremlinParser.d.ts +5881 -0
- package/build/esm/language/grammar/GremlinParser.js +34711 -0
- package/build/esm/language/index.d.ts +12 -0
- package/build/esm/language/index.js +30 -0
- package/build/esm/language/translator/AnonymizedTranslateVisitor.d.ts +36 -0
- package/build/esm/language/translator/AnonymizedTranslateVisitor.js +151 -0
- package/build/esm/language/translator/DotNetTranslateVisitor.d.ts +155 -0
- package/build/esm/language/translator/DotNetTranslateVisitor.js +820 -0
- package/build/esm/language/translator/GoTranslateVisitor.d.ts +31 -0
- package/build/esm/language/translator/GoTranslateVisitor.js +333 -0
- package/build/esm/language/translator/GremlinTranslator.d.ts +18 -0
- package/build/esm/language/translator/GremlinTranslator.js +89 -0
- package/build/esm/language/translator/GroovyTranslateVisitor.d.ts +34 -0
- package/build/esm/language/translator/GroovyTranslateVisitor.js +281 -0
- package/build/esm/language/translator/JavaTranslateVisitor.d.ts +23 -0
- package/build/esm/language/translator/JavaTranslateVisitor.js +241 -0
- package/build/esm/language/translator/JavascriptTranslateVisitor.d.ts +25 -0
- package/build/esm/language/translator/JavascriptTranslateVisitor.js +214 -0
- package/build/esm/language/translator/PythonTranslateVisitor.d.ts +28 -0
- package/build/esm/language/translator/PythonTranslateVisitor.js +298 -0
- package/build/esm/language/translator/TranslateVisitor.d.ts +91 -0
- package/build/esm/language/translator/TranslateVisitor.js +386 -0
- package/build/esm/language/translator/Translation.d.ts +13 -0
- package/build/esm/language/translator/Translation.js +43 -0
- package/build/esm/language/translator/Translator.d.ts +24 -0
- package/build/esm/language/translator/Translator.js +40 -0
- package/build/esm/language/translator/TranslatorException.d.ts +6 -0
- package/build/esm/language/translator/TranslatorException.js +27 -0
- package/build/esm/process/anonymous-traversal.d.ts +40 -0
- package/build/esm/process/anonymous-traversal.js +72 -0
- package/build/esm/process/graph-traversal.d.ts +1134 -0
- package/build/esm/process/graph-traversal.js +1693 -0
- package/build/esm/process/gremlin-lang.d.ts +15 -0
- package/build/esm/process/gremlin-lang.js +193 -0
- package/build/esm/process/transaction.d.ts +34 -0
- package/build/esm/process/transaction.js +65 -0
- package/build/esm/process/traversal-strategy.d.ts +211 -0
- package/build/esm/process/traversal-strategy.js +319 -0
- package/build/esm/process/traversal.d.ts +186 -0
- package/build/esm/process/traversal.js +469 -0
- package/build/esm/structure/graph.d.ts +57 -0
- package/build/esm/structure/graph.js +148 -0
- package/build/esm/structure/io/binary/GraphBinary.d.ts +91 -0
- package/build/esm/structure/io/binary/GraphBinary.js +108 -0
- package/build/esm/structure/io/binary/internals/AnySerializer.d.ts +8 -0
- package/build/esm/structure/io/binary/internals/AnySerializer.js +77 -0
- package/build/esm/structure/io/binary/internals/ArraySerializer.d.ts +15 -0
- package/build/esm/structure/io/binary/internals/ArraySerializer.js +136 -0
- package/build/esm/structure/io/binary/internals/BigIntegerSerializer.d.ts +14 -0
- package/build/esm/structure/io/binary/internals/BigIntegerSerializer.js +133 -0
- package/build/esm/structure/io/binary/internals/BinarySerializer.d.ts +11 -0
- package/build/esm/structure/io/binary/internals/BinarySerializer.js +109 -0
- package/build/esm/structure/io/binary/internals/BooleanSerializer.d.ts +11 -0
- package/build/esm/structure/io/binary/internals/BooleanSerializer.js +90 -0
- package/build/esm/structure/io/binary/internals/ByteSerializer.d.ts +10 -0
- package/build/esm/structure/io/binary/internals/ByteSerializer.js +85 -0
- package/build/esm/structure/io/binary/internals/DataType.d.ts +35 -0
- package/{lib/driver/auth/mechanisms/sasl-mechanism-base.js → build/esm/structure/io/binary/internals/DataType.js} +43 -34
- package/build/esm/structure/io/binary/internals/DateTimeSerializer.d.ts +15 -0
- package/build/esm/structure/io/binary/internals/DateTimeSerializer.js +136 -0
- package/build/esm/structure/io/binary/internals/DoubleSerializer.d.ts +11 -0
- package/build/esm/structure/io/binary/internals/DoubleSerializer.js +88 -0
- package/build/esm/structure/io/binary/internals/EdgeSerializer.d.ts +20 -0
- package/build/esm/structure/io/binary/internals/EdgeSerializer.js +198 -0
- package/build/esm/structure/io/binary/internals/EnumSerializer.d.ts +24 -0
- package/build/esm/structure/io/binary/internals/EnumSerializer.js +124 -0
- package/build/esm/structure/io/binary/internals/FloatSerializer.d.ts +11 -0
- package/build/esm/structure/io/binary/internals/FloatSerializer.js +88 -0
- package/build/esm/structure/io/binary/internals/GraphBinaryReader.d.ts +19 -0
- package/build/esm/structure/io/binary/internals/GraphBinaryReader.js +94 -0
- package/build/esm/structure/io/binary/internals/GraphBinaryWriter.d.ts +9 -0
- package/build/esm/structure/io/binary/internals/GraphBinaryWriter.js +82 -0
- package/build/esm/structure/io/binary/internals/IntSerializer.d.ts +13 -0
- package/build/esm/structure/io/binary/internals/IntSerializer.js +100 -0
- package/build/esm/structure/io/binary/internals/LongSerializer.d.ts +11 -0
- package/build/esm/structure/io/binary/internals/LongSerializer.js +92 -0
- package/build/esm/structure/io/binary/internals/MapSerializer.d.ts +13 -0
- package/build/esm/structure/io/binary/internals/MapSerializer.js +141 -0
- package/build/esm/structure/io/binary/internals/MarkerSerializer.d.ts +8 -0
- package/build/esm/structure/io/binary/internals/MarkerSerializer.js +60 -0
- package/build/esm/structure/io/binary/internals/NumberSerializationStrategy.d.ts +9 -0
- package/build/esm/structure/io/binary/internals/NumberSerializationStrategy.js +63 -0
- package/build/esm/structure/io/binary/internals/PathSerializer.d.ts +15 -0
- package/build/esm/structure/io/binary/internals/PathSerializer.js +110 -0
- package/build/esm/structure/io/binary/internals/PropertySerializer.d.ts +15 -0
- package/build/esm/structure/io/binary/internals/PropertySerializer.js +127 -0
- package/build/esm/structure/io/binary/internals/SetSerializer.d.ts +15 -0
- package/build/esm/structure/io/binary/internals/SetSerializer.js +135 -0
- package/build/esm/structure/io/binary/internals/ShortSerializer.d.ts +11 -0
- package/build/esm/structure/io/binary/internals/ShortSerializer.js +88 -0
- package/build/esm/structure/io/binary/internals/StringSerializer.d.ts +11 -0
- package/build/esm/structure/io/binary/internals/StringSerializer.js +104 -0
- package/build/esm/structure/io/binary/internals/StubSerializer.d.ts +7 -0
- package/{.prettierrc.js → build/esm/structure/io/binary/internals/StubSerializer.js} +12 -12
- package/build/esm/structure/io/binary/internals/UnspecifiedNullSerializer.d.ts +11 -0
- package/build/esm/structure/io/binary/internals/UnspecifiedNullSerializer.js +67 -0
- package/build/esm/structure/io/binary/internals/UuidSerializer.d.ts +14 -0
- package/build/esm/structure/io/binary/internals/UuidSerializer.js +106 -0
- package/build/esm/structure/io/binary/internals/VertexPropertySerializer.d.ts +15 -0
- package/build/esm/structure/io/binary/internals/VertexPropertySerializer.js +160 -0
- package/build/esm/structure/io/binary/internals/VertexSerializer.d.ts +17 -0
- package/build/esm/structure/io/binary/internals/VertexSerializer.js +125 -0
- package/build/esm/structure/io/binary/internals/utils.d.ts +6 -0
- package/{lib → build/esm}/structure/io/binary/internals/utils.js +23 -35
- package/build/esm/utils.d.ts +20 -0
- package/build/esm/utils.js +98 -0
- package/package.json +61 -23
- package/.eslintrc.js +0 -154
- package/.nvmrc +0 -1
- package/Gruntfile.js +0 -35
- package/NOTICE +0 -5
- package/doc/AnonymousTraversalSource.html +0 -793
- package/doc/Authenticator.html +0 -303
- package/doc/Bytecode.html +0 -941
- package/doc/CardinalityValue.html +0 -711
- package/doc/Client.html +0 -1869
- package/doc/Connection.html +0 -1192
- package/doc/DataType.js.html +0 -150
- package/doc/DriverRemoteConnection.html +0 -1528
- package/doc/EdgeLabelVerificationStrategy.html +0 -238
- package/doc/Graph.html +0 -343
- package/doc/GraphBinaryReader.js.html +0 -132
- package/doc/GraphBinaryWriter.js.html +0 -135
- package/doc/GraphSON2Reader.html +0 -407
- package/doc/GraphSON2Writer.html +0 -558
- package/doc/GraphSON3Reader.html +0 -170
- package/doc/GraphSON3Writer.html +0 -170
- package/doc/GraphTraversal.html +0 -22974
- package/doc/GraphTraversalSource.html +0 -3683
- package/doc/HaltedTraverserStrategy.html +0 -215
- package/doc/MatchAlgorithmStrategy.html +0 -210
- package/doc/P.html +0 -2020
- package/doc/PartitionStrategy.html +0 -387
- package/doc/Path.html +0 -242
- package/doc/PlainTextSaslAuthenticator.html +0 -456
- package/doc/ProductiveByStrategy.html +0 -258
- package/doc/RemoteConnection.html +0 -1086
- package/doc/RemoteStrategy.html +0 -307
- package/doc/RemoteTraversal.html +0 -170
- package/doc/ReservedKeysVerificationStrategy.html +0 -261
- package/doc/ResponseError.html +0 -360
- package/doc/ResultSet.html +0 -633
- package/doc/SaslAuthenticator.html +0 -455
- package/doc/SaslMechanismBase.html +0 -506
- package/doc/SaslMechanismPlain.html +0 -925
- package/doc/SeedStrategy.html +0 -288
- package/doc/SubgraphStrategy.html +0 -387
- package/doc/TextP.html +0 -1440
- package/doc/Transaction.html +0 -655
- package/doc/Translator.html +0 -527
- package/doc/TraversalStrategies.html +0 -652
- package/doc/TraversalStrategy.html +0 -393
- package/doc/TypeSerializer.html +0 -166
- package/doc/driver_auth_authenticator.js.html +0 -89
- package/doc/driver_auth_mechanisms_sasl-mechanism-base.js.html +0 -103
- package/doc/driver_auth_mechanisms_sasl-mechanism-plain.js.html +0 -157
- package/doc/driver_auth_plain-text-sasl-authenticator.js.html +0 -106
- package/doc/driver_auth_sasl-authenticator.js.html +0 -100
- package/doc/driver_client.js.html +0 -250
- package/doc/driver_connection.js.html +0 -518
- package/doc/driver_driver-remote-connection.js.html +0 -193
- package/doc/driver_remote-connection.js.html +0 -198
- package/doc/driver_response-error.js.html +0 -98
- package/doc/driver_result-set.js.html +0 -134
- package/doc/fonts/OpenSans-Bold-webfont.eot +0 -0
- package/doc/fonts/OpenSans-Bold-webfont.svg +0 -1830
- package/doc/fonts/OpenSans-Bold-webfont.woff +0 -0
- package/doc/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
- package/doc/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
- package/doc/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
- package/doc/fonts/OpenSans-Italic-webfont.eot +0 -0
- package/doc/fonts/OpenSans-Italic-webfont.svg +0 -1830
- package/doc/fonts/OpenSans-Italic-webfont.woff +0 -0
- package/doc/fonts/OpenSans-Light-webfont.eot +0 -0
- package/doc/fonts/OpenSans-Light-webfont.svg +0 -1831
- package/doc/fonts/OpenSans-Light-webfont.woff +0 -0
- package/doc/fonts/OpenSans-LightItalic-webfont.eot +0 -0
- package/doc/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
- package/doc/fonts/OpenSans-LightItalic-webfont.woff +0 -0
- package/doc/fonts/OpenSans-Regular-webfont.eot +0 -0
- package/doc/fonts/OpenSans-Regular-webfont.svg +0 -1831
- package/doc/fonts/OpenSans-Regular-webfont.woff +0 -0
- package/doc/global.html +0 -728
- package/doc/index.html +0 -185
- package/doc/module.exports.html +0 -301
- package/doc/process_anonymous-traversal.js.html +0 -138
- package/doc/process_bytecode.js.html +0 -175
- package/doc/process_graph-traversal.js.html +0 -1936
- package/doc/process_transaction.js.html +0 -151
- package/doc/process_translator.js.html +0 -172
- package/doc/process_traversal-strategy.js.html +0 -466
- package/doc/process_traversal.js.html +0 -592
- package/doc/scripts/linenumber.js +0 -25
- package/doc/scripts/prettify/Apache-License-2.0.txt +0 -202
- package/doc/scripts/prettify/lang-css.js +0 -2
- package/doc/scripts/prettify/prettify.js +0 -28
- package/doc/structure_graph.js.html +0 -233
- package/doc/structure_io_binary_internals_DataType.js.html +0 -151
- package/doc/structure_io_binary_internals_GraphBinaryReader.js.html +0 -133
- package/doc/structure_io_binary_internals_GraphBinaryWriter.js.html +0 -136
- package/doc/structure_io_graph-serializer.js.html +0 -354
- package/doc/structure_io_type-serializers.js.html +0 -617
- package/doc/styles/jsdoc-default.css +0 -358
- package/doc/styles/prettify-jsdoc.css +0 -111
- package/doc/styles/prettify-tomorrow.css +0 -132
- package/doc/utils.js.html +0 -181
- package/docker-compose.yml +0 -66
- package/lib/driver/auth/mechanisms/sasl-mechanism-plain.js +0 -106
- package/lib/driver/auth/plain-text-sasl-authenticator.js +0 -55
- package/lib/driver/auth/sasl-authenticator.js +0 -49
- package/lib/driver/client.js +0 -199
- package/lib/driver/connection.js +0 -467
- package/lib/driver/driver-remote-connection.js +0 -142
- package/lib/driver/remote-connection.js +0 -147
- package/lib/driver/result-set.js +0 -83
- package/lib/process/anonymous-traversal.js +0 -87
- package/lib/process/bytecode.js +0 -124
- package/lib/process/graph-traversal.js +0 -1885
- package/lib/process/transaction.js +0 -100
- package/lib/process/translator.js +0 -121
- package/lib/process/traversal-strategy.js +0 -415
- package/lib/process/traversal.js +0 -541
- package/lib/structure/graph.js +0 -182
- package/lib/structure/io/binary/GraphBinary.js +0 -110
- package/lib/structure/io/binary/internals/AnySerializer.js +0 -100
- package/lib/structure/io/binary/internals/ArraySerializer.js +0 -137
- package/lib/structure/io/binary/internals/BigIntegerSerializer.js +0 -153
- package/lib/structure/io/binary/internals/BooleanSerializer.js +0 -105
- package/lib/structure/io/binary/internals/BulkSetSerializer.js +0 -126
- package/lib/structure/io/binary/internals/ByteBufferSerializer.js +0 -126
- package/lib/structure/io/binary/internals/ByteSerializer.js +0 -97
- package/lib/structure/io/binary/internals/BytecodeSerializer.js +0 -250
- package/lib/structure/io/binary/internals/ClassSerializer.js +0 -60
- package/lib/structure/io/binary/internals/DataType.js +0 -100
- package/lib/structure/io/binary/internals/DateSerializer.js +0 -105
- package/lib/structure/io/binary/internals/DoubleSerializer.js +0 -101
- package/lib/structure/io/binary/internals/EdgeSerializer.js +0 -216
- package/lib/structure/io/binary/internals/EnumSerializer.js +0 -152
- package/lib/structure/io/binary/internals/FloatSerializer.js +0 -101
- package/lib/structure/io/binary/internals/GraphBinaryReader.js +0 -82
- package/lib/structure/io/binary/internals/GraphBinaryWriter.js +0 -85
- package/lib/structure/io/binary/internals/IntSerializer.js +0 -114
- package/lib/structure/io/binary/internals/LambdaSerializer.js +0 -71
- package/lib/structure/io/binary/internals/LongSerializer.js +0 -109
- package/lib/structure/io/binary/internals/LongSerializerNg.js +0 -104
- package/lib/structure/io/binary/internals/MapSerializer.js +0 -155
- package/lib/structure/io/binary/internals/NumberSerializationStrategy.js +0 -73
- package/lib/structure/io/binary/internals/OffsetDateTimeSerializer.js +0 -151
- package/lib/structure/io/binary/internals/PSerializer.js +0 -152
- package/lib/structure/io/binary/internals/PathSerializer.js +0 -124
- package/lib/structure/io/binary/internals/PropertySerializer.js +0 -142
- package/lib/structure/io/binary/internals/SetSerializer.js +0 -134
- package/lib/structure/io/binary/internals/ShortSerializer.js +0 -101
- package/lib/structure/io/binary/internals/StringSerializer.js +0 -116
- package/lib/structure/io/binary/internals/TextPSerializer.js +0 -146
- package/lib/structure/io/binary/internals/TraversalStrategySerializer.js +0 -69
- package/lib/structure/io/binary/internals/TraverserSerializer.js +0 -124
- package/lib/structure/io/binary/internals/UnspecifiedNullSerializer.js +0 -77
- package/lib/structure/io/binary/internals/UuidSerializer.js +0 -121
- package/lib/structure/io/binary/internals/VertexPropertySerializer.js +0 -176
- package/lib/structure/io/binary/internals/VertexSerializer.js +0 -139
- package/lib/structure/io/graph-serializer.js +0 -303
- package/lib/structure/io/type-serializers.js +0 -566
- package/lib/utils.js +0 -130
- package/licenses/chai +0 -21
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
-
* or more contributor license agreements. See the NOTICE file
|
|
4
|
-
* distributed with this work for additional information
|
|
5
|
-
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
-
* to you under the Apache License, Version 2.0 (the
|
|
7
|
-
* "License"); you may not use this file except in compliance
|
|
8
|
-
* with the License. You may obtain a copy of the License at
|
|
9
|
-
*
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing,
|
|
13
|
-
* software distributed under the License is distributed on an
|
|
14
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
-
* KIND, either express or implied. See the License for the
|
|
16
|
-
* specific language governing permissions and limitations
|
|
17
|
-
* under the License.
|
|
18
|
-
*/
|
|
19
|
-
'use strict';
|
|
20
|
-
|
|
21
|
-
const remote = require('../driver/remote-connection');
|
|
22
|
-
const Bytecode = require('./bytecode');
|
|
23
|
-
const { TraversalStrategies } = require('./traversal-strategy');
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* A controller for a remote transaction that is constructed from <code>g.tx()</code>. Calling <code>begin()</code>
|
|
27
|
-
* on this object will produce a new <code>GraphTraversalSource</code> that is bound to a remote transaction over which
|
|
28
|
-
* multiple traversals may be executed in that context. Calling <code>commit()</code> or <code>rollback()</code> will
|
|
29
|
-
* then close the transaction and thus, the session. This feature only works with transaction enabled graphs.
|
|
30
|
-
*/
|
|
31
|
-
class Transaction {
|
|
32
|
-
constructor(g) {
|
|
33
|
-
this._g = g;
|
|
34
|
-
this._sessionBasedConnection = undefined;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Spawns a <code>GraphTraversalSource</code> that is bound to a remote session which enables a transaction.
|
|
39
|
-
* @returns {*}
|
|
40
|
-
*/
|
|
41
|
-
begin() {
|
|
42
|
-
if (this._sessionBasedConnection) {
|
|
43
|
-
throw new Error('Transaction already started on this object');
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
this._sessionBasedConnection = this._g.remoteConnection.createSession();
|
|
47
|
-
const traversalStrategy = new TraversalStrategies();
|
|
48
|
-
traversalStrategy.addStrategy(new remote.RemoteStrategy(this._sessionBasedConnection));
|
|
49
|
-
return new this._g.graphTraversalSourceClass(
|
|
50
|
-
this._g.graph,
|
|
51
|
-
traversalStrategy,
|
|
52
|
-
new Bytecode(this._g.bytecode),
|
|
53
|
-
this._g.graphTraversalSourceClass,
|
|
54
|
-
this._g.graphTraversalClass,
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* @returns {Promise}
|
|
60
|
-
*/
|
|
61
|
-
commit() {
|
|
62
|
-
if (!this._sessionBasedConnection) {
|
|
63
|
-
throw new Error('Cannot commit a transaction that is not started');
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
return this._sessionBasedConnection.commit().finally(() => this.close());
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* @returns {Promise}
|
|
71
|
-
*/
|
|
72
|
-
rollback() {
|
|
73
|
-
if (!this._sessionBasedConnection) {
|
|
74
|
-
throw new Error('Cannot rollback a transaction that is not started');
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
return this._sessionBasedConnection.rollback().finally(() => this.close());
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Returns true if transaction is open.
|
|
82
|
-
* @returns {Boolean}
|
|
83
|
-
*/
|
|
84
|
-
get isOpen() {
|
|
85
|
-
return this._sessionBasedConnection.isOpen;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* @returns {Promise}
|
|
90
|
-
*/
|
|
91
|
-
close() {
|
|
92
|
-
if (this._sessionBasedConnection) {
|
|
93
|
-
this._sessionBasedConnection.close();
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
module.exports = {
|
|
99
|
-
Transaction,
|
|
100
|
-
};
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
-
* or more contributor license agreements. See the NOTICE file
|
|
4
|
-
* distributed with this work for additional information
|
|
5
|
-
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
-
* to you under the Apache License, Version 2.0 (the
|
|
7
|
-
* "License"); you may not use this file except in compliance
|
|
8
|
-
* with the License. You may obtain a copy of the License at
|
|
9
|
-
*
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing,
|
|
13
|
-
* software distributed under the License is distributed on an
|
|
14
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
-
* KIND, either express or implied. See the License for the
|
|
16
|
-
* specific language governing permissions and limitations
|
|
17
|
-
* under the License.
|
|
18
|
-
*/
|
|
19
|
-
'use strict';
|
|
20
|
-
|
|
21
|
-
const Traversal = require('./traversal').Traversal;
|
|
22
|
-
const Bytecode = require('./bytecode');
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Class to translate glv bytecode steps into executable Gremlin-Groovy script
|
|
26
|
-
*/
|
|
27
|
-
class Translator {
|
|
28
|
-
constructor(traversalSource) {
|
|
29
|
-
this._traversalSource = traversalSource;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
getTraversalSource() {
|
|
33
|
-
return this._traversalSource;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
getTargetLanguage() {
|
|
37
|
-
return 'gremlin-groovy';
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
of(traversalSource) {
|
|
41
|
-
this._traversalSource = traversalSource;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Returns a script representation of the given bytecode instructions.
|
|
46
|
-
* @param {Object} bytecodeOrTraversal The traversal or bytecode of a traversal containing step instructions.
|
|
47
|
-
* @param {boolean} child Determines if a traversal object should be treated as an anonymous child or if it is a spawn from "g"
|
|
48
|
-
* @returns {string} Gremlin-Groovy script
|
|
49
|
-
*/
|
|
50
|
-
translate(bytecodeOrTraversal, child = false) {
|
|
51
|
-
let script = child ? '__' : this._traversalSource;
|
|
52
|
-
const bc = bytecodeOrTraversal instanceof Bytecode ? bytecodeOrTraversal : bytecodeOrTraversal.getBytecode();
|
|
53
|
-
|
|
54
|
-
const instructions = bc.stepInstructions;
|
|
55
|
-
|
|
56
|
-
// build the script from the glv instructions.
|
|
57
|
-
for (let i = 0; i < instructions.length; i++) {
|
|
58
|
-
const params = instructions[i].slice(1);
|
|
59
|
-
script += '.' + instructions[i][0] + '(';
|
|
60
|
-
|
|
61
|
-
if (params.length) {
|
|
62
|
-
for (let k = 0; k < params.length; k++) {
|
|
63
|
-
if (k > 0) {
|
|
64
|
-
script += ', ';
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
script += this.convert(params[k]);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
script += ')';
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return script;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Converts an object to a Gremlin script representation.
|
|
79
|
-
* @param {Object} anyObject The object to convert to a script representation
|
|
80
|
-
* @returns {string} The Gremlin script representation
|
|
81
|
-
*/
|
|
82
|
-
convert(anyObject) {
|
|
83
|
-
let script = '';
|
|
84
|
-
if (Object(anyObject) === anyObject) {
|
|
85
|
-
if (anyObject instanceof Traversal) {
|
|
86
|
-
script += this.translate(anyObject.getBytecode(), true);
|
|
87
|
-
} else if (anyObject.toString() === '[object Object]') {
|
|
88
|
-
Object.keys(anyObject).forEach(function (key, index) {
|
|
89
|
-
if (index > 0) {
|
|
90
|
-
script += ', ';
|
|
91
|
-
}
|
|
92
|
-
script += `('${key}', `;
|
|
93
|
-
if (anyObject[key] instanceof String || typeof anyObject[key] === 'string') {
|
|
94
|
-
script += `'${`${anyObject[key]}`.replaceAll("'", "\\'")}'`; // eslint-disable-line quotes
|
|
95
|
-
} else {
|
|
96
|
-
script += anyObject[key];
|
|
97
|
-
}
|
|
98
|
-
script += ')';
|
|
99
|
-
});
|
|
100
|
-
} else if (Array.isArray(anyObject)) {
|
|
101
|
-
const parts = [];
|
|
102
|
-
for (const item of anyObject) {
|
|
103
|
-
parts.push(this.convert(item));
|
|
104
|
-
}
|
|
105
|
-
script += '[' + parts.join(', ') + ']';
|
|
106
|
-
} else {
|
|
107
|
-
script += anyObject.toString();
|
|
108
|
-
}
|
|
109
|
-
} else if (anyObject === undefined || anyObject === null) {
|
|
110
|
-
script += 'null';
|
|
111
|
-
} else if (typeof anyObject === 'number' || typeof anyObject === 'boolean') {
|
|
112
|
-
script += anyObject;
|
|
113
|
-
} else {
|
|
114
|
-
script += `'${`${anyObject}`.replaceAll("'", "\\'")}'`; // eslint-disable-line quotes
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
return script;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
module.exports = Translator;
|
|
@@ -1,415 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
-
* or more contributor license agreements. See the NOTICE file
|
|
4
|
-
* distributed with this work for additional information
|
|
5
|
-
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
-
* to you under the Apache License, Version 2.0 (the
|
|
7
|
-
* "License"); you may not use this file except in compliance
|
|
8
|
-
* with the License. You may obtain a copy of the License at
|
|
9
|
-
*
|
|
10
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing,
|
|
13
|
-
* software distributed under the License is distributed on an
|
|
14
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
-
* KIND, either express or implied. See the License for the
|
|
16
|
-
* specific language governing permissions and limitations
|
|
17
|
-
* under the License.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @author Jorge Bay Gondra
|
|
22
|
-
*/
|
|
23
|
-
'use strict';
|
|
24
|
-
|
|
25
|
-
const Traversal = require('./traversal').Traversal;
|
|
26
|
-
|
|
27
|
-
class TraversalStrategies {
|
|
28
|
-
/**
|
|
29
|
-
* Creates a new instance of TraversalStrategies.
|
|
30
|
-
* @param {TraversalStrategies} [parent] The parent strategies from where to clone the values from.
|
|
31
|
-
* @constructor
|
|
32
|
-
*/
|
|
33
|
-
constructor(parent) {
|
|
34
|
-
if (parent) {
|
|
35
|
-
// Clone the strategies
|
|
36
|
-
this.strategies = [...parent.strategies];
|
|
37
|
-
} else {
|
|
38
|
-
this.strategies = [];
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/** @param {TraversalStrategy} strategy */
|
|
43
|
-
addStrategy(strategy) {
|
|
44
|
-
this.strategies.push(strategy);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/** @param {TraversalStrategy} strategy */
|
|
48
|
-
removeStrategy(strategy) {
|
|
49
|
-
const idx = this.strategies.findIndex((s) => s.fqcn === strategy.fqcn);
|
|
50
|
-
if (idx !== -1) {
|
|
51
|
-
return this.strategies.splice(idx, 1)[0];
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
return undefined;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* @param {Traversal} traversal
|
|
59
|
-
* @returns {Promise}
|
|
60
|
-
*/
|
|
61
|
-
applyStrategies(traversal) {
|
|
62
|
-
// Apply all strategies serially
|
|
63
|
-
return this.strategies.reduce(
|
|
64
|
-
(promise, strategy) => promise.then(() => strategy.apply(traversal)),
|
|
65
|
-
Promise.resolve(),
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/** @abstract */
|
|
71
|
-
class TraversalStrategy {
|
|
72
|
-
/**
|
|
73
|
-
* @param {String} fqcn fully qualified class name in Java of the strategy
|
|
74
|
-
* @param {Object} configuration for the strategy
|
|
75
|
-
*/
|
|
76
|
-
constructor(fqcn, configuration = {}) {
|
|
77
|
-
this.fqcn = fqcn;
|
|
78
|
-
this.configuration = configuration;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* @abstract
|
|
83
|
-
* @param {Traversal} traversal
|
|
84
|
-
* @returns {Promise}
|
|
85
|
-
*/
|
|
86
|
-
apply(traversal) {}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
class ConnectiveStrategy extends TraversalStrategy {
|
|
90
|
-
constructor() {
|
|
91
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ConnectiveStrategy');
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
class ElementIdStrategy extends TraversalStrategy {
|
|
96
|
-
constructor() {
|
|
97
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ElementIdStrategy');
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
class HaltedTraverserStrategy extends TraversalStrategy {
|
|
102
|
-
/**
|
|
103
|
-
* @param {String} haltedTraverserFactory full qualified class name in Java of a {@code HaltedTraverserFactory} implementation
|
|
104
|
-
*/
|
|
105
|
-
constructor({ haltedTraverserFactory } = {}) {
|
|
106
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.HaltedTraverserStrategy');
|
|
107
|
-
if (haltedTraverserFactory !== undefined) {
|
|
108
|
-
this.configuration['haltedTraverserFactory'] = haltedTraverserFactory;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
class MessagePassingReductionStrategy extends TraversalStrategy {
|
|
114
|
-
constructor() {
|
|
115
|
-
super(
|
|
116
|
-
'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.optimization.MessagePassingReductionStrategy',
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
class OptionsStrategy extends TraversalStrategy {
|
|
122
|
-
constructor(options) {
|
|
123
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.OptionsStrategy');
|
|
124
|
-
if (options !== undefined) {
|
|
125
|
-
this.configuration = options;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
class PartitionStrategy extends TraversalStrategy {
|
|
131
|
-
/**
|
|
132
|
-
* @param {Object} [options]
|
|
133
|
-
* @param {String} [options.partitionKey] name of the property key to partition by
|
|
134
|
-
* @param {String} [options.writePartition] the value of the currently write partition
|
|
135
|
-
* @param {Array<String>} [options.readPartitions] list of strings representing the partitions to include for reads
|
|
136
|
-
* @param {boolean} [options.includeMetaProperties] determines if meta-properties should be included in partitioning defaulting to false
|
|
137
|
-
*/
|
|
138
|
-
constructor(options) {
|
|
139
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategy', options);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
class ProfileStrategy extends TraversalStrategy {
|
|
144
|
-
constructor() {
|
|
145
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.finalization.ProfileStrategy');
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
class SeedStrategy extends TraversalStrategy {
|
|
150
|
-
/**
|
|
151
|
-
* @param {Object} [options]
|
|
152
|
-
* @param {number} [options.seed] the seed to provide to the random number generator for the traversal
|
|
153
|
-
*/
|
|
154
|
-
constructor(options) {
|
|
155
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SeedStrategy', {
|
|
156
|
-
seed: options?.seed,
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
class SubgraphStrategy extends TraversalStrategy {
|
|
162
|
-
/**
|
|
163
|
-
* @param {Object} [options]
|
|
164
|
-
* @param {GraphTraversal} [options.vertices] name of the property key to partition by
|
|
165
|
-
* @param {GraphTraversal} [options.edges] the value of the currently write partition
|
|
166
|
-
* @param {GraphTraversal} [options.vertexProperties] list of strings representing the partitions to include for reads
|
|
167
|
-
* @param {boolean} [options.checkAdjacentVertices] enables the strategy to apply the {@code vertices} filter to the adjacent vertices of an edge.
|
|
168
|
-
*/
|
|
169
|
-
constructor(options) {
|
|
170
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategy', options);
|
|
171
|
-
if (this.configuration.vertices instanceof Traversal) {
|
|
172
|
-
this.configuration.vertices = this.configuration.vertices.bytecode;
|
|
173
|
-
}
|
|
174
|
-
if (this.configuration.edges instanceof Traversal) {
|
|
175
|
-
this.configuration.edges = this.configuration.edges.bytecode;
|
|
176
|
-
}
|
|
177
|
-
if (this.configuration.vertexProperties instanceof Traversal) {
|
|
178
|
-
this.configuration.vertexProperties = this.configuration.vertexProperties.bytecode;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
class ReferenceElementStrategy extends TraversalStrategy {
|
|
184
|
-
constructor() {
|
|
185
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.finalization.ReferenceElementStrategy');
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
class VertexProgramStrategy extends TraversalStrategy {
|
|
190
|
-
constructor(options) {
|
|
191
|
-
super('org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.decoration.VertexProgramStrategy', options);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
class MatchAlgorithmStrategy extends TraversalStrategy {
|
|
196
|
-
/**
|
|
197
|
-
* @param matchAlgorithm
|
|
198
|
-
*/
|
|
199
|
-
constructor({ matchAlgorithm } = {}) {
|
|
200
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.finalization.MatchAlgorithmStrategy');
|
|
201
|
-
if (matchAlgorithm !== undefined) {
|
|
202
|
-
this.configuration['matchAlgorithm'] = matchAlgorithm;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
class ComputerFinalizationStrategy extends TraversalStrategy {
|
|
208
|
-
constructor() {
|
|
209
|
-
super('org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.finalization.ComputerFinalizationStrategy');
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
class AdjacentToIncidentStrategy extends TraversalStrategy {
|
|
214
|
-
constructor() {
|
|
215
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.AdjacentToIncidentStrategy');
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
class ByModulatorOptimizationStrategy extends TraversalStrategy {
|
|
220
|
-
constructor() {
|
|
221
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.ByModulatorOptimizationStrategy');
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
class FilterRankingStrategy extends TraversalStrategy {
|
|
226
|
-
constructor() {
|
|
227
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.FilterRankingStrategy');
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
class IdentityRemovalStrategy extends TraversalStrategy {
|
|
232
|
-
constructor() {
|
|
233
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IdentityRemovalStrategy');
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
class IncidentToAdjacentStrategy extends TraversalStrategy {
|
|
238
|
-
constructor() {
|
|
239
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IncidentToAdjacentStrategy');
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
class InlineFilterStrategy extends TraversalStrategy {
|
|
244
|
-
constructor() {
|
|
245
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.InlineFilterStrategy');
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
class LazyBarrierStrategy extends TraversalStrategy {
|
|
250
|
-
constructor() {
|
|
251
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.LazyBarrierStrategy');
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
class MatchPredicateStrategy extends TraversalStrategy {
|
|
256
|
-
constructor() {
|
|
257
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.MatchPredicateStrategy');
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
class OrderLimitStrategy extends TraversalStrategy {
|
|
262
|
-
constructor() {
|
|
263
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.OrderLimitStrategy');
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
class PathProcessorStrategy extends TraversalStrategy {
|
|
268
|
-
constructor() {
|
|
269
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.PathProcessorStrategy');
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
class PathRetractionStrategy extends TraversalStrategy {
|
|
274
|
-
constructor() {
|
|
275
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.PathRetractionStrategy');
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
class ProductiveByStrategy extends TraversalStrategy {
|
|
280
|
-
/**
|
|
281
|
-
* @param {Object} [options]
|
|
282
|
-
* @param {Array<String>} productiveKeys set of keys that will always be productive
|
|
283
|
-
*/
|
|
284
|
-
constructor({ productiveKeys = [] } = {}) {
|
|
285
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.ProductiveByStrategy');
|
|
286
|
-
this.configuration['productiveKeys'] = productiveKeys;
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
class CountStrategy extends TraversalStrategy {
|
|
291
|
-
constructor() {
|
|
292
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.CountStrategy');
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
class RepeatUnrollStrategy extends TraversalStrategy {
|
|
297
|
-
constructor() {
|
|
298
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.RepeatUnrollStrategy');
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
class GraphFilterStrategy extends TraversalStrategy {
|
|
303
|
-
constructor() {
|
|
304
|
-
super('org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.optimization.GraphFilterStrategy');
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
class EarlyLimitStrategy extends TraversalStrategy {
|
|
309
|
-
constructor() {
|
|
310
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.EarlyLimitStrategy');
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
class ComputerVerificationStrategy extends TraversalStrategy {
|
|
315
|
-
constructor() {
|
|
316
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ComputerVerificationStrategy');
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
class LambdaRestrictionStrategy extends TraversalStrategy {
|
|
321
|
-
constructor() {
|
|
322
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.LambdaRestrictionStrategy');
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
class ReadOnlyStrategy extends TraversalStrategy {
|
|
327
|
-
constructor() {
|
|
328
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy');
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
class EdgeLabelVerificationStrategy extends TraversalStrategy {
|
|
333
|
-
/**
|
|
334
|
-
* @param {boolean} logWarnings determines if warnings should be written to the logger when verification fails
|
|
335
|
-
* @param {boolean} throwException determines if exceptions should be thrown when verifications fails
|
|
336
|
-
*/
|
|
337
|
-
constructor({ logWarnings = false, throwException = false } = {}) {
|
|
338
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.EdgeLabelVerificationStrategy');
|
|
339
|
-
this.configuration['logWarnings'] = logWarnings;
|
|
340
|
-
this.configuration['throwException'] = throwException;
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
class ReservedKeysVerificationStrategy extends TraversalStrategy {
|
|
345
|
-
/**
|
|
346
|
-
* @param {boolean} logWarnings determines if warnings should be written to the logger when verification fails
|
|
347
|
-
* @param {boolean} throwException determines if exceptions should be thrown when verifications fails
|
|
348
|
-
* @param {Array<String>} keys the list of reserved keys to verify
|
|
349
|
-
*/
|
|
350
|
-
constructor({ logWarnings = false, throwException = false, keys = ['id', 'label'] } = {}) {
|
|
351
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReservedKeysVerificationStrategy');
|
|
352
|
-
this.configuration['logWarnings'] = logWarnings;
|
|
353
|
-
this.configuration['throwException'] = throwException;
|
|
354
|
-
this.configuration['keys'] = keys;
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
class VertexProgramRestrictionStrategy extends TraversalStrategy {
|
|
359
|
-
constructor() {
|
|
360
|
-
super(
|
|
361
|
-
'org.apache.tinkerpop.gremlin.process.computer.traversal.strategy.verification.VertexProgramRestrictionStrategy',
|
|
362
|
-
);
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
class StandardVerificationStrategy extends TraversalStrategy {
|
|
367
|
-
constructor() {
|
|
368
|
-
super('org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.StandardVerificationStrategy');
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
module.exports = {
|
|
373
|
-
TraversalStrategies: TraversalStrategies,
|
|
374
|
-
TraversalStrategy: TraversalStrategy,
|
|
375
|
-
// decoration
|
|
376
|
-
ComputerFinalizationStrategy: ComputerFinalizationStrategy,
|
|
377
|
-
ConnectiveStrategy: ConnectiveStrategy,
|
|
378
|
-
ElementIdStrategy: ElementIdStrategy,
|
|
379
|
-
HaltedTraverserStrategy: HaltedTraverserStrategy,
|
|
380
|
-
MessagePassingReductionStrategy: MessagePassingReductionStrategy,
|
|
381
|
-
OptionsStrategy: OptionsStrategy,
|
|
382
|
-
PartitionStrategy: PartitionStrategy,
|
|
383
|
-
ProfileStrategy: ProfileStrategy,
|
|
384
|
-
ReferenceElementStrategy: ReferenceElementStrategy,
|
|
385
|
-
SeedStrategy: SeedStrategy,
|
|
386
|
-
SubgraphStrategy: SubgraphStrategy,
|
|
387
|
-
VertexProgramStrategy: VertexProgramStrategy,
|
|
388
|
-
// finalization
|
|
389
|
-
MatchAlgorithmStrategy: MatchAlgorithmStrategy,
|
|
390
|
-
// optimization
|
|
391
|
-
AdjacentToIncidentStrategy: AdjacentToIncidentStrategy,
|
|
392
|
-
ByModulatorOptimizationStrategy: ByModulatorOptimizationStrategy,
|
|
393
|
-
FilterRankingStrategy: FilterRankingStrategy,
|
|
394
|
-
IdentityRemovalStrategy: IdentityRemovalStrategy,
|
|
395
|
-
IncidentToAdjacentStrategy: IncidentToAdjacentStrategy,
|
|
396
|
-
InlineFilterStrategy: InlineFilterStrategy,
|
|
397
|
-
LazyBarrierStrategy: LazyBarrierStrategy,
|
|
398
|
-
MatchPredicateStrategy: MatchPredicateStrategy,
|
|
399
|
-
OrderLimitStrategy: OrderLimitStrategy,
|
|
400
|
-
PathProcessorStrategy: PathProcessorStrategy,
|
|
401
|
-
PathRetractionStrategy: PathRetractionStrategy,
|
|
402
|
-
ProductiveByStrategy: ProductiveByStrategy,
|
|
403
|
-
CountStrategy: CountStrategy,
|
|
404
|
-
RepeatUnrollStrategy: RepeatUnrollStrategy,
|
|
405
|
-
GraphFilterStrategy: GraphFilterStrategy,
|
|
406
|
-
EarlyLimitStrategy: EarlyLimitStrategy,
|
|
407
|
-
// verification
|
|
408
|
-
ComputerVerificationStrategy: ComputerVerificationStrategy,
|
|
409
|
-
EdgeLabelVerificationStrategy: EdgeLabelVerificationStrategy,
|
|
410
|
-
LambdaRestrictionStrategy: LambdaRestrictionStrategy,
|
|
411
|
-
ReadOnlyStrategy: ReadOnlyStrategy,
|
|
412
|
-
ReservedKeysVerificationStrategy: ReservedKeysVerificationStrategy,
|
|
413
|
-
StandardVerificationStrategy: StandardVerificationStrategy,
|
|
414
|
-
VertexProgramRestrictionStrategy: VertexProgramRestrictionStrategy,
|
|
415
|
-
};
|