Re: [Sqlalchemy-tickets] [sqlalchemy] #2842: The recipe "Storing/Using Enumerations" does not funct
Brought to you by:
zzzeek
|
From: sqlalchemy <mi...@zz...> - 2013-10-19 06:18:33
|
#2842: The recipe "Storing/Using Enumerations" does not function in SQLite
-----------------------------------+------------------------------------
Reporter: rgg | Owner: zzzeek
Type: enhancement | Status: closed
Priority: low | Milestone:
Component: utils | Severity: no triage selected yet
Resolution: duplicate | Keywords:
Progress State: completed/closed |
-----------------------------------+------------------------------------
Changes (by zzzeek):
* status: new => closed
* resolution: => duplicate
* status_field: awaiting triage => completed/closed
Comment:
this is due to #2838.
removing the naive calling of cached_bind_processor:
{{{
#!diff
diff --git a/lib/sqlalchemy/sql/compiler.py
b/lib/sqlalchemy/sql/compiler.py
index 22906af..4c5700f 100644
--- a/lib/sqlalchemy/sql/compiler.py
+++ b/lib/sqlalchemy/sql/compiler.py
@@ -954,9 +954,9 @@ class SQLCompiler(Compiled):
def render_literal_bindparam(self, bindparam, **kw):
value = bindparam.value
- processor = bindparam.type._cached_bind_processor(self.dialect)
- if processor:
- value = processor(value)
+ #processor = bindparam.type._cached_bind_processor(self.dialect)
+ #if processor:
+ # value = processor(value)
return self.render_literal_value(value, bindparam.type)
def render_literal_value(self, value, type_):
}}}
recipe works again.
the regression in 0.9 is due to the greater usage of
render_literal_bindparam() introduced in #2742.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2842#comment:1>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|