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

# Class BaseAdapter

source code

        object --+
                 |
    ConnectionPool --+
                     |
                    BaseAdapter

Known Subclasses:
  NoSQLAdapter, MySQLAdapter, DB2Adapter, FireBirdAdapter, InformixAdapter, IngresAdapter, PostgreSQLAdapter, SQLiteAdapter, MSSQLAdapter, OracleAdapter, SAPDBAdapter

Instance Methods | [hide private]
integrity_error(self) | source code
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, unlock=True) to be used ONLY for files that on GAE may not be on filesystem | source code
file_delete(self, filename) | source code
__init__(self, db, uri, pool_size=0, folder=1, db_codec=`'``UTF-8``'`, credential_decoder=<function <lambda> at 0xd635f0>, driver_args=`{``}`, adapter_args=`{``}`) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code
sequence_name(self, tablename) | source code
trigger_name(self, tablename) | source code
create_table(self, table, migrate=True, fake_migrate=True, polymodel=1) | source code
migrate_table(self, table, sql_fields, sql_fields_old, sql_fields_aux, logfile, fake_migrate=True) | source code
LOWER(self, first) | source code
UPPER(self, first) | source code
EXTRACT(self, first, what) | source code
AGGREGATE(self, first, what) | source code
JOIN(self) | source code
LEFT_JOIN(self) | source code
RANDOM(self) | source code
NOT_NULL(self, default, field_type) | source code
COALESCE_ZERO(self, first) | source code
ALLOW_NULL(self) | source code
SUBSTRING(self, field, parameters) | source code
PRIMARY_KEY(self, key) | source code
_drop(self, table, mode) | source code
drop(self, table, mode=`'````'`) | source code
_insert(self, table, fields) | source code
insert(self, table, fields) | source code
bulk_insert(self, table, items) | source code
NOT(self, first) | source code
AND(self, first, second) | source code
OR(self, first, second) | source code
BELONGS(self, first, second) | source code
LIKE(self, first, second) | source code
STARTSWITH(self, first, second) | source code
ENDSWITH(self, first, second) | source code
CONTAINS(self, first, second) | source code
EQ(self, first, second=1) | source code
NE(self, first, second=1) | source code
LT(self, first, second=1) | source code
LE(self, first, second=1) | source code
GT(self, first, second=1) | source code
GE(self, first, second=1) | source code
ADD(self, first, second) | source code
SUB(self, first, second) | source code
MUL(self, first, second) | source code
DIV(self, first, second) | source code
MOD(self, first, second) | source code
AS(self, first, second) | source code
ON(self, first, second) | source code
INVERT(self, first) | source code
COMMA(self, first, second) | source code
expand(self, expression, field_type=1) | source code
alias(self, table, alias) given a table object, makes a new table object with alias name. | source code
_truncate(self, table, mode=`'````'`) | source code
truncate(self, table, mode=`'``` `'`) | source code
_update(self, tablename, query, fields) | source code
update(self, tablename, query, fields) | source code
_delete(self, tablename, query) | source code
delete(self, tablename, query) | source code
get_table(self, query) | source code
_select(self, query, fields, attributes) | source code
select_limitby(self, sql_s, sql_f, sql_t, sql_w, sql_o, limitby) | source code
select(self, query, fields, attributes) Always returns a Rows object, even if it may be empty | source code
_count(self, query, distinct=1) | source code
count(self, query, distinct=1) | source code
tables(self, query) | source code
commit(self) | source code
rollback(self) | source code
close(self) | source code
distributed_transaction_begin(self, key) | source code
prepare(self, key) | source code
commit_prepared(self, key) | source code
rollback_prepared(self, key) | source code
concat_add(self, table) | source code
constraint_name(self, table, fieldname) | source code
create_sequence_and_triggers(self, query, table, **args) | source code
log_execute(self, *a, **b) | source code
execute(self, *a, **b) | source code
represent(self, obj, fieldtype) | source code
represent_exceptions(self, obj, fieldtype) | source code
lastrowid(self, table) | source code
integrity_error_class(self) | source code
rowslice(self, rows, minimum=0, maximum=1) by default this function does nothing, overload when db does not do slicing | source code
parse(self, rows, colnames, blob_decode=True) | source code
filter_tenant(self, query, tablenames) | source code
Inherited from `ConnectionPool`: `find_or_make_work_folder`, `pool_connection` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Static Methods | [hide private]
Inherited from `ConnectionPool`: `close_all_instances`, `set_folder`

Class Variables | [hide private]
| driver = `1` PyMySQL: A pure-Python drop-in replacement for MySQLdb.
| maxcharlength = `32768`
| commit_on_alter_table = `True`
| support_distributed_transaction = `True`
| uploads_in_blob = `True`
| types = ``{``'``blob``'``:` `'``BLOB``'``,` `'``boolean``'``:` `'``CHAR(1)``'``,` `'``date``'``:` `'``DATE``'``,``...``
Inherited from `ConnectionPool`: `pools`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, db, uri, pool_size=0, folder=1, db_codec=`'``UTF-8``'`, credential_decoder=<function <lambda> at 0xd635f0>, driver_args=`{``}`, adapter_args=`{``}`) (Constructor) | source code
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Overrides: object.__init__ (inherited documentation)

Class Variable Details | [hide private]

  ### types Value:
      {'blob': 'BLOB',
       'boolean': 'CHAR(1)',
       'date': 'DATE',
       'datetime': 'TIMESTAMP',
       'decimal': 'DOUBLE',
       'double': 'DOUBLE',
       'id': 'INTEGER PRIMARY KEY AUTOINCREMENT',
       'integer': 'INTEGER',
      ...