diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-01-20 00:42:07 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-01-20 00:42:07 +0000 |
commit | 2808d04dd8faec0b7a8ac280ff23674cd0a36fc6 (patch) | |
tree | 64b0869431e4bd7165c6442a3c8f0a99870c6a41 /lib/sqlalchemy/engine.py | |
parent | c9e7e698e60d9d15e113a0b936ea630bcda5443a (diff) | |
download | sqlalchemy-2808d04dd8faec0b7a8ac280ff23674cd0a36fc6.tar.gz |
added explicit bind parameters and column type maps to text type
text type also parses :<string> into bind param objects
bind parameters convert their incoming type using engine.type_descriptor() methods
types.adapt_type() adjusted to not do extra work with incoming types, since the bind
param change will cause it to be called a lot more
added tests to new text type stuff, bind params, fixed some type tests
added basic docs for using text with binde params
Diffstat (limited to 'lib/sqlalchemy/engine.py')
-rw-r--r-- | lib/sqlalchemy/engine.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sqlalchemy/engine.py b/lib/sqlalchemy/engine.py index 054c5853c..a1e57f6b3 100644 --- a/lib/sqlalchemy/engine.py +++ b/lib/sqlalchemy/engine.py @@ -223,6 +223,10 @@ class SQLEngine(schema.SchemaEngine): if type(typeobj) is type: typeobj = typeobj() return typeobj + + def text(self, text, *args, **kwargs): + """returns a sql.text() object for performing literal queries.""" + return sql.text(text, engine=self, *args, **kwargs) def schemagenerator(self, proxy, **params): """returns a schema.SchemaVisitor instance that can generate schemas, when it is |