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

Class MSSQLAdapter

source code

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

Nested Classes [hide private]

Inherited from BaseAdapter: __metaclass__

Instance Methods [hide private]
 
concat_add(self, tablename) source code
 
varquote(self, name) source code
 
EXTRACT(self, field, what) source code
 
LEFT_JOIN(self) source code
 
RANDOM(self) source code
 
ALLOW_NULL(self) source code
 
CAST(self, first, second) source code
 
SUBSTRING(self, field, parameters) source code
 
PRIMARY_KEY(self, key) source code
 
AGGREGATE(self, first, what) source code
 
select_limitby(self, sql_s, sql_f, sql_t, sql_w, sql_o, limitby) 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, srid=4326, after_connection=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
lastrowid(self, table) source code
 
rowslice(self, rows, minimum=0, maximum=None)
By default this function does nothing; overload when db does not do slicing.
source code
 
EPOCH(self, first) source code
 
CONCAT(self, *items) source code
 
ST_ASTEXT(self, first) source code
 
ST_CONTAINS(self, first, second) source code
 
ST_DISTANCE(self, first, second) source code
 
ST_EQUALS(self, first, second) source code
 
ST_INTERSECTS(self, first, second) source code
 
ST_OVERLAPS(self, first, second) source code
 
ST_TOUCHES(self, first, second) source code
 
ST_WITHIN(self, first, second) source code
 
represent(self, obj, fieldtype) source code

Inherited from BaseAdapter: ADD, AND, AS, BELONGS, CASE, COALESCE, COALESCE_ZERO, COMMA, CONTAINS, COUNT, DIV, ENDSWITH, EQ, GE, GT, ILIKE, INVERT, JOIN, LE, LENGTH, LIKE, LOWER, LT, MOD, MUL, NE, NOT, NOT_NULL, ON, OR, RAW, REGEXP, REPLACE, STARTSWITH, SUB, UPPER, adapt, alias, build_parsemap, bulk_insert, close_connection, commit, commit_prepared, common_filter, connector, constraint_name, count, create_sequence_and_triggers, create_table, delete, distributed_transaction_begin, 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, prepare, represent_exceptions, rollback, rollback_prepared, save_dbt, select, sequence_name, smart_adapt, sqlsafe_field, sqlsafe_table, table_alias, tables, trigger_name, truncate, update

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

Class Variables [hide private]
  drivers = ('pyodbc')
  T_SEP = 'T'
  QUOTE_TEMPLATE = '"%s"'
  types = {'big-id': 'BIGINT IDENTITY PRIMARY KEY', 'big-referen...
  TRUE = 1
  FALSE = 0
  REGEX_DSN = re.compile(r'^(?P<dsn>.+)$')
  REGEX_URI = re.compile(r'^(?P<user>[^:@]+)(:(?P<password>[^@]*...
  REGEX_ARGPATTERN = re.compile(r'(?P<argkey>[^=]+)=(?P<argvalue...

Inherited from BaseAdapter: can_select_for_update, commit_on_alter_table, connection, dbpath, driver, driver_name, folder, native_json, support_distributed_transaction, uploads_in_blob

Inherited from ConnectionPool: POOLS, check_active_connection

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

concat_add(self, tablename)

source code 
Overrides: BaseAdapter.concat_add

varquote(self, name)

source code 
Overrides: BaseAdapter.varquote

EXTRACT(self, field, what)

source code 
Overrides: BaseAdapter.EXTRACT

LEFT_JOIN(self)

source code 
Overrides: BaseAdapter.LEFT_JOIN

RANDOM(self)

source code 
Overrides: BaseAdapter.RANDOM

ALLOW_NULL(self)

source code 
Overrides: BaseAdapter.ALLOW_NULL

CAST(self, first, second)

source code 
Overrides: BaseAdapter.CAST

SUBSTRING(self, field, parameters)

source code 
Overrides: BaseAdapter.SUBSTRING

PRIMARY_KEY(self, key)

source code 
Overrides: BaseAdapter.PRIMARY_KEY

AGGREGATE(self, first, what)

source code 
Overrides: BaseAdapter.AGGREGATE

select_limitby(self, sql_s, sql_f, sql_t, sql_w, sql_o, limitby)

source code 
Overrides: BaseAdapter.select_limitby

__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, srid=4326, after_connection=None)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

lastrowid(self, table)

source code 
Overrides: BaseAdapter.lastrowid

rowslice(self, rows, minimum=0, maximum=None)

source code 

By default this function does nothing; overload when db does not do slicing.

Overrides: BaseAdapter.rowslice
(inherited documentation)

EPOCH(self, first)

source code 
Overrides: BaseAdapter.EPOCH

CONCAT(self, *items)

source code 
Overrides: BaseAdapter.CONCAT

represent(self, obj, fieldtype)

source code 
Overrides: BaseAdapter.represent

Class Variable Details [hide private]

types

Value:
{'big-id': 'BIGINT IDENTITY PRIMARY KEY',
 'big-reference': 'BIGINT NULL, CONSTRAINT %(constraint_name)s FOREIGN\
 KEY (%(field_name)s) REFERENCES %(foreign_key)s ON DELETE %(on_delete\
_action)s',
 'bigint': 'BIGINT',
 'blob': 'IMAGE',
 'boolean': 'BIT',
 'date': 'DATETIME',
...

REGEX_URI

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

REGEX_ARGPATTERN

Value:
re.compile(r'(?P<argkey>[^=]+)=(?P<argvalue>[^&]*)')