Class: Dock::Couchdb
- Inherits:
-
Base
- Object
- Base
- Dock::Couchdb
show all
- Defined in:
- lib/dock/adapters/couchdb.rb
Instance Attribute Summary
Attributes inherited from Base
#model
Instance Method Summary
collapse
Methods inherited from Base
#embedded, inherited, #initialize, #scoped
Constructor Details
This class inherits a constructor from Dock::Base
Instance Method Details
#all(options = {}) ⇒ Object
14
15
16
17
18
19
20
|
# File 'lib/dock/adapters/couchdb.rb', line 14
def all(options = {})
conditions, order, limit, offset = (options)
opts = { :conditions => conditions, :order => order_clause(order) }
opts = opts.merge({ :limit => limit }) unless limit.nil?
opts = opts.merge({ :offset => offset }) unless offset.nil?
model.all opts
end
|
#associations ⇒ Object
35
36
37
|
# File 'lib/dock/adapters/couchdb.rb', line 35
def associations()
end
|
#belongs_to ⇒ Object
51
52
53
|
# File 'lib/dock/adapters/couchdb.rb', line 51
def belongs_to()
end
|
#column_names ⇒ Object
41
42
43
|
# File 'lib/dock/adapters/couchdb.rb', line 41
def column_names()
model.properties.map(&:name)
end
|
#count(options = {}) ⇒ Object
45
46
47
|
# File 'lib/dock/adapters/couchdb.rb', line 45
def count(options = {})
all(options).count
end
|
#create(attributes = {}) ⇒ Object
5
6
7
|
# File 'lib/dock/adapters/couchdb.rb', line 5
def create(attributes = {})
end
|
#cyclic? ⇒ Boolean
63
64
65
|
# File 'lib/dock/adapters/couchdb.rb', line 63
def cyclic?()
end
|
#destroy(object) ⇒ Object
2 zoo.attributes = { :name => ‘The Glue Factory’, :inception => Time.now } 3 zoo.save
32
33
34
|
# File 'lib/dock/adapters/couchdb.rb', line 32
def destroy(object)
object.destroy if valid_object?(object)
end
|
#embedded? ⇒ Boolean
60
61
62
|
# File 'lib/dock/adapters/couchdb.rb', line 60
def embedded?()
end
|
#encoding ⇒ Object
48
49
50
|
# File 'lib/dock/adapters/couchdb.rb', line 48
def encoding()
end
|
#find(id) ⇒ Object
8
9
10
|
# File 'lib/dock/adapters/couchdb.rb', line 8
def find(id)
end
|
#find!(id) ⇒ Object
11
12
13
|
# File 'lib/dock/adapters/couchdb.rb', line 11
def find!(id)
end
|
#first(options = {}) ⇒ Object
21
22
23
24
|
# File 'lib/dock/adapters/couchdb.rb', line 21
def first(options = {})
conditions, order = (options)
model.first :conditions => conditions, :order => order_clause(order)
end
|
#has_many ⇒ Object
54
55
56
|
# File 'lib/dock/adapters/couchdb.rb', line 54
def has_many()
end
|
#id ⇒ Object
25
26
27
|
# File 'lib/dock/adapters/couchdb.rb', line 25
def id()
end
|
#model_name ⇒ Object
38
39
40
|
# File 'lib/dock/adapters/couchdb.rb', line 38
def model_name()
model.class.name
end
|
#properties ⇒ Object
69
70
71
|
# File 'lib/dock/adapters/couchdb.rb', line 69
def properties()
end
|
#scoped? ⇒ Boolean
57
58
59
|
# File 'lib/dock/adapters/couchdb.rb', line 57
def scoped?()
end
|
#supports_joins? ⇒ Boolean
66
67
68
|
# File 'lib/dock/adapters/couchdb.rb', line 66
def supports_joins?()
false
end
|
#update(search_key, find_by, update_key, by_value) ⇒ Object
28
29
30
31
|
# File 'lib/dock/adapters/couchdb.rb', line 28
def update(search_key, find_by, update_key, by_value)
end
|