arel-compat 0.4.0
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.
- data/History.txt +25 -0
- data/README.markdown +182 -0
- data/lib/arel.rb +13 -0
- data/lib/arel/algebra.rb +10 -0
- data/lib/arel/algebra/attributes.rb +7 -0
- data/lib/arel/algebra/attributes/attribute.rb +270 -0
- data/lib/arel/algebra/attributes/boolean.rb +21 -0
- data/lib/arel/algebra/attributes/decimal.rb +9 -0
- data/lib/arel/algebra/attributes/float.rb +9 -0
- data/lib/arel/algebra/attributes/integer.rb +10 -0
- data/lib/arel/algebra/attributes/string.rb +10 -0
- data/lib/arel/algebra/attributes/time.rb +6 -0
- data/lib/arel/algebra/core_extensions.rb +4 -0
- data/lib/arel/algebra/core_extensions/class.rb +32 -0
- data/lib/arel/algebra/core_extensions/hash.rb +11 -0
- data/lib/arel/algebra/core_extensions/object.rb +30 -0
- data/lib/arel/algebra/core_extensions/symbol.rb +9 -0
- data/lib/arel/algebra/expression.rb +43 -0
- data/lib/arel/algebra/header.rb +67 -0
- data/lib/arel/algebra/ordering.rb +23 -0
- data/lib/arel/algebra/predicates.rb +190 -0
- data/lib/arel/algebra/relations.rb +17 -0
- data/lib/arel/algebra/relations/operations/alias.rb +7 -0
- data/lib/arel/algebra/relations/operations/from.rb +6 -0
- data/lib/arel/algebra/relations/operations/group.rb +12 -0
- data/lib/arel/algebra/relations/operations/having.rb +17 -0
- data/lib/arel/algebra/relations/operations/join.rb +69 -0
- data/lib/arel/algebra/relations/operations/lock.rb +12 -0
- data/lib/arel/algebra/relations/operations/order.rb +19 -0
- data/lib/arel/algebra/relations/operations/project.rb +20 -0
- data/lib/arel/algebra/relations/operations/skip.rb +7 -0
- data/lib/arel/algebra/relations/operations/take.rb +11 -0
- data/lib/arel/algebra/relations/operations/where.rb +17 -0
- data/lib/arel/algebra/relations/relation.rb +136 -0
- data/lib/arel/algebra/relations/row.rb +26 -0
- data/lib/arel/algebra/relations/utilities/compound.rb +54 -0
- data/lib/arel/algebra/relations/utilities/externalization.rb +24 -0
- data/lib/arel/algebra/relations/utilities/nil.rb +7 -0
- data/lib/arel/algebra/relations/writes.rb +36 -0
- data/lib/arel/algebra/value.rb +14 -0
- data/lib/arel/engines.rb +2 -0
- data/lib/arel/engines/memory.rb +4 -0
- data/lib/arel/engines/memory/engine.rb +16 -0
- data/lib/arel/engines/memory/predicates.rb +99 -0
- data/lib/arel/engines/memory/primitives.rb +27 -0
- data/lib/arel/engines/memory/relations.rb +5 -0
- data/lib/arel/engines/memory/relations/array.rb +35 -0
- data/lib/arel/engines/memory/relations/compound.rb +9 -0
- data/lib/arel/engines/memory/relations/operations.rb +67 -0
- data/lib/arel/engines/memory/relations/writes.rb +7 -0
- data/lib/arel/engines/sql.rb +8 -0
- data/lib/arel/engines/sql/attributes.rb +40 -0
- data/lib/arel/engines/sql/christener.rb +14 -0
- data/lib/arel/engines/sql/compilers/ibm_db_compiler.rb +48 -0
- data/lib/arel/engines/sql/compilers/mysql_compiler.rb +11 -0
- data/lib/arel/engines/sql/compilers/oracle_compiler.rb +95 -0
- data/lib/arel/engines/sql/compilers/postgresql_compiler.rb +42 -0
- data/lib/arel/engines/sql/compilers/sqlite_compiler.rb +9 -0
- data/lib/arel/engines/sql/core_extensions.rb +4 -0
- data/lib/arel/engines/sql/core_extensions/array.rb +24 -0
- data/lib/arel/engines/sql/core_extensions/nil_class.rb +15 -0
- data/lib/arel/engines/sql/core_extensions/object.rb +19 -0
- data/lib/arel/engines/sql/core_extensions/range.rb +19 -0
- data/lib/arel/engines/sql/engine.rb +55 -0
- data/lib/arel/engines/sql/formatters.rb +122 -0
- data/lib/arel/engines/sql/predicates.rb +103 -0
- data/lib/arel/engines/sql/primitives.rb +97 -0
- data/lib/arel/engines/sql/relations.rb +10 -0
- data/lib/arel/engines/sql/relations/compiler.rb +118 -0
- data/lib/arel/engines/sql/relations/operations/alias.rb +5 -0
- data/lib/arel/engines/sql/relations/operations/join.rb +33 -0
- data/lib/arel/engines/sql/relations/relation.rb +65 -0
- data/lib/arel/engines/sql/relations/table.rb +88 -0
- data/lib/arel/engines/sql/relations/utilities/compound.rb +10 -0
- data/lib/arel/engines/sql/relations/utilities/externalization.rb +14 -0
- data/lib/arel/engines/sql/relations/utilities/nil.rb +6 -0
- data/lib/arel/engines/sql/relations/utilities/recursion.rb +13 -0
- data/lib/arel/engines/sql/relations/writes.rb +19 -0
- data/lib/arel/session.rb +51 -0
- data/lib/arel/version.rb +3 -0
- data/spec/algebra/unit/predicates/binary_spec.rb +35 -0
- data/spec/algebra/unit/predicates/equality_spec.rb +29 -0
- data/spec/algebra/unit/predicates/in_spec.rb +12 -0
- data/spec/algebra/unit/primitives/attribute_spec.rb +181 -0
- data/spec/algebra/unit/primitives/expression_spec.rb +45 -0
- data/spec/algebra/unit/primitives/value_spec.rb +15 -0
- data/spec/algebra/unit/relations/alias_spec.rb +16 -0
- data/spec/algebra/unit/relations/delete_spec.rb +9 -0
- data/spec/algebra/unit/relations/group_spec.rb +10 -0
- data/spec/algebra/unit/relations/insert_spec.rb +9 -0
- data/spec/algebra/unit/relations/join_spec.rb +25 -0
- data/spec/algebra/unit/relations/order_spec.rb +21 -0
- data/spec/algebra/unit/relations/project_spec.rb +34 -0
- data/spec/algebra/unit/relations/relation_spec.rb +187 -0
- data/spec/algebra/unit/relations/skip_spec.rb +10 -0
- data/spec/algebra/unit/relations/table_spec.rb +38 -0
- data/spec/algebra/unit/relations/take_spec.rb +10 -0
- data/spec/algebra/unit/relations/update_spec.rb +9 -0
- data/spec/algebra/unit/relations/where_spec.rb +19 -0
- data/spec/algebra/unit/session/session_spec.rb +84 -0
- data/spec/attributes/boolean_spec.rb +57 -0
- data/spec/attributes/float_spec.rb +119 -0
- data/spec/attributes/header_spec.rb +42 -0
- data/spec/attributes/integer_spec.rb +119 -0
- data/spec/attributes/string_spec.rb +43 -0
- data/spec/attributes/time_spec.rb +24 -0
- data/spec/engines/memory/integration/joins/cross_engine_spec.rb +51 -0
- data/spec/engines/memory/unit/relations/array_spec.rb +32 -0
- data/spec/engines/memory/unit/relations/insert_spec.rb +28 -0
- data/spec/engines/memory/unit/relations/join_spec.rb +31 -0
- data/spec/engines/memory/unit/relations/order_spec.rb +27 -0
- data/spec/engines/memory/unit/relations/project_spec.rb +27 -0
- data/spec/engines/memory/unit/relations/skip_spec.rb +26 -0
- data/spec/engines/memory/unit/relations/take_spec.rb +26 -0
- data/spec/engines/memory/unit/relations/where_spec.rb +39 -0
- data/spec/engines/sql/integration/joins/with_adjacency_spec.rb +258 -0
- data/spec/engines/sql/integration/joins/with_aggregations_spec.rb +221 -0
- data/spec/engines/sql/integration/joins/with_compounds_spec.rb +137 -0
- data/spec/engines/sql/unit/engine_spec.rb +45 -0
- data/spec/engines/sql/unit/predicates/binary_spec.rb +140 -0
- data/spec/engines/sql/unit/predicates/equality_spec.rb +75 -0
- data/spec/engines/sql/unit/predicates/in_spec.rb +179 -0
- data/spec/engines/sql/unit/predicates/noteq_spec.rb +75 -0
- data/spec/engines/sql/unit/predicates/predicates_spec.rb +79 -0
- data/spec/engines/sql/unit/primitives/attribute_spec.rb +36 -0
- data/spec/engines/sql/unit/primitives/expression_spec.rb +28 -0
- data/spec/engines/sql/unit/primitives/literal_spec.rb +43 -0
- data/spec/engines/sql/unit/primitives/value_spec.rb +29 -0
- data/spec/engines/sql/unit/relations/alias_spec.rb +53 -0
- data/spec/engines/sql/unit/relations/delete_spec.rb +83 -0
- data/spec/engines/sql/unit/relations/from_spec.rb +64 -0
- data/spec/engines/sql/unit/relations/group_spec.rb +72 -0
- data/spec/engines/sql/unit/relations/having_spec.rb +78 -0
- data/spec/engines/sql/unit/relations/insert_spec.rb +143 -0
- data/spec/engines/sql/unit/relations/join_spec.rb +180 -0
- data/spec/engines/sql/unit/relations/lock_spec.rb +86 -0
- data/spec/engines/sql/unit/relations/order_spec.rb +161 -0
- data/spec/engines/sql/unit/relations/project_spec.rb +143 -0
- data/spec/engines/sql/unit/relations/skip_spec.rb +41 -0
- data/spec/engines/sql/unit/relations/table_spec.rb +129 -0
- data/spec/engines/sql/unit/relations/take_spec.rb +49 -0
- data/spec/engines/sql/unit/relations/update_spec.rb +203 -0
- data/spec/engines/sql/unit/relations/where_spec.rb +72 -0
- data/spec/relations/join_spec.rb +42 -0
- data/spec/relations/relation_spec.rb +31 -0
- data/spec/shared/relation_spec.rb +255 -0
- data/spec/spec_helper.rb +36 -0
- data/spec/support/check.rb +6 -0
- data/spec/support/connections/mysql_connection.rb +14 -0
- data/spec/support/connections/oracle_connection.rb +17 -0
- data/spec/support/connections/postgresql_connection.rb +13 -0
- data/spec/support/connections/sqlite3_connection.rb +24 -0
- data/spec/support/guards.rb +28 -0
- data/spec/support/matchers.rb +4 -0
- data/spec/support/matchers/be_like.rb +24 -0
- data/spec/support/matchers/disambiguate_attributes.rb +28 -0
- data/spec/support/matchers/hash_the_same_as.rb +26 -0
- data/spec/support/matchers/have_rows.rb +18 -0
- data/spec/support/model.rb +62 -0
- data/spec/support/schemas/mysql_schema.rb +26 -0
- data/spec/support/schemas/oracle_schema.rb +20 -0
- data/spec/support/schemas/postgresql_schema.rb +26 -0
- data/spec/support/schemas/sqlite3_schema.rb +26 -0
- metadata +258 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
module AdapterGuards
|
2
|
+
def adapter_is(*names)
|
3
|
+
names = names.map(&:to_s)
|
4
|
+
names.each{|name| verify_adapter_name(name)}
|
5
|
+
yield if names.include? adapter_name
|
6
|
+
end
|
7
|
+
|
8
|
+
def adapter_is_not(*names)
|
9
|
+
names = names.map(&:to_s)
|
10
|
+
names.each{|name| verify_adapter_name(name)}
|
11
|
+
yield unless names.include? adapter_name
|
12
|
+
end
|
13
|
+
|
14
|
+
def adapter_name
|
15
|
+
name = ActiveRecord::Base.configurations["unit"][:adapter]
|
16
|
+
name = 'oracle' if name == 'oracle_enhanced'
|
17
|
+
verify_adapter_name(name)
|
18
|
+
name
|
19
|
+
end
|
20
|
+
|
21
|
+
def verify_adapter_name(name)
|
22
|
+
raise "Invalid adapter name: #{name}" unless valid_adapters.include?(name.to_s)
|
23
|
+
end
|
24
|
+
|
25
|
+
def valid_adapters
|
26
|
+
%w[mysql postgresql sqlite3 oracle]
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Matchers
|
2
|
+
class BeLike
|
3
|
+
def initialize(expected)
|
4
|
+
@expected = expected.gsub(/\s+/, ' ').strip
|
5
|
+
end
|
6
|
+
|
7
|
+
def matches?(actual)
|
8
|
+
@actual = actual.gsub(/\s+/, ' ').strip
|
9
|
+
@expected == @actual
|
10
|
+
end
|
11
|
+
|
12
|
+
def failure_message
|
13
|
+
"expected\n#{@actual}\nto be like\n#{@expected}"
|
14
|
+
end
|
15
|
+
|
16
|
+
def negative_failure_message
|
17
|
+
"expected\n#{@actual}\nto be unlike\n#{@expected}"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def be_like(expected)
|
22
|
+
BeLike.new(expected)
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Matchers
|
2
|
+
class DisambiguateAttributes
|
3
|
+
def initialize(attributes)
|
4
|
+
@attributes = attributes
|
5
|
+
end
|
6
|
+
|
7
|
+
def matches?(actual)
|
8
|
+
@actual = actual
|
9
|
+
attribute1, attribute2 = @attributes
|
10
|
+
@actual[attribute1].descends_from?(attribute1) &&
|
11
|
+
!@actual[attribute1].descends_from?(attribute2) &&
|
12
|
+
@actual[attribute2].descends_from?(attribute2)
|
13
|
+
end
|
14
|
+
|
15
|
+
def failure_message
|
16
|
+
""
|
17
|
+
# "expected #{@actual} to disambiguate its attributes"
|
18
|
+
end
|
19
|
+
|
20
|
+
def negative_failure_message
|
21
|
+
"expected #{@actual} to not disambiguate its attributes"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def disambiguate_attributes(*attributes)
|
26
|
+
DisambiguateAttributes.new(attributes)
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Matchers
|
2
|
+
class HashTheSameAs
|
3
|
+
def initialize(expected)
|
4
|
+
@expected = expected
|
5
|
+
end
|
6
|
+
|
7
|
+
def matches?(actual)
|
8
|
+
@actual = actual
|
9
|
+
hash = {}
|
10
|
+
hash[@expected] = :some_arbitrary_value
|
11
|
+
hash[@actual] == :some_arbitrary_value
|
12
|
+
end
|
13
|
+
|
14
|
+
def failure_message
|
15
|
+
"expected #{@actual} to hash the same as #{@expected}; they must be `eql?` and have the same `#hash` value"
|
16
|
+
end
|
17
|
+
|
18
|
+
def negative_failure_message
|
19
|
+
"expected #{@actual} to hash differently than #{@expected}; they must not be `eql?` or have a differing `#hash` values"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def hash_the_same_as(expected)
|
24
|
+
HashTheSameAs.new(expected)
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Matchers
|
2
|
+
def have_rows(expected)
|
3
|
+
simple_matcher "have rows" do |given, matcher|
|
4
|
+
found, got, expected = [], [], expected.map { |r| r.tuple }
|
5
|
+
given.each do |row|
|
6
|
+
got << row.tuple
|
7
|
+
found << expected.find { |r| row.tuple == r }
|
8
|
+
end
|
9
|
+
|
10
|
+
matcher.failure_message = "Expected to get:\n" \
|
11
|
+
"#{expected.map {|r| " #{r.inspect}" }.join("\n")}\n" \
|
12
|
+
"instead, got:\n" \
|
13
|
+
"#{got.map {|r| " #{r.inspect}" }.join("\n")}"
|
14
|
+
|
15
|
+
found.compact.length == expected.length && got.compact.length == expected.length
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
module Arel
|
2
|
+
module Testing
|
3
|
+
class Engine
|
4
|
+
attr_reader :rows
|
5
|
+
|
6
|
+
def initialize
|
7
|
+
@rows = []
|
8
|
+
end
|
9
|
+
|
10
|
+
def supports(operation)
|
11
|
+
false
|
12
|
+
end
|
13
|
+
|
14
|
+
def read(relation)
|
15
|
+
@rows.dup.map { |r| Row.new(relation, r) }
|
16
|
+
end
|
17
|
+
|
18
|
+
def create(insert)
|
19
|
+
@rows << insert.record.tuple
|
20
|
+
insert
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
class Model
|
26
|
+
include Relation
|
27
|
+
|
28
|
+
attr_reader :engine
|
29
|
+
|
30
|
+
def self.build
|
31
|
+
relation = new
|
32
|
+
yield relation
|
33
|
+
relation
|
34
|
+
end
|
35
|
+
|
36
|
+
def initialize
|
37
|
+
@attributes = []
|
38
|
+
end
|
39
|
+
|
40
|
+
def engine(engine = nil)
|
41
|
+
@engine = engine if engine
|
42
|
+
@engine
|
43
|
+
end
|
44
|
+
|
45
|
+
def attribute(name, type)
|
46
|
+
@attributes << type.new(self, name)
|
47
|
+
end
|
48
|
+
|
49
|
+
def attributes
|
50
|
+
Header.new(@attributes)
|
51
|
+
end
|
52
|
+
|
53
|
+
def format(attribute, value)
|
54
|
+
value
|
55
|
+
end
|
56
|
+
|
57
|
+
def insert(row)
|
58
|
+
insert = super Arel::Row.new(self, row)
|
59
|
+
insert.record
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
sql = <<-SQL
|
2
|
+
DROP TABLE IF EXISTS users;
|
3
|
+
CREATE TABLE users (
|
4
|
+
id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
5
|
+
name VARCHAR(255) NOT NULL
|
6
|
+
);
|
7
|
+
|
8
|
+
DROP TABLE IF EXISTS photos;
|
9
|
+
CREATE TABLE photos (
|
10
|
+
id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
11
|
+
user_id INTEGER NOT NULL,
|
12
|
+
camera_id INTEGER NOT NULL
|
13
|
+
);
|
14
|
+
DROP TABLE IF EXISTS developers;
|
15
|
+
CREATE TABLE developers (
|
16
|
+
id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
17
|
+
name VARCHAR(255) NOT NULL,
|
18
|
+
salary INTEGER NOT NULL,
|
19
|
+
department VARCHAR(255) NOT NULL,
|
20
|
+
created_at TIMESTAMP NOT NULL
|
21
|
+
);
|
22
|
+
SQL
|
23
|
+
|
24
|
+
sql.split(/;/).select(&:present?).each do |sql_statement|
|
25
|
+
ActiveRecord::Base.connection.execute sql_statement
|
26
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
ActiveRecord::Schema.define do
|
2
|
+
suppress_messages do
|
3
|
+
create_table :users, :primary_key_trigger => true, :force => true do |t|
|
4
|
+
t.string :name, :limit => 255, :null => false
|
5
|
+
end
|
6
|
+
|
7
|
+
create_table :photos, :primary_key_trigger => true, :force => true do |t|
|
8
|
+
t.integer :user_id
|
9
|
+
t.integer :camera_id
|
10
|
+
end
|
11
|
+
|
12
|
+
create_table :developers, :primary_key_trigger => true, :force => true do |t|
|
13
|
+
t.string :name, :limit => 255, :null => false
|
14
|
+
t.integer :salary
|
15
|
+
t.string :department, :limit => 255, :null => false
|
16
|
+
t.timestamp :created_at, :null => false
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
sql = <<-SQL
|
2
|
+
DROP TABLE IF EXISTS users;
|
3
|
+
CREATE TABLE users (
|
4
|
+
id SERIAL PRIMARY KEY NOT NULL,
|
5
|
+
name VARCHAR(255) NOT NULL
|
6
|
+
);
|
7
|
+
|
8
|
+
DROP TABLE IF EXISTS photos;
|
9
|
+
CREATE TABLE photos (
|
10
|
+
id SERIAL PRIMARY KEY NOT NULL,
|
11
|
+
user_id INTEGER NOT NULL,
|
12
|
+
camera_id INTEGER NOT NULL
|
13
|
+
);
|
14
|
+
DROP TABLE IF EXISTS developers;
|
15
|
+
CREATE TABLE developers (
|
16
|
+
id SERIAL PRIMARY KEY NOT NULL,
|
17
|
+
name VARCHAR(255) NOT NULL,
|
18
|
+
salary INTEGER NOT NULL,
|
19
|
+
department VARCHAR(255) NOT NULL,
|
20
|
+
created_at TIMESTAMP NOT NULL
|
21
|
+
);
|
22
|
+
SQL
|
23
|
+
|
24
|
+
sql.split(/;/).select(&:present?).each do |sql_statement|
|
25
|
+
ActiveRecord::Base.connection.execute sql_statement
|
26
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
sql = <<-SQL
|
2
|
+
DROP TABLE IF EXISTS users;
|
3
|
+
CREATE TABLE users (
|
4
|
+
id INTEGER NOT NULL PRIMARY KEY,
|
5
|
+
name VARCHAR(255) NOT NULL
|
6
|
+
);
|
7
|
+
|
8
|
+
DROP TABLE IF EXISTS photos;
|
9
|
+
CREATE TABLE photos (
|
10
|
+
id INTEGER NOT NULL PRIMARY KEY,
|
11
|
+
user_id INTEGER NOT NULL,
|
12
|
+
camera_id INTEGER NOT NULL
|
13
|
+
);
|
14
|
+
DROP TABLE IF EXISTS developers;
|
15
|
+
CREATE TABLE developers (
|
16
|
+
id INTEGER NOT NULL PRIMARY KEY,
|
17
|
+
name VARCHAR(255) NOT NULL,
|
18
|
+
salary INTEGER NOT NULL,
|
19
|
+
department VARCHAR(255) NOT NULL,
|
20
|
+
created_at TIMESTAMP NOT NULL
|
21
|
+
);
|
22
|
+
SQL
|
23
|
+
|
24
|
+
sql.split(/;/).select(&:present?).each do |sql_statement|
|
25
|
+
ActiveRecord::Base.connection.execute sql_statement
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,258 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: arel-compat
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 4
|
8
|
+
- 0
|
9
|
+
version: 0.4.0
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Bryan Helmkamp
|
13
|
+
- Nick Kallen
|
14
|
+
- Emilio Tagua
|
15
|
+
autorequire:
|
16
|
+
bindir: bin
|
17
|
+
cert_chain: []
|
18
|
+
|
19
|
+
date: 2010-06-08 00:00:00 +02:00
|
20
|
+
default_executable:
|
21
|
+
dependencies:
|
22
|
+
- !ruby/object:Gem::Dependency
|
23
|
+
name: activerecord
|
24
|
+
prerelease: false
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
segments:
|
30
|
+
- 2
|
31
|
+
- 3
|
32
|
+
- 4
|
33
|
+
version: 2.3.4
|
34
|
+
type: :runtime
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: activesupport
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
segments:
|
44
|
+
- 2
|
45
|
+
- 3
|
46
|
+
- 4
|
47
|
+
version: 2.3.4
|
48
|
+
type: :runtime
|
49
|
+
version_requirements: *id002
|
50
|
+
description: |-
|
51
|
+
Arel is a Relational Algebra for Ruby. It 1) simplifies the generation complex
|
52
|
+
of SQL queries and it 2) adapts to various RDBMS systems. It is intended to be
|
53
|
+
a framework framework; that is, you can build your own ORM with it, focusing on
|
54
|
+
innovative object and collection modeling as opposed to database compatibility
|
55
|
+
and query generation.
|
56
|
+
email: bryan@brynary.com
|
57
|
+
executables: []
|
58
|
+
|
59
|
+
extensions: []
|
60
|
+
|
61
|
+
extra_rdoc_files:
|
62
|
+
- History.txt
|
63
|
+
- README.markdown
|
64
|
+
files:
|
65
|
+
- lib/arel/algebra/attributes/attribute.rb
|
66
|
+
- lib/arel/algebra/attributes/boolean.rb
|
67
|
+
- lib/arel/algebra/attributes/decimal.rb
|
68
|
+
- lib/arel/algebra/attributes/float.rb
|
69
|
+
- lib/arel/algebra/attributes/integer.rb
|
70
|
+
- lib/arel/algebra/attributes/string.rb
|
71
|
+
- lib/arel/algebra/attributes/time.rb
|
72
|
+
- lib/arel/algebra/attributes.rb
|
73
|
+
- lib/arel/algebra/core_extensions/class.rb
|
74
|
+
- lib/arel/algebra/core_extensions/hash.rb
|
75
|
+
- lib/arel/algebra/core_extensions/object.rb
|
76
|
+
- lib/arel/algebra/core_extensions/symbol.rb
|
77
|
+
- lib/arel/algebra/core_extensions.rb
|
78
|
+
- lib/arel/algebra/expression.rb
|
79
|
+
- lib/arel/algebra/header.rb
|
80
|
+
- lib/arel/algebra/ordering.rb
|
81
|
+
- lib/arel/algebra/predicates.rb
|
82
|
+
- lib/arel/algebra/relations/operations/alias.rb
|
83
|
+
- lib/arel/algebra/relations/operations/from.rb
|
84
|
+
- lib/arel/algebra/relations/operations/group.rb
|
85
|
+
- lib/arel/algebra/relations/operations/having.rb
|
86
|
+
- lib/arel/algebra/relations/operations/join.rb
|
87
|
+
- lib/arel/algebra/relations/operations/lock.rb
|
88
|
+
- lib/arel/algebra/relations/operations/order.rb
|
89
|
+
- lib/arel/algebra/relations/operations/project.rb
|
90
|
+
- lib/arel/algebra/relations/operations/skip.rb
|
91
|
+
- lib/arel/algebra/relations/operations/take.rb
|
92
|
+
- lib/arel/algebra/relations/operations/where.rb
|
93
|
+
- lib/arel/algebra/relations/relation.rb
|
94
|
+
- lib/arel/algebra/relations/row.rb
|
95
|
+
- lib/arel/algebra/relations/utilities/compound.rb
|
96
|
+
- lib/arel/algebra/relations/utilities/externalization.rb
|
97
|
+
- lib/arel/algebra/relations/utilities/nil.rb
|
98
|
+
- lib/arel/algebra/relations/writes.rb
|
99
|
+
- lib/arel/algebra/relations.rb
|
100
|
+
- lib/arel/algebra/value.rb
|
101
|
+
- lib/arel/algebra.rb
|
102
|
+
- lib/arel/engines/memory/engine.rb
|
103
|
+
- lib/arel/engines/memory/predicates.rb
|
104
|
+
- lib/arel/engines/memory/primitives.rb
|
105
|
+
- lib/arel/engines/memory/relations/array.rb
|
106
|
+
- lib/arel/engines/memory/relations/compound.rb
|
107
|
+
- lib/arel/engines/memory/relations/operations.rb
|
108
|
+
- lib/arel/engines/memory/relations/writes.rb
|
109
|
+
- lib/arel/engines/memory/relations.rb
|
110
|
+
- lib/arel/engines/memory.rb
|
111
|
+
- lib/arel/engines/sql/attributes.rb
|
112
|
+
- lib/arel/engines/sql/christener.rb
|
113
|
+
- lib/arel/engines/sql/compilers/ibm_db_compiler.rb
|
114
|
+
- lib/arel/engines/sql/compilers/mysql_compiler.rb
|
115
|
+
- lib/arel/engines/sql/compilers/oracle_compiler.rb
|
116
|
+
- lib/arel/engines/sql/compilers/postgresql_compiler.rb
|
117
|
+
- lib/arel/engines/sql/compilers/sqlite_compiler.rb
|
118
|
+
- lib/arel/engines/sql/core_extensions/array.rb
|
119
|
+
- lib/arel/engines/sql/core_extensions/nil_class.rb
|
120
|
+
- lib/arel/engines/sql/core_extensions/object.rb
|
121
|
+
- lib/arel/engines/sql/core_extensions/range.rb
|
122
|
+
- lib/arel/engines/sql/core_extensions.rb
|
123
|
+
- lib/arel/engines/sql/engine.rb
|
124
|
+
- lib/arel/engines/sql/formatters.rb
|
125
|
+
- lib/arel/engines/sql/predicates.rb
|
126
|
+
- lib/arel/engines/sql/primitives.rb
|
127
|
+
- lib/arel/engines/sql/relations/compiler.rb
|
128
|
+
- lib/arel/engines/sql/relations/operations/alias.rb
|
129
|
+
- lib/arel/engines/sql/relations/operations/join.rb
|
130
|
+
- lib/arel/engines/sql/relations/relation.rb
|
131
|
+
- lib/arel/engines/sql/relations/table.rb
|
132
|
+
- lib/arel/engines/sql/relations/utilities/compound.rb
|
133
|
+
- lib/arel/engines/sql/relations/utilities/externalization.rb
|
134
|
+
- lib/arel/engines/sql/relations/utilities/nil.rb
|
135
|
+
- lib/arel/engines/sql/relations/utilities/recursion.rb
|
136
|
+
- lib/arel/engines/sql/relations/writes.rb
|
137
|
+
- lib/arel/engines/sql/relations.rb
|
138
|
+
- lib/arel/engines/sql.rb
|
139
|
+
- lib/arel/engines.rb
|
140
|
+
- lib/arel/session.rb
|
141
|
+
- lib/arel/version.rb
|
142
|
+
- lib/arel.rb
|
143
|
+
- History.txt
|
144
|
+
- README.markdown
|
145
|
+
has_rdoc: true
|
146
|
+
homepage: http://github.com/brynary/arel
|
147
|
+
licenses: []
|
148
|
+
|
149
|
+
post_install_message:
|
150
|
+
rdoc_options: []
|
151
|
+
|
152
|
+
require_paths:
|
153
|
+
- lib
|
154
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
segments:
|
159
|
+
- 0
|
160
|
+
version: "0"
|
161
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - ">="
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
segments:
|
166
|
+
- 0
|
167
|
+
version: "0"
|
168
|
+
requirements: []
|
169
|
+
|
170
|
+
rubyforge_project: arel
|
171
|
+
rubygems_version: 1.3.6
|
172
|
+
signing_key:
|
173
|
+
specification_version: 3
|
174
|
+
summary: Arel is a relational algebra engine for Ruby
|
175
|
+
test_files:
|
176
|
+
- spec/algebra/unit/predicates/binary_spec.rb
|
177
|
+
- spec/algebra/unit/predicates/equality_spec.rb
|
178
|
+
- spec/algebra/unit/predicates/in_spec.rb
|
179
|
+
- spec/algebra/unit/primitives/attribute_spec.rb
|
180
|
+
- spec/algebra/unit/primitives/expression_spec.rb
|
181
|
+
- spec/algebra/unit/primitives/value_spec.rb
|
182
|
+
- spec/algebra/unit/relations/alias_spec.rb
|
183
|
+
- spec/algebra/unit/relations/delete_spec.rb
|
184
|
+
- spec/algebra/unit/relations/group_spec.rb
|
185
|
+
- spec/algebra/unit/relations/insert_spec.rb
|
186
|
+
- spec/algebra/unit/relations/join_spec.rb
|
187
|
+
- spec/algebra/unit/relations/order_spec.rb
|
188
|
+
- spec/algebra/unit/relations/project_spec.rb
|
189
|
+
- spec/algebra/unit/relations/relation_spec.rb
|
190
|
+
- spec/algebra/unit/relations/skip_spec.rb
|
191
|
+
- spec/algebra/unit/relations/table_spec.rb
|
192
|
+
- spec/algebra/unit/relations/take_spec.rb
|
193
|
+
- spec/algebra/unit/relations/update_spec.rb
|
194
|
+
- spec/algebra/unit/relations/where_spec.rb
|
195
|
+
- spec/algebra/unit/session/session_spec.rb
|
196
|
+
- spec/attributes/boolean_spec.rb
|
197
|
+
- spec/attributes/float_spec.rb
|
198
|
+
- spec/attributes/header_spec.rb
|
199
|
+
- spec/attributes/integer_spec.rb
|
200
|
+
- spec/attributes/string_spec.rb
|
201
|
+
- spec/attributes/time_spec.rb
|
202
|
+
- spec/engines/memory/integration/joins/cross_engine_spec.rb
|
203
|
+
- spec/engines/memory/unit/relations/array_spec.rb
|
204
|
+
- spec/engines/memory/unit/relations/insert_spec.rb
|
205
|
+
- spec/engines/memory/unit/relations/join_spec.rb
|
206
|
+
- spec/engines/memory/unit/relations/order_spec.rb
|
207
|
+
- spec/engines/memory/unit/relations/project_spec.rb
|
208
|
+
- spec/engines/memory/unit/relations/skip_spec.rb
|
209
|
+
- spec/engines/memory/unit/relations/take_spec.rb
|
210
|
+
- spec/engines/memory/unit/relations/where_spec.rb
|
211
|
+
- spec/engines/sql/integration/joins/with_adjacency_spec.rb
|
212
|
+
- spec/engines/sql/integration/joins/with_aggregations_spec.rb
|
213
|
+
- spec/engines/sql/integration/joins/with_compounds_spec.rb
|
214
|
+
- spec/engines/sql/unit/engine_spec.rb
|
215
|
+
- spec/engines/sql/unit/predicates/binary_spec.rb
|
216
|
+
- spec/engines/sql/unit/predicates/equality_spec.rb
|
217
|
+
- spec/engines/sql/unit/predicates/in_spec.rb
|
218
|
+
- spec/engines/sql/unit/predicates/noteq_spec.rb
|
219
|
+
- spec/engines/sql/unit/predicates/predicates_spec.rb
|
220
|
+
- spec/engines/sql/unit/primitives/attribute_spec.rb
|
221
|
+
- spec/engines/sql/unit/primitives/expression_spec.rb
|
222
|
+
- spec/engines/sql/unit/primitives/literal_spec.rb
|
223
|
+
- spec/engines/sql/unit/primitives/value_spec.rb
|
224
|
+
- spec/engines/sql/unit/relations/alias_spec.rb
|
225
|
+
- spec/engines/sql/unit/relations/delete_spec.rb
|
226
|
+
- spec/engines/sql/unit/relations/from_spec.rb
|
227
|
+
- spec/engines/sql/unit/relations/group_spec.rb
|
228
|
+
- spec/engines/sql/unit/relations/having_spec.rb
|
229
|
+
- spec/engines/sql/unit/relations/insert_spec.rb
|
230
|
+
- spec/engines/sql/unit/relations/join_spec.rb
|
231
|
+
- spec/engines/sql/unit/relations/lock_spec.rb
|
232
|
+
- spec/engines/sql/unit/relations/order_spec.rb
|
233
|
+
- spec/engines/sql/unit/relations/project_spec.rb
|
234
|
+
- spec/engines/sql/unit/relations/skip_spec.rb
|
235
|
+
- spec/engines/sql/unit/relations/table_spec.rb
|
236
|
+
- spec/engines/sql/unit/relations/take_spec.rb
|
237
|
+
- spec/engines/sql/unit/relations/update_spec.rb
|
238
|
+
- spec/engines/sql/unit/relations/where_spec.rb
|
239
|
+
- spec/relations/join_spec.rb
|
240
|
+
- spec/relations/relation_spec.rb
|
241
|
+
- spec/shared/relation_spec.rb
|
242
|
+
- spec/spec_helper.rb
|
243
|
+
- spec/support/check.rb
|
244
|
+
- spec/support/connections/mysql_connection.rb
|
245
|
+
- spec/support/connections/oracle_connection.rb
|
246
|
+
- spec/support/connections/postgresql_connection.rb
|
247
|
+
- spec/support/connections/sqlite3_connection.rb
|
248
|
+
- spec/support/guards.rb
|
249
|
+
- spec/support/matchers/be_like.rb
|
250
|
+
- spec/support/matchers/disambiguate_attributes.rb
|
251
|
+
- spec/support/matchers/hash_the_same_as.rb
|
252
|
+
- spec/support/matchers/have_rows.rb
|
253
|
+
- spec/support/matchers.rb
|
254
|
+
- spec/support/model.rb
|
255
|
+
- spec/support/schemas/mysql_schema.rb
|
256
|
+
- spec/support/schemas/oracle_schema.rb
|
257
|
+
- spec/support/schemas/postgresql_schema.rb
|
258
|
+
- spec/support/schemas/sqlite3_schema.rb
|