Module: Dynamodb::Api
- Defined in:
- lib/dynamodb/api.rb,
lib/dynamodb/api/query.rb,
lib/dynamodb/api/config.rb,
lib/dynamodb/api/adapter.rb,
lib/dynamodb/api/version.rb,
lib/dynamodb/api/put/item.rb,
lib/dynamodb/api/relation.rb,
lib/dynamodb/api/delete/item.rb,
lib/dynamodb/api/update/base.rb,
lib/dynamodb/api/update/item.rb,
lib/dynamodb/api/map/operator.rb,
lib/dynamodb/api/delete/tables.rb,
lib/dynamodb/api/config/options.rb,
lib/dynamodb/api/update/attributes.rb,
lib/dynamodb/api/relation/from_clause.rb,
lib/dynamodb/api/relation/limit_clause.rb,
lib/dynamodb/api/relation/order_clause.rb,
lib/dynamodb/api/relation/where_clause.rb,
lib/dynamodb/api/relation/filter_clause.rb,
lib/dynamodb/api/relation/query_methods.rb,
lib/dynamodb/api/relation/select_clause.rb,
lib/dynamodb/api/relation/global_secondary_index.rb,
lib/dynamodb/api/relation/expression_attribute_names.rb
Overview
Defined Under Namespace
Modules: Config, Delete, Map, Put, Relation, Update
Classes: Adapter, Query
Constant Summary
collapse
- VERSION =
'0.6.2'.freeze
Class Method Summary
collapse
Class Method Details
.adapter ⇒ Object
35
36
37
|
# File 'lib/dynamodb/api.rb', line 35
def adapter
@adapter ||= Dynamodb::Api::Adapter.new
end
|
.config ⇒ Object
31
32
33
|
# File 'lib/dynamodb/api.rb', line 31
def config
block_given? ? yield(Dynamodb::Api::Config) : Dynamodb::Api::Config
end
|
.delete(table_name, key) ⇒ Object
56
57
58
|
# File 'lib/dynamodb/api.rb', line 56
def delete(table_name, key)
Delete::Item.delete_item(key, table_name)
end
|
.drop_tables ⇒ Object
39
40
41
|
# File 'lib/dynamodb/api.rb', line 39
def drop_tables
Delete::Tables.delete_tables
end
|
.insert(table_name, value) ⇒ Object
47
48
49
50
|
# File 'lib/dynamodb/api.rb', line 47
def insert(table_name, value)
Put::Item.put_item(value, table_name)
end
|
.query ⇒ Object
43
44
45
|
# File 'lib/dynamodb/api.rb', line 43
def query
Query.new
end
|
.remove_attributes(table_name, key, attrs) ⇒ Object
60
61
62
|
# File 'lib/dynamodb/api.rb', line 60
def remove_attributes(table_name, key, attrs)
Update::Attributes.new.remove_attributes(key, attrs, table_name)
end
|
.update(table_name, key, value) ⇒ Object
52
53
54
|
# File 'lib/dynamodb/api.rb', line 52
def update(table_name, key, value)
Update::Item.new.update_item(key, value, table_name)
end
|