Package gluon :: Module dal :: Class CouchDBAdapter
[hide private]
[frames] | no frames]

Class CouchDBAdapter

source code

    object --+            
             |            
ConnectionPool --+        
                 |        
       BaseAdapter --+    
                     |    
          NoSQLAdapter --+
                         |
                        CouchDBAdapter

Nested Classes [hide private]

Inherited from BaseAdapter: __metaclass__

Instance Methods [hide private]
 
file_exists(self, filename)
to be used ONLY for files that on GAE may not be on filesystem
source code
 
file_open(self, filename, mode='rb', lock=True)
to be used ONLY for files that on GAE may not be on filesystem
source code
 
file_close(self, fileobj)
to be used ONLY for files that on GAE may not be on filesystem
source code
 
expand(self, expression, field_type=None) source code
 
AND(self, first, second) source code
 
OR(self, first, second) source code
 
EQ(self, first, second) source code
 
NE(self, first, second) source code
 
COMMA(self, first, second) source code
 
represent(self, obj, fieldtype) source code
 
__init__(self, db, uri='couchdb://127.0.0.1:5984', pool_size=0, folder=None, db_codec='UTF-8', credential_decoder=<function IDENTITY at 0x334cd70>, driver_args={}, adapter_args={}, do_connect=True, after_connection=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
create_table(self, table, migrate=True, fake_migrate=False, polymodel=None) source code
 
insert(self, table, fields) source code
 
_select(self, query, fields, attributes) source code
 
select(self, query, fields, attributes)
Always returns a Rows object, possibly empty.
source code
 
delete(self, tablename, query) source code
 
update(self, tablename, query, fields) source code
 
count(self, query, distinct=None) source code

Inherited from NoSQLAdapter: ADD, AGGREGATE, AS, DIV, ENDSWITH, EXTRACT, ILIKE, LEFT_JOIN, LENGTH, LOWER, MUL, ON, PRIMARY_KEY, RANDOM, STARTSWITH, SUB, SUBSTRING, UPPER, alias, close_connection, commit, commit_prepared, concat_add, constraint_name, create_sequence_and_triggers, distributed_transaction_begin, drop, execute, id_query, lastrowid, log_execute, migrate_table, prepare, represent_exceptions, rollback, rollback_prepared, rowslice

Inherited from NoSQLAdapter (private): _count, _delete, _insert, _update

Inherited from BaseAdapter: ALLOW_NULL, BELONGS, CASE, CAST, COALESCE, COALESCE_ZERO, CONCAT, CONTAINS, COUNT, EPOCH, GE, GT, INVERT, JOIN, LE, LIKE, LT, MOD, NOT, NOT_NULL, RAW, REGEXP, REPLACE, adapt, build_parsemap, bulk_insert, common_filter, connector, expand_all, file_delete, find_driver, get_table, isOperationalError, isProgrammingError, is_numerical_type, log, parse, parse_blob, parse_boolean, parse_date, parse_datetime, parse_decimal, parse_double, parse_id, parse_integer, parse_json, parse_list_integers, parse_list_references, parse_list_strings, parse_reference, parse_time, parse_value, save_dbt, select_limitby, sequence_name, smart_adapt, sqlsafe_field, sqlsafe_table, table_alias, tables, trigger_name, truncate, varquote

Inherited from ConnectionPool: after_connection, after_connection_hook, close, find_or_make_work_folder, reconnect

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]

Inherited from NoSQLAdapter: to_unicode

Inherited from ConnectionPool: close_all_instances, set_folder

Class Variables [hide private]
  drivers = ('couchdb')
  uploads_in_blob = True
  types = {'bigint': <type 'long'>, 'blob': <type 'str'>, 'boole...

Inherited from NoSQLAdapter: QUOTE_TEMPLATE, can_select_for_update

Inherited from BaseAdapter: FALSE, TRUE, T_SEP, commit_on_alter_table, connection, dbpath, driver, driver_name, folder, native_json, support_distributed_transaction

Inherited from ConnectionPool: POOLS, check_active_connection

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

file_exists(self, filename)

source code 

to be used ONLY for files that on GAE may not be on filesystem

Overrides: BaseAdapter.file_exists
(inherited documentation)

file_open(self, filename, mode='rb', lock=True)

source code 

to be used ONLY for files that on GAE may not be on filesystem

Overrides: BaseAdapter.file_open
(inherited documentation)

file_close(self, fileobj)

source code 

to be used ONLY for files that on GAE may not be on filesystem

Overrides: BaseAdapter.file_close
(inherited documentation)

expand(self, expression, field_type=None)

source code 
Overrides: BaseAdapter.expand

AND(self, first, second)

source code 
Overrides: BaseAdapter.AND

OR(self, first, second)

source code 
Overrides: BaseAdapter.OR

EQ(self, first, second)

source code 
Overrides: BaseAdapter.EQ

NE(self, first, second)

source code 
Overrides: BaseAdapter.NE

COMMA(self, first, second)

source code 
Overrides: BaseAdapter.COMMA

represent(self, obj, fieldtype)

source code 
Overrides: BaseAdapter.represent

__init__(self, db, uri='couchdb://127.0.0.1:5984', pool_size=0, folder=None, db_codec='UTF-8', credential_decoder=<function IDENTITY at 0x334cd70>, driver_args={}, adapter_args={}, do_connect=True, after_connection=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

create_table(self, table, migrate=True, fake_migrate=False, polymodel=None)

source code 
Overrides: BaseAdapter.create_table

insert(self, table, fields)

source code 
Overrides: BaseAdapter.insert

_select(self, query, fields, attributes)

source code 
Overrides: BaseAdapter._select

select(self, query, fields, attributes)

source code 

Always returns a Rows object, possibly empty.

Overrides: BaseAdapter.select
(inherited documentation)

delete(self, tablename, query)

source code 
Overrides: BaseAdapter.delete

update(self, tablename, query, fields)

source code 
Overrides: BaseAdapter.update

count(self, query, distinct=None)

source code 
Overrides: BaseAdapter.count

Class Variable Details [hide private]

types

Value:
{'bigint': <type 'long'>,
 'blob': <type 'str'>,
 'boolean': <type 'bool'>,
 'date': <type 'datetime.date'>,
 'datetime': <type 'datetime.datetime'>,
 'double': <type 'float'>,
 'float': <type 'float'>,
 'id': <type 'long'>,
...