Hi,
As far as I know, sqlite does not allow you to store decimal objects,
only floats. Which really is not the same. If you really need decimals
(ie: accounting books anyone ?) then you should consider using
firebird which is the only other database engine supported by SA that
is embeddable in a
decimals.. u can use pickling? slower, yes.
On Friday 24 August 2007 10:37:53 Florent Aide wrote:
Hi,
As far as I know, sqlite does not allow you to store decimal
objects, only floats. Which really is not the same. If you really
need decimals (ie: accounting books anyone ?) then you should
Hi,
firebird which is the only other database engine supported by SA that
is embeddable in a python application without the need of and external
server.
There is one other option, on Windows, the SA 0.4 beta supports
Microsoft Access. I believe it works on all Windows systems (i.e. not
i am storing only accounting amounts so i do care...
long time ago there was no decimals easily available, so we used a
fixed-point arithmetic (over integers) instead of decimals.
either way, u cant store 1/3, and i dont think any db supports
fractions.
On Friday 24 August 2007 12:17:39
How would you do something like this then:
session.query.(LedgerLine).query(LedgerLine.base_amount.between(decimal1,
decimal2))
the between() won't work since sqlite won't be able to compare your
pickled amounts.
Pickling cannot be an option in all cases particularly when you are
storing
##
from sqlalchemy import *
meta = BoundMetaData('sqlite://', echo=False)
# Parents table.
parents = Table('parents', meta,
Column(id, Integer, primary_key=True),
Column(data, String(50), nullable=False)
)
#
You might be interested by: http://techspot.zzzeek.org/?p=13
(also in the examples directory of SQLAlchemy)
On 8/24/07, praddy [EMAIL PROTECTED] wrote:
##
from sqlalchemy import *
meta = BoundMetaData('sqlite://', echo=False)
#
What is the syntax to specify the columns in a generative query?
q = session.query(Foo)
q = q.group_by([foo_table.c.description])
for currow in q:
print currow
This query selects all the columns in the Foo table, wondering how to
specify the columns to select.
On Friday 24 August 2007 19:20:00 Gaetan de Menten wrote:
You might be interested by: http://techspot.zzzeek.org/?p=13
(also in the examples directory of SQLAlchemy)
On 8/24/07, praddy [EMAIL PROTECTED] wrote:
##
from sqlalchemy
Hi,
I m trying to write a way of storing a 2 level dictionary in a database.
class Foo(object):
def __init__(self):
self.a = {}
def __iadd__(self, i):
if i not in self.a:
self.a[i] = {}
return self
def keys(self):
for i in self.a.keys():
On Aug 23, 2007, at 11:18 AM, che wrote:
Hi,
On 23 Авг, 17:47, Michael Bayer [EMAIL PROTECTED] wrote:
dont compile() the insert statement yourself here; since you are only
executing it once, theres nothing to be gained by manually compiling
first.
this was the minimal code demonstrating
On Aug 24, 2007, at 1:26 AM, Arun Kumar PG wrote:
Guys,
Quick clarification:
If we have two tables A and B with relationship keys 'XYZ' in both
(B references A) then which is faster:
1) session.query(A).select_by(*[A.c.XYZ == B.c.XYZ])
or
2) session.query(A, B).join('XYZ')
2
On Aug 24, 2007, at 10:43 AM, Curtis Scheer wrote:
What is the syntax to specify the columns in a generative query?
q = session.query(Foo)
q = q.group_by([foo_table.c.description])
for currow in q:
print currow
This query selects all the columns in the
On Aug 24, 2007, at 7:41 PM, Nathan Harmston wrote:
Hi,
I m trying to write a way of storing a 2 level dictionary in a
database.
class Foo(object):
def __init__(self):
self.a = {}
def __iadd__(self, i):
if i not in self.a:
self.a[i] = {}
hi, I'm rather new to SQLAlchemy, using version 0.3.x right now. I
would like to know the reason why Query.filter() returns another Query
object instead of aplying in place, if there is one. an answer to this
would help me to understand better this ORM.
Search the discussion group archive for the phrase (in quotes) in
place and take a look at some of the related discussions from late
June.
On Aug 23, 2:10 pm, Marcos Dione [EMAIL PROTECTED] wrote:
hi, I'm rather new to SQLAlchemy, using version 0.3.x right now. I
would like to know the
16 matches
Mail list logo