rasti-db 1.5.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +41 -16
- data/lib/rasti/db.rb +0 -1
- data/lib/rasti/db/collection.rb +57 -35
- data/lib/rasti/db/data_source.rb +18 -0
- data/lib/rasti/db/environment.rb +32 -0
- data/lib/rasti/db/query.rb +13 -9
- data/lib/rasti/db/relations/base.rb +22 -8
- data/lib/rasti/db/relations/graph.rb +10 -16
- data/lib/rasti/db/relations/many_to_many.rb +57 -23
- data/lib/rasti/db/relations/many_to_one.rb +9 -7
- data/lib/rasti/db/relations/one_to_many.rb +21 -13
- data/lib/rasti/db/version.rb +1 -1
- data/spec/collection_spec.rb +202 -50
- data/spec/minitest_helper.rb +47 -12
- data/spec/model_spec.rb +3 -1
- data/spec/query_spec.rb +104 -33
- data/spec/relations_spec.rb +27 -7
- metadata +4 -3
- data/lib/rasti/db/helpers.rb +0 -16
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rasti-db
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriel Naiman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sequel
|
@@ -277,7 +277,8 @@ files:
|
|
277
277
|
- lib/rasti-db.rb
|
278
278
|
- lib/rasti/db.rb
|
279
279
|
- lib/rasti/db/collection.rb
|
280
|
-
- lib/rasti/db/
|
280
|
+
- lib/rasti/db/data_source.rb
|
281
|
+
- lib/rasti/db/environment.rb
|
281
282
|
- lib/rasti/db/model.rb
|
282
283
|
- lib/rasti/db/nql/invalid_expression_error.rb
|
283
284
|
- lib/rasti/db/nql/nodes/binary_node.rb
|
data/lib/rasti/db/helpers.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
module Rasti
|
2
|
-
module DB
|
3
|
-
module Helpers
|
4
|
-
module WithSchema
|
5
|
-
|
6
|
-
private
|
7
|
-
|
8
|
-
def with_schema(table, field=nil)
|
9
|
-
qualified_table = schema ? Sequel[schema][table] : Sequel[table]
|
10
|
-
field ? Sequel[qualified_table][field] : qualified_table
|
11
|
-
end
|
12
|
-
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|