-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
47 lines (29 loc) · 940 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
dead_simple_db
==============
A object oriented interface to Amazon SimpleDB service from AWS
require 'dead_simple_db'
#you need your Amazon AWS credentials defined in the environment
ENV['AMAZON_ACCESS_KEY_ID'] = 'your access key'
ENV['AMAZON_SECRET_ACCESS_KEY'] = 'your secret access key'
class Client < DeadSimpleDb::Base
domain 'test_domain'
attr_sdb :first_name, 'String'
attr_sdb :last_name, 'String'
attr_sdb :budget, 'Integer', :digits => 9
attr_sdb :first_purchase, 'Time'
end
c = Client.new
c.first_name = "Henry"
c.last_name = "Chinaski"
c.budget = 1000
# that's how you save your first record on Amazon SimpleDB
c.save
# and that's how you fetch it
henry = Client.find(:first, "['first_name' = 'Henry']")
puts henry.first_name
INSTALLATION
============
sudo gem install hungryblank-dead_simple_db -s http://gems.github.com
COPYRIGHT
=========
Copyright (c) 2009 Paolo Negri. See LICENSE for details.