public
Description: DataMapper Adapters
Homepage: http://www.yehudakatz.com
Clone URL: git://github.com/wycats/dm-adapters.git
Fixes up some issues with naming conventions
hassox (author)
Tue Jul 01 07:17:20 -0700 2008
commit  05fab22f1bd9b88a6ec2c31d086a0449f3b7bd47
tree    26abf77f193390d8c354520d9c32a332b9c91422
parent  5826e2ac800dcb63626a2be1921d21f2a0d98db1
...
30
31
32
33
 
34
35
36
37
 
38
39
40
...
124
125
126
127
128
129
130
...
30
31
32
 
33
34
35
36
 
37
38
39
40
...
124
125
126
 
127
128
129
0
@@ -30,11 +30,11 @@ module DataMapper
0
           end
0
           case prop
0
           when Property
0
- "#{prop.field} #{operator}"
0
+ "#{Extlib::Inflection.camelize(prop.field)} #{operator}"
0
           when Query::Path
0
             rels = prop.relationships
0
             names = rels.map {|r| storage_name(r, repository) }.join(".")
0
- "#{names}.#{prop.field} #{operator}"
0
+ "#{names}.#{Extlib::Inflection.camelize(prop.field)} #{operator}"
0
           end
0
         end
0
 
0
@@ -124,7 +124,6 @@ module DataMapper
0
         repository = query.repository
0
         properties = query.fields
0
         properties_with_indexes = Hash[*properties.zip((0...properties.size).to_a).flatten]
0
-
0
         conditions = query.conditions.map {|c| SQL.from_condition(c, repository)}.compact.join(") AND (")
0
       
0
         query_string = "SELECT #{query.fields.map {|f| @field_naming_convention.call(f.field)}.join(", ")} from #{query.model.storage_name(repository.name)}"

Comments

    No one has commented yet.