activegraph 11.3.1 → 11.5.0.alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/Gemfile +1 -1
  4. data/activegraph.gemspec +3 -3
  5. data/lib/active_graph/attribute_set.rb +0 -4
  6. data/lib/active_graph/base.rb +0 -3
  7. data/lib/active_graph/config.rb +0 -1
  8. data/lib/active_graph/core/instrumentable.rb +0 -5
  9. data/lib/active_graph/core/querable.rb +0 -5
  10. data/lib/active_graph/core/query.rb +6 -9
  11. data/lib/active_graph/core/query_clauses.rb +65 -7
  12. data/lib/active_graph/core/query_ext.rb +1 -1
  13. data/lib/active_graph/core/record.rb +0 -5
  14. data/lib/active_graph/core/result.rb +5 -0
  15. data/lib/active_graph/core/wrappable.rb +1 -1
  16. data/lib/active_graph/generators/active_model.rb +33 -0
  17. data/lib/active_graph/generators/generated_attribute.rb +17 -0
  18. data/lib/{rails/generators/active_graph/migration → active_graph/generators}/migration_generator.rb +0 -4
  19. data/lib/{rails/generators/active_graph_generator.rb → active_graph/generators/migration_helper.rb} +0 -75
  20. data/lib/{rails/generators/active_graph/model → active_graph/generators}/model_generator.rb +0 -4
  21. data/lib/active_graph/generators/source_path_helper.rb +10 -0
  22. data/lib/{rails/generators/active_graph/upgrade_v8 → active_graph/generators}/upgrade_v8_generator.rb +0 -4
  23. data/lib/active_graph/lazy_attribute_hash.rb +0 -2
  24. data/lib/active_graph/migration.rb +0 -3
  25. data/lib/active_graph/migrations/helpers.rb +0 -7
  26. data/lib/active_graph/migrations/runner.rb +0 -4
  27. data/lib/active_graph/migrations.rb +0 -8
  28. data/lib/active_graph/model_schema.rb +0 -1
  29. data/lib/active_graph/node/has_n/association.rb +0 -3
  30. data/lib/active_graph/node/labels.rb +1 -3
  31. data/lib/active_graph/node/orm_adapter.rb +0 -6
  32. data/lib/active_graph/node/query/{query_proxy_link.rb → query_proxy/link.rb} +92 -0
  33. data/lib/active_graph/node/query/query_proxy.rb +20 -3
  34. data/lib/active_graph/node/scope.rb +4 -43
  35. data/lib/active_graph/node/wrapping.rb +52 -0
  36. data/lib/active_graph/node.rb +1 -0
  37. data/lib/active_graph/railtie.rb +0 -6
  38. data/lib/active_graph/relationship/property.rb +0 -2
  39. data/lib/active_graph/relationship/wrapping.rb +26 -0
  40. data/lib/active_graph/shared/attributes.rb +3 -2
  41. data/lib/active_graph/shared/node_query_factory.rb +15 -0
  42. data/lib/active_graph/shared/persistence.rb +1 -1
  43. data/lib/active_graph/shared/query_factory.rb +0 -60
  44. data/lib/active_graph/shared/rel_query_factory.rb +47 -0
  45. data/lib/active_graph/shared/type_converters.rb +0 -6
  46. data/lib/active_graph/tasks/migration.rake +0 -4
  47. data/lib/active_graph/timestamps.rb +0 -3
  48. data/lib/active_graph/version.rb +1 -1
  49. data/lib/active_graph.rb +43 -114
  50. metadata +31 -22
  51. data/lib/active_graph/core.rb +0 -14
  52. data/lib/active_graph/node/node_wrapper.rb +0 -54
  53. data/lib/active_graph/relationship/rel_wrapper.rb +0 -31
  54. data/lib/active_graph/wrapper.rb +0 -4
  55. /data/lib/active_graph/{errors.rb → error.rb} +0 -0
  56. /data/lib/{rails/generators/active_graph → active_graph/generators}/migration/templates/migration.erb +0 -0
  57. /data/lib/{rails/generators/active_graph → active_graph/generators}/model/templates/migration.erb +0 -0
  58. /data/lib/{rails/generators/active_graph → active_graph/generators}/model/templates/model.erb +0 -0
  59. /data/lib/{rails/generators/active_graph → active_graph/generators}/upgrade_v8/templates/migration.erb +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1ae9faa69f9792692e849f1d3de64c0a22b8e5623302cde0b1e707bfb443bba
