composite_primary_keys 3.0.0.b3 → 3.0.3
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 +15 -1
- data/Rakefile +1 -1
- data/lib/composite_primary_keys/associations/has_many_association.rb +7 -6
- data/lib/composite_primary_keys/associations/has_one_association.rb +1 -1
- data/lib/composite_primary_keys/calculations.rb +28 -26
- data/lib/composite_primary_keys/connection_adapters/sqlite3_adapter.rb +1 -1
- data/lib/composite_primary_keys/finder_methods.rb +11 -3
- data/lib/composite_primary_keys/version.rb +2 -3
- data/test/debug.log +123 -112
- metadata +12 -16
- data/test/fixtures/debug.log +0 -133
data/History.txt
CHANGED
@@ -1,4 +1,18 @@
|
|
1
|
-
== 3.0.1
|
1
|
+
== 3.0.1 2010-11-19
|
2
|
+
* Support ActiveRecord 3.0.3 and Arel 2+
|
3
|
+
* Require ActiveRecord 3.0.3 as minimum dependency
|
4
|
+
* Fix double quoting issue with table names - thanks to Kevin Motschiedler for a patch.
|
5
|
+
* Fix SQLiteAdapter class inheritance issue - thanks to Brandon Hauff for a patch.
|
6
|
+
|
7
|
+
|
8
|
+
== 3.0.1.b3 2010-11-07
|
9
|
+
|
10
|
+
* Fix bug in joining to :has_one association
|
11
|
+
* Added support for Model.find(:last)
|
12
|
+
* Added support for finding via associations with
|
13
|
+
limited ids. For example find(:include => :foo, :limit => 1)
|
14
|
+
|
15
|
+
== 3.0.1.b2 2010-11-06
|
2
16
|
|
3
17
|
* Port to Rails 3.0 and Ruby 1.9.2
|
4
18
|
|
data/Rakefile
CHANGED
@@ -15,14 +15,13 @@ module ActiveRecord
|
|
15
15
|
else
|
16
16
|
# CPK
|
17
17
|
# @finder_sql = "#{@reflection.quoted_table_name}.#{@reflection.primary_key_name} = #{owner_quoted_id}"
|
18
|
-
@finder_sql = full_columns_equals(@reflection.
|
18
|
+
@finder_sql = full_columns_equals(@reflection.table_name, @reflection.cpk_primary_key, owner_quoted_id)
|
19
19
|
@finder_sql << " AND (#{conditions})" if conditions
|
20
20
|
end
|
21
21
|
|
22
22
|
construct_counter_sql
|
23
23
|
end
|
24
24
|
|
25
|
-
# Deletes the records according to the <tt>:dependent</tt> option.
|
26
25
|
def delete_records(records)
|
27
26
|
case @reflection.options[:dependent]
|
28
27
|
when :destroy
|
@@ -32,9 +31,10 @@ module ActiveRecord
|
|
32
31
|
else
|
33
32
|
relation = Arel::Table.new(@reflection.table_name)
|
34
33
|
# CPK
|
35
|
-
#
|
36
|
-
# and(
|
37
|
-
#
|
34
|
+
#relation.where(relation[@reflection.primary_key_name].eq(@owner.id).
|
35
|
+
# and(relation[@reflection.klass.primary_key].in(records.map { |r| r.id }))
|
36
|
+
#).update(relation[@reflection.primary_key_name] => nil)
|
37
|
+
|
38
38
|
id_predicate = nil
|
39
39
|
owner_key_values = @reflection.cpk_primary_key.zip([@owner.id].flatten)
|
40
40
|
owner_key_values.each do |key, value|
|
@@ -57,8 +57,9 @@ module ActiveRecord
|
|
57
57
|
|
58
58
|
relation = relation.where(id_predicate.and(record_predicates))
|
59
59
|
|
60
|
+
nullify_relation = Arel::Table.new(@reflection.table_name)
|
60
61
|
nullify = @reflection.cpk_primary_key.inject(Hash.new) do |hash, key|
|
61
|
-
hash[
|
62
|
+
hash[nullify_relation[key]] = nil
|
62
63
|
hash
|
63
64
|
end
|
64
65
|
|
@@ -10,7 +10,7 @@ module ActiveRecord
|
|
10
10
|
else
|
11
11
|
# CPK
|
12
12
|
#@finder_sql = "#{@reflection.quoted_table_name}.#{@reflection.primary_key_name} = #{owner_quoted_id}"
|
13
|
-
@finder_sql = full_columns_equals(@reflection.
|
13
|
+
@finder_sql = full_columns_equals(@reflection.table_name, @reflection.cpk_primary_key, owner_quoted_id)
|
14
14
|
end
|
15
15
|
@finder_sql << " AND (#{conditions})" if conditions
|
16
16
|
end
|
@@ -1,27 +1,29 @@
|
|
1
|
-
|
2
|
-
module Calculations
|
3
|
-
def execute_simple_calculation(operation, column_name, distinct)
|
4
|
-
# CPK changes
|
5
|
-
if column_name.kind_of?(Array)
|
6
|
-
columns = column_name.map do |primary_key_column|
|
7
|
-
table[primary_key_column].to_sql
|
8
|
-
end
|
9
|
-
projection = "DISTINCT #{columns.join(',')}"
|
10
|
-
subquery = "(#{table.project(projection).to_sql}) AS subquery"
|
11
|
-
relation = Arel::Table.new(subquery).project(Arel::SqlLiteral.new('*').count)
|
12
|
-
type_cast_calculated_value(@klass.connection.select_value(relation.to_sql),
|
13
|
-
column_for(column_name.first), operation)
|
14
|
-
else
|
15
|
-
column = if @klass.column_names.include?(column_name.to_s)
|
16
|
-
Arel::Attribute.new(@klass.unscoped, column_name)
|
17
|
-
else
|
18
|
-
Arel::SqlLiteral.new(column_name == :all ? "*" : column_name.to_s)
|
19
|
-
end
|
1
|
+
# TODO - This code doesn't work with ActiveRecord 3.0.3...
|
20
2
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
3
|
+
#module ActiveRecord
|
4
|
+
# module Calculations
|
5
|
+
# def execute_simple_calculation(operation, column_name, distinct)
|
6
|
+
# # CPK changes
|
7
|
+
# if column_name.kind_of?(Array)
|
8
|
+
# columns = column_name.map do |primary_key_column|
|
9
|
+
# table[primary_key_column].to_sql
|
10
|
+
# end
|
11
|
+
# projection = "DISTINCT #{columns.join(',')}"
|
12
|
+
# subquery = "(#{table.project(projection).to_sql}) AS subquery"
|
13
|
+
# relation = Arel::Table.new(subquery).project(Arel::SqlLiteral.new('*').count)
|
14
|
+
# type_cast_calculated_value(@klass.connection.select_value(relation.to_sql),
|
15
|
+
# column_for(column_name.first), operation)
|
16
|
+
# else
|
17
|
+
# column = if @klass.column_names.include?(column_name.to_s)
|
18
|
+
# Arel::Attribute.new(@klass.unscoped, column_name)
|
19
|
+
# else
|
20
|
+
# Arel::SqlLiteral.new(column_name == :all ? "*" : column_name.to_s)
|
21
|
+
# end
|
22
|
+
#
|
23
|
+
# # Postgresql doesn't like ORDER BY when there are no GROUP BY
|
24
|
+
# relation = except(:order).select(operation == 'count' ? column.count(distinct) : column.send(operation))
|
25
|
+
# type_cast_calculated_value(@klass.connection.select_value(relation.to_sql), column_for(column_name), operation)
|
26
|
+
# end
|
27
|
+
# end
|
28
|
+
# end
|
29
|
+
#end
|
@@ -7,10 +7,10 @@ module CompositePrimaryKeys
|
|
7
7
|
|
8
8
|
# CPK
|
9
9
|
# values = @klass.connection.distinct("#{@klass.connection.quote_table_name @klass.table_name}.#{@klass.primary_key}", orders)
|
10
|
-
|
11
10
|
keys = @klass.primary_keys.map do |key|
|
12
11
|
"#{@klass.connection.quote_table_name @klass.table_name}.#{key}"
|
13
12
|
end
|
13
|
+
|
14
14
|
values = @klass.connection.distinct(keys.join(', '), orders)
|
15
15
|
|
16
16
|
ids_array = relation.select(values).collect {|row| row[@klass.primary_key]}
|
@@ -25,10 +25,18 @@ module CompositePrimaryKeys
|
|
25
25
|
and_expressions = [self.primary_keys, id_set].transpose.map do |key, id|
|
26
26
|
table[key].eq(id)
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
|
+
# Merge all the ands together
|
30
|
+
first = and_expressions.shift
|
31
|
+
Arel::Nodes::Grouping.new(and_expressions.inject(first) do |memo, expr|
|
32
|
+
Arel::Nodes::And.new(memo, expr)
|
33
|
+
end)
|
29
34
|
end
|
30
35
|
|
31
|
-
|
36
|
+
first = or_expressions.shift
|
37
|
+
Arel::Nodes::Grouping.new(or_expressions.inject(first) do |memo, expr|
|
38
|
+
Arel::Nodes::Or.new(memo, expr)
|
39
|
+
end)
|
32
40
|
end
|
33
41
|
|
34
42
|
def exists?(id = nil)
|
data/test/debug.log
CHANGED
@@ -1,135 +1,141 @@
|
|
1
|
-
# Logfile created on Sat Nov
|
1
|
+
# Logfile created on Sat Nov 20 00:07:06 -0700 2010 by logger.rb/22285
|
2
2
|
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
3
3
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
4
4
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
5
|
-
[1m[35mSQL (
|
6
|
-
[1m[36mSQL (1.0ms)[0m [1mSHOW TIME ZONE[0m
|
7
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
8
|
-
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'panic'
|
9
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
10
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
5
|
+
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'notice'
|
11
6
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
12
|
-
PGError: ERROR: column suburbs.city_idsuburb_id does not exist
|
13
|
-
LINE 1: ...T "suburbs".* FROM "suburbs" ORDER BY suburbs.ci...
|
14
|
-
^
|
15
|
-
: SELECT "suburbs".* FROM "suburbs" ORDER BY suburbs.city_idsuburb_id DESC LIMIT 1
|
16
7
|
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
17
8
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
18
9
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
19
10
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
20
11
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
21
|
-
PGError: ERROR:
|
22
|
-
LINE 1: ...
|
23
|
-
|
24
|
-
:
|
12
|
+
PGError: ERROR: operator does not exist: character varying = integer
|
13
|
+
LINE 1: ...ments".person_type = 'User') AND ("comments".person_id = 1))
|
14
|
+
^
|
15
|
+
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
|
16
|
+
: SELECT "hacks".* FROM "hacks" INNER JOIN "comments" ON ("hacks"."name" = "comments"."hack_id") WHERE (("comments".person_type = 'User') AND ("comments".person_id = 1))
|
25
17
|
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
26
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
27
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
28
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
29
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
30
|
-
PGError: ERROR: column suburbs.city_idsuburb_id does not exist
|
31
|
-
LINE 1: ...T "suburbs".* FROM "suburbs" ORDER BY suburbs.ci...
|
32
|
-
^
|
33
|
-
: SELECT "suburbs".* FROM "suburbs" ORDER BY suburbs.city_idsuburb_id DESC LIMIT 1
|
34
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
35
18
|
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'panic'
|
36
19
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
37
20
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
38
|
-
[1m[36mSQL (
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
[1m[36mSQL (
|
45
|
-
[1m[35mSQL (
|
21
|
+
[1m[36mSQL (1.0ms)[0m [1mSHOW TIME ZONE[0m
|
22
|
+
PGError: ERROR: operator does not exist: character varying = integer
|
23
|
+
LINE 1: ...ments".person_type = 'User') AND ("comments".person_id = 1))
|
24
|
+
^
|
25
|
+
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
|
26
|
+
: SELECT "hacks".* FROM "hacks" INNER JOIN "comments" ON ("hacks"."name" = "comments"."hack_id") WHERE (("comments".person_type = 'User') AND ("comments".person_id = 1))
|
27
|
+
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
28
|
+
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'panic'
|
46
29
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
47
|
-
[1m[35mSQL (
|
30
|
+
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'notice'
|
48
31
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
32
|
+
PGError: ERROR: column "rooms.dorm_id" must appear in the GROUP BY clause or be used in an aggregate function
|
33
|
+
LINE 1: SELECT "rooms".*, COUNT(*) FROM "rooms" INNER JOIN "room_ass...
|
34
|
+
^
|
35
|
+
: SELECT "rooms".*, COUNT(*) FROM "rooms" INNER JOIN "room_assignments" ON ("rooms"."dorm_id" = "room_assignments"."dorm_id" AND "rooms"."room_id" = "room_assignments"."room_id") WHERE (("room_assignments".student_id = 1))
|
36
|
+
PGError: ERROR: operator does not exist: character varying = integer
|
37
|
+
LINE 1: ...ments".person_type = 'User') AND ("comments".person_id = 1))
|
38
|
+
^
|
39
|
+
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
|
40
|
+
: SELECT "hacks".* FROM "hacks" INNER JOIN "comments" ON ("hacks"."name" = "comments"."hack_id") WHERE (("comments".person_type = 'User') AND ("comments".person_id = 1))
|
49
41
|
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
50
42
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
51
|
-
[1m[36mSQL (
|
43
|
+
[1m[36mSQL (1.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
52
44
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
53
45
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
54
|
-
PGError: ERROR: column
|
55
|
-
LINE 1:
|
56
|
-
|
57
|
-
: SELECT
|
46
|
+
PGError: ERROR: column "rooms.dorm_id" must appear in the GROUP BY clause or be used in an aggregate function
|
47
|
+
LINE 1: SELECT "rooms".*, COUNT(*) FROM "rooms" INNER JOIN "room_ass...
|
48
|
+
^
|
49
|
+
: SELECT "rooms".*, COUNT(*) FROM "rooms" INNER JOIN "room_assignments" ON ("rooms"."dorm_id" = "room_assignments"."dorm_id" AND "rooms"."room_id" = "room_assignments"."room_id") WHERE (("room_assignments".student_id = 1))
|
58
50
|
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
59
51
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
60
52
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
61
53
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
62
54
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
55
|
+
PGError: ERROR: column "rooms.dorm_id" must appear in the GROUP BY clause or be used in an aggregate function
|
56
|
+
LINE 1: SELECT "rooms".*, COUNT(*) FROM "rooms" INNER JOIN "room_ass...
|
57
|
+
^
|
58
|
+
: SELECT "rooms".*, COUNT(*) FROM "rooms" INNER JOIN "room_assignments" ON ("rooms"."dorm_id" = "room_assignments"."dorm_id" AND "rooms"."room_id" = "room_assignments"."room_id") WHERE (("room_assignments".student_id = 1))
|
63
59
|
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
64
|
-
[1m[35mSQL (
|
60
|
+
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'panic'
|
65
61
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
66
62
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
67
63
|
[1m[36mSQL (1.0ms)[0m [1mSHOW TIME ZONE[0m
|
64
|
+
PGError: ERROR: column "rooms.dorm_id" must appear in the GROUP BY clause or be used in an aggregate function
|
65
|
+
LINE 1: SELECT "rooms".*, COUNT(*) FROM "rooms" INNER JOIN "room_ass...
|
66
|
+
^
|
67
|
+
: SELECT "rooms".*, COUNT(*) FROM "rooms" INNER JOIN "room_assignments" ON ("rooms"."dorm_id" = "room_assignments"."dorm_id" AND "rooms"."room_id" = "room_assignments"."room_id") WHERE (("room_assignments".student_id = 1))
|
68
68
|
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
69
69
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
70
|
-
[1m[36mSQL (1.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
71
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
72
|
-
[1m[36mSQL (1.0ms)[0m [1mSHOW TIME ZONE[0m
|
73
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
74
|
-
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'panic'
|
75
70
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
76
71
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
77
72
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
73
|
+
PGError: ERROR: column "rooms.dorm_id" must appear in the GROUP BY clause or be used in an aggregate function
|
74
|
+
LINE 1: SELECT "rooms".*, COUNT(*) FROM "rooms" INNER JOIN "room_ass...
|
75
|
+
^
|
76
|
+
: SELECT "rooms".*, COUNT(*) FROM "rooms" INNER JOIN "room_assignments" ON ("rooms"."dorm_id" = "room_assignments"."dorm_id" AND "rooms"."room_id" = "room_assignments"."room_id") WHERE (("room_assignments".student_id = 1))
|
83
77
|
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
84
78
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
85
79
|
[1m[36mSQL (1.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
86
80
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
87
81
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
82
|
+
PGError: ERROR: column "rooms.dorm_id" must appear in the GROUP BY clause or be used in an aggregate function
|
83
|
+
LINE 1: SELECT "rooms".*, COUNT(*) FROM "rooms" INNER JOIN "room_ass...
|
84
|
+
^
|
85
|
+
: SELECT "rooms".*, COUNT(*) FROM "rooms" INNER JOIN "room_assignments" ON ("rooms"."dorm_id" = "room_assignments"."dorm_id" AND "rooms"."room_id" = "room_assignments"."room_id") WHERE (("room_assignments".student_id = 1))
|
88
86
|
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
89
|
-
[1m[35mSQL (
|
87
|
+
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
90
88
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
91
89
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
92
|
-
[1m[36mSQL (
|
90
|
+
[1m[36mSQL (1.0ms)[0m [1mSHOW TIME ZONE[0m
|
91
|
+
PGError: ERROR: column "rooms.dorm_id" must appear in the GROUP BY clause or be used in an aggregate function
|
92
|
+
LINE 1: SELECT "rooms".*, COUNT(*) FROM "rooms" INNER JOIN "room_ass...
|
93
|
+
^
|
94
|
+
: SELECT "rooms".*, COUNT(*) FROM "rooms" INNER JOIN "room_assignments" ON ("rooms"."dorm_id" = "room_assignments"."dorm_id" AND "rooms"."room_id" = "room_assignments"."room_id") WHERE (("room_assignments".student_id = 1))
|
93
95
|
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
94
|
-
[1m[35mSQL (
|
96
|
+
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
95
97
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
96
|
-
[1m[35mSQL (
|
98
|
+
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'notice'
|
97
99
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
100
|
+
PGError: ERROR: column "rooms.dorm_id" must appear in the GROUP BY clause or be used in an aggregate function
|
101
|
+
LINE 1: SELECT "rooms".*, COUNT(*) FROM "rooms" INNER JOIN "room_ass...
|
102
|
+
^
|
103
|
+
: SELECT "rooms".*, COUNT(*) FROM "rooms" INNER JOIN "room_assignments" ON ("rooms"."dorm_id" = "room_assignments"."dorm_id" AND "rooms"."room_id" = "room_assignments"."room_id") WHERE (("room_assignments".student_id = 1))
|
98
104
|
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
99
105
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
100
106
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
101
107
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
102
108
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
109
|
+
PGError: ERROR: column "rooms.dorm_id" must appear in the GROUP BY clause or be used in an aggregate function
|
110
|
+
LINE 1: SELECT "rooms".*, COUNT(*) FROM "rooms" INNER JOIN "room_ass...
|
111
|
+
^
|
112
|
+
: SELECT "rooms".*, COUNT(*) FROM "rooms" INNER JOIN "room_assignments" ON ("rooms"."dorm_id" = "room_assignments"."dorm_id" AND "rooms"."room_id" = "room_assignments"."room_id") WHERE (("room_assignments".student_id = 1))
|
103
113
|
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
104
114
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
105
115
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
106
116
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
107
|
-
[1m[36mSQL (
|
108
|
-
[1m[36mSQL (
|
117
|
+
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
118
|
+
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
109
119
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
110
120
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
111
|
-
[1m[35mSQL (
|
121
|
+
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'notice'
|
112
122
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
113
|
-
[1m[36mSQL (
|
123
|
+
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
114
124
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
115
125
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
116
126
|
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'notice'
|
117
127
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
118
128
|
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
119
129
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
120
|
-
[1m[36mSQL (
|
130
|
+
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
121
131
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
122
132
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
123
|
-
[1m[36mSQL (
|
124
|
-
[1m[35mSQL (
|
133
|
+
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
134
|
+
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'panic'
|
125
135
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
126
136
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
127
137
|
[1m[36mSQL (1.0ms)[0m [1mSHOW TIME ZONE[0m
|
128
|
-
|
129
|
-
LINE 1: SELECT "memberships"."user_idgroup_id" AS t0_r0, "member...
|
130
|
-
^
|
131
|
-
: SELECT "memberships"."user_idgroup_id" AS t0_r0, "memberships"."user_id" AS t0_r1, "memberships"."group_id" AS t0_r2, "membership_statuses"."id" AS t1_r0, "membership_statuses"."user_id" AS t1_r1, "membership_statuses"."group_id" AS t1_r2, "membership_statuses"."status" AS t1_r3 FROM "memberships" LEFT OUTER JOIN "membership_statuses" ON "membership_statuses"."user_id" = "memberships"."user_id" AND "membership_statuses"."group_id" = "memberships"."group_id" WHERE (membership_statuses.status = 'Active')
|
132
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
138
|
+
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
133
139
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
134
140
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
135
141
|
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'notice'
|
@@ -137,14 +143,19 @@ LINE 1: SELECT "memberships"."user_idgroup_id" AS t0_r0, "member...
|
|
137
143
|
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
138
144
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
139
145
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
140
|
-
[1m[35mSQL (
|
146
|
+
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
141
147
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
142
148
|
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
143
149
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
144
150
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
145
151
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
146
152
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
147
|
-
[1m[36mSQL (
|
153
|
+
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
154
|
+
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
155
|
+
[1m[36mSQL (1.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
156
|
+
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'notice'
|
157
|
+
[1m[36mSQL (1.0ms)[0m [1mSHOW TIME ZONE[0m
|
158
|
+
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
148
159
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
149
160
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
150
161
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
@@ -154,16 +165,28 @@ LINE 1: SELECT "memberships"."user_idgroup_id" AS t0_r0, "member...
|
|
154
165
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
155
166
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
156
167
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
157
|
-
|
168
|
+
PGError: ERROR: schema "(SELECT DISTINCT "tariffs"" does not exist
|
169
|
+
LINE 1: SELECT COUNT(*) FROM "(SELECT DISTINCT ""tariffs"""."tariff_...
|
170
|
+
^
|
171
|
+
: SELECT COUNT(*) FROM "(SELECT DISTINCT ""tariffs"""."tariff_id"
|
172
|
+
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
158
173
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
159
|
-
[1m[36mSQL (
|
160
|
-
[1m[35mSQL (
|
174
|
+
[1m[36mSQL (1.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
175
|
+
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'notice'
|
161
176
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
177
|
+
PGError: ERROR: schema "(SELECT DISTINCT "tariffs"" does not exist
|
178
|
+
LINE 1: SELECT COUNT(*) FROM "(SELECT DISTINCT ""tariffs"""."tariff_...
|
179
|
+
^
|
180
|
+
: SELECT COUNT(*) FROM "(SELECT DISTINCT ""tariffs"""."tariff_id"
|
162
181
|
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
163
182
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
164
183
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
165
184
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
166
185
|
[1m[36mSQL (1.0ms)[0m [1mSHOW TIME ZONE[0m
|
186
|
+
PGError: ERROR: schema "(SELECT DISTINCT "tariffs"" does not exist
|
187
|
+
LINE 1: SELECT COUNT(*) FROM "(SELECT DISTINCT ""tariffs"""."tariff_...
|
188
|
+
^
|
189
|
+
: SELECT COUNT(*) FROM "(SELECT DISTINCT ""tariffs"""."tariff_id"
|
167
190
|
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
168
191
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
169
192
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
@@ -172,61 +195,46 @@ LINE 1: SELECT "memberships"."user_idgroup_id" AS t0_r0, "member...
|
|
172
195
|
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
173
196
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
174
197
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
175
|
-
[1m[35mSQL (
|
176
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
177
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
178
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
179
|
-
[1m[36mSQL (1.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
180
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
198
|
+
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'notice'
|
181
199
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
182
200
|
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
183
201
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
184
202
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
185
203
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
186
204
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
187
|
-
|
188
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
189
|
-
[1m[36mSQL (1.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
190
|
-
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'notice'
|
191
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
192
|
-
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
193
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
194
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
195
|
-
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'notice'
|
196
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
197
|
-
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
205
|
+
TypeError: wrong argument type Arel::SelectManager (expected String): #<Arel::SelectManager:0x59f0df0>
|
198
206
|
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
199
207
|
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'panic'
|
200
208
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
201
209
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
202
|
-
[1m[36mSQL (
|
203
|
-
PGError: ERROR: column memberships.user_idgroup_id does not exist
|
204
|
-
LINE 1: SELECT DISTINCT "memberships".user_idgroup_id FROM ...
|
205
|
-
^
|
206
|
-
: SELECT DISTINCT "memberships".user_idgroup_id FROM "memberships" LEFT OUTER JOIN "membership_statuses" ON "membership_statuses"."user_id" = "memberships"."user_id" AND "membership_statuses"."group_id" = "memberships"."group_id" WHERE (membership_statuses.status = 'Active') LIMIT 1
|
210
|
+
[1m[36mSQL (1.0ms)[0m [1mSHOW TIME ZONE[0m
|
207
211
|
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
208
212
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
209
213
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
210
214
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
211
|
-
[1m[36mSQL (
|
215
|
+
[1m[36mSQL (1.0ms)[0m [1mSHOW TIME ZONE[0m
|
212
216
|
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
213
217
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
214
|
-
[1m[36mSQL (
|
218
|
+
[1m[36mSQL (1.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
215
219
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
216
220
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
217
221
|
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
218
222
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
219
|
-
[1m[36mSQL (
|
223
|
+
[1m[36mSQL (1.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
220
224
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
221
225
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
226
|
+
PGError: ERROR: column "i" does not exist
|
227
|
+
LINE 1: SELECT COUNT(DISTINCT i) FROM "products" LEFT OUTER JOIN "pr...
|
228
|
+
^
|
229
|
+
: SELECT COUNT(DISTINCT i) FROM "products" LEFT OUTER JOIN "product_tariffs" ON "product_tariffs"."product_id" = "products"."id"
|
222
230
|
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
223
231
|
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'panic'
|
224
232
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
225
233
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
226
234
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
227
|
-
[1m[36mSQL (
|
228
|
-
[1m[35mSQL (
|
229
|
-
[1m[36mSQL (
|
235
|
+
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
236
|
+
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'panic'
|
237
|
+
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
230
238
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
231
239
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
232
240
|
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
@@ -238,34 +246,37 @@ LINE 1: SELECT DISTINCT "memberships".user_idgroup_id FROM ...
|
|
238
246
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
239
247
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
240
248
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
241
|
-
[1m[36mSQL (1.0ms)[0m [1mSHOW TIME ZONE[0m
|
242
|
-
[1m[36mSQL (2.0ms)[0m [1mSHOW client_min_messages[0m
|
243
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
244
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
245
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
246
249
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
250
|
+
PGError: ERROR: column "tariff_idstart_date" does not exist
|
251
|
+
LINE 1: SELECT COUNT(DISTINCT tariff_idstart_date) FROM "tariffs" LE...
|
252
|
+
^
|
253
|
+
: SELECT COUNT(DISTINCT tariff_idstart_date) FROM "tariffs" LEFT OUTER JOIN "product_tariffs" ON "product_tariffs"."tariff_id" = "tariffs"."tariff_id" AND "product_tariffs"."tariff_start_date" = "tariffs"."start_date"
|
247
254
|
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
248
255
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
249
256
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
250
257
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
251
258
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
252
|
-
|
253
|
-
|
259
|
+
PGError: ERROR: column "tariff_idstart_date" does not exist
|
260
|
+
LINE 1: SELECT COUNT(DISTINCT tariff_idstart_date) FROM "tariffs" LE...
|
261
|
+
^
|
262
|
+
: SELECT COUNT(DISTINCT tariff_idstart_date) FROM "tariffs" LEFT OUTER JOIN "product_tariffs" ON "product_tariffs"."tariff_id" = "tariffs"."tariff_id" AND "product_tariffs"."tariff_start_date" = "tariffs"."start_date"
|
263
|
+
PGError: ERROR: operator does not exist: character varying = integer
|
264
|
+
LINE 1: ...ments".person_type = 'User') AND ("comments".person_id = 1))
|
265
|
+
^
|
266
|
+
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
|
267
|
+
: SELECT "hacks".* FROM "hacks" INNER JOIN "comments" ON ("hacks"."name" = "comments"."hack_id") WHERE (("comments".person_type = 'User') AND ("comments".person_id = 1))
|
268
|
+
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
269
|
+
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
254
270
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
255
271
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
256
272
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
257
273
|
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
258
|
-
[1m[35mSQL (
|
274
|
+
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'panic'
|
259
275
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
260
276
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
261
|
-
[1m[36mSQL (
|
277
|
+
[1m[36mSQL (1.0ms)[0m [1mSHOW TIME ZONE[0m
|
262
278
|
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
263
279
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
264
|
-
[1m[36mSQL (1.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
265
|
-
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'notice'
|
266
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
267
|
-
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
268
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
269
280
|
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
270
281
|
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
271
282
|
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: composite_primary_keys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 1
|
5
|
+
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
|
11
|
-
version: 3.0.0.b3
|
9
|
+
- 3
|
10
|
+
version: 3.0.3
|
12
11
|
platform: ruby
|
13
12
|
authors:
|
14
13
|
- Dr Nic Williams
|
@@ -17,7 +16,7 @@ autorequire:
|
|
17
16
|
bindir: bin
|
18
17
|
cert_chain: []
|
19
18
|
|
20
|
-
date: 2010-11-
|
19
|
+
date: 2010-11-20 00:00:00 -07:00
|
21
20
|
default_executable:
|
22
21
|
dependencies:
|
23
22
|
- !ruby/object:Gem::Dependency
|
@@ -28,12 +27,12 @@ dependencies:
|
|
28
27
|
requirements:
|
29
28
|
- - ">="
|
30
29
|
- !ruby/object:Gem::Version
|
31
|
-
hash:
|
30
|
+
hash: 1
|
32
31
|
segments:
|
33
32
|
- 3
|
34
33
|
- 0
|
35
|
-
-
|
36
|
-
version: 3.0.
|
34
|
+
- 3
|
35
|
+
version: 3.0.3
|
37
36
|
type: :runtime
|
38
37
|
version_requirements: *id001
|
39
38
|
- !ruby/object:Gem::Dependency
|
@@ -126,7 +125,6 @@ files:
|
|
126
125
|
- test/fixtures/db_definitions/oracle.sql
|
127
126
|
- test/fixtures/db_definitions/postgresql.sql
|
128
127
|
- test/fixtures/db_definitions/sqlite.sql
|
129
|
-
- test/fixtures/debug.log
|
130
128
|
- test/fixtures/department.rb
|
131
129
|
- test/fixtures/departments.yml
|
132
130
|
- test/fixtures/dorm.rb
|
@@ -221,14 +219,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
221
219
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
222
220
|
none: false
|
223
221
|
requirements:
|
224
|
-
- - "
|
222
|
+
- - ">="
|
225
223
|
- !ruby/object:Gem::Version
|
226
|
-
hash:
|
224
|
+
hash: 3
|
227
225
|
segments:
|
228
|
-
-
|
229
|
-
|
230
|
-
- 1
|
231
|
-
version: 1.3.1
|
226
|
+
- 0
|
227
|
+
version: "0"
|
232
228
|
requirements: []
|
233
229
|
|
234
230
|
rubyforge_project: compositekeys
|
data/test/fixtures/debug.log
DELETED
@@ -1,133 +0,0 @@
|
|
1
|
-
# Logfile created on 2010-05-01 19:19:57 -0600 by logger.rb/25413
|
2
|
-
PGError: ERROR: column employees.department_id,location_id does not exist
|
3
|
-
LINE 1: ...s" SET "department_id,location_id" = NULL WHERE ("employees...
|
4
|
-
^
|
5
|
-
: UPDATE "employees" SET "department_id,location_id" = NULL WHERE ("employees"."department_id,location_id" = (1, 1) AND "employees"."id" IN (1, 2))
|
6
|
-
PGError: ERROR: column employees.department_id,location_id does not exist
|
7
|
-
LINE 1: ...s" SET "department_id,location_id" = NULL WHERE ("employees...
|
8
|
-
^
|
9
|
-
: UPDATE "employees" SET "department_id,location_id" = NULL WHERE ("employees"."department_id,location_id" = (1, 1) AND "employees"."id" IN (1))
|
10
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
11
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
12
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
13
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
14
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
15
|
-
[1m[35mSQL (3.0ms)[0m SELECT tablename
|
16
|
-
FROM pg_tables
|
17
|
-
WHERE schemaname = ANY (current_schemas(false))
|
18
|
-
|
19
|
-
[1m[36mReferenceCode Load (1.0ms)[0m [1mSELECT "reference_codes".* FROM "reference_codes" ORDER BY reference_type_id,reference_code LIMIT 1[0m
|
20
|
-
[1m[35mSQL (4.0ms)[0m SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
|
21
|
-
FROM pg_attribute a LEFT JOIN pg_attrdef d
|
22
|
-
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
|
23
|
-
WHERE a.attrelid = '"reference_codes"'::regclass
|
24
|
-
AND a.attnum > 0 AND NOT a.attisdropped
|
25
|
-
ORDER BY a.attnum
|
26
|
-
|
27
|
-
[1m[36mReferenceCode Load (1.0ms)[0m [1mSELECT "reference_codes".* FROM "reference_codes" WHERE ("reference_codes"."reference_type_id" = 1) AND ("reference_codes"."reference_code" = 1)[0m
|
28
|
-
[1m[35mReferenceCode Load (2.0ms)[0m SELECT "reference_codes".* FROM "reference_codes" ORDER BY reference_type_id,reference_code LIMIT 1
|
29
|
-
[1m[36mReferenceCode Load (1.0ms)[0m [1mSELECT "reference_codes".* FROM "reference_codes" WHERE ("reference_codes"."reference_type_id" = 1) AND ("reference_codes"."reference_code" = 1)[0m
|
30
|
-
[1m[35mReferenceCode Load (7.0ms)[0m SELECT "reference_codes".* FROM "reference_codes" ORDER BY reference_type_id,reference_code LIMIT 1
|
31
|
-
[1m[36mReferenceCode Load (1.0ms)[0m [1mSELECT "reference_codes".* FROM "reference_codes" LIMIT 1[0m
|
32
|
-
[1m[35mReferenceCode Load (1.0ms)[0m SELECT "reference_codes".* FROM "reference_codes"
|
33
|
-
[1m[36mReferenceCode Load (1.0ms)[0m [1mSELECT "reference_codes".* FROM "reference_codes" ORDER BY reference_type_id,reference_code LIMIT 1[0m
|
34
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
35
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
36
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
37
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
38
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
39
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
40
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
41
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
42
|
-
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'notice'
|
43
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
44
|
-
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
45
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
46
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
47
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
48
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
49
|
-
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
50
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
51
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
52
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
53
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
54
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
55
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
56
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
57
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
58
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
59
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
60
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
61
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
62
|
-
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'notice'
|
63
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
64
|
-
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
65
|
-
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'panic'
|
66
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
67
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
68
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
69
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
70
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
71
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
72
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
73
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
74
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
75
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
76
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
77
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
78
|
-
[1m[36mSQL (1.0ms)[0m [1mSHOW TIME ZONE[0m
|
79
|
-
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
80
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
81
|
-
[1m[36mSQL (1.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
82
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
83
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
84
|
-
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
85
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
86
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
87
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
88
|
-
[1m[36mSQL (1.0ms)[0m [1mSHOW TIME ZONE[0m
|
89
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
90
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
91
|
-
[1m[36mSQL (1.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
92
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
93
|
-
[1m[36mSQL (1.0ms)[0m [1mSHOW TIME ZONE[0m
|
94
|
-
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
95
|
-
[1m[35mSQL (1.0ms)[0m SET client_min_messages TO 'panic'
|
96
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
97
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
98
|
-
[1m[36mSQL (1.0ms)[0m [1mSHOW TIME ZONE[0m
|
99
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
100
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
101
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
102
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
103
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
104
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
105
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
106
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
107
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
108
|
-
[1m[36mSQL (1.0ms)[0m [1mSHOW TIME ZONE[0m
|
109
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
110
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
111
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
112
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
113
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
114
|
-
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
115
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
116
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
117
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
118
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
119
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
120
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
121
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
122
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
123
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
124
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW client_min_messages[0m
|
125
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
126
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
127
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
128
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|
129
|
-
[1m[36mSQL (1.0ms)[0m [1mSHOW client_min_messages[0m
|
130
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'panic'
|
131
|
-
[1m[36mSQL (0.0ms)[0m [1mSET standard_conforming_strings = on[0m
|
132
|
-
[1m[35mSQL (0.0ms)[0m SET client_min_messages TO 'notice'
|
133
|
-
[1m[36mSQL (0.0ms)[0m [1mSHOW TIME ZONE[0m
|