- changed status to resolved
inserts fail for column identifiers that contain spaces
Issue #833
resolved
from sqlalchemy import *
tbl = Table('tbl', MetaData('sqlite:///'),
Column('with space', Integer),
Column('without', Integer))
tbl.create()
print list( select([space'](tbl.c['with), tbl.c.without]).execute() )
tbl.insert().execute({'without':123})
print list(tbl.select().execute())
tbl.insert().execute({'with space':456})
print list(tbl.select().execute())
[123)](]
[(None,)
Traceback (most recent call last):
File "ins1.py", line 12, in <module>
tbl.insert().execute({'with space':456})
File "sa-trunk/lib/sqlalchemy/sql/expression.py", line 971, in execute
return e._execute_clauseelement(self, multiparams, params)
File "sa-trunk/lib/sqlalchemy/engine/base.py", line 1128, in _execute_clauseelement
return connection._execute_clauseelement(elem, multiparams, params)
File "sa-trunk/lib/sqlalchemy/engine/base.py", line 835, in _execute_clauseelement
return self._execute_compiled(elem.compile(dialect=self.dialect, column_keys=keys, inline=len(params) > 1), distilled_params=params)
File "sa-trunk/lib/sqlalchemy/engine/base.py", line 846, in _execute_compiled
context.pre_execution()
File "sa-trunk/lib/sqlalchemy/engine/default.py", line 213, in pre_execution
self.pre_exec()
File "sa-trunk/lib/sqlalchemy/engine/default.py", line 226, in pre_exec
self.parameters = self.__convert_compiled_params(self.compiled_parameters)
File "sa-trunk/lib/sqlalchemy/engine/default.py", line 198, in __convert_compiled_params
parameters = [for p in parameters](p.get_raw_list(processors))
File "sa-trunk/lib/sqlalchemy/sql/util.py", line 83, in get_raw_list
res.append(binds[key](key)[2](2))
KeyError: 'with'
}}}
Comments (2)
-
repo owner -
repo owner - removed milestone
Removing milestone: 0.4.xx (automated comment)
- Log in to comment
4a4daad81a6c5f987ac6eba0afdaccb3a70554f8 removes the whole regexp step for bindparams.