4
- data.tar.gz: 57cb8e74aae28b60346bd7c908ed4e793df433c0722b3ab2322320d5a9bab217
3
+ metadata.gz: '0101891bd10ab15f40fe0b95d8f9801addbad38e6a9a620d6ed3172538f13b81'
4
+ data.tar.gz: 29cd3cdd821bdd01723767210820b441d175c20722d086791e3b6f96c60e7860
5
5
  SHA512:
6
- metadata.gz: c5de6bb15067a8c93a14be2dd8949d70d0edcbc1bdabcab2c0880e11dda13f9bfcbdddc51c82438d7cd1642fafb841cbe6b03ca714d1633f3c8b09396531eb0c
7
- data.tar.gz: 976b9fa40c5056de62e7dc9fc3437c107adf13b09f5d1b07b660b79f92f74c9434c18114e4bab1c16e845f529e145c4b337e461cf77b5a4f40d5255a9619103f
6
+ metadata.gz: 236ae57612400438f2ea424600e5b4013790d9fe77840421727f83e5158ca4c8622cc8b2bda502d19c8f212956c86111f25b38fe5d3a68e2ef4819620432aa53
7
+ data.tar.gz: e699e3c4788af542fec9c1b74552b08309a8bd3611a25232445c0bf8a7a4f292067ee3cb86db5c7ed7a34dc134eff8a1fea59c772b778a58de2b1c3d1ec47bb1
data/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file.
3
3
  This file should follow the standards specified on [http://keepachangelog.com/]
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## [11.4.0] 2023-02-12
7
+
8
+ ## Fixed
9
+
10
+ - Added support for cypher UNION
11
+
6
12
  ## [11.3.1] 2023-02-12
7
13
 
8
14
  ## Fixed
data/Gemfile CHANGED
@@ -4,7 +4,7 @@ gemspec
4
4
 
5
5
  # gem 'neo4j-ruby-driver', path: '../neo4j-ruby-driver'
6
6
 
7
- gem 'listen', '< 3.1'
7
+ # gem 'listen', '< 3.1'
8
8
 
9
9
  active_model_version = ENV['ACTIVE_MODEL_VERSION']
10
10
  gem 'activemodel', "~> #{active_model_version}" if active_model_version&.length&.positive?
data/activegraph.gemspec CHANGED
@@ -33,8 +33,8 @@ DESCRIPTION
33
33
  s.add_dependency('activemodel', '>= 4.0')
34
34
  s.add_dependency('activesupport', '>= 4.0')
35
35
  s.add_dependency('i18n', '!= 1.8.8') # https://github.com/jruby/jruby/issues/6547
36
- s.add_dependency('neo4j-ruby-driver', '>= 4.4.1')
37
- s.add_dependency('orm_adapter', '~> 0.5.0')
36
+ s.add_dependency('neo4j-ruby-driver', '>= 4.4.1', '< 5')
37
+ s.add_dependency('orm_adapter', '>= 0.5.0')
38
38
  s.add_dependency('sorted_set')
39
39
  s.add_development_dependency('guard')
40
40
  s.add_development_dependency('guard-rspec')
@@ -47,5 +47,5 @@ DESCRIPTION
47
47
  s.add_development_dependency('rubocop', '>= 0.56.0')
48
48
  s.add_development_dependency('yard')
49
49
  s.add_development_dependency('dryspec')
50
- s.add_development_dependency('rspec', '< 3.10') # Cannot proxy frozen objects
50
+ s.add_development_dependency('rspec', '>= 3.10')
51
51
  end
@@ -1,7 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
- require 'active_model/attribute_set'
4
-
5
1
  module ActiveGraph
6
2
  class AttributeSet < ActiveModel::AttributeSet
7
3
  def initialize(attr_hash, attr_list)
@@ -1,6 +1,3 @@
1
- require 'active_graph/core/querable'
2
- require 'active_graph/core/schema'
3
-
4
1
  module ActiveGraph
5
2
  # To contain any base login for Node/Relationship which
6
3
  # is external to the main classes
@@ -26,7 +26,6 @@ module ActiveGraph
26
26
 
27
27
  # @return [Hash] the default file loaded by yaml
28
28
  def defaults
29
- require 'yaml'
30
29
  @defaults ||= ActiveSupport::HashWithIndifferentAccess.new(YAML.load_file(default_file))
31
30
  end
32
31
 
@@ -1,8 +1,3 @@
1
- require 'active_support/concern'
2
- require 'active_support/notifications'
3
- require 'active_graph/ansi'
4
- require 'active_graph/core/logging'
5
-
6
1
  module ActiveGraph
7
2
  module Core
8
3
  module Instrumentable
@@ -1,8 +1,3 @@
1
- require 'active_graph/core/instrumentable'
2
- require 'active_graph/transaction'
3
- require 'active_graph/core/query_builder'
4
- require 'active_graph/core/record'
5
-
6
1
  module ActiveGraph
7
2
  module Core
8
3
  module Querable
@@ -1,7 +1,3 @@
1
- require 'active_graph/core/query_clauses'
2
- require 'active_graph/core/query_find_in_batches'
3
- require 'active_support/notifications'
4
-
5
1
  module ActiveGraph
6
2
  module Core
7
3
  # Allows for generation of cypher queries via ruby method calls (inspired by ActiveRecord / arel syntax)
@@ -15,9 +11,9 @@ module ActiveGraph
15
11
  class Query
16
12
  include ActiveGraph::Core::QueryClauses
17
13
  include ActiveGraph::Core::QueryFindInBatches
14
+ include QueryExt
18
15
  DEFINED_CLAUSES = {}
19
16
 
20
-
21
17
  attr_accessor :clauses
22
18
 
23
19
  class Parameters
@@ -162,8 +158,8 @@ module ActiveGraph
162
158
  # DETACH DELETE clause
163
159
  # @return [Query]
164
160
 
165
- METHODS = %w[start match optional_match call using where create create_unique merge set on_create_set on_match_set remove unwind delete detach_delete with with_distinct return order skip limit] # rubocop:disable Metrics/LineLength
166
- BREAK_METHODS = %(with with_distinct call)
161
+ METHODS = %w[start match optional_match call using where create create_unique merge set on_create_set on_match_set remove unwind delete detach_delete with with_distinct return order skip limit union call_subquery_start call_subquery_end] # rubocop:disable Layout/LineLength
162
+ BREAK_METHODS = %w(with with_distinct call call_subquery_start call_subquery_end)
167
163
 
168
164
  CLAUSIFY_CLAUSE = proc { |method| const_get(method.to_s.split('_').map(&:capitalize).join + 'Clause') }
169
165
  CLAUSES = METHODS.map(&CLAUSIFY_CLAUSE)
@@ -247,7 +243,7 @@ module ActiveGraph
247
243
  neo_id = (node_object.respond_to?(:neo_id) ? node_object.neo_id : node_object)
248
244
 
249
245
  match_method = optional_match ? :optional_match : :match
250
- query.send(match_method, variable).where(variable => {neo_id: neo_id})
246
+ query.send(match_method, variable).where(variable => { neo_id: })
251
247
  end
252
248
  end
253
249
 
@@ -271,7 +267,6 @@ module ActiveGraph
271
267
  # @return [Array]
272
268
  # @raise [ActiveGraph::Server::CypherResponse::ResponseError] Raises errors from neo4j server
273
269
 
274
-
275
270
  # Executes a query without returning the result
276
271
  # @return [Boolean] true if successful
277
272
  # @raise [ActiveGraph::Server::CypherResponse::ResponseError] Raises errors from neo4j server
@@ -318,6 +313,7 @@ module ActiveGraph
318
313
  # @return [String] Resulting cypher query string
319
314
  EMPTY = ' '
320
315
  NEWLINE = "\n"
316
+
321
317
  def to_cypher(options = {})
322
318
  join_string = options[:pretty] ? NEWLINE : EMPTY
323
319
 
@@ -334,6 +330,7 @@ module ActiveGraph
334
330
  cypher_string = "CYPHER #{@options[:parser]} #{cypher_string}" if @options[:parser]
335
331
  cypher_string.tap(&:strip!)
336
332
  end
333
+
337
334
  alias cypher to_cypher
338
335
 
339
336
  def pretty_cypher
@@ -28,7 +28,7 @@ module ActiveGraph
28
28
  def value
29
29
  return @value if @value
30
30
 
31
- [String, Symbol, Integer, Hash, NilClass].each do |arg_class|
31
+ [String, Symbol, Integer, Hash, NilClass, Array].each do |arg_class|
32
32
  from_method = "from_#{arg_class.name.downcase}"
33
33
  return @value = send(from_method, @arg) if @arg.is_a?(arg_class) && respond_to?(from_method)
34
34
  end
@@ -130,13 +130,15 @@ module ActiveGraph
130
130
  def to_cypher(clauses, pretty = false)
131
131
  string = clause_string(clauses, pretty)
132
132
 
133
- final_keyword = if pretty
134
- "#{clause_color}#{keyword}#{ANSI::CLEAR}"
135
- else
136
- keyword
137
- end
133
+ "#{final_keyword(pretty)} #{string}" if !string.empty?
134
+ end
138
135
 
139
- "#{final_keyword} #{string}" if !string.empty?
136
+ def final_keyword(pretty)
137
+ if pretty
138
+ "#{clause_color}#{keyword}#{ANSI::CLEAR}"
139
+ else
140
+ keyword
141
+ end
140
142
  end
141
143
 
142
144
  def clause_string(clauses, pretty)
@@ -256,6 +258,30 @@ module ActiveGraph
256
258
  end
257
259
  end
258
260
 
261
+ class UnionClause < Clause
262
+ KEYWORD = ''
263
+
264
+ def from_array(args)
265
+ "#{args[1]} RETURN #{args[0]} AS #{args.last}"
266
+ end
267
+
268
+ class << self
269
+ def from_args(args, params, options = {})
270
+ params.add_params(args[2])
271
+
272
+ [from_arg(args, params, options)]
273
+ end
274
+
275
+ def clause_strings(clauses)
276
+ clauses.map!(&:value)
277
+ end
278
+
279
+ def clause_join
280
+ ' UNION '
281
+ end
282
+ end
283
+ end
284
+
259
285
  class WhereClause < Clause
260
286
  KEYWORD = 'WHERE'
261
287
 
@@ -349,6 +375,38 @@ module ActiveGraph
349
375
  end
350
376
  end
351
377
 
378
+ class CallSubqueryStartClause < Clause
379
+ KEYWORD = 'CALL {'
380
+
381
+ def from_nilclass(_value)
382
+ ' '
383
+ end
384
+
385
+ def from_string(value)
386
+ value
387
+ end
388
+
389
+ class << self
390
+ def to_cypher(clauses, pretty = false)
391
+ super || final_keyword(pretty)
392
+ end
393
+
394
+ def clause_strings(clauses)
395
+ clauses.map!(&:value)
396
+ end
397
+ end
398
+ end
399
+
400
+ class CallSubqueryEndClause < Clause
401
+ KEYWORD = '}'
402
+
403
+ class << self
404
+ def to_cypher(_clauses, pretty = false)
405
+ final_keyword(pretty)
406
+ end
407
+ end
408
+ end
409
+
352
410
  class MatchClause < Clause
353
411
  KEYWORD = 'MATCH'
354
412
 
@@ -1,6 +1,6 @@
1
1
  module ActiveGraph
2
2
  module Core
3
- class Query
3
+ module QueryExt
4
4
  # Creates a ActiveGraph::Node::Query::QueryProxy object that builds off of a Core::Query object.
5
5
  #
6
6
  # @param [Class] model An Node model to be used as the start of a new QueryuProxy chain
@@ -1,8 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
- require 'active_graph/core/result'
4
- require 'active_support/core_ext/module/attribute_accessors'
5
-
6
1
  module ActiveGraph
7
2
  module Core
8
3
  module Record
@@ -16,6 +16,11 @@ module ActiveGraph
16
16
  @records&.each(&block) || super
17
17
  end
18
18
 
19
+ ## To avoid to_a on Neo4j::Driver::Result as that one does not call the above block
20
+ def to_a
21
+ map.to_a
22
+ end
23
+
19
24
  def store
20
25
  return if @records
21
26
  keys
@@ -8,7 +8,7 @@ module ActiveGraph
8
8
  end
9
9
 
10
10
  class_methods do
11
- def wrapper_callback(proc)
11
+ def wrapper_callback(&proc)
12
12
  fail 'Callback already specified!' if @wrapper_callback
13
13
  @wrapper_callback = proc
14
14
  end
@@ -0,0 +1,33 @@
1
+ class ActiveGraph::Generators::ActiveModel < Rails::Generators::ActiveModel #:nodoc:
2
+ def self.all(klass)
3
+ "#{klass}.all"
4
+ end
5
+
6
+ def self.find(klass, params = nil)
7
+ "#{klass}.find(#{params})"
8
+ end
9
+
10
+ def self.build(klass, params = nil)
11
+ if params
12
+ "#{klass}.new(#{params})"
13
+ else
14
+ "#{klass}.new"
15
+ end
16
+ end
17
+
18
+ def save
19
+ "#{name}.save"
20
+ end
21
+
22
+ def update_attributes(params = nil)
23
+ "#{name}.update_attributes(#{params})"
24
+ end
25
+
26
+ def errors
27
+ "#{name}.errors"
28
+ end
29
+
30
+ def destroy
31
+ "#{name}.destroy"
32
+ end
33
+ end
@@ -0,0 +1,17 @@
1
+ module ActiveGraph
2
+ module Generators
3
+ module GeneratedAttribute #:nodoc:
4
+ def type_class
5
+ case type.to_s.downcase
6
+ when 'any' then 'any'
7
+ when 'datetime' then 'DateTime'
8
+ when 'date' then 'Date'
9
+ when 'integer', 'number', 'fixnum' then 'Integer'
10
+ when 'float' then 'Float'
11
+ else
12
+ 'String'
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -1,7 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
- require File.join(File.dirname(__FILE__), '..', '..', '..', '..', 'active_graph.rb')
4
-
5
1
  module ActiveGraph
6
2
  module Generators
7
3
  class MigrationGenerator < ::Rails::Generators::NamedBase
@@ -1,13 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
- require 'rails/generators/named_base'
4
- require 'rails/generators/active_model'
5
-
6
- module ActiveGraph
7
- module Generators #:nodoc:
8
- end
9
- end
10
-
11
1
  module ActiveGraph::Generators::MigrationHelper
12
2
  extend ActiveSupport::Concern
13
3
 
@@ -54,68 +44,3 @@ module ActiveGraph::Generators::MigrationHelper
54
44
  FileUtils.rm(real_file_name) if @behavior == :revoke
55
45
  end
56
46
  end
57
-
58
- module ActiveGraph::Generators::SourcePathHelper
59
- extend ActiveSupport::Concern
60
-
61
- module ClassMethods
62
- def source_root
63
- @_neo4j_source_root ||= File.expand_path(File.join(File.dirname(__FILE__),
64
- 'active_graph', generator_name, 'templates'))
65
- end
66
- end
67
- end
68
-
69
-
70
- class ActiveGraph::Generators::ActiveModel < Rails::Generators::ActiveModel #:nodoc:
71
- def self.all(klass)
72
- "#{klass}.all"
73
- end
74
-
75
- def self.find(klass, params = nil)
76
- "#{klass}.find(#{params})"
77
- end
78
-
79
- def self.build(klass, params = nil)
80
- if params
81
- "#{klass}.new(#{params})"
82
- else
83
- "#{klass}.new"
84
- end
85
- end
86
-
87
- def save
88
- "#{name}.save"
89
- end
90
-
91
- def update_attributes(params = nil)
92
- "#{name}.update_attributes(#{params})"
93
- end
94
-
95
- def errors
96
- "#{name}.errors"
97
- end
98
-
99
- def destroy
100
- "#{name}.destroy"
101
- end
102
- end
103
-
104
-
105
- module Rails
106
- module Generators
107
- class GeneratedAttribute #:nodoc:
108
- def type_class
109
- case type.to_s.downcase
110
- when 'any' then 'any'
111
- when 'datetime' then 'DateTime'
112
- when 'date' then 'Date'
113
- when 'integer', 'number', 'fixnum' then 'Integer'
114
- when 'float' then 'Float'
115
- else
116
- 'String'
117
- end
118
- end
119
- end
120
- end
121
- end
@@ -1,7 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
- require File.join(File.dirname(__FILE__), '..', '..', '..', '..', 'active_graph.rb')
4
-
5
1
  class ActiveGraph::Generators::ModelGenerator < Rails::Generators::NamedBase #:nodoc:
6
2
  include ::ActiveGraph::Generators::SourcePathHelper
7
3
  include ::ActiveGraph::Generators::MigrationHelper
@@ -0,0 +1,10 @@
1
+ module ActiveGraph::Generators::SourcePathHelper
2
+ extend ActiveSupport::Concern
3
+
4
+ module ClassMethods
5
+ def source_root
6
+ @_neo4j_source_root ||= File.expand_path(File.join(File.dirname(__FILE__),
7
+ generator_name, 'templates'))
8
+ end
9
+ end
10
+ end
@@ -1,7 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
- require File.join(File.dirname(__FILE__), '..', '..', '..', '..', 'active_graph.rb')
4
-
5
1
  module ActiveGraph
6
2
  module Generators
7
3
  class UpgradeV8Generator < ::Rails::Generators::Base
@@ -1,5 +1,3 @@
1
- require 'active_model/attribute_set'
2
-
3
1
  module ActiveGraph
4
2
  class LazyAttributeHash < ActiveModel::LazyAttributeHash
5
3
  def initialize(values, attr_list)
@@ -1,6 +1,3 @@
1
- require 'benchmark'
2
- require 'active_graph/migrations/helpers/id_property'
3
-
4
1
  module ActiveGraph
5
2
  class Migration
6
3
  def migrate
@@ -1,14 +1,7 @@
1
- require 'benchmark'
2
-
3
1
  module ActiveGraph
4
2
  module Migrations
5
3
  module Helpers
6
4
  extend ActiveSupport::Concern
7
- extend ActiveSupport::Autoload
8
-
9
- autoload :Schema
10
- autoload :IdProperty
11
- autoload :Relationships
12
5
 
13
6
  PROPERTY_ALREADY_DEFINED = 'Property `%{new_property}` is already defined in `%{label}`. '\
14
7
  'To overwrite, call `remove_property(:%{label}, :%{new_property})` before this method.'.freeze
@@ -1,7 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
- require 'sorted_set'
4
-
5
1
  module ActiveGraph
6
2
  module Migrations
7
3
  class Runner
@@ -1,13 +1,5 @@
1
1
  module ActiveGraph
2
2
  module Migrations
3
- extend ActiveSupport::Autoload
4
- autoload :Helpers
5
- autoload :MigrationFile
6
- autoload :Base
7
- autoload :Runner
8
- autoload :SchemaMigration
9
- autoload :CheckPending
10
-
11
3
  class << self
12
4
  def check_for_pending_migrations!
13
5
  return if ActiveGraph::Config.configuration['skip_migration_check']
@@ -1,4 +1,3 @@
1
- require 'set'
2
1
  module ActiveGraph
3
2
  # This is here to support the removed functionality of being able to
4
3
  # defined indexes and constraints on models
@@ -1,6 +1,3 @@
1
- require 'active_support/inflector/inflections'
2
- require 'active_graph/class_arguments'
3
-
4
1
  module ActiveGraph
5
2
  module Node
6
3
  module HasN
@@ -1,5 +1,3 @@
1
- require 'active_graph/core/label'
2
-
3
1
  module ActiveGraph
4
2
  module Node
5
3
  # Provides a mapping between neo4j labels and Ruby classes
@@ -76,7 +74,7 @@ module ActiveGraph
76
74
 
77
75
  def self.clear_wrapped_models
78
76
  MODELS_FOR_LABELS_CACHE.clear
79
- ActiveGraph::NodeWrapping::CONSTANTS_FOR_LABELS_CACHE.clear
77
+ ActiveGraph::Node::Wrapping::CONSTANTS_FOR_LABELS_CACHE.clear
80
78
  end
81
79
 
82
80
  module ClassMethods
@@ -1,11 +1,5 @@
1
- require 'orm_adapter'
2
-
3
1
  module ActiveGraph
4
2
  module Node
5
- module ClassMethods
6
- include OrmAdapter::ToAdapter
7
- end
8
-
9
3
  class OrmAdapter < ::OrmAdapter::Base
10
4
  module ClassMethods
11
5
  include ActiveModel::Callbacks