activecypher 0.7.0 → 0.7.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/lib/active_cypher/connection_adapters/memgraph_adapter.rb +6 -2
- data/lib/active_cypher/connection_adapters/neo4j_adapter.rb +3 -2
- data/lib/active_cypher/schema/catalog.rb +2 -0
- data/lib/active_cypher/schema/dumper.rb +4 -2
- data/lib/active_cypher/schema/writer/cypher.rb +2 -0
- data/lib/active_cypher/version.rb +1 -1
- data/lib/tasks/graphdb_schema.rake +10 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5ccd00478564eeb903b76a423867e21973268d6c23af232de7329abe94263d5
|
4
|
+
data.tar.gz: a6e74f587ad7c543123840d5f44440efca909a44efa0a59be5b8ce15d8d39f0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b90a82d07ffc1504ddf9d07fcd88a80d3371d32ed09eb8f799c4d228958e090522a44cac2abd6bdf661983fda43ce95b898fe440f8e76c0427621f55ad342a0
|
7
|
+
data.tar.gz: bd848d6485fdc502673f88ad3ea3dd776d486a1e11cf501592994efba1347cb799b28af0b6f06e5a29daf3a60c79c39072181fb03d36f0938df5ed52699bd881
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
2
|
+
|
3
|
+
require 'active_cypher/schema/catalog'
|
3
4
|
|
4
5
|
module ActiveCypher
|
5
6
|
module ConnectionAdapters
|
@@ -69,7 +70,10 @@ module ActiveCypher
|
|
69
70
|
protected
|
70
71
|
|
71
72
|
def parse_schema(rows)
|
72
|
-
nodes
|
73
|
+
nodes = []
|
74
|
+
edges = []
|
75
|
+
idx = []
|
76
|
+
cons = []
|
73
77
|
|
74
78
|
rows.each do |row|
|
75
79
|
case row['type']
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
2
|
+
|
3
|
+
require 'active_cypher/schema/catalog'
|
3
4
|
|
4
5
|
module ActiveCypher
|
5
6
|
module ConnectionAdapters
|
@@ -33,7 +34,7 @@ module ActiveCypher
|
|
33
34
|
end
|
34
35
|
|
35
36
|
Schema::Catalog.new(indexes: idx_defs, constraints: con_defs,
|
36
|
-
|
37
|
+
node_types: [], edge_types: [])
|
37
38
|
rescue StandardError
|
38
39
|
Schema::Catalog.new(indexes: [], constraints: [], node_types: [], edge_types: [])
|
39
40
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'fileutils'
|
2
4
|
require 'optparse'
|
3
5
|
|
@@ -5,7 +7,7 @@ module ActiveCypher
|
|
5
7
|
module Schema
|
6
8
|
# Dumps the graph schema to a Cypher script
|
7
9
|
class Dumper
|
8
|
-
DEFAULT_PATH = 'graphdb'
|
10
|
+
DEFAULT_PATH = 'graphdb'
|
9
11
|
|
10
12
|
def initialize(connection = ActiveCypher::Base.connection, base_dir: Dir.pwd)
|
11
13
|
@connection = connection
|
@@ -60,7 +62,7 @@ module ActiveCypher
|
|
60
62
|
def catalog_from_migrations
|
61
63
|
idx = []
|
62
64
|
cons = []
|
63
|
-
Dir[File.join(@base_dir, 'graphdb', 'migrate', '*.rb')].
|
65
|
+
Dir[File.join(@base_dir, 'graphdb', 'migrate', '*.rb')].each do |file|
|
64
66
|
require file
|
65
67
|
class_name = File.basename(file, '.rb').split('_', 2).last.camelize
|
66
68
|
klass = Object.const_get(class_name)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activecypher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Abdelkader Boudih
|
@@ -213,6 +213,7 @@ files:
|
|
213
213
|
- lib/cyrel/types/hash_type.rb
|
214
214
|
- lib/cyrel/types/symbol_type.rb
|
215
215
|
- lib/tasks/graphdb_migrate.rake
|
216
|
+
- lib/tasks/graphdb_schema.rake
|
216
217
|
- sig/activecypher.rbs
|
217
218
|
homepage: https://github.com/seuros/activecypher
|
218
219
|
licenses:
|