gremlin 3.8.1 → 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.
Files changed (411) hide show
  1. package/README.md +18 -4
  2. package/build/cjs/driver/auth.cjs +69 -0
  3. package/build/cjs/driver/auth.d.cts +9 -0
  4. package/build/cjs/driver/client.cjs +134 -0
  5. package/build/cjs/driver/client.d.cts +85 -0
  6. package/build/cjs/driver/connection.cjs +250 -0
  7. package/build/cjs/driver/connection.d.cts +63 -0
  8. package/build/cjs/driver/driver-remote-connection.cjs +141 -0
  9. package/build/cjs/driver/driver-remote-connection.d.cts +33 -0
  10. package/build/cjs/driver/remote-connection.cjs +75 -0
  11. package/build/cjs/driver/remote-connection.d.cts +72 -0
  12. package/build/cjs/driver/request-message.cjs +157 -0
  13. package/build/cjs/driver/request-message.d.cts +49 -0
  14. package/build/cjs/driver/response-error.cjs +45 -0
  15. package/build/cjs/driver/response-error.d.cts +13 -0
  16. package/build/cjs/driver/result-set.cjs +111 -0
  17. package/build/cjs/driver/result-set.d.cts +29 -0
  18. package/build/cjs/index.cjs +125 -0
  19. package/build/cjs/index.d.cts +393 -0
  20. package/build/cjs/language/grammar/GremlinLexer.cjs +1851 -0
  21. package/build/cjs/language/grammar/GremlinLexer.d.cts +340 -0
  22. package/build/cjs/language/grammar/GremlinListener.cjs +4490 -0
  23. package/build/cjs/language/grammar/GremlinListener.d.cts +4898 -0
  24. package/build/cjs/language/grammar/GremlinParser.cjs +35244 -0
  25. package/build/cjs/language/grammar/GremlinParser.d.cts +5881 -0
  26. package/build/cjs/language/index.cjs +48 -0
  27. package/build/cjs/language/index.d.cts +12 -0
  28. package/build/cjs/language/translator/AnonymizedTranslateVisitor.cjs +157 -0
  29. package/build/cjs/language/translator/AnonymizedTranslateVisitor.d.cts +36 -0
  30. package/build/cjs/language/translator/DotNetTranslateVisitor.cjs +826 -0
  31. package/build/cjs/language/translator/DotNetTranslateVisitor.d.cts +155 -0
  32. package/build/cjs/language/translator/GoTranslateVisitor.cjs +339 -0
  33. package/build/cjs/language/translator/GoTranslateVisitor.d.cts +31 -0
  34. package/build/cjs/language/translator/GremlinTranslator.cjs +96 -0
  35. package/build/cjs/language/translator/GremlinTranslator.d.cts +18 -0
  36. package/build/cjs/language/translator/GroovyTranslateVisitor.cjs +287 -0
  37. package/build/cjs/language/translator/GroovyTranslateVisitor.d.cts +34 -0
  38. package/build/cjs/language/translator/JavaTranslateVisitor.cjs +247 -0
  39. package/build/cjs/language/translator/JavaTranslateVisitor.d.cts +23 -0
  40. package/build/cjs/language/translator/JavascriptTranslateVisitor.cjs +220 -0
  41. package/build/cjs/language/translator/JavascriptTranslateVisitor.d.cts +25 -0
  42. package/build/cjs/language/translator/PythonTranslateVisitor.cjs +304 -0
  43. package/build/cjs/language/translator/PythonTranslateVisitor.d.cts +28 -0
  44. package/build/cjs/language/translator/TranslateVisitor.cjs +389 -0
  45. package/build/cjs/language/translator/TranslateVisitor.d.cts +91 -0
  46. package/build/cjs/language/translator/Translation.cjs +47 -0
  47. package/build/cjs/language/translator/Translation.d.cts +13 -0
  48. package/build/cjs/language/translator/Translator.cjs +46 -0
  49. package/build/cjs/language/translator/Translator.d.cts +24 -0
  50. package/build/cjs/language/translator/TranslatorException.cjs +31 -0
  51. package/build/cjs/language/translator/TranslatorException.d.cts +6 -0
  52. package/build/cjs/process/anonymous-traversal.cjs +78 -0
  53. package/build/cjs/process/anonymous-traversal.d.cts +40 -0
  54. package/build/cjs/process/graph-traversal.cjs +1702 -0
  55. package/build/cjs/process/graph-traversal.d.cts +1134 -0
  56. package/build/cjs/process/gremlin-lang.cjs +196 -0
  57. package/build/cjs/process/gremlin-lang.d.cts +15 -0
  58. package/build/cjs/process/transaction.cjs +69 -0
  59. package/build/cjs/process/transaction.d.cts +34 -0
  60. package/build/cjs/process/traversal-strategy.cjs +360 -0
  61. package/build/cjs/process/traversal-strategy.d.cts +211 -0
  62. package/build/cjs/process/traversal.cjs +482 -0
  63. package/build/cjs/process/traversal.d.cts +186 -0
  64. package/build/cjs/structure/graph.cjs +157 -0
  65. package/build/cjs/structure/graph.d.cts +57 -0
  66. package/build/cjs/structure/io/binary/GraphBinary.cjs +148 -0
  67. package/build/cjs/structure/io/binary/GraphBinary.d.cts +91 -0
  68. package/build/cjs/structure/io/binary/internals/AnySerializer.cjs +80 -0
  69. package/build/cjs/structure/io/binary/internals/AnySerializer.d.cts +8 -0
  70. package/build/cjs/structure/io/binary/internals/ArraySerializer.cjs +139 -0
  71. package/build/cjs/structure/io/binary/internals/ArraySerializer.d.cts +15 -0
  72. package/build/cjs/structure/io/binary/internals/BigIntegerSerializer.cjs +136 -0
  73. package/build/cjs/structure/io/binary/internals/BigIntegerSerializer.d.cts +14 -0
  74. package/build/cjs/structure/io/binary/internals/BinarySerializer.cjs +112 -0
  75. package/build/cjs/structure/io/binary/internals/BinarySerializer.d.cts +11 -0
  76. package/build/cjs/structure/io/binary/internals/BooleanSerializer.cjs +93 -0
  77. package/build/cjs/structure/io/binary/internals/BooleanSerializer.d.cts +11 -0
  78. package/build/cjs/structure/io/binary/internals/ByteSerializer.cjs +88 -0
  79. package/build/cjs/structure/io/binary/internals/ByteSerializer.d.cts +10 -0
  80. package/build/cjs/structure/io/binary/internals/DataType.cjs +63 -0
  81. package/build/cjs/structure/io/binary/internals/DataType.d.cts +35 -0
  82. package/build/cjs/structure/io/binary/internals/DateTimeSerializer.cjs +139 -0
  83. package/build/cjs/structure/io/binary/internals/DateTimeSerializer.d.cts +15 -0
  84. package/build/cjs/structure/io/binary/internals/DoubleSerializer.cjs +91 -0
  85. package/build/cjs/structure/io/binary/internals/DoubleSerializer.d.cts +11 -0
  86. package/build/cjs/structure/io/binary/internals/EdgeSerializer.cjs +201 -0
  87. package/build/cjs/structure/io/binary/internals/EdgeSerializer.d.cts +20 -0
  88. package/build/cjs/structure/io/binary/internals/EnumSerializer.cjs +127 -0
  89. package/build/cjs/structure/io/binary/internals/EnumSerializer.d.cts +24 -0
  90. package/build/cjs/structure/io/binary/internals/FloatSerializer.cjs +91 -0
  91. package/build/cjs/structure/io/binary/internals/FloatSerializer.d.cts +11 -0
  92. package/build/cjs/structure/io/binary/internals/GraphBinaryReader.cjs +97 -0
  93. package/build/cjs/structure/io/binary/internals/GraphBinaryReader.d.cts +19 -0
  94. package/build/cjs/structure/io/binary/internals/GraphBinaryWriter.cjs +85 -0
  95. package/build/cjs/structure/io/binary/internals/GraphBinaryWriter.d.cts +9 -0
  96. package/build/cjs/structure/io/binary/internals/IntSerializer.cjs +103 -0
  97. package/build/cjs/structure/io/binary/internals/IntSerializer.d.cts +13 -0
  98. package/build/cjs/structure/io/binary/internals/LongSerializer.cjs +95 -0
  99. package/build/cjs/structure/io/binary/internals/LongSerializer.d.cts +11 -0
  100. package/build/cjs/structure/io/binary/internals/MapSerializer.cjs +144 -0
  101. package/build/cjs/structure/io/binary/internals/MapSerializer.d.cts +13 -0
  102. package/build/cjs/structure/io/binary/internals/MarkerSerializer.cjs +63 -0
  103. package/build/cjs/structure/io/binary/internals/MarkerSerializer.d.cts +8 -0
  104. package/build/cjs/structure/io/binary/internals/NumberSerializationStrategy.cjs +66 -0
  105. package/build/cjs/structure/io/binary/internals/NumberSerializationStrategy.d.cts +9 -0
  106. package/build/cjs/structure/io/binary/internals/PathSerializer.cjs +113 -0
  107. package/build/cjs/structure/io/binary/internals/PathSerializer.d.cts +15 -0
  108. package/build/cjs/structure/io/binary/internals/PropertySerializer.cjs +130 -0
  109. package/build/cjs/structure/io/binary/internals/PropertySerializer.d.cts +15 -0
  110. package/build/cjs/structure/io/binary/internals/SetSerializer.cjs +138 -0
  111. package/build/cjs/structure/io/binary/internals/SetSerializer.d.cts +15 -0
  112. package/build/cjs/structure/io/binary/internals/ShortSerializer.cjs +91 -0
  113. package/build/cjs/structure/io/binary/internals/ShortSerializer.d.cts +11 -0
  114. package/build/cjs/structure/io/binary/internals/StringSerializer.cjs +107 -0
  115. package/build/cjs/structure/io/binary/internals/StringSerializer.d.cts +11 -0
  116. package/{lib/driver/auth/authenticator.js → build/cjs/structure/io/binary/internals/StubSerializer.cjs} +14 -20
  117. package/build/cjs/structure/io/binary/internals/StubSerializer.d.cts +7 -0
  118. package/build/cjs/structure/io/binary/internals/UnspecifiedNullSerializer.cjs +70 -0
  119. package/build/cjs/structure/io/binary/internals/UnspecifiedNullSerializer.d.cts +11 -0
  120. package/build/cjs/structure/io/binary/internals/UuidSerializer.cjs +109 -0
  121. package/build/cjs/structure/io/binary/internals/UuidSerializer.d.cts +14 -0
  122. package/build/cjs/structure/io/binary/internals/VertexPropertySerializer.cjs +163 -0
  123. package/build/cjs/structure/io/binary/internals/VertexPropertySerializer.d.cts +15 -0
  124. package/build/cjs/structure/io/binary/internals/VertexSerializer.cjs +128 -0
  125. package/build/cjs/structure/io/binary/internals/VertexSerializer.d.cts +17 -0
  126. package/build/cjs/structure/io/binary/internals/utils.cjs +53 -0
  127. package/build/cjs/structure/io/binary/internals/utils.d.cts +6 -0
  128. package/build/cjs/utils.cjs +142 -0
  129. package/build/cjs/utils.d.cts +20 -0
  130. package/build/esm/driver/auth.d.ts +9 -0
  131. package/build/esm/driver/auth.js +65 -0
  132. package/build/esm/driver/client.d.ts +85 -0
  133. package/build/esm/driver/client.js +128 -0
  134. package/build/esm/driver/connection.d.ts +63 -0
  135. package/build/esm/driver/connection.js +211 -0
  136. package/build/esm/driver/driver-remote-connection.d.ts +33 -0
  137. package/build/esm/driver/driver-remote-connection.js +102 -0
  138. package/build/esm/driver/remote-connection.d.ts +72 -0
  139. package/build/esm/driver/remote-connection.js +69 -0
  140. package/build/esm/driver/request-message.d.ts +49 -0
  141. package/build/esm/driver/request-message.js +152 -0
  142. package/build/esm/driver/response-error.d.ts +13 -0
  143. package/{lib → build/esm}/driver/response-error.js +21 -26
  144. package/build/esm/driver/result-set.d.ts +29 -0
  145. package/build/esm/driver/result-set.js +75 -0
  146. package/build/esm/index.d.ts +393 -0
  147. package/{index.js → build/esm/index.js} +23 -33
  148. package/build/esm/language/grammar/GremlinLexer.d.ts +340 -0
  149. package/build/esm/language/grammar/GremlinLexer.js +1814 -0
  150. package/build/esm/language/grammar/GremlinListener.d.ts +4898 -0
  151. package/build/esm/language/grammar/GremlinListener.js +4486 -0
  152. package/build/esm/language/grammar/GremlinParser.d.ts +5881 -0
  153. package/build/esm/language/grammar/GremlinParser.js +34711 -0
  154. package/build/esm/language/index.d.ts +12 -0
  155. package/build/esm/language/index.js +30 -0
  156. package/build/esm/language/translator/AnonymizedTranslateVisitor.d.ts +36 -0
  157. package/build/esm/language/translator/AnonymizedTranslateVisitor.js +151 -0
  158. package/build/esm/language/translator/DotNetTranslateVisitor.d.ts +155 -0
  159. package/build/esm/language/translator/DotNetTranslateVisitor.js +820 -0
  160. package/build/esm/language/translator/GoTranslateVisitor.d.ts +31 -0
  161. package/build/esm/language/translator/GoTranslateVisitor.js +333 -0
  162. package/build/esm/language/translator/GremlinTranslator.d.ts +18 -0
  163. package/build/esm/language/translator/GremlinTranslator.js +89 -0
  164. package/build/esm/language/translator/GroovyTranslateVisitor.d.ts +34 -0
  165. package/build/esm/language/translator/GroovyTranslateVisitor.js +281 -0
  166. package/build/esm/language/translator/JavaTranslateVisitor.d.ts +23 -0
  167. package/build/esm/language/translator/JavaTranslateVisitor.js +241 -0
  168. package/build/esm/language/translator/JavascriptTranslateVisitor.d.ts +25 -0
  169. package/build/esm/language/translator/JavascriptTranslateVisitor.js +214 -0
  170. package/build/esm/language/translator/PythonTranslateVisitor.d.ts +28 -0
  171. package/build/esm/language/translator/PythonTranslateVisitor.js +298 -0
  172. package/build/esm/language/translator/TranslateVisitor.d.ts +91 -0
  173. package/build/esm/language/translator/TranslateVisitor.js +386 -0
  174. package/build/esm/language/translator/Translation.d.ts +13 -0
  175. package/build/esm/language/translator/Translation.js +43 -0
  176. package/build/esm/language/translator/Translator.d.ts +24 -0
  177. package/build/esm/language/translator/Translator.js +40 -0
  178. package/build/esm/language/translator/TranslatorException.d.ts +6 -0
  179. package/build/esm/language/translator/TranslatorException.js +27 -0
  180. package/build/esm/process/anonymous-traversal.d.ts +40 -0
  181. package/build/esm/process/anonymous-traversal.js +72 -0
  182. package/build/esm/process/graph-traversal.d.ts +1134 -0
  183. package/build/esm/process/graph-traversal.js +1693 -0
  184. package/build/esm/process/gremlin-lang.d.ts +15 -0
  185. package/build/esm/process/gremlin-lang.js +193 -0
  186. package/build/esm/process/transaction.d.ts +34 -0
  187. package/build/esm/process/transaction.js +65 -0
  188. package/build/esm/process/traversal-strategy.d.ts +211 -0
  189. package/build/esm/process/traversal-strategy.js +319 -0
  190. package/build/esm/process/traversal.d.ts +186 -0
  191. package/build/esm/process/traversal.js +469 -0
  192. package/build/esm/structure/graph.d.ts +57 -0
  193. package/build/esm/structure/graph.js +148 -0
  194. package/build/esm/structure/io/binary/GraphBinary.d.ts +91 -0
  195. package/build/esm/structure/io/binary/GraphBinary.js +108 -0
  196. package/build/esm/structure/io/binary/internals/AnySerializer.d.ts +8 -0
  197. package/build/esm/structure/io/binary/internals/AnySerializer.js +77 -0
  198. package/build/esm/structure/io/binary/internals/ArraySerializer.d.ts +15 -0
  199. package/build/esm/structure/io/binary/internals/ArraySerializer.js +136 -0
  200. package/build/esm/structure/io/binary/internals/BigIntegerSerializer.d.ts +14 -0
  201. package/build/esm/structure/io/binary/internals/BigIntegerSerializer.js +133 -0
  202. package/build/esm/structure/io/binary/internals/BinarySerializer.d.ts +11 -0
  203. package/build/esm/structure/io/binary/internals/BinarySerializer.js +109 -0
  204. package/build/esm/structure/io/binary/internals/BooleanSerializer.d.ts +11 -0
  205. package/build/esm/structure/io/binary/internals/BooleanSerializer.js +90 -0
  206. package/build/esm/structure/io/binary/internals/ByteSerializer.d.ts +10 -0
  207. package/build/esm/structure/io/binary/internals/ByteSerializer.js +85 -0
  208. package/build/esm/structure/io/binary/internals/DataType.d.ts +35 -0
  209. package/{lib/driver/auth/mechanisms/sasl-mechanism-base.js → build/esm/structure/io/binary/internals/DataType.js} +43 -34
  210. package/build/esm/structure/io/binary/internals/DateTimeSerializer.d.ts +15 -0
  211. package/build/esm/structure/io/binary/internals/DateTimeSerializer.js +136 -0
  212. package/build/esm/structure/io/binary/internals/DoubleSerializer.d.ts +11 -0
  213. package/build/esm/structure/io/binary/internals/DoubleSerializer.js +88 -0
  214. package/build/esm/structure/io/binary/internals/EdgeSerializer.d.ts +20 -0
  215. package/build/esm/structure/io/binary/internals/EdgeSerializer.js +198 -0
  216. package/build/esm/structure/io/binary/internals/EnumSerializer.d.ts +24 -0
  217. package/build/esm/structure/io/binary/internals/EnumSerializer.js +124 -0
  218. package/build/esm/structure/io/binary/internals/FloatSerializer.d.ts +11 -0
  219. package/build/esm/structure/io/binary/internals/FloatSerializer.js +88 -0
  220. package/build/esm/structure/io/binary/internals/GraphBinaryReader.d.ts +19 -0
  221. package/build/esm/structure/io/binary/internals/GraphBinaryReader.js +94 -0
  222. package/build/esm/structure/io/binary/internals/GraphBinaryWriter.d.ts +9 -0
  223. package/build/esm/structure/io/binary/internals/GraphBinaryWriter.js +82 -0
  224. package/build/esm/structure/io/binary/internals/IntSerializer.d.ts +13 -0
  225. package/build/esm/structure/io/binary/internals/IntSerializer.js +100 -0
  226. package/build/esm/structure/io/binary/internals/LongSerializer.d.ts +11 -0
  227. package/build/esm/structure/io/binary/internals/LongSerializer.js +92 -0
  228. package/build/esm/structure/io/binary/internals/MapSerializer.d.ts +13 -0
  229. package/build/esm/structure/io/binary/internals/MapSerializer.js +141 -0
  230. package/build/esm/structure/io/binary/internals/MarkerSerializer.d.ts +8 -0
  231. package/build/esm/structure/io/binary/internals/MarkerSerializer.js +60 -0
  232. package/build/esm/structure/io/binary/internals/NumberSerializationStrategy.d.ts +9 -0
  233. package/build/esm/structure/io/binary/internals/NumberSerializationStrategy.js +63 -0
  234. package/build/esm/structure/io/binary/internals/PathSerializer.d.ts +15 -0
  235. package/build/esm/structure/io/binary/internals/PathSerializer.js +110 -0
  236. package/build/esm/structure/io/binary/internals/PropertySerializer.d.ts +15 -0
  237. package/build/esm/structure/io/binary/internals/PropertySerializer.js +127 -0
  238. package/build/esm/structure/io/binary/internals/SetSerializer.d.ts +15 -0
  239. package/build/esm/structure/io/binary/internals/SetSerializer.js +135 -0
  240. package/build/esm/structure/io/binary/internals/ShortSerializer.d.ts +11 -0
  241. package/build/esm/structure/io/binary/internals/ShortSerializer.js +88 -0
  242. package/build/esm/structure/io/binary/internals/StringSerializer.d.ts +11 -0
  243. package/build/esm/structure/io/binary/internals/StringSerializer.js +104 -0
  244. package/build/esm/structure/io/binary/internals/StubSerializer.d.ts +7 -0
  245. package/{.prettierrc.js → build/esm/structure/io/binary/internals/StubSerializer.js} +11 -11
  246. package/build/esm/structure/io/binary/internals/UnspecifiedNullSerializer.d.ts +11 -0
  247. package/build/esm/structure/io/binary/internals/UnspecifiedNullSerializer.js +67 -0
  248. package/build/esm/structure/io/binary/internals/UuidSerializer.d.ts +14 -0
  249. package/build/esm/structure/io/binary/internals/UuidSerializer.js +106 -0
  250. package/build/esm/structure/io/binary/internals/VertexPropertySerializer.d.ts +15 -0
  251. package/build/esm/structure/io/binary/internals/VertexPropertySerializer.js +160 -0
  252. package/build/esm/structure/io/binary/internals/VertexSerializer.d.ts +17 -0
  253. package/build/esm/structure/io/binary/internals/VertexSerializer.js +125 -0
  254. package/build/esm/structure/io/binary/internals/utils.d.ts +6 -0
  255. package/{lib → build/esm}/structure/io/binary/internals/utils.js +23 -35
  256. package/build/esm/utils.d.ts +20 -0
  257. package/build/esm/utils.js +98 -0
  258. package/package.json +56 -20
  259. package/.nvmrc +0 -1
  260. package/NOTICE +0 -5
  261. package/doc/AnonymousTraversalSource.html +0 -793
  262. package/doc/Authenticator.html +0 -303
  263. package/doc/Bytecode.html +0 -941
  264. package/doc/CardinalityValue.html +0 -711
  265. package/doc/Client.html +0 -1869
  266. package/doc/Connection.html +0 -1192
  267. package/doc/DriverRemoteConnection.html +0 -1528
  268. package/doc/EdgeLabelVerificationStrategy.html +0 -238
  269. package/doc/Graph.html +0 -343
  270. package/doc/GraphSON2Reader.html +0 -407
  271. package/doc/GraphSON2Writer.html +0 -558
  272. package/doc/GraphSON3Reader.html +0 -170
  273. package/doc/GraphSON3Writer.html +0 -170
  274. package/doc/GraphTraversal.html +0 -22974
  275. package/doc/GraphTraversalSource.html +0 -3683
  276. package/doc/HaltedTraverserStrategy.html +0 -215
  277. package/doc/MatchAlgorithmStrategy.html +0 -210
  278. package/doc/P.html +0 -2020
  279. package/doc/PartitionStrategy.html +0 -387
  280. package/doc/Path.html +0 -242
  281. package/doc/PlainTextSaslAuthenticator.html +0 -456
  282. package/doc/ProductiveByStrategy.html +0 -258
  283. package/doc/RemoteConnection.html +0 -1086
  284. package/doc/RemoteStrategy.html +0 -307
  285. package/doc/RemoteTraversal.html +0 -170
  286. package/doc/ReservedKeysVerificationStrategy.html +0 -261
  287. package/doc/ResponseError.html +0 -360
  288. package/doc/ResultSet.html +0 -633
  289. package/doc/SaslAuthenticator.html +0 -455
  290. package/doc/SaslMechanismBase.html +0 -506
  291. package/doc/SaslMechanismPlain.html +0 -925
  292. package/doc/SeedStrategy.html +0 -288
  293. package/doc/SubgraphStrategy.html +0 -387
  294. package/doc/TextP.html +0 -1440
  295. package/doc/Transaction.html +0 -655
  296. package/doc/Translator.html +0 -527
  297. package/doc/TraversalStrategies.html +0 -652
  298. package/doc/TraversalStrategy.html +0 -393
  299. package/doc/TypeSerializer.html +0 -166
  300. package/doc/driver_auth_authenticator.js.html +0 -89
  301. package/doc/driver_auth_mechanisms_sasl-mechanism-base.js.html +0 -103
  302. package/doc/driver_auth_mechanisms_sasl-mechanism-plain.js.html +0 -157
  303. package/doc/driver_auth_plain-text-sasl-authenticator.js.html +0 -106
  304. package/doc/driver_auth_sasl-authenticator.js.html +0 -100
  305. package/doc/driver_client.js.html +0 -250
  306. package/doc/driver_connection.js.html +0 -518
  307. package/doc/driver_driver-remote-connection.js.html +0 -193
  308. package/doc/driver_remote-connection.js.html +0 -198
  309. package/doc/driver_response-error.js.html +0 -98
  310. package/doc/driver_result-set.js.html +0 -134
  311. package/doc/fonts/OpenSans-Bold-webfont.eot +0 -0
  312. package/doc/fonts/OpenSans-Bold-webfont.svg +0 -1830
  313. package/doc/fonts/OpenSans-Bold-webfont.woff +0 -0
  314. package/doc/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  315. package/doc/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
  316. package/doc/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  317. package/doc/fonts/OpenSans-Italic-webfont.eot +0 -0
  318. package/doc/fonts/OpenSans-Italic-webfont.svg +0 -1830
  319. package/doc/fonts/OpenSans-Italic-webfont.woff +0 -0
  320. package/doc/fonts/OpenSans-Light-webfont.eot +0 -0
  321. package/doc/fonts/OpenSans-Light-webfont.svg +0 -1831
  322. package/doc/fonts/OpenSans-Light-webfont.woff +0 -0
  323. package/doc/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  324. package/doc/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
  325. package/doc/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  326. package/doc/fonts/OpenSans-Regular-webfont.eot +0 -0
  327. package/doc/fonts/OpenSans-Regular-webfont.svg +0 -1831
  328. package/doc/fonts/OpenSans-Regular-webfont.woff +0 -0
  329. package/doc/global.html +0 -728
  330. package/doc/index.html +0 -185
  331. package/doc/module.exports.html +0 -301
  332. package/doc/process_anonymous-traversal.js.html +0 -138
  333. package/doc/process_bytecode.js.html +0 -175
  334. package/doc/process_graph-traversal.js.html +0 -1936
  335. package/doc/process_transaction.js.html +0 -151
  336. package/doc/process_translator.js.html +0 -172
  337. package/doc/process_traversal-strategy.js.html +0 -466
  338. package/doc/process_traversal.js.html +0 -592
  339. package/doc/scripts/linenumber.js +0 -25
  340. package/doc/scripts/prettify/Apache-License-2.0.txt +0 -202
  341. package/doc/scripts/prettify/lang-css.js +0 -2
  342. package/doc/scripts/prettify/prettify.js +0 -28
  343. package/doc/structure_graph.js.html +0 -233
  344. package/doc/structure_io_binary_internals_DataType.js.html +0 -151
  345. package/doc/structure_io_binary_internals_GraphBinaryReader.js.html +0 -133
  346. package/doc/structure_io_binary_internals_GraphBinaryWriter.js.html +0 -136
  347. package/doc/structure_io_graph-serializer.js.html +0 -354
  348. package/doc/structure_io_type-serializers.js.html +0 -617
  349. package/doc/styles/jsdoc-default.css +0 -358
  350. package/doc/styles/prettify-jsdoc.css +0 -111
  351. package/doc/styles/prettify-tomorrow.css +0 -132
  352. package/doc/utils.js.html +0 -181
  353. package/docker-compose.yml +0 -76
  354. package/eslint.config.mjs +0 -143
  355. package/lib/driver/auth/mechanisms/sasl-mechanism-plain.js +0 -106
  356. package/lib/driver/auth/plain-text-sasl-authenticator.js +0 -55
  357. package/lib/driver/auth/sasl-authenticator.js +0 -49
  358. package/lib/driver/client.js +0 -199
  359. package/lib/driver/connection.js +0 -467
  360. package/lib/driver/driver-remote-connection.js +0 -142
  361. package/lib/driver/remote-connection.js +0 -147
  362. package/lib/driver/result-set.js +0 -83
  363. package/lib/process/anonymous-traversal.js +0 -87
  364. package/lib/process/bytecode.js +0 -124
  365. package/lib/process/graph-traversal.js +0 -1885
  366. package/lib/process/transaction.js +0 -100
  367. package/lib/process/translator.js +0 -121
  368. package/lib/process/traversal-strategy.js +0 -415
  369. package/lib/process/traversal.js +0 -541
  370. package/lib/structure/graph.js +0 -182
  371. package/lib/structure/io/binary/GraphBinary.js +0 -110
  372. package/lib/structure/io/binary/internals/AnySerializer.js +0 -100
  373. package/lib/structure/io/binary/internals/ArraySerializer.js +0 -137
  374. package/lib/structure/io/binary/internals/BigIntegerSerializer.js +0 -153
  375. package/lib/structure/io/binary/internals/BooleanSerializer.js +0 -105
  376. package/lib/structure/io/binary/internals/BulkSetSerializer.js +0 -126
  377. package/lib/structure/io/binary/internals/ByteBufferSerializer.js +0 -126
  378. package/lib/structure/io/binary/internals/ByteSerializer.js +0 -97
  379. package/lib/structure/io/binary/internals/BytecodeSerializer.js +0 -250
  380. package/lib/structure/io/binary/internals/ClassSerializer.js +0 -60
  381. package/lib/structure/io/binary/internals/DataType.js +0 -100
  382. package/lib/structure/io/binary/internals/DateSerializer.js +0 -105
  383. package/lib/structure/io/binary/internals/DoubleSerializer.js +0 -101
  384. package/lib/structure/io/binary/internals/EdgeSerializer.js +0 -216
  385. package/lib/structure/io/binary/internals/EnumSerializer.js +0 -152
  386. package/lib/structure/io/binary/internals/FloatSerializer.js +0 -101
  387. package/lib/structure/io/binary/internals/GraphBinaryReader.js +0 -82
  388. package/lib/structure/io/binary/internals/GraphBinaryWriter.js +0 -85
  389. package/lib/structure/io/binary/internals/IntSerializer.js +0 -114
  390. package/lib/structure/io/binary/internals/LambdaSerializer.js +0 -71
  391. package/lib/structure/io/binary/internals/LongSerializer.js +0 -109
  392. package/lib/structure/io/binary/internals/LongSerializerNg.js +0 -104
  393. package/lib/structure/io/binary/internals/MapSerializer.js +0 -155
  394. package/lib/structure/io/binary/internals/NumberSerializationStrategy.js +0 -73
  395. package/lib/structure/io/binary/internals/OffsetDateTimeSerializer.js +0 -151
  396. package/lib/structure/io/binary/internals/PSerializer.js +0 -152
  397. package/lib/structure/io/binary/internals/PathSerializer.js +0 -124
  398. package/lib/structure/io/binary/internals/PropertySerializer.js +0 -142
  399. package/lib/structure/io/binary/internals/SetSerializer.js +0 -134
  400. package/lib/structure/io/binary/internals/ShortSerializer.js +0 -101
  401. package/lib/structure/io/binary/internals/StringSerializer.js +0 -116
  402. package/lib/structure/io/binary/internals/TextPSerializer.js +0 -146
  403. package/lib/structure/io/binary/internals/TraversalStrategySerializer.js +0 -69
  404. package/lib/structure/io/binary/internals/TraverserSerializer.js +0 -124
  405. package/lib/structure/io/binary/internals/UnspecifiedNullSerializer.js +0 -77
  406. package/lib/structure/io/binary/internals/UuidSerializer.js +0 -121
  407. package/lib/structure/io/binary/internals/VertexPropertySerializer.js +0 -176
  408. package/lib/structure/io/binary/internals/VertexSerializer.js +0 -139
  409. package/lib/structure/io/graph-serializer.js +0 -303
  410. package/lib/structure/io/type-serializers.js +0 -566
  411. package/lib/utils.js +0 -130
