Skip to content

Commit 077f8b4

Browse files
Add analyze endpoint to rust driver (#794)
## Usage and product changes Adds support for the analyze endpoint to rust driver. ## Implementation Implement protocol serialization/deserialization and request/response handling.
1 parent 3dbe8c5 commit 077f8b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2811
-469
lines changed

Cargo.lock

Lines changed: 606 additions & 448 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dependencies/typedb/artifacts.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def typedb_artifact():
2525
artifact_name = "typedb-all-{platform}-{version}.{ext}",
2626
tag_source = deployment["artifact"]["release"]["download"],
2727
commit_source = deployment["artifact"]["snapshot"]["download"],
28-
tag = "3.5.4"
28+
commit = "429639dfbfced5dcf79d773c455e58fb485ccfda"
2929
)
3030

3131
#def typedb_cloud_artifact():

dependencies/typedb/repositories.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ def typedb_protocol():
2828
git_repository(
2929
name = "typedb_protocol",
3030
remote = "https://github.com/typedb/typedb-protocol",
31-
tag = "3.4.0", # sync-marker: do not remove this comment, this is used for sync-dependencies by @typedb_protocol
31+
commit = "9d446848f69867b5d921793e6a7c77f8e035b150", # sync-marker: do not remove this comment, this is used for sync-dependencies by @typedb_protocol
3232
)
3333

3434
def typedb_behaviour():
3535
git_repository(
3636
name = "typedb_behaviour",
37-
remote = "https://github.com/typedb/typedb-behaviour",
38-
commit = "095a58cb823dd8436600526ceb3ff2c0bdf377f9", # sync-marker: do not remove this comment, this is used for sync-dependencies by @typedb_behaviour
37+
remote = "https://github.com/krishnangovindraj/typedb-behaviour",
38+
commit = "69f45dd45e175319c855f0991d0161fcaf90b5ac", # sync-marker: do not remove this comment, this is used for sync-dependencies by @typedb_behaviour
3939
)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[#_struct_AnalyzedQuery]
2+
=== AnalyzedQuery
3+
4+
*Implements traits:*
5+
6+
* `Clone`
7+
* `Debug`
8+
9+
An ``AnalyzedQuery`` contains the server’s representation of the query and preamble functions; as well as the result of types inferred for each variable by type-inference.
10+
11+
[caption=""]
12+
.Fields
13+
// tag::properties[]
14+
[cols=",,"]
15+
[options="header"]
16+
|===
17+
|Name |Type |Description
18+
a| `fetch` a| `Option<Fetch>` a|
19+
a| `preamble` a| `Vec<Function>` a|
20+
a| `query` a| `Pipeline` a|
21+
a| `source` a| `String` a|
22+
|===
23+
// end::properties[]
24+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[#_enum_Comparator]
2+
=== Comparator
3+
4+
A representation of the comparator used in a comparison constraint.
5+
6+
[caption=""]
7+
.Enum variants
8+
// tag::enum_constants[]
9+
[cols=""]
10+
[options="header"]
11+
|===
12+
|Variant
13+
a| `Contains = 7`
14+
a| `Equal = 0`
15+
a| `Greater = 4`
16+
a| `GreaterOrEqual = 5`
17+
a| `LessOrEqual = 3`
18+
a| `LessThan = 2`
19+
a| `Like = 6`
20+
a| `NotEqual = 1`
21+
|===
22+
// end::enum_constants[]
23+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[#_struct_Conjunction]
2+
=== Conjunction
3+
4+
*Implements traits:*
5+
6+
* `Clone`
7+
* `Debug`
8+
9+
A representation of the constraints involved in the query, and types inferred for each variable.
10+
11+
[caption=""]
12+
.Fields
13+
// tag::properties[]
14+
[cols=",,"]
15+
[options="header"]
16+
|===
17+
|Name |Type |Description
18+
a| `constraints` a| `Vec<ConstraintWithSpan>` a|
19+
a| `variable_annotations` a| `HashMap<Variable, VariableAnnotations>` a|
20+
|===
21+
// end::properties[]
22+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[#_struct_ConjunctionID]
2+
=== ConjunctionID
3+
4+
*Implements traits:*
5+
6+
* `Clone`
7+
* `Copy`
8+
* `Debug`
9+
10+
Holds the index of the conjunction in a ``Pipeline``’s ``conjunctions`` field. Used as indirection in the representation of a pipeline.
11+
12+
[caption=""]
13+
.Fields
14+
// tag::properties[]
15+
[cols=",,"]
16+
[options="header"]
17+
|===
18+
|Name |Type |Description
19+
a| `0` a| `usize` a|
20+
|===
21+
// end::properties[]
22+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[#_enum_Constraint]
2+
=== Constraint
3+
4+
The constraints making up a conjunction.
5+
6+
[caption=""]
7+
.Enum variants
8+
// tag::enum_constants[]
9+
[cols=""]
10+
[options="header"]
11+
|===
12+
|Variant
13+
a| `Comparison`
14+
a| `Expression`
15+
a| `FunctionCall`
16+
a| `Has`
17+
a| `Iid`
18+
a| `Is`
19+
a| `Isa`
20+
a| `Kind`
21+
a| `Label`
22+
a| `Links`
23+
a| `Not`
24+
a| `Or`
25+
a| `Owns`
26+
a| `Plays`
27+
a| `Relates`
28+
a| `Sub`
29+
a| `Try`
30+
a| `Value`
31+
|===
32+
// end::enum_constants[]
33+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[#_enum_ConstraintExactness]
2+
=== ConstraintExactness
3+
4+
Tells apart exact variants of constraints from the ones allowing subtype-polymorphism. e.g. <code>isa!</code> would be represented as an <code>Constraint::Isa</code> with its exactness field <code>ConstraintExactness::Exact</code>.
5+
6+
[caption=""]
7+
.Enum variants
8+
// tag::enum_constants[]
9+
[cols=""]
10+
[options="header"]
11+
|===
12+
|Variant
13+
a| `Exact = 0`
14+
a| `Subtypes = 1`
15+
|===
16+
// end::enum_constants[]
17+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[#_struct_ConstraintSpan]
2+
=== ConstraintSpan
3+
4+
*Implements traits:*
5+
6+
* `Clone`
7+
* `Debug`
8+

0 commit comments

Comments
 (0)