collection of bound parameters, rather than
implicitly assigning None. [ticket:2556]
+ - [feature] Various API tweaks to the "dialect"
+ API to better support highly specialized
+ systems such as the Akiban database, including
+ more hooks to allow an execution context to
+ access type processors.
+
- [bug] The names of the columns on the
.c. attribute of a select().apply_labels()
is now based on <tablename>_<colkey> instead
def post_exec(self):
pass
+ def get_result_processor(self, type_, colname, coltype):
+ """Return a 'result processor' for a given type as present in
+ cursor.description.
+
+ This has a default implementation that dialects can override
+ for context-sensitive result type handling.
+
+ """
+ return type_._cached_result_processor(self.dialect, coltype)
+
def get_lastrowid(self):
"""return self.cursor.lastrowid, or equivalent, after an INSERT.
name, obj, type_ = \
colname, None, typemap.get(coltype, types.NULLTYPE)
- processor = type_._cached_result_processor(dialect, coltype)
+ processor = context.get_result_processor(type_, colname, coltype)
processors.append(processor)
rec = (processor, obj, i)
def visit_select(self, select, asfrom=False, parens=True,
iswrapper=False, fromhints=None,
compound_index=0,
+ force_result_map=False,
positional_names=None, **kwargs):
entry = self.stack and self.stack[-1] or {}
# to outermost if existingfroms: correlate_froms =
# correlate_froms.union(existingfroms)
- populate_result_map = compound_index == 0 and (
- not entry or \
- entry.get('iswrapper', False)
+ populate_result_map = force_result_map or (
+ compound_index == 0 and (
+ not entry or \
+ entry.get('iswrapper', False)
+ )
)
self.stack.append({'from': correlate_froms,
e = engines.utf8_engine()
inspector = inspect(e)
- for vname in inspector.get_view_names():
- e.execute(schema._DropView(schema.Table(vname, schema.MetaData())))
+ try:
+ view_names = inspector.get_view_names()
+ except NotImplementedError:
+ pass
+ else:
+ for vname in view_names:
+ e.execute(schema._DropView(schema.Table(vname, schema.MetaData())))
- for vname in inspector.get_view_names(schema="test_schema"):
- e.execute(schema._DropView(
- schema.Table(vname,
- schema.MetaData(), schema="test_schema")))
+ try:
+ view_names = inspector.get_view_names(schema="test_schema")
+ except NotImplementedError:
+ pass
+ else:
+ for vname in view_names:
+ e.execute(schema._DropView(
+ schema.Table(vname,
+ schema.MetaData(), schema="test_schema")))
for tname in reversed(inspector.get_table_names(order_by="foreign_key")):
e.execute(schema.DropTable(schema.Table(tname, schema.MetaData())))