drysql 0.1.7 → 0.1.8

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.
@@ -72,7 +72,7 @@ module ActiveRecord
72
72
  # this will be fixed
73
73
  # FIXME must be fixed once composite primary keys are supported
74
74
  sql = "select t1.column_name from all_cons_columns t1 inner join all_constraints t2 on \
75
- (t1.owner = t2.owner AND t1.constraint_name = t2.constraint_name) where t1.table_name='#{table_name}' and t2.constraint_type='P'"
75
+ (t1.owner = t2.owner AND t1.constraint_name = t2.constraint_name) where t1.table_name='#{table_name.upcase}' and t2.constraint_type='P'"
76
76
  primary_key_column_name = select_one(sql, "Primary Key")['column_name']
77
77
 
78
78
  columns.each do |column|
@@ -82,11 +82,11 @@ module ActiveRecord
82
82
 
83
83
  def constraints(table_name, name = nil)#:nodoc:
84
84
  constraints = []
85
- sql = "select t1.owner, t1.constraint_name, t1.constraint_type, t1.table_name, t1.r_owner, t1.r_constraint_name, \
86
- t1.delete_rule, t2.column_name, t3.table_name as r_table_name, t3.column_name as r_column_name from all_constraints t1 \
85
+ sql = "select t1.owner, t1.constraint_name, t1.constraint_type, lower(t1.table_name) as table_name, t1.r_owner, t1.r_constraint_name, \
86
+ t1.delete_rule, t2.column_name, lower(t3.table_name) as r_table_name, t3.column_name as r_column_name from all_constraints t1 \
87
87
  inner join all_cons_columns t2 on ( t1.owner = t2.owner AND t1.constraint_name = t2.constraint_name) left outer join \
88
88
  all_cons_columns t3 on (t1.r_owner = t3.owner AND t1.r_constraint_name = t3.constraint_name) where \
89
- t1.table_name='#{table_name}' or t3.table_name='#{table_name}'"
89
+ t1.table_name='#{table_name.upcase}' or t3.table_name='#{table_name.upcase}'"
90
90
 
91
91
  results = select_all(sql, name)
92
92
  constraint_name_hash = {}
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: drysql
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.7
7
- date: 2006-12-13 00:00:00 -05:00
6
+ version: 0.1.8
7
+ date: 2007-01-03 00:00:00 -05:00
8
8
  summary: Dynamic, Reflective, Invisible Object-Relational Mapping for Ruby
9
9
  require_paths:
10
10
  - lib