Great!
The solution #3 seems especially appealing ...
Thank you for the comprehensive answer!
-Original Message-
From: sqlalchemy@googlegroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of jason kirtland
Sent: Thursday, January 17, 2008 7:53 PM
To: sqlalchemy@googlegroups.com
Subject:
you relation should have argument like
primary_join= engineers.c.hired_by_id==managers.c.employee_id
or similar. i do not know for sure as i've done a layer on top of SA that
stores most of this knowledge, so i dont bother with it. Have a look at
dbcook.sf.net. u may use it as ORM to build and
Dear All,
Just to let you know how I solved my problem: according to the solution
#3 described below by Jason, I created in my local sqlalchemy
installation a MultiValuedMappedCollection class in the
sqlalchemy.orm.collections package Based on the MappedCollection class.
The newly created class
Hello, pleas, i have begginer problem and question:
In table (database is sqlite) is colum for create date (create_date =
Field(DateTime, default = datetime.now))
I need query from table, with all item where have year of create date
2007.
Is this the right way ? (this don`t work)
data =
Would create_date = '2007-01-01' and create_date '2008-01-01' be
acceptable?
If so, something like this should work
from sqlalchemy import and_
from datetime import date
data = Table.query().filter(and_([Mikropost.c.create_date = date(2007,
1, 1),
--On 18. Januar 2008 12:08:46 -0500 Rick Morrison [EMAIL PROTECTED]
wrote:
There are no generic date functions in SQLAlchemy (although work has begun
on them). So for now, you'll need to use date functions native to your
database.
For sqlite something like,
func.strftime('%Y',
On Jan 18, 2008, at 10:59 AM, Hermann Himmelbauer wrote:
Hi,
I have a table that looks appr. like this (I deleted some columns):
table_acc = Table(
'konto', metadata,
Column('kontoid', Integer, primary_key=True, key='accid'),
Column('erdat', DateTime, default=func.now(),
On Jan 18, 2008, at 5:29 PM, Hermann Himmelbauer wrote:
Am Freitag, 18. Januar 2008 22:43 schrieb Michael Bayer:
On Jan 18, 2008, at 10:59 AM, Hermann Himmelbauer wrote:
Hi,
I have a table that looks appr. like this (I deleted some columns):
table_acc = Table(
'konto', metadata,
I am getting an error connecting to Postgresql:
ImportError: unknown database 'psycopg'
The back story is that I am attempting to modify an example given in
Martin Aspeli's Book: Professional Plone Development (Chapter 12 -
page 274-. He recommends using SQLAlchemy, and it looks very cool,
kind
Hi,
I have a table that looks appr. like this (I deleted some columns):
table_acc = Table(
'konto', metadata,
Column('kontoid', Integer, primary_key=True, key='accid'),
Column('erdat', DateTime, default=func.now(), key='datopen'))
What I'd like to accomplish is that when during an
Hi all,
it's only now that I came across this interesting discussion.
I tried similar things but what I wanted to protect was my cached
data. And session.merge(obj, dont_load=True) triggers these
AssertionErrors. :-(
So I went for a MapperExtension instead. The after_update method can
still
There are no generic date functions in SQLAlchemy (although work has begun
on them). So for now, you'll need to use date functions native to your
database.
For sqlite something like,
func.strftime('%Y', Mikropost.c.create_date) == '2008'
should work -- you may need to add additional percent
Such operations will likely trigger a full table scan
SQLite dates are stored as strings anyway, AFAIK there is little one can do
to avoid table-scans in SQLite based solely on date criteria. I use julian
dates stored as integers when working with large datasets in SQLite, and
convert as needed.
Rick Morrison wrote:
Such operations will likely trigger a full table scan
SQLite dates are stored as strings anyway, AFAIK there is little one can do
to avoid table-scans in SQLite based solely on date criteria. I use julian
dates stored as integers when working with large datasets in
Am Freitag, 18. Januar 2008 22:43 schrieb Michael Bayer:
On Jan 18, 2008, at 10:59 AM, Hermann Himmelbauer wrote:
Hi,
I have a table that looks appr. like this (I deleted some columns):
table_acc = Table(
'konto', metadata,
Column('kontoid', Integer, primary_key=True,
15 matches
Mail list logo