gqlite 1.2.0 → 1.2.3
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/gqliterb/.cargo/config.toml +2 -0
- data/ext/gqliterb/Cargo.lock +152 -135
- data/ext/gqliterb/Cargo.toml +4 -6
- data/ext/gqliterb/src/lib.rs +8 -2
- data/ext/gqliterb/vendor/gqlitedb/Cargo.lock +2115 -0
- data/ext/gqliterb/vendor/gqlitedb/Cargo.toml +138 -0
- data/ext/gqliterb/vendor/gqlitedb/askama.toml +3 -0
- data/ext/gqliterb/vendor/gqlitedb/benches/common/mod.rs +25 -0
- data/ext/gqliterb/vendor/gqlitedb/benches/common/pokec.rs +185 -0
- data/ext/gqliterb/vendor/gqlitedb/benches/pokec_divan.rs +137 -0
- data/ext/gqliterb/vendor/gqlitedb/benches/pokec_iai.rs +122 -0
- data/ext/gqliterb/vendor/gqlitedb/release.toml +7 -0
- data/ext/gqliterb/vendor/gqlitedb/src/aggregators/arithmetic.rs +96 -0
- data/ext/gqliterb/vendor/gqlitedb/src/aggregators/containers.rs +33 -0
- data/ext/gqliterb/vendor/gqlitedb/src/aggregators/count.rs +35 -0
- data/ext/gqliterb/vendor/gqlitedb/src/aggregators/stats.rs +168 -0
- data/ext/gqliterb/vendor/gqlitedb/src/aggregators.rs +74 -0
- data/ext/gqliterb/vendor/gqlitedb/src/capi.rs +259 -0
- data/ext/gqliterb/vendor/gqlitedb/src/compiler/expression_analyser.rs +431 -0
- data/ext/gqliterb/vendor/gqlitedb/src/compiler/variables_manager.rs +621 -0
- data/ext/gqliterb/vendor/gqlitedb/src/compiler.rs +1115 -0
- data/ext/gqliterb/vendor/gqlitedb/src/connection.rs +342 -0
- data/ext/gqliterb/vendor/gqlitedb/src/consts.rs +10 -0
- data/ext/gqliterb/vendor/gqlitedb/src/error.rs +613 -0
- data/ext/gqliterb/vendor/gqlitedb/src/functions/containers.rs +115 -0
- data/ext/gqliterb/vendor/gqlitedb/src/functions/edge.rs +20 -0
- data/ext/gqliterb/vendor/gqlitedb/src/functions/math.rs +44 -0
- data/ext/gqliterb/vendor/gqlitedb/src/functions/node.rs +16 -0
- data/ext/gqliterb/vendor/gqlitedb/src/functions/path.rs +80 -0
- data/ext/gqliterb/vendor/gqlitedb/src/functions/scalar.rs +86 -0
- data/ext/gqliterb/vendor/gqlitedb/src/functions/string.rs +28 -0
- data/ext/gqliterb/vendor/gqlitedb/src/functions/value.rs +99 -0
- data/ext/gqliterb/vendor/gqlitedb/src/functions.rs +410 -0
- data/ext/gqliterb/vendor/gqlitedb/src/graph.rs +283 -0
- data/ext/gqliterb/vendor/gqlitedb/src/interpreter/evaluators.rs +1776 -0
- data/ext/gqliterb/vendor/gqlitedb/src/interpreter/instructions.rs +267 -0
- data/ext/gqliterb/vendor/gqlitedb/src/interpreter/mod.rs +4 -0
- data/ext/gqliterb/vendor/gqlitedb/src/lib.rs +41 -0
- data/ext/gqliterb/vendor/gqlitedb/src/parser/ast.rs +611 -0
- data/ext/gqliterb/vendor/gqlitedb/src/parser/gql.pest +196 -0
- data/ext/gqliterb/vendor/gqlitedb/src/parser/parser.rs +1183 -0
- data/ext/gqliterb/vendor/gqlitedb/src/parser.rs +4 -0
- data/ext/gqliterb/vendor/gqlitedb/src/prelude.rs +8 -0
- data/ext/gqliterb/vendor/gqlitedb/src/serialize_with.rs +94 -0
- data/ext/gqliterb/vendor/gqlitedb/src/store/pgql.rs +121 -0
- data/ext/gqliterb/vendor/gqlitedb/src/store/redb.rs +1262 -0
- data/ext/gqliterb/vendor/gqlitedb/src/store/sqlite.rs +1026 -0
- data/ext/gqliterb/vendor/gqlitedb/src/store.rs +439 -0
- data/ext/gqliterb/vendor/gqlitedb/src/tests/compiler.rs +92 -0
- data/ext/gqliterb/vendor/gqlitedb/src/tests/evaluators.rs +227 -0
- data/ext/gqliterb/vendor/gqlitedb/src/tests/parser.rs +81 -0
- data/ext/gqliterb/vendor/gqlitedb/src/tests/store/redb.rs +46 -0
- data/ext/gqliterb/vendor/gqlitedb/src/tests/store/sqlite.rs +46 -0
- data/ext/gqliterb/vendor/gqlitedb/src/tests/store.rs +470 -0
- data/ext/gqliterb/vendor/gqlitedb/src/tests/templates/ast.rs +356 -0
- data/ext/gqliterb/vendor/gqlitedb/src/tests/templates/programs.rs +455 -0
- data/ext/gqliterb/vendor/gqlitedb/src/tests/templates.rs +2 -0
- data/ext/gqliterb/vendor/gqlitedb/src/tests.rs +39 -0
- data/ext/gqliterb/vendor/gqlitedb/src/utils.rs +28 -0
- data/ext/gqliterb/vendor/gqlitedb/src/value/compare.rs +212 -0
- data/ext/gqliterb/vendor/gqlitedb/src/value/contains.rs +47 -0
- data/ext/gqliterb/vendor/gqlitedb/src/value/value_map.rs +298 -0
- data/ext/gqliterb/vendor/gqlitedb/src/value.rs +609 -0
- data/ext/gqliterb/vendor/gqlitedb/src/value_table.rs +610 -0
- data/ext/gqliterb/vendor/gqlitedb/templates/sql/sqlite/call_stats.sql +22 -0
- data/ext/gqliterb/vendor/gqlitedb/templates/sql/sqlite/edge_count_for_node.sql +3 -0
- data/ext/gqliterb/vendor/gqlitedb/templates/sql/sqlite/edge_create.sql +6 -0
- data/ext/gqliterb/vendor/gqlitedb/templates/sql/sqlite/edge_delete.sql +1 -0
- data/ext/gqliterb/vendor/gqlitedb/templates/sql/sqlite/edge_delete_by_nodes.sql +2 -0
- data/ext/gqliterb/vendor/gqlitedb/templates/sql/sqlite/edge_select.sql +139 -0
- data/ext/gqliterb/vendor/gqlitedb/templates/sql/sqlite/edge_update.sql +4 -0
- data/ext/gqliterb/vendor/gqlitedb/templates/sql/sqlite/graph_create.sql +16 -0
- data/ext/gqliterb/vendor/gqlitedb/templates/sql/sqlite/graph_delete.sql +3 -0
- data/ext/gqliterb/vendor/gqlitedb/templates/sql/sqlite/metadata_create_table.sql +1 -0
- data/ext/gqliterb/vendor/gqlitedb/templates/sql/sqlite/metadata_get.sql +1 -0
- data/ext/gqliterb/vendor/gqlitedb/templates/sql/sqlite/metadata_set.sql +1 -0
- data/ext/gqliterb/vendor/gqlitedb/templates/sql/sqlite/node_create.sql +1 -0
- data/ext/gqliterb/vendor/gqlitedb/templates/sql/sqlite/node_delete.sql +1 -0
- data/ext/gqliterb/vendor/gqlitedb/templates/sql/sqlite/node_select.sql +42 -0
- data/ext/gqliterb/vendor/gqlitedb/templates/sql/sqlite/node_update.sql +4 -0
- data/ext/gqliterb/vendor/gqlitedb/templates/sql/sqlite/table_exists.sql +5 -0
- data/ext/gqliterb/vendor/gqlitedb/templates/sql/sqlite/upgrade_from_1_01.sql +2 -0
- data/ext/gqliterb/vendor/gqlitedb/templates/sql/sqlite/upgrade_graph_from_1_01.sql +65 -0
- metadata +82 -2
@@ -0,0 +1,227 @@
|
|
1
|
+
use crate::{
|
2
|
+
interpreter::evaluators::eval_program,
|
3
|
+
prelude::*,
|
4
|
+
store::{Store, TransactionBoxable},
|
5
|
+
tests::{check_stats, templates::programs},
|
6
|
+
};
|
7
|
+
|
8
|
+
#[test]
|
9
|
+
fn test_evaluate_simple_create_node()
|
10
|
+
{
|
11
|
+
let temp_file = crate::tests::create_tmp_file();
|
12
|
+
let store = crate::store::redb::Store::open(temp_file.path()).unwrap();
|
13
|
+
|
14
|
+
eval_program(&store, &programs::simple_create(), &Default::default()).unwrap();
|
15
|
+
check_stats(&store, None, 1, 0, 0, 0);
|
16
|
+
}
|
17
|
+
|
18
|
+
#[test]
|
19
|
+
fn test_evaluate_create_named_node()
|
20
|
+
{
|
21
|
+
let temp_file = crate::tests::create_tmp_file();
|
22
|
+
let store = crate::store::redb::Store::open(temp_file.path()).unwrap();
|
23
|
+
|
24
|
+
let value = eval_program(&store, &programs::create_named_node(), &Default::default()).unwrap();
|
25
|
+
check_stats(&store, None, 1, 0, 0, 1);
|
26
|
+
|
27
|
+
assert_eq!(
|
28
|
+
value,
|
29
|
+
value::array![value::array!["p"], value::array!["foo"]]
|
30
|
+
);
|
31
|
+
}
|
32
|
+
|
33
|
+
#[test]
|
34
|
+
fn test_evaluate_create_named_node_double_return()
|
35
|
+
{
|
36
|
+
let temp_file = crate::tests::create_tmp_file();
|
37
|
+
let store = crate::store::redb::Store::open(temp_file.path()).unwrap();
|
38
|
+
|
39
|
+
let value = eval_program(
|
40
|
+
&store,
|
41
|
+
&programs::create_named_node_double_return(),
|
42
|
+
&Default::default(),
|
43
|
+
)
|
44
|
+
.unwrap();
|
45
|
+
check_stats(&store, None, 1, 0, 0, 2);
|
46
|
+
|
47
|
+
assert_eq!(
|
48
|
+
value,
|
49
|
+
value::array![value::array!["id", "p"], value::array![12, "foo"]]
|
50
|
+
);
|
51
|
+
}
|
52
|
+
|
53
|
+
#[test]
|
54
|
+
fn test_evaluate_double_with_return()
|
55
|
+
{
|
56
|
+
let temp_file = crate::tests::create_tmp_file();
|
57
|
+
let store = crate::store::redb::Store::open(temp_file.path()).unwrap();
|
58
|
+
|
59
|
+
let value = eval_program(&store, &programs::double_with_return(), &Default::default()).unwrap();
|
60
|
+
check_stats(&store, None, 0, 0, 0, 0);
|
61
|
+
|
62
|
+
assert_eq!(value, value::array![value::array!["a"], value::array![1]]);
|
63
|
+
}
|
64
|
+
|
65
|
+
#[test]
|
66
|
+
fn test_evaluate_unwind()
|
67
|
+
{
|
68
|
+
let temp_file = crate::tests::create_tmp_file();
|
69
|
+
let store = crate::store::redb::Store::open(temp_file.path()).unwrap();
|
70
|
+
|
71
|
+
let value = eval_program(&store, &programs::unwind(), &Default::default()).unwrap();
|
72
|
+
check_stats(&store, None, 0, 0, 0, 0);
|
73
|
+
|
74
|
+
assert_eq!(value, value::array![value::array!["i"], value::array![0]]);
|
75
|
+
}
|
76
|
+
|
77
|
+
#[test]
|
78
|
+
fn test_evaluate_match_loop()
|
79
|
+
{
|
80
|
+
let temp_file = crate::tests::create_tmp_file();
|
81
|
+
let store = crate::store::redb::Store::open(temp_file.path()).unwrap();
|
82
|
+
|
83
|
+
let node = graph::Node {
|
84
|
+
key: graph::Key { uuid: 1 },
|
85
|
+
labels: vec![],
|
86
|
+
properties: Default::default(),
|
87
|
+
};
|
88
|
+
let mut tx = store.begin_write().unwrap();
|
89
|
+
store
|
90
|
+
.create_nodes(&mut tx, &"default".to_string(), vec![&node].into_iter())
|
91
|
+
.unwrap();
|
92
|
+
store
|
93
|
+
.create_edges(
|
94
|
+
&mut tx,
|
95
|
+
&"default".to_string(),
|
96
|
+
vec![&graph::Edge {
|
97
|
+
key: graph::Key { uuid: 2 },
|
98
|
+
source: node.clone(),
|
99
|
+
destination: node.clone(),
|
100
|
+
labels: vec![],
|
101
|
+
properties: Default::default(),
|
102
|
+
}]
|
103
|
+
.into_iter(),
|
104
|
+
)
|
105
|
+
.unwrap();
|
106
|
+
tx.close().unwrap();
|
107
|
+
|
108
|
+
let value = eval_program(&store, &programs::match_loop(), &Default::default()).unwrap();
|
109
|
+
check_stats(&store, None, 1, 1, 0, 0);
|
110
|
+
|
111
|
+
assert_eq!(
|
112
|
+
value,
|
113
|
+
value::array![value::array!["n"], value::array![node]]
|
114
|
+
);
|
115
|
+
}
|
116
|
+
|
117
|
+
#[test]
|
118
|
+
fn test_evaluate_optional_match()
|
119
|
+
{
|
120
|
+
let temp_file = crate::tests::create_tmp_file();
|
121
|
+
let store = crate::store::redb::Store::open(temp_file.path()).unwrap();
|
122
|
+
|
123
|
+
let value = eval_program(&store, &programs::optional_match(), &Default::default()).unwrap();
|
124
|
+
check_stats(&store, None, 0, 0, 0, 0);
|
125
|
+
|
126
|
+
assert_eq!(
|
127
|
+
value,
|
128
|
+
value::array![value::array!["a"], value::array![value::Value::Null]]
|
129
|
+
);
|
130
|
+
}
|
131
|
+
|
132
|
+
#[test]
|
133
|
+
fn test_evaluate_match_count()
|
134
|
+
{
|
135
|
+
let temp_file = crate::tests::create_tmp_file();
|
136
|
+
let store = crate::store::redb::Store::open(temp_file.path()).unwrap();
|
137
|
+
let function_manager = functions::Manager::new();
|
138
|
+
let program = programs::match_count(&function_manager);
|
139
|
+
|
140
|
+
// Count 0
|
141
|
+
let value = eval_program(&store, &program, &Default::default()).unwrap();
|
142
|
+
check_stats(&store, None, 0, 0, 0, 0);
|
143
|
+
|
144
|
+
assert_eq!(
|
145
|
+
value,
|
146
|
+
value::array![value::array!["count(*)"], value::array![0]]
|
147
|
+
);
|
148
|
+
|
149
|
+
// Count 1
|
150
|
+
let node = graph::Node {
|
151
|
+
key: graph::Key { uuid: 1 },
|
152
|
+
labels: vec![],
|
153
|
+
properties: Default::default(),
|
154
|
+
};
|
155
|
+
let mut tx = store.begin_write().unwrap();
|
156
|
+
store
|
157
|
+
.create_nodes(&mut tx, &"default".to_string(), vec![&node].into_iter())
|
158
|
+
.unwrap();
|
159
|
+
tx.close().unwrap();
|
160
|
+
check_stats(&store, None, 1, 0, 0, 0);
|
161
|
+
|
162
|
+
let value = eval_program(&store, &program, &Default::default()).unwrap();
|
163
|
+
check_stats(&store, None, 1, 0, 0, 0);
|
164
|
+
|
165
|
+
assert_eq!(
|
166
|
+
value,
|
167
|
+
value::array![value::array!["count(*)"], value::array![1]]
|
168
|
+
);
|
169
|
+
}
|
170
|
+
|
171
|
+
#[test]
|
172
|
+
fn test_evaluate_aggregation()
|
173
|
+
{
|
174
|
+
let temp_file = crate::tests::create_tmp_file();
|
175
|
+
let store = crate::store::redb::Store::open(temp_file.path()).unwrap();
|
176
|
+
let function_manager = functions::Manager::new();
|
177
|
+
let program = programs::aggregation(&function_manager);
|
178
|
+
|
179
|
+
let nodes = vec![
|
180
|
+
graph::Node {
|
181
|
+
key: graph::Key { uuid: 1 },
|
182
|
+
labels: vec![],
|
183
|
+
properties: value::map!("name" => "a", "num" => 33),
|
184
|
+
},
|
185
|
+
graph::Node {
|
186
|
+
key: graph::Key { uuid: 2 },
|
187
|
+
labels: vec![],
|
188
|
+
properties: value::map!("name" => "a"),
|
189
|
+
},
|
190
|
+
graph::Node {
|
191
|
+
key: graph::Key { uuid: 3 },
|
192
|
+
labels: vec![],
|
193
|
+
properties: value::map!("name" => "b", "num" => 42),
|
194
|
+
},
|
195
|
+
];
|
196
|
+
let mut tx = store.begin_write().unwrap();
|
197
|
+
store
|
198
|
+
.create_nodes(&mut tx, &"default".to_string(), nodes.iter())
|
199
|
+
.unwrap();
|
200
|
+
tx.close().unwrap();
|
201
|
+
check_stats(&store, None, 3, 0, 0, 5);
|
202
|
+
|
203
|
+
let value = eval_program(&store, &program, &Default::default()).unwrap();
|
204
|
+
check_stats(&store, None, 3, 0, 0, 5);
|
205
|
+
|
206
|
+
assert!(
|
207
|
+
value
|
208
|
+
== value::array![
|
209
|
+
value::array!["n.name", "count(n.num)"],
|
210
|
+
value::array!["a", 1],
|
211
|
+
value::array!["b", 1]
|
212
|
+
]
|
213
|
+
|| value
|
214
|
+
== value::array![
|
215
|
+
value::array!["n.name", "count(n.num)"],
|
216
|
+
value::array!["b", 1],
|
217
|
+
value::array!["a", 1]
|
218
|
+
],
|
219
|
+
"left ({}) == right ({} in any order) failed",
|
220
|
+
value,
|
221
|
+
value::array![
|
222
|
+
value::array!["n.name", "count(n.num)"],
|
223
|
+
value::array!["a", 1],
|
224
|
+
value::array!["b", 1]
|
225
|
+
],
|
226
|
+
);
|
227
|
+
}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
use crate::{
|
2
|
+
parser::{self, parse},
|
3
|
+
tests::templates::ast,
|
4
|
+
};
|
5
|
+
|
6
|
+
fn compare_ast(actual: Vec<parser::ast::Statement>, expected: Vec<parser::ast::Statement>)
|
7
|
+
{
|
8
|
+
assert_eq!(format!("{:?}", actual), format!("{:?}", expected));
|
9
|
+
}
|
10
|
+
|
11
|
+
#[test]
|
12
|
+
fn test_parse_simple_create_node()
|
13
|
+
{
|
14
|
+
let ast = parse("CREATE ()").unwrap();
|
15
|
+
let ast = ast.into_iter().next().unwrap();
|
16
|
+
compare_ast(ast, ast::simple_create_node())
|
17
|
+
}
|
18
|
+
|
19
|
+
#[test]
|
20
|
+
fn test_parse_create_named_node()
|
21
|
+
{
|
22
|
+
let ast = parse("CREATE (n {name: 'foo'}) RETURN n.name AS p").unwrap();
|
23
|
+
let ast = ast.into_iter().next().unwrap();
|
24
|
+
compare_ast(ast, ast::create_named_node())
|
25
|
+
}
|
26
|
+
|
27
|
+
#[test]
|
28
|
+
fn test_parse_create_named_node_double_return()
|
29
|
+
{
|
30
|
+
let ast = parse("CREATE (n {id: 12, name: 'foo'}) RETURN n.id AS id, n.name AS p").unwrap();
|
31
|
+
let ast = ast.into_iter().next().unwrap();
|
32
|
+
compare_ast(ast, ast::create_named_node_double_return())
|
33
|
+
}
|
34
|
+
|
35
|
+
#[test]
|
36
|
+
fn test_parse_double_with_return()
|
37
|
+
{
|
38
|
+
let ast = parse("WITH 1 AS n, 2 AS m WITH n AS a, m AS b RETURN a").unwrap();
|
39
|
+
let ast = ast.into_iter().next().unwrap();
|
40
|
+
compare_ast(ast, ast::double_with_return())
|
41
|
+
}
|
42
|
+
|
43
|
+
#[test]
|
44
|
+
fn test_parse_unwind()
|
45
|
+
{
|
46
|
+
let ast = parse("UNWIND [0] AS i RETURN i").unwrap();
|
47
|
+
let ast = ast.into_iter().next().unwrap();
|
48
|
+
compare_ast(ast, ast::unwind())
|
49
|
+
}
|
50
|
+
|
51
|
+
#[test]
|
52
|
+
fn test_parse_match_loop()
|
53
|
+
{
|
54
|
+
let ast = parse("MATCH (n)-[]->(n) RETURN n").unwrap();
|
55
|
+
let ast = ast.into_iter().next().unwrap();
|
56
|
+
compare_ast(ast, ast::match_loop());
|
57
|
+
}
|
58
|
+
|
59
|
+
#[test]
|
60
|
+
fn test_parse_optional_match()
|
61
|
+
{
|
62
|
+
let ast = parse("OPTIONAL MATCH (a) RETURN a").unwrap();
|
63
|
+
let ast = ast.into_iter().next().unwrap();
|
64
|
+
compare_ast(ast, ast::optional_match());
|
65
|
+
}
|
66
|
+
|
67
|
+
#[test]
|
68
|
+
fn test_parse_match_count()
|
69
|
+
{
|
70
|
+
let ast = parse("MATCH (a) RETURN count(*)").unwrap();
|
71
|
+
let ast = ast.into_iter().next().unwrap();
|
72
|
+
compare_ast(ast, ast::match_count());
|
73
|
+
}
|
74
|
+
|
75
|
+
#[test]
|
76
|
+
fn test_parse_aggregation()
|
77
|
+
{
|
78
|
+
let ast = parse("MATCH (n) RETURN n.name, count(n.num)").unwrap();
|
79
|
+
let ast = ast.into_iter().next().unwrap();
|
80
|
+
compare_ast(ast, ast::aggregation());
|
81
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
#[test]
|
2
|
+
fn test_in_memory()
|
3
|
+
{
|
4
|
+
let store = crate::store::redb::Store::in_memory().unwrap();
|
5
|
+
super::test_select_nodes(store);
|
6
|
+
}
|
7
|
+
|
8
|
+
#[test]
|
9
|
+
fn test_graphs()
|
10
|
+
{
|
11
|
+
let temp_file = crate::tests::create_tmp_file();
|
12
|
+
let store = crate::store::redb::Store::open(temp_file.path()).unwrap();
|
13
|
+
super::test_graphs(store);
|
14
|
+
}
|
15
|
+
|
16
|
+
#[test]
|
17
|
+
fn test_select_nodes()
|
18
|
+
{
|
19
|
+
let temp_file = crate::tests::create_tmp_file();
|
20
|
+
let store = crate::store::redb::Store::open(temp_file.path()).unwrap();
|
21
|
+
super::test_select_nodes(store);
|
22
|
+
}
|
23
|
+
|
24
|
+
#[test]
|
25
|
+
fn test_update_nodes()
|
26
|
+
{
|
27
|
+
let temp_file = crate::tests::create_tmp_file();
|
28
|
+
let store = crate::store::redb::Store::open(temp_file.path()).unwrap();
|
29
|
+
super::test_update_nodes(store);
|
30
|
+
}
|
31
|
+
|
32
|
+
#[test]
|
33
|
+
fn test_select_edges()
|
34
|
+
{
|
35
|
+
let temp_file = crate::tests::create_tmp_file();
|
36
|
+
let store = crate::store::redb::Store::open(temp_file.path()).unwrap();
|
37
|
+
super::test_select_edges(store);
|
38
|
+
}
|
39
|
+
|
40
|
+
#[test]
|
41
|
+
fn test_update_edges()
|
42
|
+
{
|
43
|
+
let temp_file = crate::tests::create_tmp_file();
|
44
|
+
let store = crate::store::redb::Store::open(temp_file.path()).unwrap();
|
45
|
+
super::test_update_edges(store);
|
46
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
#[test]
|
2
|
+
fn test_in_memory()
|
3
|
+
{
|
4
|
+
let store = crate::store::sqlite::Store::in_memory().unwrap();
|
5
|
+
super::test_select_nodes(store);
|
6
|
+
}
|
7
|
+
|
8
|
+
#[test]
|
9
|
+
fn test_graphs()
|
10
|
+
{
|
11
|
+
let temp_file = crate::tests::create_tmp_file();
|
12
|
+
let store = crate::store::sqlite::Store::open(temp_file.path()).unwrap();
|
13
|
+
super::test_graphs(store);
|
14
|
+
}
|
15
|
+
|
16
|
+
#[test]
|
17
|
+
fn test_select_nodes()
|
18
|
+
{
|
19
|
+
let temp_file = crate::tests::create_tmp_file();
|
20
|
+
let store = crate::store::sqlite::Store::open(temp_file.path()).unwrap();
|
21
|
+
super::test_select_nodes(store);
|
22
|
+
}
|
23
|
+
|
24
|
+
#[test]
|
25
|
+
fn test_update_nodes()
|
26
|
+
{
|
27
|
+
let temp_file = crate::tests::create_tmp_file();
|
28
|
+
let store = crate::store::sqlite::Store::open(temp_file.path()).unwrap();
|
29
|
+
super::test_update_nodes(store);
|
30
|
+
}
|
31
|
+
|
32
|
+
#[test]
|
33
|
+
fn test_select_edges()
|
34
|
+
{
|
35
|
+
let temp_file = crate::tests::create_tmp_file();
|
36
|
+
let store = crate::store::sqlite::Store::open(temp_file.path()).unwrap();
|
37
|
+
super::test_select_edges(store);
|
38
|
+
}
|
39
|
+
|
40
|
+
#[test]
|
41
|
+
fn test_update_edges()
|
42
|
+
{
|
43
|
+
let temp_file = crate::tests::create_tmp_file();
|
44
|
+
let store = crate::store::sqlite::Store::open(temp_file.path()).unwrap();
|
45
|
+
super::test_update_edges(store);
|
46
|
+
}
|