I use Float for money at the moment.
I am moving from Mysql to Postgres and have not had any issues but i'm not sure
if Float actually works correctly.
Floats are being used for both broken number values and for money values.
should I change to numeric for Postgres as I do not see that Column
Using FLOAT for monetary amounts is an extremely bad idea because of the
inexactness of storage and arithmetic ..
Using MONEY is discouraged because it is too locale-sensitive
NUMERIC should be used instead
On 12/28/2011 11:48, Martijn Moeling wrote:
I use Float for money at the moment.
I am
On 12/27/2011 5:34 PM, Michael Bayer wrote:
On Dec 27, 2011, at 5:21 PM, Kent wrote:
So see what happens if you, for the moment, just monkeypatch over
orm.session._state_session to do a lookup in a global context if
state.session_id isn't set. If that solves the problem of I want
detached
I've made web application using Pyramid 1.2.5 + Python 2.7.1 + SQLAlchemy
0.7.4 and occasionally encountered the following error.
Traceback (most recent call last):
File /usr/local/lib/python2.7/site-packages/pyramid/router.py, line
176, in __call__
response = self.handle_request(request)
Was it your intention to no longer allow this type of query().get()?
session.query(cls.orderid).get(orderid)
I get InvalidRequestError: get() can only be used against a single
mapped class. but the wording is such that I'm not sure you intended to
limit that use case (there is only a single
On Dec 28, 2011, at 9:18 AM, Kent wrote:
Off topic, but from a shell prompt I sometimes find myself naturally
attempting this:
session.detach(instance)
and then when that fails, I remember:
session.expunge(instance)
I'm not asking for a change here, but quite curious: you think
On Dec 28, 2011, at 11:34 AM, Kent wrote:
Was it your intention to no longer allow this type of query().get()?
session.query(cls.orderid).get(orderid)
it was ! yes.
I get InvalidRequestError: get() can only be used against a single mapped
class. but the wording is such that I'm not
On Dec 27, 2011, at 8:37 PM, Vlad K. wrote:
Hi all.
I need to select some rows where pkey is in a sequence. How do I order by
that very sequence?
images_all =
session.query(AdImage).filter(AdImage.image_id.in_(images)).order_by( ?
).all()
Postgresql backend.
typically
On Dec 27, 2011, at 11:58 PM, Josh Ha-Nyung Chung wrote:
I've made web application using Pyramid 1.2.5 + Python 2.7.1 + SQLAlchemy
0.7.4 and occasionally encountered the following error.
File build/bdist.linux-x86_64/egg/sqlalchemy/engine/base.py, line 1599,
in _execute_context
On 2011-12-28 10:58 AM, Michael Bayer wrote:
detach(), also nice.
This seems most descriptive of what is actually taking place. I poured over the
docs for some time looking for the detach() method.
Michael
--
You received this message because you are subscribed to the Google Groups
On Dec 28, 12:07 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Dec 28, 2011, at 11:34 AM, Kent wrote:
Was it your intention to no longer allow this type of query().get()?
session.query(cls.orderid).get(orderid)
it was ! yes.
I get InvalidRequestError: get() can only be
in fact, I modified our Query class after .first() was being abused
out of laziness:
def first(self):
raise ProgrammingError(Never use .first(); please use .get()
or .one()\n
.one() makes sure there is only one return and .get()
returns None if doesn't exist.\n
12 matches
Mail list logo