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
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Jorge Bay Gondra
|
|
3
|
+
*/
|
|
4
|
+
import type { RemoteConnection } from '../driver/remote-connection.cjs';
|
|
5
|
+
import { Traversal } from './traversal.cjs';
|
|
6
|
+
export declare class TraversalStrategies {
|
|
7
|
+
readonly strategies: TraversalStrategy[];
|
|
8
|
+
/**
|
|
9
|
+
* Creates a new instance of TraversalStrategies.
|
|
10
|
+
* @param {TraversalStrategies} [parent] The parent strategies from where to clone the values from.
|
|
11
|
+
*/
|
|
12
|
+
constructor(parent?: TraversalStrategies);
|
|
13
|
+
/** @param {TraversalStrategy} strategy */
|
|
14
|
+
addStrategy(strategy: TraversalStrategy): void;
|
|
15
|
+
/** @param {TraversalStrategy} strategy */
|
|
16
|
+
removeStrategy(strategy: TraversalStrategy): TraversalStrategy | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* @param {Traversal} traversal
|
|
19
|
+
* @returns {Promise}
|
|
20
|
+
*/
|
|
21
|
+
applyStrategies(traversal: Traversal): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
export type TraversalStrategyConfiguration = any;
|
|
24
|
+
export declare abstract class TraversalStrategy {
|
|
25
|
+
configuration: TraversalStrategyConfiguration;
|
|
26
|
+
connection?: RemoteConnection;
|
|
27
|
+
strategyName: string;
|
|
28
|
+
/**
|
|
29
|
+
* @param {TraversalStrategyConfiguration} configuration for the strategy
|
|
30
|
+
*/
|
|
31
|
+
constructor(configuration?: TraversalStrategyConfiguration);
|
|
32
|
+
/**
|
|
33
|
+
* @abstract
|
|
34
|
+
* @param {Traversal} traversal
|
|
35
|
+
* @returns {Promise}
|
|
36
|
+
*/
|
|
37
|
+
apply(traversal: Traversal): Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
export declare class ConnectiveStrategy extends TraversalStrategy {
|
|
40
|
+
constructor();
|
|
41
|
+
}
|
|
42
|
+
export declare class ElementIdStrategy extends TraversalStrategy {
|
|
43
|
+
constructor();
|
|
44
|
+
}
|
|
45
|
+
export declare class HaltedTraverserStrategy extends TraversalStrategy {
|
|
46
|
+
/**
|
|
47
|
+
* @param {String} haltedTraverserFactory full qualified class name in Java of a `HaltedTraverserFactory` implementation
|
|
48
|
+
*/
|
|
49
|
+
constructor({ haltedTraverserFactory }: {
|
|
50
|
+
haltedTraverserFactory?: string | undefined;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
export declare class MessagePassingReductionStrategy extends TraversalStrategy {
|
|
54
|
+
constructor();
|
|
55
|
+
}
|
|
56
|
+
export declare class OptionsStrategy extends TraversalStrategy {
|
|
57
|
+
constructor(options: TraversalStrategyConfiguration);
|
|
58
|
+
}
|
|
59
|
+
export declare class PartitionStrategy extends TraversalStrategy {
|
|
60
|
+
/**
|
|
61
|
+
* @param options
|
|
62
|
+
* @param options.partitionKey - name of the property key to partition by
|
|
63
|
+
* @param options.writePartition - the value of the currently write partition
|
|
64
|
+
* @param options.readPartitions - list of strings representing the partitions to include for reads
|
|
65
|
+
* @param options.includeMetaProperties - determines if meta-properties should be included in partitioning defaulting to false
|
|
66
|
+
*/
|
|
67
|
+
constructor({ partitionKey, writePartition, readPartitions, includeMetaProperties }?: {
|
|
68
|
+
partitionKey?: string;
|
|
69
|
+
writePartition?: string;
|
|
70
|
+
readPartitions?: string[];
|
|
71
|
+
includeMetaProperties?: boolean;
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
export declare class ProfileStrategy extends TraversalStrategy {
|
|
75
|
+
constructor();
|
|
76
|
+
}
|
|
77
|
+
export declare class SubgraphStrategy extends TraversalStrategy {
|
|
78
|
+
/**
|
|
79
|
+
* @param options
|
|
80
|
+
* @param options.vertices - traversal to filter vertices
|
|
81
|
+
* @param options.edges - traversal to filter edges
|
|
82
|
+
* @param options.vertexProperties - traversal to filter vertex properties
|
|
83
|
+
* @param options.checkAdjacentVertices - enables the strategy to apply the `vertices` filter to the adjacent vertices of an edge.
|
|
84
|
+
*/
|
|
85
|
+
constructor({ vertices, edges, vertexProperties, checkAdjacentVertices }?: {
|
|
86
|
+
vertices?: any;
|
|
87
|
+
edges?: any;
|
|
88
|
+
vertexProperties?: any;
|
|
89
|
+
checkAdjacentVertices?: boolean;
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
export declare class ProductiveByStrategy extends TraversalStrategy {
|
|
93
|
+
/**
|
|
94
|
+
* @param options
|
|
95
|
+
* @param options.productiveKeys - set of keys that will always be productive
|
|
96
|
+
*/
|
|
97
|
+
constructor({ productiveKeys }?: {
|
|
98
|
+
productiveKeys?: never[] | undefined;
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
export declare class ReferenceElementStrategy extends TraversalStrategy {
|
|
102
|
+
constructor();
|
|
103
|
+
}
|
|
104
|
+
export declare class VertexProgramStrategy extends TraversalStrategy {
|
|
105
|
+
constructor(options: TraversalStrategyConfiguration);
|
|
106
|
+
}
|
|
107
|
+
export declare class MatchAlgorithmStrategy extends TraversalStrategy {
|
|
108
|
+
/**
|
|
109
|
+
* @param matchAlgorithm
|
|
110
|
+
*/
|
|
111
|
+
constructor({ matchAlgorithm }: {
|
|
112
|
+
matchAlgorithm?: string | undefined;
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
export declare class ComputerFinalizationStrategy extends TraversalStrategy {
|
|
116
|
+
constructor();
|
|
117
|
+
}
|
|
118
|
+
export declare class AdjacentToIncidentStrategy extends TraversalStrategy {
|
|
119
|
+
constructor();
|
|
120
|
+
}
|
|
121
|
+
export declare class FilterRankingStrategy extends TraversalStrategy {
|
|
122
|
+
constructor();
|
|
123
|
+
}
|
|
124
|
+
export declare class ByModulatorOptimizationStrategy extends TraversalStrategy {
|
|
125
|
+
constructor();
|
|
126
|
+
}
|
|
127
|
+
export declare class IdentityRemovalStrategy extends TraversalStrategy {
|
|
128
|
+
constructor();
|
|
129
|
+
}
|
|
130
|
+
export declare class IncidentToAdjacentStrategy extends TraversalStrategy {
|
|
131
|
+
constructor();
|
|
132
|
+
}
|
|
133
|
+
export declare class InlineFilterStrategy extends TraversalStrategy {
|
|
134
|
+
constructor();
|
|
135
|
+
}
|
|
136
|
+
export declare class LazyBarrierStrategy extends TraversalStrategy {
|
|
137
|
+
constructor();
|
|
138
|
+
}
|
|
139
|
+
export declare class MatchPredicateStrategy extends TraversalStrategy {
|
|
140
|
+
constructor();
|
|
141
|
+
}
|
|
142
|
+
export declare class OrderLimitStrategy extends TraversalStrategy {
|
|
143
|
+
constructor();
|
|
144
|
+
}
|
|
145
|
+
export declare class PathProcessorStrategy extends TraversalStrategy {
|
|
146
|
+
constructor();
|
|
147
|
+
}
|
|
148
|
+
export declare class PathRetractionStrategy extends TraversalStrategy {
|
|
149
|
+
constructor();
|
|
150
|
+
}
|
|
151
|
+
export declare class CountStrategy extends TraversalStrategy {
|
|
152
|
+
constructor();
|
|
153
|
+
}
|
|
154
|
+
export declare class RepeatUnrollStrategy extends TraversalStrategy {
|
|
155
|
+
constructor();
|
|
156
|
+
}
|
|
157
|
+
export declare class GraphFilterStrategy extends TraversalStrategy {
|
|
158
|
+
constructor();
|
|
159
|
+
}
|
|
160
|
+
export declare class EarlyLimitStrategy extends TraversalStrategy {
|
|
161
|
+
constructor();
|
|
162
|
+
}
|
|
163
|
+
export declare class ComputerVerificationStrategy extends TraversalStrategy {
|
|
164
|
+
constructor();
|
|
165
|
+
}
|
|
166
|
+
export declare class LambdaRestrictionStrategy extends TraversalStrategy {
|
|
167
|
+
constructor();
|
|
168
|
+
}
|
|
169
|
+
export declare class ReadOnlyStrategy extends TraversalStrategy {
|
|
170
|
+
constructor();
|
|
171
|
+
}
|
|
172
|
+
export declare class EdgeLabelVerificationStrategy extends TraversalStrategy {
|
|
173
|
+
/**
|
|
174
|
+
* @param options
|
|
175
|
+
* @param options.logWarnings - determines if warnings should be written to the logger when verification fails
|
|
176
|
+
* @param options.throwException - determines if exceptions should be thrown when verifications fails
|
|
177
|
+
*/
|
|
178
|
+
constructor({ logWarnings, throwException }?: {
|
|
179
|
+
logWarnings?: boolean | undefined;
|
|
180
|
+
throwException?: boolean | undefined;
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
export declare class ReservedKeysVerificationStrategy extends TraversalStrategy {
|
|
184
|
+
/**
|
|
185
|
+
* @param options
|
|
186
|
+
* @param options.logWarnings - determines if warnings should be written to the logger when verification fails
|
|
187
|
+
* @param options.throwException - determines if exceptions should be thrown when verifications fails
|
|
188
|
+
* @param options.keys - the list of reserved keys to verify
|
|
189
|
+
*/
|
|
190
|
+
constructor({ logWarnings, throwException, keys }?: {
|
|
191
|
+
logWarnings?: boolean | undefined;
|
|
192
|
+
throwException?: boolean | undefined;
|
|
193
|
+
keys?: string[] | undefined;
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
export declare class VertexProgramRestrictionStrategy extends TraversalStrategy {
|
|
197
|
+
constructor();
|
|
198
|
+
}
|
|
199
|
+
export declare class StandardVerificationStrategy extends TraversalStrategy {
|
|
200
|
+
constructor();
|
|
201
|
+
}
|
|
202
|
+
export type SeedStrategyOptions = {
|
|
203
|
+
seed: number;
|
|
204
|
+
};
|
|
205
|
+
export declare class SeedStrategy extends TraversalStrategy {
|
|
206
|
+
/**
|
|
207
|
+
* @param {SeedStrategyOptions} [options]
|
|
208
|
+
* @param {number} [options.seed] the seed to provide to the random number generator for the traversal
|
|
209
|
+
*/
|
|
210
|
+
constructor(options: SeedStrategyOptions);
|
|
211
|
+
}
|
|
@@ -0,0 +1,482 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
4
|
+
* or more contributor license agreements. See the NOTICE file
|
|
5
|
+
* distributed with this work for additional information
|
|
6
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
7
|
+
* to you under the Apache License, Version 2.0 (the
|
|
8
|
+
* "License"); you may not use this file except in compliance
|
|
9
|
+
* with the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing,
|
|
14
|
+
* software distributed under the License is distributed on an
|
|
15
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
+
* KIND, either express or implied. See the License for the
|
|
17
|
+
* specific language governing permissions and limitations
|
|
18
|
+
* under the License.
|
|
19
|
+
*/
|
|
20
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
21
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.n = exports.t = exports.scope = exports.pop = exports.pick = exports.order = exports.operator = exports.merge = exports.gryoVersion = exports.graphSONVersion = exports.gType = exports.dt = exports.direction = exports.column = exports.cardinality = exports.barrier = exports.EnumValue = exports.withOptions = exports.TraversalSideEffects = exports.Traverser = exports.TextP = exports.P = exports.IO = exports.Traversal = void 0;
|
|
25
|
+
const gremlin_lang_js_1 = __importDefault(require("./gremlin-lang.cjs"));
|
|
26
|
+
const itemDone = Object.freeze({ value: null, done: true });
|
|
27
|
+
const asyncIteratorSymbol = Symbol.asyncIterator || Symbol('@@asyncIterator');
|
|
28
|
+
class Traversal {
|
|
29
|
+
graph;
|
|
30
|
+
traversalStrategies;
|
|
31
|
+
gremlinLang;
|
|
32
|
+
results = null;
|
|
33
|
+
sideEffects = null;
|
|
34
|
+
_traversalStrategiesPromise = null;
|
|
35
|
+
_resultsIteratorIndex = 0;
|
|
36
|
+
constructor(graph, traversalStrategies, gremlinLang = new gremlin_lang_js_1.default()) {
|
|
37
|
+
this.graph = graph;
|
|
38
|
+
this.traversalStrategies = traversalStrategies;
|
|
39
|
+
this.gremlinLang = gremlinLang;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Async iterable method implementation.
|
|
43
|
+
*/
|
|
44
|
+
[asyncIteratorSymbol]() {
|
|
45
|
+
return this;
|
|
46
|
+
}
|
|
47
|
+
/** @returns {GremlinLang} */
|
|
48
|
+
getGremlinLang() {
|
|
49
|
+
return this.gremlinLang;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Returns an Array containing the traverser objects.
|
|
53
|
+
* @returns {Promise.<Array>}
|
|
54
|
+
*/
|
|
55
|
+
toList() {
|
|
56
|
+
return this._applyStrategies().then(() => {
|
|
57
|
+
const result = [];
|
|
58
|
+
let it;
|
|
59
|
+
while ((it = this._getNext()) && !it.done) {
|
|
60
|
+
result.push(it.value);
|
|
61
|
+
}
|
|
62
|
+
return result;
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Determines if there are any more items to iterate from the traversal.
|
|
67
|
+
* @returns {Promise.<boolean>}
|
|
68
|
+
*/
|
|
69
|
+
hasNext() {
|
|
70
|
+
return this._applyStrategies().then(() => {
|
|
71
|
+
if (!this.results || this.results.length <= 0 || this._resultsIteratorIndex >= this.results.length) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
if (this.results[this._resultsIteratorIndex] instanceof Traverser) {
|
|
75
|
+
return this.results[this._resultsIteratorIndex].bulk > 0 || this._resultsIteratorIndex + 1 < this.results.length;
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Iterates all Traverser instances in the traversal.
|
|
84
|
+
* @returns {Promise}
|
|
85
|
+
*/
|
|
86
|
+
iterate() {
|
|
87
|
+
this.gremlinLang.addStep('discard');
|
|
88
|
+
return this._applyStrategies().then(() => {
|
|
89
|
+
let it;
|
|
90
|
+
while ((it = this._getNext()) && !it.done) {
|
|
91
|
+
//
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Async iterator method implementation.
|
|
97
|
+
* Returns a promise containing an iterator item.
|
|
98
|
+
* @returns {Promise.<{value, done}>}
|
|
99
|
+
*/
|
|
100
|
+
next() {
|
|
101
|
+
return this._applyStrategies().then(() => this._getNext());
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Synchronous iterator of traversers including
|
|
105
|
+
* @private
|
|
106
|
+
*/
|
|
107
|
+
_getNext() {
|
|
108
|
+
while (this.results && this._resultsIteratorIndex < this.results.length) {
|
|
109
|
+
const next = this.results[this._resultsIteratorIndex];
|
|
110
|
+
if (next instanceof Traverser) {
|
|
111
|
+
if (next.bulk > 0) {
|
|
112
|
+
next.bulk--;
|
|
113
|
+
return { value: next.object, done: false };
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
this._resultsIteratorIndex++;
|
|
117
|
+
if (!(next instanceof Traverser)) {
|
|
118
|
+
return { value: next, done: false };
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return itemDone;
|
|
122
|
+
}
|
|
123
|
+
_applyStrategies() {
|
|
124
|
+
if (this._traversalStrategiesPromise) {
|
|
125
|
+
// Apply strategies only once
|
|
126
|
+
return this._traversalStrategiesPromise;
|
|
127
|
+
}
|
|
128
|
+
return (this._traversalStrategiesPromise = this.traversalStrategies?.applyStrategies(this) ?? Promise.resolve());
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Returns step instructions during JSON serialization
|
|
132
|
+
* @returns {Array}
|
|
133
|
+
*/
|
|
134
|
+
toJSON() {
|
|
135
|
+
return this.gremlinLang.getGremlin();
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Returns the GremlinLang representation of the traversal
|
|
139
|
+
* @returns {String}
|
|
140
|
+
*/
|
|
141
|
+
toString() {
|
|
142
|
+
return this.gremlinLang.getGremlin();
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
exports.Traversal = Traversal;
|
|
146
|
+
class IO {
|
|
147
|
+
static get graphml() {
|
|
148
|
+
return 'graphml';
|
|
149
|
+
}
|
|
150
|
+
static get graphson() {
|
|
151
|
+
return 'graphson';
|
|
152
|
+
}
|
|
153
|
+
static get gryo() {
|
|
154
|
+
return 'gryo';
|
|
155
|
+
}
|
|
156
|
+
static get reader() {
|
|
157
|
+
return '~tinkerpop.io.reader';
|
|
158
|
+
}
|
|
159
|
+
static get registry() {
|
|
160
|
+
return '~tinkerpop.io.registry';
|
|
161
|
+
}
|
|
162
|
+
static get writer() {
|
|
163
|
+
return '~tinkerpop.io.writer';
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
exports.IO = IO;
|
|
167
|
+
// eslint-disable-next-line no-unused-vars
|
|
168
|
+
class ConnectedComponent {
|
|
169
|
+
static get component() {
|
|
170
|
+
return 'gremlin.connectedComponentVertexProgram.component';
|
|
171
|
+
}
|
|
172
|
+
static get edges() {
|
|
173
|
+
return '~tinkerpop.connectedComponent.edges';
|
|
174
|
+
}
|
|
175
|
+
static get propertyName() {
|
|
176
|
+
return '~tinkerpop.connectedComponent.propertyName';
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
// eslint-disable-next-line no-unused-vars
|
|
180
|
+
class ShortestPath {
|
|
181
|
+
static get distance() {
|
|
182
|
+
return '~tinkerpop.shortestPath.distance';
|
|
183
|
+
}
|
|
184
|
+
static get edges() {
|
|
185
|
+
return '~tinkerpop.shortestPath.edges';
|
|
186
|
+
}
|
|
187
|
+
static get includeEdges() {
|
|
188
|
+
return '~tinkerpop.shortestPath.includeEdges';
|
|
189
|
+
}
|
|
190
|
+
static get maxDistance() {
|
|
191
|
+
return '~tinkerpop.shortestPath.maxDistance';
|
|
192
|
+
}
|
|
193
|
+
static get target() {
|
|
194
|
+
return '~tinkerpop.shortestPath.target';
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
// eslint-disable-next-line no-unused-vars
|
|
198
|
+
class PageRank {
|
|
199
|
+
static get edges() {
|
|
200
|
+
return '~tinkerpop.pageRank.edges';
|
|
201
|
+
}
|
|
202
|
+
static get propertyName() {
|
|
203
|
+
return '~tinkerpop.pageRank.propertyName';
|
|
204
|
+
}
|
|
205
|
+
static get times() {
|
|
206
|
+
return '~tinkerpop.pageRank.times';
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
// eslint-disable-next-line no-unused-vars
|
|
210
|
+
class PeerPressure {
|
|
211
|
+
static get edges() {
|
|
212
|
+
return '~tinkerpop.peerPressure.edges';
|
|
213
|
+
}
|
|
214
|
+
static get propertyName() {
|
|
215
|
+
return '~tinkerpop.peerPressure.propertyName';
|
|
216
|
+
}
|
|
217
|
+
static get times() {
|
|
218
|
+
return '~tinkerpop.peerPressure.times';
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
class P {
|
|
222
|
+
operator;
|
|
223
|
+
value;
|
|
224
|
+
other;
|
|
225
|
+
/**
|
|
226
|
+
* Represents an operation.
|
|
227
|
+
*/
|
|
228
|
+
constructor(operator, value, other) {
|
|
229
|
+
this.operator = operator;
|
|
230
|
+
this.value = value;
|
|
231
|
+
this.other = other;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Returns the string representation of the instance.
|
|
235
|
+
* @returns {string}
|
|
236
|
+
*/
|
|
237
|
+
toString() {
|
|
238
|
+
function formatValue(value) {
|
|
239
|
+
if (Array.isArray(value)) {
|
|
240
|
+
const acc = [];
|
|
241
|
+
for (const item of value) {
|
|
242
|
+
acc.push(formatValue(item));
|
|
243
|
+
}
|
|
244
|
+
return '[' + acc.join(', ') + ']';
|
|
245
|
+
}
|
|
246
|
+
if (value && typeof value === 'string') {
|
|
247
|
+
return `'${value}'`;
|
|
248
|
+
}
|
|
249
|
+
return String(value);
|
|
250
|
+
}
|
|
251
|
+
if (this.other === undefined || this.other === null) {
|
|
252
|
+
return this.operator + '(' + formatValue(this.value) + ')';
|
|
253
|
+
}
|
|
254
|
+
return this.operator + '(' + formatValue(this.value) + ', ' + formatValue(this.other) + ')';
|
|
255
|
+
}
|
|
256
|
+
and(arg) {
|
|
257
|
+
return new P('and', this, arg);
|
|
258
|
+
}
|
|
259
|
+
or(arg) {
|
|
260
|
+
return new P('or', this, arg);
|
|
261
|
+
}
|
|
262
|
+
static within(...args) {
|
|
263
|
+
if (args.length === 1 && Array.isArray(args[0])) {
|
|
264
|
+
return new P('within', args[0], null);
|
|
265
|
+
}
|
|
266
|
+
return new P('within', args, null);
|
|
267
|
+
}
|
|
268
|
+
static without(...args) {
|
|
269
|
+
if (args.length === 1 && Array.isArray(args[0])) {
|
|
270
|
+
return new P('without', args[0], null);
|
|
271
|
+
}
|
|
272
|
+
return new P('without', args, null);
|
|
273
|
+
}
|
|
274
|
+
/** @param {...Object} args */
|
|
275
|
+
static between(...args) {
|
|
276
|
+
return createP('between', args);
|
|
277
|
+
}
|
|
278
|
+
/** @param {...Object} args */
|
|
279
|
+
static eq(...args) {
|
|
280
|
+
return createP('eq', args);
|
|
281
|
+
}
|
|
282
|
+
/** @param {...Object} args */
|
|
283
|
+
static gt(...args) {
|
|
284
|
+
return createP('gt', args);
|
|
285
|
+
}
|
|
286
|
+
/** @param {...Object} args */
|
|
287
|
+
static gte(...args) {
|
|
288
|
+
return createP('gte', args);
|
|
289
|
+
}
|
|
290
|
+
/** @param {...Object} args */
|
|
291
|
+
static inside(...args) {
|
|
292
|
+
return createP('inside', args);
|
|
293
|
+
}
|
|
294
|
+
/** @param {...Object} args */
|
|
295
|
+
static lt(...args) {
|
|
296
|
+
return createP('lt', args);
|
|
297
|
+
}
|
|
298
|
+
/** @param {...Object} args */
|
|
299
|
+
static lte(...args) {
|
|
300
|
+
return createP('lte', args);
|
|
301
|
+
}
|
|
302
|
+
/** @param {...Object} args */
|
|
303
|
+
static neq(...args) {
|
|
304
|
+
return createP('neq', args);
|
|
305
|
+
}
|
|
306
|
+
/** @param {...Object} args */
|
|
307
|
+
static not(...args) {
|
|
308
|
+
return createP('not', args);
|
|
309
|
+
}
|
|
310
|
+
/** @param {...Object} args */
|
|
311
|
+
static outside(...args) {
|
|
312
|
+
return createP('outside', args);
|
|
313
|
+
}
|
|
314
|
+
/** @param {...Object} args */
|
|
315
|
+
static typeOf(...args) {
|
|
316
|
+
return createP('typeOf', args);
|
|
317
|
+
}
|
|
318
|
+
/** @param {...Object} args */
|
|
319
|
+
static test(...args) {
|
|
320
|
+
return createP('test', args);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
exports.P = P;
|
|
324
|
+
function createP(operator, args) {
|
|
325
|
+
args.unshift(null, operator);
|
|
326
|
+
return new (Function.prototype.bind.apply(P, args))();
|
|
327
|
+
}
|
|
328
|
+
class TextP {
|
|
329
|
+
operator;
|
|
330
|
+
value;
|
|
331
|
+
other;
|
|
332
|
+
/**
|
|
333
|
+
* Represents an operation.
|
|
334
|
+
*/
|
|
335
|
+
constructor(operator, value, other) {
|
|
336
|
+
this.operator = operator;
|
|
337
|
+
this.value = value;
|
|
338
|
+
this.other = other;
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Returns the string representation of the instance.
|
|
342
|
+
* @returns {string}
|
|
343
|
+
*/
|
|
344
|
+
toString() {
|
|
345
|
+
function formatValue(value) {
|
|
346
|
+
if (value && typeof value === 'string') {
|
|
347
|
+
return `'${value}'`;
|
|
348
|
+
}
|
|
349
|
+
return value;
|
|
350
|
+
}
|
|
351
|
+
if (this.other === undefined) {
|
|
352
|
+
return this.operator + '(' + formatValue(this.value) + ')';
|
|
353
|
+
}
|
|
354
|
+
return this.operator + '(' + formatValue(this.value) + ', ' + formatValue(this.other) + ')';
|
|
355
|
+
}
|
|
356
|
+
and(arg) {
|
|
357
|
+
return new P('and', this, arg);
|
|
358
|
+
}
|
|
359
|
+
or(arg) {
|
|
360
|
+
return new P('or', this, arg);
|
|
361
|
+
}
|
|
362
|
+
/** @param {...Object} args */
|
|
363
|
+
static containing(...args) {
|
|
364
|
+
return createTextP('containing', args);
|
|
365
|
+
}
|
|
366
|
+
/** @param {...Object} args */
|
|
367
|
+
static endingWith(...args) {
|
|
368
|
+
return createTextP('endingWith', args);
|
|
369
|
+
}
|
|
370
|
+
/** @param {...Object} args */
|
|
371
|
+
static notContaining(...args) {
|
|
372
|
+
return createTextP('notContaining', args);
|
|
373
|
+
}
|
|
374
|
+
/** @param {...Object} args */
|
|
375
|
+
static notEndingWith(...args) {
|
|
376
|
+
return createTextP('notEndingWith', args);
|
|
377
|
+
}
|
|
378
|
+
/** @param {...Object} args */
|
|
379
|
+
static notStartingWith(...args) {
|
|
380
|
+
return createTextP('notStartingWith', args);
|
|
381
|
+
}
|
|
382
|
+
/** @param {...Object} args */
|
|
383
|
+
static startingWith(...args) {
|
|
384
|
+
return createTextP('startingWith', args);
|
|
385
|
+
}
|
|
386
|
+
/** @param {...Object} args */
|
|
387
|
+
static regex(...args) {
|
|
388
|
+
return createTextP('regex', args);
|
|
389
|
+
}
|
|
390
|
+
/** @param {...Object} args */
|
|
391
|
+
static notRegex(...args) {
|
|
392
|
+
return createTextP('notRegex', args);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
exports.TextP = TextP;
|
|
396
|
+
function createTextP(operator, args) {
|
|
397
|
+
args.unshift(null, operator);
|
|
398
|
+
return new (Function.prototype.bind.apply(TextP, args))();
|
|
399
|
+
}
|
|
400
|
+
class Traverser {
|
|
401
|
+
object;
|
|
402
|
+
bulk;
|
|
403
|
+
constructor(object, bulk) {
|
|
404
|
+
this.object = object;
|
|
405
|
+
this.bulk = bulk;
|
|
406
|
+
this.bulk = bulk || 1;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
exports.Traverser = Traverser;
|
|
410
|
+
class TraversalSideEffects {
|
|
411
|
+
}
|
|
412
|
+
exports.TraversalSideEffects = TraversalSideEffects;
|
|
413
|
+
exports.withOptions = {
|
|
414
|
+
tokens: '~tinkerpop.valueMap.tokens',
|
|
415
|
+
none: 0,
|
|
416
|
+
ids: 1,
|
|
417
|
+
labels: 2,
|
|
418
|
+
keys: 4,
|
|
419
|
+
values: 8,
|
|
420
|
+
all: 15,
|
|
421
|
+
indexer: '~tinkerpop.index.indexer',
|
|
422
|
+
list: 0,
|
|
423
|
+
map: 1,
|
|
424
|
+
};
|
|
425
|
+
function toEnum(typeName, keys) {
|
|
426
|
+
const result = {};
|
|
427
|
+
keys.split(' ').forEach((k) => {
|
|
428
|
+
let jsKey = k;
|
|
429
|
+
if (jsKey === jsKey.toUpperCase()) {
|
|
430
|
+
jsKey = jsKey.toLowerCase();
|
|
431
|
+
}
|
|
432
|
+
result[jsKey] = new EnumValue(typeName, k);
|
|
433
|
+
});
|
|
434
|
+
return result;
|
|
435
|
+
}
|
|
436
|
+
const directionAlias = {
|
|
437
|
+
from_: 'out',
|
|
438
|
+
to: 'in',
|
|
439
|
+
};
|
|
440
|
+
// for direction enums, maps the same EnumValue object to the enum aliases after creating them
|
|
441
|
+
function toDirectionEnum(typeName, keys) {
|
|
442
|
+
const result = toEnum(typeName, keys);
|
|
443
|
+
Object.keys(directionAlias).forEach((k) => {
|
|
444
|
+
result[k] = result[directionAlias[k]];
|
|
445
|
+
});
|
|
446
|
+
return result;
|
|
447
|
+
}
|
|
448
|
+
function toGTypeEnum(typeName, keys) {
|
|
449
|
+
const result = {};
|
|
450
|
+
keys.split(' ').forEach((k) => {
|
|
451
|
+
result[k] = new EnumValue(typeName, k.toUpperCase());
|
|
452
|
+
});
|
|
453
|
+
return result;
|
|
454
|
+
}
|
|
455
|
+
class EnumValue {
|
|
456
|
+
typeName;
|
|
457
|
+
elementName;
|
|
458
|
+
constructor(typeName, elementName) {
|
|
459
|
+
this.typeName = typeName;
|
|
460
|
+
this.elementName = elementName;
|
|
461
|
+
}
|
|
462
|
+
toString() {
|
|
463
|
+
return this.typeName + '.' + this.elementName;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
exports.EnumValue = EnumValue;
|
|
467
|
+
exports.barrier = toEnum('Barrier', 'normSack');
|
|
468
|
+
exports.cardinality = toEnum('Cardinality', 'list set single');
|
|
469
|
+
exports.column = toEnum('Column', 'keys values');
|
|
470
|
+
exports.direction = toDirectionEnum('Direction', 'BOTH IN OUT from_ to');
|
|
471
|
+
exports.dt = toEnum('DT', 'second minute hour day');
|
|
472
|
+
exports.gType = toGTypeEnum('GType', 'bigDecimal bigInt binary boolean byte char datetime double duration edge float graph int list long map null number path property set short string tree uuid vertex vproperty');
|
|
473
|
+
exports.graphSONVersion = toEnum('GraphSONVersion', 'V1_0 V2_0 V3_0');
|
|
474
|
+
exports.gryoVersion = toEnum('GryoVersion', 'V1_0 V3_0');
|
|
475
|
+
exports.merge = toEnum('Merge', 'onCreate onMatch outV inV');
|
|
476
|
+
exports.operator = toEnum('Operator', 'addAll and assign div max min minus mult or sum sumLong');
|
|
477
|
+
exports.order = toEnum('Order', 'asc desc shuffle');
|
|
478
|
+
exports.pick = toEnum('Pick', 'any none unproductive');
|
|
479
|
+
exports.pop = toEnum('Pop', 'all first last mixed');
|
|
480
|
+
exports.scope = toEnum('Scope', 'global local');
|
|
481
|
+
exports.t = toEnum('T', 'id key label value');
|
|
482
|
+
exports.n = toEnum('N', 'byte_ short_ int_ long_ float_ double_ bigInt bigDecimal');
|