Re: [sqlalchemy] sqla 0.9.1 Float type always return decimal object

2014-01-21 Thread 曹忠
test env: sql server 2005 and pyodbc 3.0.7 and freetds 0.91, on debian 8.0 product env: sql server 2005 and pyodbc 3.0.7 and native client 10.0, on windows 2003 above two env is the same behavior with 0.9.1, always return decimal object for float type follow is part data model: from

Re: [sqlalchemy] sqla 0.9.1 Float type always return decimal object

2014-01-21 Thread 曹忠
now my project deploy with 0.8.4 works well! 在 2014年1月21日星期二UTC+8上午2时33分05秒,Michael Bayer写道: 1. What database backend is this? 2. What does the CREATE TABLE for the table in question look like, as it is present in the database? 3. Was the behavior the same with 0.8.4 ? On Jan 20,

Re: [sqlalchemy] sqla 0.9.1 Float type always return decimal object

2014-01-21 Thread Michael Bayer
On Jan 21, 2014, at 4:31 AM, 曹忠 joo.t...@gmail.com wrote: test env: sql server 2005 and pyodbc 3.0.7 and freetds 0.91, on debian 8.0 product env: sql server 2005 and pyodbc 3.0.7 and native client 10.0, on windows 2003 above two env is the same behavior with 0.9.1, always return decimal

Re: [sqlalchemy] sqla 0.9.1 Float type always return decimal object

2014-01-21 Thread 曹忠
sorry, is coefficient column, we have 500+ data models, here is one of they. 在 2014年1月21日星期二UTC+8下午10时59分07秒,Michael Bayer写道: On Jan 21, 2014, at 4:31 AM, 曹忠 joo@gmail.com javascript: wrote: test env: sql server 2005 and pyodbc 3.0.7 and freetds 0.91, on debian 8.0 product env:

Re: [sqlalchemy] sqla 0.9.1 Float type always return decimal object

2014-01-21 Thread 曹忠
coefficient define on server: FCoefficient decimal(20, 10) NOT NULL DEFAULT (1), Float type has parameter asdecimal=False, 0.9 user no choice? I hope not 在 2014年1月21日星期二UTC+8下午10时59分07秒,Michael Bayer写道: On Jan 21, 2014, at 4:31 AM, 曹忠 joo@gmail.com javascript: wrote: test env: sql

Re: [sqlalchemy] sqla 0.9.1 Float type always return decimal object

2014-01-21 Thread 曹忠
Float(Numeric) type has parameter asdecimal=False, 0.9 user no choice? I hope not 在 2014年1月21日星期二UTC+8下午10时59分07秒,Michael Bayer写道: On Jan 21, 2014, at 4:31 AM, 曹忠 joo@gmail.com javascript: wrote: test env: sql server 2005 and pyodbc 3.0.7 and freetds 0.91, on debian 8.0 product

Re: [sqlalchemy] sqla 0.9.1 Float type always return decimal object

2014-01-21 Thread Michael Bayer
yes I’ve just figured this out on this end - your column is not a Float, it is a Numeric (more specifically a DECIMAL, but Numeric is good enough). The column types that you place in Column have to match the *actual* datatype on the server - this is how SQLAlchemy knows what kind of data to

[sqlalchemy] sqla 0.9.1 Float type always return decimal object

2014-01-20 Thread 曹忠
qty = Column(Float(asdecimal=False), nullable=False, server_default='(0)') the qty always return decimal object, how to return the python float type object? -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop

Re: [sqlalchemy] sqla 0.9.1 Float type always return decimal object

2014-01-20 Thread Michael Bayer
1. What database backend is this? 2. What does the CREATE TABLE for the table in question look like, as it is present in the database? 3. Was the behavior the same with 0.8.4 ? On Jan 20, 2014, at 12:31 PM, 曹忠 joo.t...@gmail.com wrote: qty = Column(Float(asdecimal=False), nullable=False,