gqlite 1.5.1 → 1.7.0
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.
- checksums.yaml +4 -4
- data/ext/Cargo.toml +10 -4
- data/ext/db-index/Cargo.toml +29 -0
- data/ext/db-index/src/hnsw/error.rs +66 -0
- data/ext/db-index/src/hnsw/graph_store.rs +272 -0
- data/ext/db-index/src/hnsw/id.rs +36 -0
- data/ext/db-index/src/hnsw/implementation.rs +1517 -0
- data/ext/db-index/src/hnsw/kernels.rs +1228 -0
- data/ext/db-index/src/hnsw/metric.rs +244 -0
- data/ext/db-index/src/hnsw/scalar.rs +72 -0
- data/ext/db-index/src/hnsw/simple_store.rs +140 -0
- data/ext/db-index/src/hnsw/store.rs +472 -0
- data/ext/db-index/src/hnsw/vector.rs +105 -0
- data/ext/db-index/src/hnsw/vectors.rs +568 -0
- data/ext/db-index/src/hnsw.rs +42 -0
- data/ext/db-index/src/lib.rs +3 -0
- data/ext/gqlitedb/Cargo.toml +19 -9
- data/ext/gqlitedb/benches/common/pokec.rs +62 -2
- data/ext/gqlitedb/benches/pokec_divan.rs +66 -2
- data/ext/gqlitedb/benches/pokec_iai.rs +60 -3
- data/ext/gqlitedb/release.toml +2 -2
- data/ext/gqlitedb/src/aggregators/arithmetic.rs +3 -1
- data/ext/gqlitedb/src/aggregators/containers.rs +1 -1
- data/ext/gqlitedb/src/aggregators/stats.rs +21 -12
- data/ext/gqlitedb/src/capi.rs +1 -1
- data/ext/gqlitedb/src/compiler/expression_analyser.rs +28 -20
- data/ext/gqlitedb/src/compiler/variables_manager.rs +97 -29
- data/ext/gqlitedb/src/compiler.rs +505 -225
- data/ext/gqlitedb/src/connection.rs +149 -11
- data/ext/gqlitedb/src/consts.rs +1 -2
- data/ext/gqlitedb/src/error.rs +123 -61
- data/ext/gqlitedb/src/functions/common.rs +39 -2
- data/ext/gqlitedb/src/functions/math.rs +8 -3
- data/ext/gqlitedb/src/functions/path.rs +48 -11
- data/ext/gqlitedb/src/functions/value.rs +1 -1
- data/ext/gqlitedb/src/functions.rs +23 -7
- data/ext/gqlitedb/src/graph.rs +1 -9
- data/ext/gqlitedb/src/interpreter/evaluators.rs +968 -130
- data/ext/gqlitedb/src/interpreter/instructions.rs +39 -2
- data/ext/gqlitedb/src/lib.rs +5 -4
- data/ext/gqlitedb/src/planner.rs +329 -0
- data/ext/gqlitedb/src/prelude.rs +3 -3
- data/ext/gqlitedb/src/store/pgrx.rs +1 -1
- data/ext/gqlitedb/src/store/postgres.rs +735 -7
- data/ext/gqlitedb/src/store/redb/hnsw_store.rs +702 -0
- data/ext/gqlitedb/src/store/redb/index.rs +274 -0
- data/ext/gqlitedb/src/store/redb.rs +1268 -113
- data/ext/gqlitedb/src/store/sqlbase/sqlmetadata.rs +28 -0
- data/ext/gqlitedb/src/store/sqlbase/sqlstore.rs +103 -0
- data/ext/gqlitedb/src/store/sqlbase.rs +146 -16
- data/ext/gqlitedb/src/store/sqlite.rs +569 -5
- data/ext/gqlitedb/src/store/vector_extract.rs +56 -0
- data/ext/gqlitedb/src/store.rs +123 -3
- data/ext/gqlitedb/src/tests/compiler.rs +207 -10
- data/ext/gqlitedb/src/tests/connection/postgres.rs +38 -3
- data/ext/gqlitedb/src/tests/connection/redb.rs +23 -0
- data/ext/gqlitedb/src/tests/connection/sqlite.rs +31 -0
- data/ext/gqlitedb/src/tests/connection.rs +61 -1
- data/ext/gqlitedb/src/tests/evaluators.rs +162 -7
- data/ext/gqlitedb/src/tests/parser.rs +54 -23
- data/ext/gqlitedb/src/tests/planner.rs +511 -0
- data/ext/gqlitedb/src/tests/store/postgres.rs +7 -0
- data/ext/gqlitedb/src/tests/store/redb.rs +8 -0
- data/ext/gqlitedb/src/tests/store/sqlite.rs +8 -0
- data/ext/gqlitedb/src/tests/store/vector_index/postgres.rs +182 -0
- data/ext/gqlitedb/src/tests/store/vector_index/redb.rs +386 -0
- data/ext/gqlitedb/src/tests/store/vector_index/sqlite.rs +166 -0
- data/ext/gqlitedb/src/tests/store/vector_index.rs +2313 -0
- data/ext/gqlitedb/src/tests/store.rs +78 -14
- data/ext/gqlitedb/src/tests/templates/ast.rs +92 -16
- data/ext/gqlitedb/src/tests/templates/programs.rs +14 -7
- data/ext/gqlitedb/src/tests.rs +15 -9
- data/ext/gqlitedb/src/utils.rs +6 -1
- data/ext/gqlitedb/src/value/compare.rs +61 -3
- data/ext/gqlitedb/src/value.rs +136 -7
- data/ext/gqlitedb/templates/sql/postgres/metadata_delete.sql +1 -0
- data/ext/gqlitedb/templates/sql/postgres/node_select.sql +1 -1
- data/ext/gqlitedb/templates/sql/sqlite/metadata_delete.sql +1 -0
- data/ext/gqliterb/src/lib.rs +53 -8
- data/ext/gqlparser/Cargo.toml +25 -0
- data/ext/gqlparser/README.MD +9 -0
- data/ext/gqlparser/benches/pokec_divan.rs +34 -0
- data/ext/gqlparser/src/common.rs +69 -0
- data/ext/gqlparser/src/gqls/ast.rs +69 -0
- data/ext/gqlparser/src/gqls/constraint.rs +79 -0
- data/ext/gqlparser/src/gqls/error.rs +22 -0
- data/ext/gqlparser/src/gqls/parser.rs +813 -0
- data/ext/gqlparser/src/gqls/prelude.rs +8 -0
- data/ext/gqlparser/src/gqls/properties.rs +115 -0
- data/ext/gqlparser/src/gqls/resolve.rs +207 -0
- data/ext/gqlparser/src/gqls.rs +265 -0
- data/ext/gqlparser/src/lib.rs +7 -0
- data/ext/gqlparser/src/oc/ast.rs +680 -0
- data/ext/gqlparser/src/oc/error.rs +172 -0
- data/ext/gqlparser/src/oc/lexer.rs +429 -0
- data/ext/gqlparser/src/oc/parser/tests.rs +2284 -0
- data/ext/gqlparser/src/oc/parser.rs +2005 -0
- data/ext/gqlparser/src/oc.rs +33 -0
- data/ext/gqlparser/src/prelude.rs +3 -0
- data/ext/graphcore/Cargo.toml +1 -0
- data/ext/graphcore/src/error.rs +26 -0
- data/ext/graphcore/src/graph.rs +177 -51
- data/ext/graphcore/src/lib.rs +4 -2
- data/ext/graphcore/src/open_cypher.rs +12 -0
- data/ext/graphcore/src/table.rs +50 -2
- data/ext/graphcore/src/timestamp.rs +127 -104
- data/ext/graphcore/src/value/tensor.rs +739 -0
- data/ext/graphcore/src/value/value_map.rs +1 -1
- data/ext/graphcore/src/value.rs +343 -19
- metadata +90 -22
- data/ext/gqlitedb/src/parser/ast.rs +0 -604
- data/ext/gqlitedb/src/parser/parser_impl.rs +0 -1213
- data/ext/gqlitedb/src/parser.rs +0 -4
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gqlite
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Cyrille Berger
|
|
@@ -37,30 +37,65 @@ dependencies:
|
|
|
37
37
|
- - "~>"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
39
|
version: 1.2.0
|
|
40
|
-
description:
|
|
41
|
-
a small, fast, self-contained, high-reliability, full-featured, Graph Query database
|
|
42
|
-
|
|
43
|
-
enable to achieve high performance and for application to combine Graph queries
|
|
44
|
-
|
|
45
|
-
and is free to everyone to use for any purpose.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
with some ISO GQL extensions
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
40
|
+
description: |+
|
|
41
|
+
GQLite is a Rust-language library, with a C interface, that implements a small, fast, self-contained, high-reliability, full-featured, Graph Query database engine.
|
|
42
|
+
GQLite support multiple database backends, such as SQLite and redb.
|
|
43
|
+
This enable to achieve high performance and for application to combine Graph queries with traditional SQL queries.
|
|
44
|
+
|
|
45
|
+
GQLite source code is license under the [MIT License](LICENSE) and is free to everyone to use for any purpose.
|
|
46
|
+
|
|
47
|
+
The official repositories contains bindings/APIs for C, C++, Python, Ruby and Crystal.
|
|
48
|
+
|
|
49
|
+
The library is still in its early stage, but it is now fully functional. Development effort has now slowed down and new features are added on a by-need basis. It supports a subset of OpenCypher, with some ISO GQL extensions.
|
|
50
|
+
|
|
51
|
+
Example of use
|
|
52
|
+
--------------
|
|
53
|
+
|
|
54
|
+
```ruby
|
|
55
|
+
require 'gqlite'
|
|
56
|
+
|
|
57
|
+
begin
|
|
58
|
+
# Create a database on the file "test.db"
|
|
59
|
+
connection = GQLite::Connection.new filename: "test.db"
|
|
60
|
+
|
|
61
|
+
# Execute a simple query to create a node and return all the nodes
|
|
62
|
+
value = connection.execute_oc_query("CREATE () MATCH (n) RETURN n")
|
|
63
|
+
|
|
64
|
+
# Print the result
|
|
65
|
+
if value.nil?
|
|
66
|
+
puts "Empty results"
|
|
67
|
+
else
|
|
68
|
+
puts "Results are #{value.to_s}"
|
|
69
|
+
end
|
|
70
|
+
rescue GQLite::Error => ex
|
|
71
|
+
# Report any error
|
|
72
|
+
puts "An error has occured: #{ex.message}"
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The documentation for the GQL query language can found in [OpenCypher](https://auksys.org/documentation/5/libraries/gqlite/opencypher/) and for the [API](https://auksys.org/documentation/5/libraries/gqlite/api/).
|
|
78
|
+
|
|
58
79
|
executables: []
|
|
59
80
|
extensions:
|
|
60
81
|
- ext/gqliterb/extconf.rb
|
|
61
82
|
extra_rdoc_files: []
|
|
62
83
|
files:
|
|
63
84
|
- ext/Cargo.toml
|
|
85
|
+
- ext/db-index/Cargo.toml
|
|
86
|
+
- ext/db-index/src/hnsw.rs
|
|
87
|
+
- ext/db-index/src/hnsw/error.rs
|
|
88
|
+
- ext/db-index/src/hnsw/graph_store.rs
|
|
89
|
+
- ext/db-index/src/hnsw/id.rs
|
|
90
|
+
- ext/db-index/src/hnsw/implementation.rs
|
|
91
|
+
- ext/db-index/src/hnsw/kernels.rs
|
|
92
|
+
- ext/db-index/src/hnsw/metric.rs
|
|
93
|
+
- ext/db-index/src/hnsw/scalar.rs
|
|
94
|
+
- ext/db-index/src/hnsw/simple_store.rs
|
|
95
|
+
- ext/db-index/src/hnsw/store.rs
|
|
96
|
+
- ext/db-index/src/hnsw/vector.rs
|
|
97
|
+
- ext/db-index/src/hnsw/vectors.rs
|
|
98
|
+
- ext/db-index/src/lib.rs
|
|
64
99
|
- ext/gqlitedb/Cargo.toml
|
|
65
100
|
- ext/gqlitedb/askama.toml
|
|
66
101
|
- ext/gqlitedb/benches/common/mod.rs
|
|
@@ -95,16 +130,16 @@ files:
|
|
|
95
130
|
- ext/gqlitedb/src/interpreter/instructions.rs
|
|
96
131
|
- ext/gqlitedb/src/interpreter/mod.rs
|
|
97
132
|
- ext/gqlitedb/src/lib.rs
|
|
98
|
-
- ext/gqlitedb/src/parser.rs
|
|
99
|
-
- ext/gqlitedb/src/parser/ast.rs
|
|
100
133
|
- ext/gqlitedb/src/parser/gql.pest
|
|
101
|
-
- ext/gqlitedb/src/
|
|
134
|
+
- ext/gqlitedb/src/planner.rs
|
|
102
135
|
- ext/gqlitedb/src/prelude.rs
|
|
103
136
|
- ext/gqlitedb/src/query_result.rs
|
|
104
137
|
- ext/gqlitedb/src/store.rs
|
|
105
138
|
- ext/gqlitedb/src/store/pgrx.rs
|
|
106
139
|
- ext/gqlitedb/src/store/postgres.rs
|
|
107
140
|
- ext/gqlitedb/src/store/redb.rs
|
|
141
|
+
- ext/gqlitedb/src/store/redb/hnsw_store.rs
|
|
142
|
+
- ext/gqlitedb/src/store/redb/index.rs
|
|
108
143
|
- ext/gqlitedb/src/store/sqlbase.rs
|
|
109
144
|
- ext/gqlitedb/src/store/sqlbase/sqlbindingvalue.rs
|
|
110
145
|
- ext/gqlitedb/src/store/sqlbase/sqlmetadata.rs
|
|
@@ -112,16 +147,24 @@ files:
|
|
|
112
147
|
- ext/gqlitedb/src/store/sqlbase/sqlresultvalue.rs
|
|
113
148
|
- ext/gqlitedb/src/store/sqlbase/sqlstore.rs
|
|
114
149
|
- ext/gqlitedb/src/store/sqlite.rs
|
|
150
|
+
- ext/gqlitedb/src/store/vector_extract.rs
|
|
115
151
|
- ext/gqlitedb/src/tests.rs
|
|
116
152
|
- ext/gqlitedb/src/tests/compiler.rs
|
|
117
153
|
- ext/gqlitedb/src/tests/connection.rs
|
|
118
154
|
- ext/gqlitedb/src/tests/connection/postgres.rs
|
|
155
|
+
- ext/gqlitedb/src/tests/connection/redb.rs
|
|
156
|
+
- ext/gqlitedb/src/tests/connection/sqlite.rs
|
|
119
157
|
- ext/gqlitedb/src/tests/evaluators.rs
|
|
120
158
|
- ext/gqlitedb/src/tests/parser.rs
|
|
159
|
+
- ext/gqlitedb/src/tests/planner.rs
|
|
121
160
|
- ext/gqlitedb/src/tests/store.rs
|
|
122
161
|
- ext/gqlitedb/src/tests/store/postgres.rs
|
|
123
162
|
- ext/gqlitedb/src/tests/store/redb.rs
|
|
124
163
|
- ext/gqlitedb/src/tests/store/sqlite.rs
|
|
164
|
+
- ext/gqlitedb/src/tests/store/vector_index.rs
|
|
165
|
+
- ext/gqlitedb/src/tests/store/vector_index/postgres.rs
|
|
166
|
+
- ext/gqlitedb/src/tests/store/vector_index/redb.rs
|
|
167
|
+
- ext/gqlitedb/src/tests/store/vector_index/sqlite.rs
|
|
125
168
|
- ext/gqlitedb/src/tests/templates.rs
|
|
126
169
|
- ext/gqlitedb/src/tests/templates/ast.rs
|
|
127
170
|
- ext/gqlitedb/src/tests/templates/programs.rs
|
|
@@ -140,6 +183,7 @@ files:
|
|
|
140
183
|
- ext/gqlitedb/templates/sql/postgres/graph_create.sql
|
|
141
184
|
- ext/gqlitedb/templates/sql/postgres/graph_delete.sql
|
|
142
185
|
- ext/gqlitedb/templates/sql/postgres/metadata_create_table.sql
|
|
186
|
+
- ext/gqlitedb/templates/sql/postgres/metadata_delete.sql
|
|
143
187
|
- ext/gqlitedb/templates/sql/postgres/metadata_get.sql
|
|
144
188
|
- ext/gqlitedb/templates/sql/postgres/metadata_set.sql
|
|
145
189
|
- ext/gqlitedb/templates/sql/postgres/node_create.sql
|
|
@@ -157,6 +201,7 @@ files:
|
|
|
157
201
|
- ext/gqlitedb/templates/sql/sqlite/graph_create.sql
|
|
158
202
|
- ext/gqlitedb/templates/sql/sqlite/graph_delete.sql
|
|
159
203
|
- ext/gqlitedb/templates/sql/sqlite/metadata_create_table.sql
|
|
204
|
+
- ext/gqlitedb/templates/sql/sqlite/metadata_delete.sql
|
|
160
205
|
- ext/gqlitedb/templates/sql/sqlite/metadata_get.sql
|
|
161
206
|
- ext/gqlitedb/templates/sql/sqlite/metadata_set.sql
|
|
162
207
|
- ext/gqlitedb/templates/sql/sqlite/node_create.sql
|
|
@@ -169,16 +214,38 @@ files:
|
|
|
169
214
|
- ext/gqliterb/Cargo.toml
|
|
170
215
|
- ext/gqliterb/extconf.rb
|
|
171
216
|
- ext/gqliterb/src/lib.rs
|
|
217
|
+
- ext/gqlparser/Cargo.toml
|
|
218
|
+
- ext/gqlparser/README.MD
|
|
219
|
+
- ext/gqlparser/benches/pokec_divan.rs
|
|
220
|
+
- ext/gqlparser/src/common.rs
|
|
221
|
+
- ext/gqlparser/src/gqls.rs
|
|
222
|
+
- ext/gqlparser/src/gqls/ast.rs
|
|
223
|
+
- ext/gqlparser/src/gqls/constraint.rs
|
|
224
|
+
- ext/gqlparser/src/gqls/error.rs
|
|
225
|
+
- ext/gqlparser/src/gqls/parser.rs
|
|
226
|
+
- ext/gqlparser/src/gqls/prelude.rs
|
|
227
|
+
- ext/gqlparser/src/gqls/properties.rs
|
|
228
|
+
- ext/gqlparser/src/gqls/resolve.rs
|
|
229
|
+
- ext/gqlparser/src/lib.rs
|
|
230
|
+
- ext/gqlparser/src/oc.rs
|
|
231
|
+
- ext/gqlparser/src/oc/ast.rs
|
|
232
|
+
- ext/gqlparser/src/oc/error.rs
|
|
233
|
+
- ext/gqlparser/src/oc/lexer.rs
|
|
234
|
+
- ext/gqlparser/src/oc/parser.rs
|
|
235
|
+
- ext/gqlparser/src/oc/parser/tests.rs
|
|
236
|
+
- ext/gqlparser/src/prelude.rs
|
|
172
237
|
- ext/graphcore/Cargo.toml
|
|
173
238
|
- ext/graphcore/README.MD
|
|
174
239
|
- ext/graphcore/src/error.rs
|
|
175
240
|
- ext/graphcore/src/graph.rs
|
|
176
241
|
- ext/graphcore/src/lib.rs
|
|
242
|
+
- ext/graphcore/src/open_cypher.rs
|
|
177
243
|
- ext/graphcore/src/prelude.rs
|
|
178
244
|
- ext/graphcore/src/serialize_with.rs
|
|
179
245
|
- ext/graphcore/src/table.rs
|
|
180
246
|
- ext/graphcore/src/timestamp.rs
|
|
181
247
|
- ext/graphcore/src/value.rs
|
|
248
|
+
- ext/graphcore/src/value/tensor.rs
|
|
182
249
|
- ext/graphcore/src/value/value_map.rs
|
|
183
250
|
- lib/gqlite.rb
|
|
184
251
|
homepage: https://gitlab.com/auksys/gqlite
|
|
@@ -203,3 +270,4 @@ rubygems_version: 3.6.7
|
|
|
203
270
|
specification_version: 4
|
|
204
271
|
summary: Ruby bindings for GQLite, a Graph Query library.
|
|
205
272
|
test_files: []
|
|
273
|
+
...
|