db = DAL('google:datastore',
adapter_args={'ndb_settings':ndb_settings, 'use_ndb':True})
ndb_settings is optional and can be used for per model caching
settings. It must be a dict in this form: ndb_settings =
{<table_name>:{<variable_name>:<variable_value>}} See:
https://developers.google.com/appengine/docs/python/ndb/cache
|
reconnect(*args,
**kwargs)
this function defines: self.connection and self.cursor (iff cursor is
True) if self.pool_size>0 it will try pull the connection from the
pool if the connection is not active (closed by db server) it will
loop if not self.pool_size or no active connections in pool makes a
new one |
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
|
|
|
|
|
__init__(self,
db,
uri,
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
filter(self,
query,
tableobj,
prop,
op,
value) |
source code
|
|
|
select_raw(self,
query,
fields=None,
attributes=None) |
source code
|
|
|
select(self,
query,
fields,
attributes)
This is the GAE version of select. |
source code
|
|
|
|
|
|
|
|
|
delete(self,
tablename,
query)
This function was changed on 2010-05-04 because according to
http://code.google.com/p/googleappengine/issues/detail?id=3119 GAE no
longer supports deleting more than 1000 records. |
source code
|
|
|
|
|
|
|
|
Inherited from NoSQLAdapter :
ADD ,
AGGREGATE ,
AS ,
DIV ,
ENDSWITH ,
EXTRACT ,
ILIKE ,
LEFT_JOIN ,
LENGTH ,
LOWER ,
MUL ,
ON ,
OR ,
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 ,
represent_exceptions ,
rollback ,
rollback_prepared ,
rowslice
Inherited from BaseAdapter :
ALLOW_NULL ,
CASE ,
CAST ,
COALESCE ,
COALESCE_ZERO ,
CONCAT ,
COUNT ,
EPOCH ,
JOIN ,
LIKE ,
MOD ,
NOT_NULL ,
RAW ,
REGEXP ,
REPLACE ,
adapt ,
build_parsemap ,
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_integer ,
parse_json ,
parse_list_references ,
parse_reference ,
parse_time ,
parse_value ,
save_dbt ,
select_limitby ,
sequence_name ,
smart_adapt ,
sqlsafe_field ,
sqlsafe_table ,
table_alias ,
tables ,
trigger_name ,
varquote
Inherited from ConnectionPool :
after_connection ,
after_connection_hook ,
close ,
find_or_make_work_folder
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|