gqlite 1.5.0 → 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 +12 -6
- 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 -8
- 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 +20 -24
- data/ext/gqlitedb/src/compiler/expression_analyser.rs +28 -20
- data/ext/gqlitedb/src/compiler/variables_manager.rs +104 -38
- data/ext/gqlitedb/src/compiler.rs +506 -227
- data/ext/gqlitedb/src/connection.rs +151 -11
- data/ext/gqlitedb/src/consts.rs +1 -2
- data/ext/gqlitedb/src/error.rs +123 -61
- data/ext/gqlitedb/src/functions/common.rs +64 -0
- data/ext/gqlitedb/src/functions/containers.rs +2 -46
- data/ext/gqlitedb/src/functions/edge.rs +1 -1
- data/ext/gqlitedb/src/functions/math.rs +87 -15
- data/ext/gqlitedb/src/functions/node.rs +1 -1
- data/ext/gqlitedb/src/functions/path.rs +48 -11
- data/ext/gqlitedb/src/functions/scalar.rs +47 -4
- data/ext/gqlitedb/src/functions/string.rs +123 -1
- data/ext/gqlitedb/src/functions/value.rs +1 -1
- data/ext/gqlitedb/src/functions.rs +165 -28
- 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/parser/gql.pest +1 -1
- 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 +742 -16
- 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 +576 -14
- data/ext/gqlitedb/src/store/vector_extract.rs +56 -0
- data/ext/gqlitedb/src/store.rs +140 -29
- 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 +93 -28
- 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,14 +1,13 @@
|
|
|
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
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: rb_sys
|
|
@@ -38,31 +37,65 @@ dependencies:
|
|
|
38
37
|
- - "~>"
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
39
|
version: 1.2.0
|
|
41
|
-
description:
|
|
42
|
-
a small, fast, self-contained, high-reliability, full-featured, Graph Query database
|
|
43
|
-
|
|
44
|
-
enable to achieve high performance and for application to combine Graph queries
|
|
45
|
-
|
|
46
|
-
and is free to everyone to use for any purpose.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
with some ISO GQL extensions
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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
|
+
|
|
60
79
|
executables: []
|
|
61
80
|
extensions:
|
|
62
81
|
- ext/gqliterb/extconf.rb
|
|
63
82
|
extra_rdoc_files: []
|
|
64
83
|
files:
|
|
65
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
|
|
66
99
|
- ext/gqlitedb/Cargo.toml
|
|
67
100
|
- ext/gqlitedb/askama.toml
|
|
68
101
|
- ext/gqlitedb/benches/common/mod.rs
|
|
@@ -83,6 +116,7 @@ files:
|
|
|
83
116
|
- ext/gqlitedb/src/consts.rs
|
|
84
117
|
- ext/gqlitedb/src/error.rs
|
|
85
118
|
- ext/gqlitedb/src/functions.rs
|
|
119
|
+
- ext/gqlitedb/src/functions/common.rs
|
|
86
120
|
- ext/gqlitedb/src/functions/containers.rs
|
|
87
121
|
- ext/gqlitedb/src/functions/edge.rs
|
|
88
122
|
- ext/gqlitedb/src/functions/math.rs
|
|
@@ -96,16 +130,16 @@ files:
|
|
|
96
130
|
- ext/gqlitedb/src/interpreter/instructions.rs
|
|
97
131
|
- ext/gqlitedb/src/interpreter/mod.rs
|
|
98
132
|
- ext/gqlitedb/src/lib.rs
|
|
99
|
-
- ext/gqlitedb/src/parser.rs
|
|
100
|
-
- ext/gqlitedb/src/parser/ast.rs
|
|
101
133
|
- ext/gqlitedb/src/parser/gql.pest
|
|
102
|
-
- ext/gqlitedb/src/
|
|
134
|
+
- ext/gqlitedb/src/planner.rs
|
|
103
135
|
- ext/gqlitedb/src/prelude.rs
|
|
104
136
|
- ext/gqlitedb/src/query_result.rs
|
|
105
137
|
- ext/gqlitedb/src/store.rs
|
|
106
138
|
- ext/gqlitedb/src/store/pgrx.rs
|
|
107
139
|
- ext/gqlitedb/src/store/postgres.rs
|
|
108
140
|
- ext/gqlitedb/src/store/redb.rs
|
|
141
|
+
- ext/gqlitedb/src/store/redb/hnsw_store.rs
|
|
142
|
+
- ext/gqlitedb/src/store/redb/index.rs
|
|
109
143
|
- ext/gqlitedb/src/store/sqlbase.rs
|
|
110
144
|
- ext/gqlitedb/src/store/sqlbase/sqlbindingvalue.rs
|
|
111
145
|
- ext/gqlitedb/src/store/sqlbase/sqlmetadata.rs
|
|
@@ -113,16 +147,24 @@ files:
|
|
|
113
147
|
- ext/gqlitedb/src/store/sqlbase/sqlresultvalue.rs
|
|
114
148
|
- ext/gqlitedb/src/store/sqlbase/sqlstore.rs
|
|
115
149
|
- ext/gqlitedb/src/store/sqlite.rs
|
|
150
|
+
- ext/gqlitedb/src/store/vector_extract.rs
|
|
116
151
|
- ext/gqlitedb/src/tests.rs
|
|
117
152
|
- ext/gqlitedb/src/tests/compiler.rs
|
|
118
153
|
- ext/gqlitedb/src/tests/connection.rs
|
|
119
154
|
- ext/gqlitedb/src/tests/connection/postgres.rs
|
|
155
|
+
- ext/gqlitedb/src/tests/connection/redb.rs
|
|
156
|
+
- ext/gqlitedb/src/tests/connection/sqlite.rs
|
|
120
157
|
- ext/gqlitedb/src/tests/evaluators.rs
|
|
121
158
|
- ext/gqlitedb/src/tests/parser.rs
|
|
159
|
+
- ext/gqlitedb/src/tests/planner.rs
|
|
122
160
|
- ext/gqlitedb/src/tests/store.rs
|
|
123
161
|
- ext/gqlitedb/src/tests/store/postgres.rs
|
|
124
162
|
- ext/gqlitedb/src/tests/store/redb.rs
|
|
125
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
|
|
126
168
|
- ext/gqlitedb/src/tests/templates.rs
|
|
127
169
|
- ext/gqlitedb/src/tests/templates/ast.rs
|
|
128
170
|
- ext/gqlitedb/src/tests/templates/programs.rs
|
|
@@ -141,6 +183,7 @@ files:
|
|
|
141
183
|
- ext/gqlitedb/templates/sql/postgres/graph_create.sql
|
|
142
184
|
- ext/gqlitedb/templates/sql/postgres/graph_delete.sql
|
|
143
185
|
- ext/gqlitedb/templates/sql/postgres/metadata_create_table.sql
|
|
186
|
+
- ext/gqlitedb/templates/sql/postgres/metadata_delete.sql
|
|
144
187
|
- ext/gqlitedb/templates/sql/postgres/metadata_get.sql
|
|
145
188
|
- ext/gqlitedb/templates/sql/postgres/metadata_set.sql
|
|
146
189
|
- ext/gqlitedb/templates/sql/postgres/node_create.sql
|
|
@@ -158,6 +201,7 @@ files:
|
|
|
158
201
|
- ext/gqlitedb/templates/sql/sqlite/graph_create.sql
|
|
159
202
|
- ext/gqlitedb/templates/sql/sqlite/graph_delete.sql
|
|
160
203
|
- ext/gqlitedb/templates/sql/sqlite/metadata_create_table.sql
|
|
204
|
+
- ext/gqlitedb/templates/sql/sqlite/metadata_delete.sql
|
|
161
205
|
- ext/gqlitedb/templates/sql/sqlite/metadata_get.sql
|
|
162
206
|
- ext/gqlitedb/templates/sql/sqlite/metadata_set.sql
|
|
163
207
|
- ext/gqlitedb/templates/sql/sqlite/node_create.sql
|
|
@@ -170,23 +214,44 @@ files:
|
|
|
170
214
|
- ext/gqliterb/Cargo.toml
|
|
171
215
|
- ext/gqliterb/extconf.rb
|
|
172
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
|
|
173
237
|
- ext/graphcore/Cargo.toml
|
|
174
238
|
- ext/graphcore/README.MD
|
|
175
239
|
- ext/graphcore/src/error.rs
|
|
176
240
|
- ext/graphcore/src/graph.rs
|
|
177
241
|
- ext/graphcore/src/lib.rs
|
|
242
|
+
- ext/graphcore/src/open_cypher.rs
|
|
178
243
|
- ext/graphcore/src/prelude.rs
|
|
179
244
|
- ext/graphcore/src/serialize_with.rs
|
|
180
245
|
- ext/graphcore/src/table.rs
|
|
181
246
|
- ext/graphcore/src/timestamp.rs
|
|
182
247
|
- ext/graphcore/src/value.rs
|
|
248
|
+
- ext/graphcore/src/value/tensor.rs
|
|
183
249
|
- ext/graphcore/src/value/value_map.rs
|
|
184
250
|
- lib/gqlite.rb
|
|
185
251
|
homepage: https://gitlab.com/auksys/gqlite
|
|
186
252
|
licenses:
|
|
187
253
|
- MIT
|
|
188
254
|
metadata: {}
|
|
189
|
-
post_install_message:
|
|
190
255
|
rdoc_options: []
|
|
191
256
|
require_paths:
|
|
192
257
|
- lib
|
|
@@ -201,8 +266,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
201
266
|
- !ruby/object:Gem::Version
|
|
202
267
|
version: '0'
|
|
203
268
|
requirements: []
|
|
204
|
-
rubygems_version: 3.
|
|
205
|
-
signing_key:
|
|
269
|
+
rubygems_version: 3.6.7
|
|
206
270
|
specification_version: 4
|
|
207
271
|
summary: Ruby bindings for GQLite, a Graph Query library.
|
|
208
272
|
test_files: []
|
|
273
|
+
...
|