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
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,
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
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:
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
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
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
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
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,