@@ -0,0 +1,196 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ const traversal_js_1 = require("./traversal.cjs");
22
+ const traversal_strategy_js_1 = require("./traversal-strategy.cjs");
23
+ const utils_js_1 = require("../utils.cjs");
24
+ const graph_js_1 = require("../structure/graph.cjs");
25
+ class GremlinLang {
26
+ gremlin = '';
27
+ optionsStrategies = [];
28
+ parameters = new Map();
29
+ constructor(toClone) {
30
+ if (toClone) {
31
+ this.gremlin = toClone.gremlin;
32
+ this.optionsStrategies = [...toClone.optionsStrategies];
33
+ this.parameters = new Map(toClone.parameters);
34
+ }
35
+ }
36
+ getOptionsStrategies() {
37
+ return this.optionsStrategies;
38
+ }
39
+ addG(g) {
40
+ this.parameters.set('g', g);
41
+ }
42
+ getParameters() {
43
+ return this.parameters;
44
+ }
45
+ _predicateAsString(p) {
46
+ if (p.operator === 'and' || p.operator === 'or') {
47
+ return `${this._predicateAsString(p.value)}.${p.operator}(${this._predicateAsString(p.other)})`;
48
+ }
49
+ let result = p.operator + '(';
50
+ if (Array.isArray(p.value)) {
51
+ result += '[' + p.value.map(v => this._argAsString(v)).join(',') + ']';
52
+ }
53
+ else {
54
+ result += this._argAsString(p.value);
55
+ if (p.other !== undefined && p.other !== null) {
56
+ result += ',' + this._argAsString(p.other);
57
+ }
58
+ }
59
+ result += ')';
60
+ return result;
61
+ }
62
+ _argAsString(arg) {
63
+ if (arg === null || arg === undefined)
64
+ return 'null';
65
+ if (typeof arg === 'boolean')
66
+ return arg ? 'true' : 'false';
67
+ if (arg instanceof utils_js_1.Long) {
68
+ return String(arg.value) + 'L';
69
+ }
70
+ if (typeof arg === 'bigint') {
71
+ return String(arg) + 'N';
72
+ }
73
+ if (typeof arg === 'number') {
74
+ if (Number.isNaN(arg))
75
+ return 'NaN';
76
+ if (arg === Infinity)
77
+ return '+Infinity';
78
+ if (arg === -Infinity)
79
+ return '-Infinity';
80
+ if (!Number.isInteger(arg))
81
+ return String(arg) + 'D';
82
+ if (arg >= -2147483648 && arg <= 2147483647)
83
+ return String(arg);
84
+ // Outside safe integer range, values have lost precision and may exceed Java Long — emit as Double.
85
+ if (arg > Number.MAX_SAFE_INTEGER || arg < -Number.MAX_SAFE_INTEGER)
86
+ return String(arg) + 'D';
87
+ return String(arg) + 'L';
88
+ }
89
+ if (arg instanceof Date) {
90
+ const iso = arg.toISOString();
91
+ return `datetime("${iso}")`;
92
+ }
93
+ if (typeof arg === 'string') {
94
+ // JSON.stringify handles all special character escaping in one call.
95
+ // Strip the outer double quotes and re-wrap in single quotes for Gremlin.
96
+ const escaped = JSON.stringify(arg).slice(1, -1).replace(/'/g, "\\'");
97
+ return `'${escaped}'`;
98
+ }
99
+ if (arg instanceof traversal_js_1.P || arg instanceof traversal_js_1.TextP) {
100
+ return this._predicateAsString(arg);
101
+ }
102
+ if (arg instanceof traversal_js_1.EnumValue) {
103
+ return arg.toString();
104
+ }
105
+ if (arg instanceof traversal_strategy_js_1.TraversalStrategy && !(arg instanceof traversal_strategy_js_1.OptionsStrategy)) {
106
+ const simpleName = arg.strategyName;
107
+ const configEntries = Object.entries(arg.configuration);
108
+ if (configEntries.length === 0) {
109
+ return simpleName;
110
+ }
111
+ const configStr = configEntries.map(([k, v]) => `${k}:${this._argAsString(v)}`).join(',');
112
+ return `new ${simpleName}(${configStr})`;
113
+ }
114
+ if (typeof arg === 'function' && arg.prototype instanceof traversal_strategy_js_1.TraversalStrategy) {
115
+ return arg.name;
116
+ }
117
+ if (arg instanceof graph_js_1.Vertex) {
118
+ return this._argAsString(arg.id);
119
+ }
120
+ if (arg instanceof GremlinLang) {
121
+ return arg.getGremlin('__');
122
+ }
123
+ if (typeof arg.getGremlinLang === 'function') {
124
+ // This is a Traversal - render as anonymous traversal
125
+ if (arg.graph != null) {
126
+ throw new Error('Child traversal must be anonymous - use __ not g');
127
+ }
128
+ return arg.getGremlinLang().getGremlin('__');
129
+ }
130
+ if (arg instanceof Set) {
131
+ const items = [...arg];
132
+ if (items.length === 0)
133
+ return '{}';
134
+ return '{' + items.map(a => this._argAsString(a)).join(',') + '}';
135
+ }
136
+ if (arg instanceof Map) {
137
+ if (arg.size === 0)
138
+ return '[:]';
139
+ const entries = [];
140
+ arg.forEach((v, k) => {
141
+ const ks = this._argAsString(k);
142
+ const vs = this._argAsString(v);
143
+ entries.push(typeof k === 'string' ? `${ks}:${vs}` : `(${ks}):${vs}`);
144
+ });
145
+ return '[' + entries.join(',') + ']';
146
+ }
147
+ if (Array.isArray(arg)) {
148
+ return '[' + arg.map(a => this._argAsString(a)).join(',') + ']';
149
+ }
150
+ if (typeof arg === 'object' && arg.constructor === Object) {
151
+ const entries = Object.entries(arg);
152
+ if (entries.length === 0)
153
+ return '[:]';
154
+ return '[' + entries.map(([k, v]) => `${this._argAsString(k)}:${this._argAsString(v)}`).join(',') + ']';
155
+ }
156
+ return String(arg);
157
+ }
158
+ addStep(name, args) {
159
+ const argsStr = args?.length ? args.map(a => this._argAsString(a)).join(',') : '';
160
+ this.gremlin += `.${name}(${argsStr})`;
161
+ return this;
162
+ }
163
+ addSource(name, args) {
164
+ if (name === 'CardinalityValueTraversal' && args) {
165
+ const card = args[0];
166
+ this.gremlin += `Cardinality.${card.elementName}(${this._argAsString(args[1])})`;
167
+ return this;
168
+ }
169
+ if (name === 'withStrategies' && args) {
170
+ const nonOptionsStrategies = [];
171
+ for (const strategy of args) {
172
+ if (strategy instanceof traversal_strategy_js_1.OptionsStrategy) {
173
+ this.optionsStrategies.push(strategy);
174
+ }
175
+ else {
176
+ nonOptionsStrategies.push(strategy);
177
+ }
178
+ }
179
+ if (nonOptionsStrategies.length > 0) {
180
+ const argsStr = nonOptionsStrategies.map(a => this._argAsString(a)).join(',');
181
+ this.gremlin += `.withStrategies(${argsStr})`;
182
+ }
183
+ return this;
184
+ }
185
+ const argsStr = args?.length ? args.map(a => this._argAsString(a)).join(',') : '';
186
+ this.gremlin += `.${name}(${argsStr})`;
187
+ return this;
188
+ }
189
+ getGremlin(prefix = 'g') {
190
+ if (this.gremlin.length > 0 && this.gremlin[0] !== '.') {
191
+ return this.gremlin;
192
+ }
193
+ return prefix + this.gremlin;
194
+ }
195
+ }
196
+ exports.default = GremlinLang;
@@ -0,0 +1,15 @@
1
+ import { OptionsStrategy } from './traversal-strategy.cjs';
2
+ export default class GremlinLang {
3
+ private gremlin;
4
+ private optionsStrategies;
5
+ private parameters;
6
+ constructor(toClone?: GremlinLang);
7
+ getOptionsStrategies(): OptionsStrategy[];
8
+ addG(g: string): void;
9
+ getParameters(): Map<string, any>;
10
+ private _predicateAsString;
11
+ private _argAsString;
12
+ addStep(name: string, args?: any[]): GremlinLang;
13
+ addSource(name: string, args?: any[]): GremlinLang;
14
+ getGremlin(prefix?: string): string;
15
+ }
@@ -0,0 +1,69 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.Transaction = void 0;
22
+ /**
23
+ * A controller for a remote transaction that is constructed from <code>g.tx()</code>. Calling <code>begin()</code>
24
+ * on this object will produce a new <code>GraphTraversalSource</code> that is bound to a remote transaction over which
25
+ * multiple traversals may be executed in that context. Calling <code>commit()</code> or <code>rollback()</code> will
26
+ * then close the transaction and thus, the session. This feature only works with transaction enabled graphs.
27
+ */
28
+ class Transaction {
29
+ g;
30
+ _sessionBasedConnection = undefined;
31
+ constructor(g) {
32
+ this.g = g;
33
+ }
34
+ /**
35
+ * Spawns a <code>GraphTraversalSource</code> that is bound to a remote session which enables a transaction.
36
+ * @returns {GraphTraversalSource}
37
+ */
38
+ begin() {
39
+ throw new Error("Transactions are not yet implemented");
40
+ }
41
+ /**
42
+ * @returns {Promise}
43
+ */
44
+ commit() {
45
+ throw new Error("Transactions are not yet implemented");
46
+ }
47
+ /**
48
+ * @returns {Promise}
49
+ */
50
+ rollback() {
51
+ throw new Error("Transactions are not yet implemented");
52
+ }
53
+ /**
54
+ * Returns true if transaction is open.
55
+ * @returns {Boolean}
56
+ */
57
+ get isOpen() {
58
+ return this._sessionBasedConnection?.isOpen ?? false;
59
+ }
60
+ /**
61
+ * @returns {Promise}
62
+ */
63
+ async close() {
64
+ if (this._sessionBasedConnection) {
65
+ this._sessionBasedConnection.close();
66
+ }
67
+ }
68
+ }
69
+ exports.Transaction = Transaction;
@@ -0,0 +1,34 @@
1
+ import { GraphTraversalSource } from './graph-traversal.cjs';
2
+ /**
3
+ * A controller for a remote transaction that is constructed from <code>g.tx()</code>. Calling <code>begin()</code>
4
+ * on this object will produce a new <code>GraphTraversalSource</code> that is bound to a remote transaction over which
5
+ * multiple traversals may be executed in that context. Calling <code>commit()</code> or <code>rollback()</code> will
6
+ * then close the transaction and thus, the session. This feature only works with transaction enabled graphs.
7
+ */
8
+ export declare class Transaction {
9
+ private readonly g;
10
+ private _sessionBasedConnection?;
11
+ constructor(g: GraphTraversalSource);
12
+ /**
13
+ * Spawns a <code>GraphTraversalSource</code> that is bound to a remote session which enables a transaction.
14
+ * @returns {GraphTraversalSource}
15
+ */
16
+ begin(): GraphTraversalSource;
17
+ /**
18
+ * @returns {Promise}
19
+ */
20
+ commit(): Promise<void>;
21
+ /**
22
+ * @returns {Promise}
23
+ */
24
+ rollback(): Promise<void>;
25
+ /**
26
+ * Returns true if transaction is open.
27
+ * @returns {Boolean}
28
+ */
29
+ get isOpen(): boolean;
30
+ /**
31
+ * @returns {Promise}
32
+ */
33
+ close(): Promise<void>;
34
+ }
@@ -0,0 +1,360 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.SeedStrategy = exports.StandardVerificationStrategy = exports.VertexProgramRestrictionStrategy = exports.ReservedKeysVerificationStrategy = exports.EdgeLabelVerificationStrategy = exports.ReadOnlyStrategy = exports.LambdaRestrictionStrategy = exports.ComputerVerificationStrategy = exports.EarlyLimitStrategy = exports.GraphFilterStrategy = exports.RepeatUnrollStrategy = exports.CountStrategy = exports.PathRetractionStrategy = exports.PathProcessorStrategy = exports.OrderLimitStrategy = exports.MatchPredicateStrategy = exports.LazyBarrierStrategy = exports.InlineFilterStrategy = exports.IncidentToAdjacentStrategy = exports.IdentityRemovalStrategy = exports.ByModulatorOptimizationStrategy = exports.FilterRankingStrategy = exports.AdjacentToIncidentStrategy = exports.ComputerFinalizationStrategy = exports.MatchAlgorithmStrategy = exports.VertexProgramStrategy = exports.ReferenceElementStrategy = exports.ProductiveByStrategy = exports.SubgraphStrategy = exports.ProfileStrategy = exports.PartitionStrategy = exports.OptionsStrategy = exports.MessagePassingReductionStrategy = exports.HaltedTraverserStrategy = exports.ElementIdStrategy = exports.ConnectiveStrategy = exports.TraversalStrategy = exports.TraversalStrategies = void 0;
22
+ const traversal_js_1 = require("./traversal.cjs");
23
+ class TraversalStrategies {
24
+ strategies;
25
+ /**
26
+ * Creates a new instance of TraversalStrategies.
27
+ * @param {TraversalStrategies} [parent] The parent strategies from where to clone the values from.
28
+ */
29
+ constructor(parent) {
30
+ if (parent) {
31
+ // Clone the strategies
32
+ this.strategies = [...parent.strategies];
33
+ }
34
+ else {
35
+ this.strategies = [];
36
+ }
37
+ }
38
+ /** @param {TraversalStrategy} strategy */
39
+ addStrategy(strategy) {
40
+ this.strategies.push(strategy);
41
+ }
42
+ /** @param {TraversalStrategy} strategy */
43
+ removeStrategy(strategy) {
44
+ const idx = this.strategies.findIndex((s) => s.strategyName === strategy.strategyName);
45
+ if (idx !== -1) {
46
+ return this.strategies.splice(idx, 1)[0];
47
+ }
48
+ return undefined;
49
+ }
50
+ /**
51
+ * @param {Traversal} traversal
52
+ * @returns {Promise}
53
+ */
54
+ applyStrategies(traversal) {
55
+ // Apply all strategies serially
56
+ return this.strategies.reduce((promise, strategy) => promise.then(() => strategy.apply(traversal)), Promise.resolve());
57
+ }
58
+ }
59
+ exports.TraversalStrategies = TraversalStrategies;
60
+ class TraversalStrategy {
61
+ configuration;
62
+ connection;
63
+ strategyName;
64
+ /**
65
+ * @param {TraversalStrategyConfiguration} configuration for the strategy
66
+ */
67
+ constructor(configuration = {}) {
68
+ this.configuration = configuration;
69
+ this.strategyName = this.constructor.name;
70
+ }
71
+ /**
72
+ * @abstract
73
+ * @param {Traversal} traversal
74
+ * @returns {Promise}
75
+ */
76
+ async apply(traversal) { }
77
+ }
78
+ exports.TraversalStrategy = TraversalStrategy;
79
+ class ConnectiveStrategy extends TraversalStrategy {
80
+ constructor() {
81
+ super();
82
+ }
83
+ }
84
+ exports.ConnectiveStrategy = ConnectiveStrategy;
85
+ class ElementIdStrategy extends TraversalStrategy {
86
+ constructor() {
87
+ super();
88
+ }
89
+ }
90
+ exports.ElementIdStrategy = ElementIdStrategy;
91
+ class HaltedTraverserStrategy extends TraversalStrategy {
92
+ /**
93
+ * @param {String} haltedTraverserFactory full qualified class name in Java of a `HaltedTraverserFactory` implementation
94
+ */
95
+ constructor({ haltedTraverserFactory = "" }) {
96
+ super({ haltedTraverserFactory: haltedTraverserFactory });
97
+ }
98
+ }
99
+ exports.HaltedTraverserStrategy = HaltedTraverserStrategy;
100
+ class MessagePassingReductionStrategy extends TraversalStrategy {
101
+ constructor() {
102
+ super();
103
+ }
104
+ }
105
+ exports.MessagePassingReductionStrategy = MessagePassingReductionStrategy;
106
+ class OptionsStrategy extends TraversalStrategy {
107
+ constructor(options) {
108
+ super(options);
109
+ }
110
+ }
111
+ exports.OptionsStrategy = OptionsStrategy;
112
+ class PartitionStrategy extends TraversalStrategy {
113
+ /**
114
+ * @param options
115
+ * @param options.partitionKey - name of the property key to partition by
116
+ * @param options.writePartition - the value of the currently write partition
117
+ * @param options.readPartitions - list of strings representing the partitions to include for reads
118
+ * @param options.includeMetaProperties - determines if meta-properties should be included in partitioning defaulting to false
119
+ */
120
+ constructor({ partitionKey, writePartition, readPartitions, includeMetaProperties } = {}) {
121
+ const config = {};
122
+ if (partitionKey !== undefined)
123
+ config.partitionKey = partitionKey;
124
+ if (writePartition !== undefined)
125
+ config.writePartition = writePartition;
126
+ if (readPartitions !== undefined)
127
+ config.readPartitions = readPartitions;
128
+ if (includeMetaProperties !== undefined)
129
+ config.includeMetaProperties = includeMetaProperties;
130
+ super(config);
131
+ }
132
+ }
133
+ exports.PartitionStrategy = PartitionStrategy;
134
+ class ProfileStrategy extends TraversalStrategy {
135
+ constructor() {
136
+ super();
137
+ }
138
+ }
139
+ exports.ProfileStrategy = ProfileStrategy;
140
+ class SubgraphStrategy extends TraversalStrategy {
141
+ /**
142
+ * @param options
143
+ * @param options.vertices - traversal to filter vertices
144
+ * @param options.edges - traversal to filter edges
145
+ * @param options.vertexProperties - traversal to filter vertex properties
146
+ * @param options.checkAdjacentVertices - enables the strategy to apply the `vertices` filter to the adjacent vertices of an edge.
147
+ */
148
+ constructor({ vertices, edges, vertexProperties, checkAdjacentVertices } = {}) {
149
+ const config = {};
150
+ if (vertices !== undefined)
151
+ config.vertices = vertices instanceof traversal_js_1.Traversal ? vertices.gremlinLang : vertices;
152
+ if (edges !== undefined)
153
+ config.edges = edges instanceof traversal_js_1.Traversal ? edges.gremlinLang : edges;
154
+ if (vertexProperties !== undefined)
155
+ config.vertexProperties = vertexProperties instanceof traversal_js_1.Traversal ? vertexProperties.gremlinLang : vertexProperties;
156
+ if (checkAdjacentVertices !== undefined)
157
+ config.checkAdjacentVertices = checkAdjacentVertices;
158
+ super(config);
159
+ }
160
+ }
161
+ exports.SubgraphStrategy = SubgraphStrategy;
162
+ class ProductiveByStrategy extends TraversalStrategy {
163
+ /**
164
+ * @param options
165
+ * @param options.productiveKeys - set of keys that will always be productive
166
+ */
167
+ constructor({ productiveKeys = [] } = {}) {
168
+ super({ productiveKeys });
169
+ }
170
+ }
171
+ exports.ProductiveByStrategy = ProductiveByStrategy;
172
+ class ReferenceElementStrategy extends TraversalStrategy {
173
+ constructor() {
174
+ super();
175
+ }
176
+ }
177
+ exports.ReferenceElementStrategy = ReferenceElementStrategy;
178
+ class VertexProgramStrategy extends TraversalStrategy {
179
+ constructor(options) {
180
+ super(options);
181
+ }
182
+ }
183
+ exports.VertexProgramStrategy = VertexProgramStrategy;
184
+ class MatchAlgorithmStrategy extends TraversalStrategy {
185
+ /**
186
+ * @param matchAlgorithm
187
+ */
188
+ constructor({ matchAlgorithm = "" }) {
189
+ super({ matchAlgorithm: matchAlgorithm });
190
+ }
191
+ }
192
+ exports.MatchAlgorithmStrategy = MatchAlgorithmStrategy;
193
+ class ComputerFinalizationStrategy extends TraversalStrategy {
194
+ constructor() {
195
+ super();
196
+ }
197
+ }
198
+ exports.ComputerFinalizationStrategy = ComputerFinalizationStrategy;
199
+ class AdjacentToIncidentStrategy extends TraversalStrategy {
200
+ constructor() {
201
+ super();
202
+ }
203
+ }
204
+ exports.AdjacentToIncidentStrategy = AdjacentToIncidentStrategy;
205
+ class FilterRankingStrategy extends TraversalStrategy {
206
+ constructor() {
207
+ super();
208
+ }
209
+ }
210
+ exports.FilterRankingStrategy = FilterRankingStrategy;
211
+ class ByModulatorOptimizationStrategy extends TraversalStrategy {
212
+ constructor() {
213
+ super();
214
+ }
215
+ }
216
+ exports.ByModulatorOptimizationStrategy = ByModulatorOptimizationStrategy;
217
+ class IdentityRemovalStrategy extends TraversalStrategy {
218
+ constructor() {
219
+ super();
220
+ }
221
+ }
222
+ exports.IdentityRemovalStrategy = IdentityRemovalStrategy;
223
+ class IncidentToAdjacentStrategy extends TraversalStrategy {
224
+ constructor() {
225
+ super();
226
+ }
227
+ }
228
+ exports.IncidentToAdjacentStrategy = IncidentToAdjacentStrategy;
229
+ class InlineFilterStrategy extends TraversalStrategy {
230
+ constructor() {
231
+ super();
232
+ }
233
+ }
234
+ exports.InlineFilterStrategy = InlineFilterStrategy;
235
+ class LazyBarrierStrategy extends TraversalStrategy {
236
+ constructor() {
237
+ super();
238
+ }
239
+ }
240
+ exports.LazyBarrierStrategy = LazyBarrierStrategy;
241
+ class MatchPredicateStrategy extends TraversalStrategy {
242
+ constructor() {
243
+ super();
244
+ }
245
+ }
246
+ exports.MatchPredicateStrategy = MatchPredicateStrategy;
247
+ class OrderLimitStrategy extends TraversalStrategy {
248
+ constructor() {
249
+ super();
250
+ }
251
+ }
252
+ exports.OrderLimitStrategy = OrderLimitStrategy;
253
+ class PathProcessorStrategy extends TraversalStrategy {
254
+ constructor() {
255
+ super();
256
+ }
257
+ }
258
+ exports.PathProcessorStrategy = PathProcessorStrategy;
259
+ class PathRetractionStrategy extends TraversalStrategy {
260
+ constructor() {
261
+ super();
262
+ }
263
+ }
264
+ exports.PathRetractionStrategy = PathRetractionStrategy;
265
+ class CountStrategy extends TraversalStrategy {
266
+ constructor() {
267
+ super();
268
+ }
269
+ }
270
+ exports.CountStrategy = CountStrategy;
271
+ class RepeatUnrollStrategy extends TraversalStrategy {
272
+ constructor() {
273
+ super();
274
+ }
275
+ }
276
+ exports.RepeatUnrollStrategy = RepeatUnrollStrategy;
277
+ class GraphFilterStrategy extends TraversalStrategy {
278
+ constructor() {
279
+ super();
280
+ }
281
+ }
282
+ exports.GraphFilterStrategy = GraphFilterStrategy;
283
+ class EarlyLimitStrategy extends TraversalStrategy {
284
+ constructor() {
285
+ super();
286
+ }
287
+ }
288
+ exports.EarlyLimitStrategy = EarlyLimitStrategy;
289
+ class ComputerVerificationStrategy extends TraversalStrategy {
290
+ constructor() {
291
+ super();
292
+ }
293
+ }
294
+ exports.ComputerVerificationStrategy = ComputerVerificationStrategy;
295
+ class LambdaRestrictionStrategy extends TraversalStrategy {
296
+ constructor() {
297
+ super();
298
+ }
299
+ }
300
+ exports.LambdaRestrictionStrategy = LambdaRestrictionStrategy;
301
+ class ReadOnlyStrategy extends TraversalStrategy {
302
+ constructor() {
303
+ super();
304
+ }
305
+ }
306
+ exports.ReadOnlyStrategy = ReadOnlyStrategy;
307
+ class EdgeLabelVerificationStrategy extends TraversalStrategy {
308
+ /**
309
+ * @param options
310
+ * @param options.logWarnings - determines if warnings should be written to the logger when verification fails
311
+ * @param options.throwException - determines if exceptions should be thrown when verifications fails
312
+ */
313
+ constructor({ logWarnings = false, throwException = false } = {}) {
314
+ super({
315
+ logWarnings: logWarnings,
316
+ throwException: throwException,
317
+ });
318
+ }
319
+ }
320
+ exports.EdgeLabelVerificationStrategy = EdgeLabelVerificationStrategy;
321
+ class ReservedKeysVerificationStrategy extends TraversalStrategy {
322
+ /**
323
+ * @param options
324
+ * @param options.logWarnings - determines if warnings should be written to the logger when verification fails
325
+ * @param options.throwException - determines if exceptions should be thrown when verifications fails
326
+ * @param options.keys - the list of reserved keys to verify
327
+ */
328
+ constructor({ logWarnings = false, throwException = false, keys = ['id', 'label'] } = {}) {
329
+ super({
330
+ logWarnings: logWarnings,
331
+ throwException: throwException,
332
+ keys: keys,
333
+ });
334
+ }
335
+ }
336
+ exports.ReservedKeysVerificationStrategy = ReservedKeysVerificationStrategy;
337
+ class VertexProgramRestrictionStrategy extends TraversalStrategy {
338
+ constructor() {
339
+ super();
340
+ }
341
+ }
342
+ exports.VertexProgramRestrictionStrategy = VertexProgramRestrictionStrategy;
343
+ class StandardVerificationStrategy extends TraversalStrategy {
344
+ constructor() {
345
+ super();
346
+ }
347
+ }
348
+ exports.StandardVerificationStrategy = StandardVerificationStrategy;
349
+ class SeedStrategy extends TraversalStrategy {
350
+ /**
351
+ * @param {SeedStrategyOptions} [options]
352
+ * @param {number} [options.seed] the seed to provide to the random number generator for the traversal
353
+ */
354
+ constructor(options) {
355
+ super({
356
+ seed: options.seed,
357
+ });
358
+ }
359
+ }
360
+ exports.SeedStrategy = SeedStrategy;