activerecord-pull-alpha 0.1.0 → 0.1.1
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/Gemfile.lock +35 -0
- data/README.md +12 -6
- data/activerecord-pull-alpha.gemspec +1 -1
- data/lib/activerecord/pull/alpha/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f19b19bbcf24f41a86b7e783b4c68ccb5708578bdc1ca7f4fda67cc9d49efb21
|
4
|
+
data.tar.gz: 23e4a83ceb4377d1d757045cadcfa21ffd1d461f45b1a9692611c44bc2a7f75e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 923ce39daf5cfa8ae28c4a3a87e063fb6e228f01129ca878bc88b6d2f2e26612ab5fd1fe9323caa6b8d46f952072596dba32089c759b62bb3df13813b905e413
|
7
|
+
data.tar.gz: ddcda0c8e54c7e6a2adff171c7612f7ee220fdb17d20e5e3f0c37750b03f08c69f6000f7a8747b233bb1b001405c39a9c2a218da6e9e588b3f709e10ce5de0dd
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
activerecord-pull-alpha (0.1.1)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
diff-lcs (1.3)
|
10
|
+
rake (13.0.1)
|
11
|
+
rspec (3.9.0)
|
12
|
+
rspec-core (~> 3.9.0)
|
13
|
+
rspec-expectations (~> 3.9.0)
|
14
|
+
rspec-mocks (~> 3.9.0)
|
15
|
+
rspec-core (3.9.1)
|
16
|
+
rspec-support (~> 3.9.1)
|
17
|
+
rspec-expectations (3.9.0)
|
18
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
19
|
+
rspec-support (~> 3.9.0)
|
20
|
+
rspec-mocks (3.9.1)
|
21
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
22
|
+
rspec-support (~> 3.9.0)
|
23
|
+
rspec-support (3.9.2)
|
24
|
+
|
25
|
+
PLATFORMS
|
26
|
+
ruby
|
27
|
+
|
28
|
+
DEPENDENCIES
|
29
|
+
activerecord-pull-alpha!
|
30
|
+
bundler (~> 1.17)
|
31
|
+
rake (~> 13.0)
|
32
|
+
rspec (~> 3.0)
|
33
|
+
|
34
|
+
BUNDLED WITH
|
35
|
+
1.17.3
|
data/README.md
CHANGED
@@ -30,13 +30,18 @@ A simple query interface for pulling deeply nested data from records.
|
|
30
30
|
|
31
31
|
## Why?
|
32
32
|
|
33
|
-
|
34
|
-
|
33
|
+
When using an SQL database modeling [trees][tree] and [ontologies][ontology] is an exercise in relational database design.
|
34
|
+
Unfortunately, when dealing with deeply nested and *overlapping* data (e.g. medical records and social graphs)
|
35
35
|
trees and ontologies won't do. We need to model graphs, a much more sparsely structured data model, but
|
36
|
-
this leads to very complex table structures and very complex SQL queries.
|
36
|
+
this leads to very complex (or sparse) table structures and very complex SQL queries.
|
37
37
|
|
38
|
-
|
39
|
-
|
38
|
+
Alternatives to SQL databases like [Datomic][datomic], [RDF][rdf] and graph databases resolve this problem in the general case,
|
39
|
+
but sometimes those solutions are not a viable option for one reason or another. This gem attempts to provide some of the
|
40
|
+
convenience of these solutions as an extension to ActiveRecord. As a bonus it makes querying trees and ontologies simple too!
|
41
|
+
|
42
|
+
## Pull Syntax
|
43
|
+
|
44
|
+
The pull syntax is inspired by the pull syntax that is used in [Datomic][datomic-pull].
|
40
45
|
|
41
46
|
## Installation
|
42
47
|
|
@@ -62,13 +67,14 @@ Or install it yourself as:
|
|
62
67
|
- [GraphQL](https://graphql.org/)
|
63
68
|
- [Entity Attribute Value Model][eav-model]
|
64
69
|
- [RDF][rdf]
|
70
|
+
- [A City is not a Tree](https://www.patternlanguage.com/archive/cityisnotatree.html)
|
65
71
|
|
66
72
|
## License
|
67
73
|
|
68
74
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
69
75
|
|
70
76
|
[datomic]: https://www.datomic.com/
|
71
|
-
[datomic-pull]: https://docs.datomic.com/on-prem/pull.html
|
77
|
+
[datomic-pull]: https://docs.datomic.com/on-prem/pull.html#pull-grammar
|
72
78
|
[eav-model]: https://en.wikipedia.org/wiki/Entity%E2%80%93attribute%E2%80%93value_model
|
73
79
|
[rdf]: https://en.wikipedia.org/wiki/Resource_Description_Framework
|
74
80
|
[tree]: https://en.wikipedia.org/wiki/Tree_(data_structure)
|
@@ -35,6 +35,6 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.require_paths = ["lib"]
|
36
36
|
|
37
37
|
spec.add_development_dependency "bundler", "~> 1.17"
|
38
|
-
spec.add_development_dependency "rake", "~>
|
38
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
39
39
|
spec.add_development_dependency "rspec", "~> 3.0"
|
40
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-pull-alpha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Delon Newman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '13.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '13.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -62,6 +62,7 @@ files:
|
|
62
62
|
- ".gitignore"
|
63
63
|
- ".rspec"
|
64
64
|
- Gemfile
|
65
|
+
- Gemfile.lock
|
65
66
|
- LICENSE.txt
|
66
67
|
- README.md
|
67
68
|
- Rakefile
|