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

Class MySQLAdapter

source code

    object --+        
             |        
ConnectionPool --+    
                 |    
       BaseAdapter --+
                     |
                    MySQLAdapter
Known Subclasses:

Instance Methods [hide private]
 
varquote(self, name) source code
 
RANDOM(self) source code
 
SUBSTRING(self, field, parameters) source code
 
EPOCH(self, first) source code
 
CONCAT(self, *items) source code
 
REGEXP(self, first, second)
regular expression operator
source code
 
_drop(self, table, mode) source code
 
_insert_empty(self, table) source code
 
distributed_transaction_begin(self, key) source code
 
prepare(self, key) source code
 
commit_prepared(self, ley) source code
 
rollback_prepared(self, key) source code
 
__init__(self, db, uri, pool_size=0, folder=None, db_codec='UTF-8', credential_decoder=<function IDENTITY at 0x2672c80>, driver_args={}, adapter_args={}, do_connect=True, after_connection=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
after_connection(self)
this it is supposed to be overloaded by adapters
source code
 
lastrowid(self, table) source code

Inherited from BaseAdapter: ADD, AGGREGATE, ALLOW_NULL, AND, AS, BELONGS, CASE, CAST, COALESCE, COALESCE_ZERO, COMMA, CONTAINS, COUNT, DIV, ENDSWITH, EQ, EXTRACT, GE, GT, ILIKE, INVERT, JOIN, LE, LEFT_JOIN, LENGTH, LIKE, LOWER, LT, MOD, MUL, NE, NOT, NOT_NULL, ON, OR, PRIMARY_KEY, RAW, REPLACE, STARTSWITH, SUB, UPPER, adapt, alias, build_parsemap, bulk_insert, close_connection, commit, common_filter, concat_add, constraint_name, count, create_sequence_and_triggers, create_table, delete, drop, execute, expand, expand_all, file_close, file_delete, file_exists, file_open, find_driver, get_table, id_query, insert, isOperationalError, isProgrammingError, is_numerical_type, log, log_execute, migrate_table, 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, represent, represent_exceptions, rollback, rowslice, save_dbt, select, select_limitby, sequence_name, smart_adapt, table_alias, tables, trigger_name, truncate, update

Inherited from ConnectionPool: 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 ConnectionPool: close_all_instances, set_folder

Class Variables [hide private]
  drivers = ('MySQLdb', 'pymysql', 'mysqlconnector')
  commit_on_alter_table = True
  support_distributed_transaction = True
  types = {'big-id': 'BIGINT AUTO_INCREMENT NOT NULL', 'big-refe...
  QUOTE_TEMPLATE = '`%s`'
  REGEX_URI = re.compile(r'^(?P<user>[^:@]+)(:(?P<password>[^@]*...

Inherited from BaseAdapter: FALSE, TRUE, T_SEP, can_select_for_update, connection, dbpath, driver, driver_name, folder, native_json, uploads_in_blob

Inherited from ConnectionPool: POOLS, check_active_connection

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

varquote(self, name)

source code 
Overrides: BaseAdapter.varquote

RANDOM(self)

source code 
Overrides: BaseAdapter.RANDOM

SUBSTRING(self, field, parameters)

source code 
Overrides: BaseAdapter.SUBSTRING

EPOCH(self, first)

source code 
Overrides: BaseAdapter.EPOCH

CONCAT(self, *items)

source code 
Overrides: BaseAdapter.CONCAT

REGEXP(self, first, second)

source code 

regular expression operator

Overrides: BaseAdapter.REGEXP
(inherited documentation)

_drop(self, table, mode)

source code 
Overrides: BaseAdapter._drop

_insert_empty(self, table)

source code 
Overrides: BaseAdapter._insert_empty

distributed_transaction_begin(self, key)

source code 
Overrides: BaseAdapter.distributed_transaction_begin

prepare(self, key)

source code 
Overrides: BaseAdapter.prepare

commit_prepared(self, ley)

source code 
Overrides: BaseAdapter.commit_prepared

rollback_prepared(self, key)

source code 
Overrides: BaseAdapter.rollback_prepared

__init__(self, db, uri, pool_size=0, folder=None, db_codec='UTF-8', credential_decoder=<function IDENTITY at 0x2672c80>, 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)

after_connection(self)

source code 

this it is supposed to be overloaded by adapters

Overrides: ConnectionPool.after_connection
(inherited documentation)

lastrowid(self, table)

source code 
Overrides: BaseAdapter.lastrowid

Class Variable Details [hide private]

types

Value:
{'big-id': 'BIGINT AUTO_INCREMENT NOT NULL',
 'big-reference': 'BIGINT, INDEX %(index_name)s (%(field_name)s), FORE\
IGN KEY (%(field_name)s) REFERENCES %(foreign_key)s ON DELETE %(on_del\
ete_action)s',
 'bigint': 'BIGINT',
 'blob': 'LONGBLOB',
 'boolean': 'CHAR(1)',
 'date': 'DATE',
...

REGEX_URI

Value:
re.compile(r'^(?P<user>[^:@]+)(:(?P<password>[^@]*))?@(?P<host>[^:/]+)\
(:(?P<port>[0-9]+))?/(?P<db>[^\?]+)(\?set_encoding=(?P<charset>\w+))?$\
')