summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/sql')
-rw-r--r--lib/sqlalchemy/sql/compiler.py3
-rw-r--r--lib/sqlalchemy/sql/ddl.py3
-rw-r--r--lib/sqlalchemy/sql/elements.py3
-rw-r--r--lib/sqlalchemy/sql/functions.py3
-rw-r--r--lib/sqlalchemy/sql/schema.py3
5 files changed, 15 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py
index 8e3cf1729..f81886240 100644
--- a/lib/sqlalchemy/sql/compiler.py
+++ b/lib/sqlalchemy/sql/compiler.py
@@ -200,6 +200,9 @@ class Compiled(object):
"""Produce the internal string representation of this element."""
pass
+ def _execute_on_connection(self, connection, multiparams, params):
+ return connection._execute_compiled(self, multiparams, params)
+
@property
def sql_compiler(self):
"""Return a Compiled that is capable of processing SQL expressions.
diff --git a/lib/sqlalchemy/sql/ddl.py b/lib/sqlalchemy/sql/ddl.py
index 2a81b3394..72ef07732 100644
--- a/lib/sqlalchemy/sql/ddl.py
+++ b/lib/sqlalchemy/sql/ddl.py
@@ -63,6 +63,9 @@ class DDLElement(Executable, _DDLCompiles):
dialect = None
callable_ = None
+ def _execute_on_connection(self, connection, multiparams, params):
+ return connection._execute_ddl(self, multiparams, params)
+
def execute(self, bind=None, target=None):
"""Execute this DDL immediately.
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py
index 92cbc3653..ea2132e67 100644
--- a/lib/sqlalchemy/sql/elements.py
+++ b/lib/sqlalchemy/sql/elements.py
@@ -292,6 +292,9 @@ class ClauseElement(Visitable):
# self
return self
+ def _execute_on_connection(self, connection, multiparams, params):
+ return connection._execute_clauseelement(self, multiparams, params)
+
def unique_params(self, *optionaldict, **kwargs):
"""Return a copy with :func:`bindparam()` elements replaced.
diff --git a/lib/sqlalchemy/sql/functions.py b/lib/sqlalchemy/sql/functions.py
index 24f79466c..489be8934 100644
--- a/lib/sqlalchemy/sql/functions.py
+++ b/lib/sqlalchemy/sql/functions.py
@@ -60,6 +60,9 @@ class FunctionElement(Executable, ColumnElement, FromClause):
group_contents=True, *args).\
self_group()
+ def _execute_on_connection(self, connection, multiparams, params):
+ return connection._execute_function(self, multiparams, params)
+
@property
def columns(self):
"""Fulfill the 'columns' contract of :class:`.ColumnElement`.
diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py
index b190c3874..35bab8e9d 100644
--- a/lib/sqlalchemy/sql/schema.py
+++ b/lib/sqlalchemy/sql/schema.py
@@ -68,6 +68,9 @@ class SchemaItem(SchemaEventTarget, visitors.Visitable):
__visit_name__ = 'schema_item'
+ def _execute_on_connection(self, connection, multiparams, params):
+ return connection._execute_default(self, multiparams, params)
+
def _init_items(self, *args):
"""Initialize the list of child items for this SchemaItem."""