diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/arel.rb | 3 | ||||
-rw-r--r-- | lib/arel/engine.rb (renamed from lib/arel/engines/engine.rb) | 0 | ||||
-rw-r--r-- | lib/arel/engines.rb | 1 | ||||
-rw-r--r-- | lib/arel/relations.rb | 23 | ||||
-rw-r--r-- | lib/arel/relations/operations.rb | 8 | ||||
-rw-r--r-- | lib/arel/relations/operations/alias.rb (renamed from lib/arel/relations/alias.rb) | 0 | ||||
-rw-r--r-- | lib/arel/relations/operations/group.rb (renamed from lib/arel/relations/group.rb) | 0 | ||||
-rw-r--r-- | lib/arel/relations/operations/join.rb (renamed from lib/arel/relations/join.rb) | 0 | ||||
-rw-r--r-- | lib/arel/relations/operations/order.rb (renamed from lib/arel/relations/order.rb) | 0 | ||||
-rw-r--r-- | lib/arel/relations/operations/project.rb (renamed from lib/arel/relations/project.rb) | 0 | ||||
-rw-r--r-- | lib/arel/relations/operations/skip.rb (renamed from lib/arel/relations/skip.rb) | 0 | ||||
-rw-r--r-- | lib/arel/relations/operations/take.rb (renamed from lib/arel/relations/take.rb) | 0 | ||||
-rw-r--r-- | lib/arel/relations/operations/where.rb (renamed from lib/arel/relations/where.rb) | 0 | ||||
-rw-r--r-- | lib/arel/relations/utilities.rb | 5 | ||||
-rw-r--r-- | lib/arel/relations/utilities/aggregation.rb (renamed from lib/arel/relations/aggregation.rb) | 0 | ||||
-rw-r--r-- | lib/arel/relations/utilities/compound.rb (renamed from lib/arel/relations/compound.rb) | 0 | ||||
-rw-r--r-- | lib/arel/relations/utilities/nil.rb (renamed from lib/arel/relations/nil.rb) | 0 | ||||
-rw-r--r-- | lib/arel/relations/utilities/recursion.rb (renamed from lib/arel/relations/recursion.rb) | 0 | ||||
-rw-r--r-- | lib/arel/relations/writes.rb | 3 | ||||
-rw-r--r-- | lib/arel/relations/writes/delete.rb (renamed from lib/arel/relations/delete.rb) | 2 | ||||
-rw-r--r-- | lib/arel/relations/writes/insert.rb (renamed from lib/arel/relations/insert.rb) | 2 | ||||
-rw-r--r-- | lib/arel/relations/writes/update.rb (renamed from lib/arel/relations/update.rb) | 2 | ||||
-rw-r--r-- | lib/arel/relations/writing.rb | 4 | ||||
-rw-r--r-- | lib/arel/session.rb (renamed from lib/arel/sessions/session.rb) | 0 |
24 files changed, 27 insertions, 26 deletions
diff --git a/lib/arel.rb b/lib/arel.rb index 75489c9c6e..b4fae65f73 100644 --- a/lib/arel.rb +++ b/lib/arel.rb @@ -8,5 +8,6 @@ require 'arel/extensions' require 'arel/sql' require 'arel/predicates' require 'arel/relations' -require 'arel/engines' +require 'arel/engine' +require 'arel/session' require 'arel/primitives'
\ No newline at end of file diff --git a/lib/arel/engines/engine.rb b/lib/arel/engine.rb index b0b7b4e955..b0b7b4e955 100644 --- a/lib/arel/engines/engine.rb +++ b/lib/arel/engine.rb diff --git a/lib/arel/engines.rb b/lib/arel/engines.rb deleted file mode 100644 index bb71537e9c..0000000000 --- a/lib/arel/engines.rb +++ /dev/null @@ -1 +0,0 @@ -require 'arel/engines/engine'
\ No newline at end of file diff --git a/lib/arel/relations.rb b/lib/arel/relations.rb index 364235fb49..3394fac7cb 100644 --- a/lib/arel/relations.rb +++ b/lib/arel/relations.rb @@ -1,19 +1,8 @@ -require 'arel/relations/recursion' require 'arel/relations/relation' -require 'arel/relations/nil' -require 'arel/relations/compound' -require 'arel/relations/writing' + +require 'arel/relations/utilities' + require 'arel/relations/table' -require 'arel/relations/aggregation' -require 'arel/relations/join' -require 'arel/relations/group' -require 'arel/relations/project' -require 'arel/relations/where' -require 'arel/relations/order' -require 'arel/relations/take' -require 'arel/relations/skip' -require 'arel/relations/delete' -require 'arel/relations/insert' -require 'arel/relations/update' -require 'arel/relations/alias' -require 'arel/sessions/session'
\ No newline at end of file + +require 'arel/relations/writes' +require 'arel/relations/operations'
\ No newline at end of file diff --git a/lib/arel/relations/operations.rb b/lib/arel/relations/operations.rb new file mode 100644 index 0000000000..c598c7fcc9 --- /dev/null +++ b/lib/arel/relations/operations.rb @@ -0,0 +1,8 @@ +require 'arel/relations/operations/alias' +require 'arel/relations/operations/group' +require 'arel/relations/operations/join' +require 'arel/relations/operations/order' +require 'arel/relations/operations/project' +require 'arel/relations/operations/where' +require 'arel/relations/operations/skip' +require 'arel/relations/operations/take'
\ No newline at end of file diff --git a/lib/arel/relations/alias.rb b/lib/arel/relations/operations/alias.rb index d14a51f67a..d14a51f67a 100644 --- a/lib/arel/relations/alias.rb +++ b/lib/arel/relations/operations/alias.rb diff --git a/lib/arel/relations/group.rb b/lib/arel/relations/operations/group.rb index bc3a7f3437..bc3a7f3437 100644 --- a/lib/arel/relations/group.rb +++ b/lib/arel/relations/operations/group.rb diff --git a/lib/arel/relations/join.rb b/lib/arel/relations/operations/join.rb index acad75c817..acad75c817 100644 --- a/lib/arel/relations/join.rb +++ b/lib/arel/relations/operations/join.rb diff --git a/lib/arel/relations/order.rb b/lib/arel/relations/operations/order.rb index ebb4dc0668..ebb4dc0668 100644 --- a/lib/arel/relations/order.rb +++ b/lib/arel/relations/operations/order.rb diff --git a/lib/arel/relations/project.rb b/lib/arel/relations/operations/project.rb index 0efc13bdb3..0efc13bdb3 100644 --- a/lib/arel/relations/project.rb +++ b/lib/arel/relations/operations/project.rb diff --git a/lib/arel/relations/skip.rb b/lib/arel/relations/operations/skip.rb index 01ac4c7204..01ac4c7204 100644 --- a/lib/arel/relations/skip.rb +++ b/lib/arel/relations/operations/skip.rb diff --git a/lib/arel/relations/take.rb b/lib/arel/relations/operations/take.rb index 0a49891aee..0a49891aee 100644 --- a/lib/arel/relations/take.rb +++ b/lib/arel/relations/operations/take.rb diff --git a/lib/arel/relations/where.rb b/lib/arel/relations/operations/where.rb index ba34846c04..ba34846c04 100644 --- a/lib/arel/relations/where.rb +++ b/lib/arel/relations/operations/where.rb diff --git a/lib/arel/relations/utilities.rb b/lib/arel/relations/utilities.rb new file mode 100644 index 0000000000..02c2e0a952 --- /dev/null +++ b/lib/arel/relations/utilities.rb @@ -0,0 +1,5 @@ +require 'arel/relations/utilities/compound' +require 'arel/relations/utilities/recursion' +require 'arel/relations/utilities/nil' +require 'arel/relations/utilities/aggregation' +require 'arel/relations/utilities/recursion'
\ No newline at end of file diff --git a/lib/arel/relations/aggregation.rb b/lib/arel/relations/utilities/aggregation.rb index 66150bff0a..66150bff0a 100644 --- a/lib/arel/relations/aggregation.rb +++ b/lib/arel/relations/utilities/aggregation.rb diff --git a/lib/arel/relations/compound.rb b/lib/arel/relations/utilities/compound.rb index a77099e0de..a77099e0de 100644 --- a/lib/arel/relations/compound.rb +++ b/lib/arel/relations/utilities/compound.rb diff --git a/lib/arel/relations/nil.rb b/lib/arel/relations/utilities/nil.rb index 2dcfb47233..2dcfb47233 100644 --- a/lib/arel/relations/nil.rb +++ b/lib/arel/relations/utilities/nil.rb diff --git a/lib/arel/relations/recursion.rb b/lib/arel/relations/utilities/recursion.rb index 848b059507..848b059507 100644 --- a/lib/arel/relations/recursion.rb +++ b/lib/arel/relations/utilities/recursion.rb diff --git a/lib/arel/relations/writes.rb b/lib/arel/relations/writes.rb new file mode 100644 index 0000000000..1495d9c857 --- /dev/null +++ b/lib/arel/relations/writes.rb @@ -0,0 +1,3 @@ +require 'arel/relations/writes/delete' +require 'arel/relations/writes/update' +require 'arel/relations/writes/insert'
\ No newline at end of file diff --git a/lib/arel/relations/delete.rb b/lib/arel/relations/writes/delete.rb index 7edc328e4a..2eaad6d1da 100644 --- a/lib/arel/relations/delete.rb +++ b/lib/arel/relations/writes/delete.rb @@ -1,5 +1,5 @@ module Arel - class Deletion < Writing + class Deletion < Compound def initialize(relation) @relation = relation end diff --git a/lib/arel/relations/insert.rb b/lib/arel/relations/writes/insert.rb index b190ccb211..a1c4c93de5 100644 --- a/lib/arel/relations/insert.rb +++ b/lib/arel/relations/writes/insert.rb @@ -1,5 +1,5 @@ module Arel - class Insert < Writing + class Insert < Compound attr_reader :record def initialize(relation, record) diff --git a/lib/arel/relations/update.rb b/lib/arel/relations/writes/update.rb index 450f06af96..760f4e931f 100644 --- a/lib/arel/relations/update.rb +++ b/lib/arel/relations/writes/update.rb @@ -1,5 +1,5 @@ module Arel - class Update < Writing + class Update < Compound attr_reader :assignments def initialize(relation, assignments) diff --git a/lib/arel/relations/writing.rb b/lib/arel/relations/writing.rb deleted file mode 100644 index b871e5a520..0000000000 --- a/lib/arel/relations/writing.rb +++ /dev/null @@ -1,4 +0,0 @@ -module Arel - class Writing < Compound - end -end
\ No newline at end of file diff --git a/lib/arel/sessions/session.rb b/lib/arel/session.rb index 8b72fd1fe6..8b72fd1fe6 100644 --- a/lib/arel/sessions/session.rb +++ b/lib/arel/session.rb |