Diego Algorta, Software and Web Developer & SysAdmin, Consultant, Freelancer I was there at RailsConf2008 when wycats presented DataMapper too. VERY NICE. But, one thing got me curious... How did you do those GREAT text effects?! What software did you use? Are those stock effects or something custom from you? Isuppose you didn't use OpenOffice.org Impress? :(4 years ago
Employments Employment
id: int id<Integer>
person_id: int
person<Person>
start: date
end: date start<Date>
salary_amt: dec
end<Date>
salary_cur: char
salary<Money>
Connection Connection Connection Connection Connection
Connection Pool
create_command “select * from foos where id = ?”
Command
execute_reader Reader next values next ...
execute_reader(12) =>
select * from foos where id = 12
works today on:
mysql, sqlite, postgres
fast, written in C
simple interface for
adapters
•read by key
• read by query
• update by key
• update set
• delete
• (optional: transactions)
salesforce adapter in
200 LOC
Errors
Operators
Naming
Conventions
~/.salesforce
Build Query
Load Result Set
Similar CRUD
Demo
custom types
class Post
include DataMapper::Resource
property :title, String
property :author, FullName
property :details, Csv
end
class FullName < DM::Type
primitive String
size 100
def self.load(str)
str.split(“, ”).reverse
end
def self.dump(ary)
ary.reverse.join(“, ”)
end
end
class Csv < DM::Type
primitive String
size 65355
def self.load(str)
FasterCSV.parse(value)
end
def self.dump(ary)
FasterCSV.generate do |csv|
ary.each {|line| csv << line}
end
end
end
But, one thing got me curious... How did you do those GREAT text effects?! What software did you use? Are those stock effects or something custom from you? Isuppose you didn't use OpenOffice.org Impress? :( 4 years ago