On Mon, 4 Sep 2006 16:21:33 +0200
Enrico Morelli <[EMAIL PROTECTED]> wrote:
> On Mon, 04 Sep 2006 15:51:06 +0200
> Sol <[EMAIL PROTECTED]> wrote:
>
> > Hello, not sure if i got you right, but here is what i think.
> >
> > > users_projects=Table('users_projects', metadata,
> > > Column('id_us
On Mon, 4 Sep 2006 16:39:18 +0200
Enrico Morelli <[EMAIL PROTECTED]> wrote:
> On Mon, 4 Sep 2006 16:34:40 +0200
> Enrico Morelli <[EMAIL PROTECTED]> wrote:
>
> > On Mon, 4 Sep 2006 16:07:51 +0200
> > "Andrija Zaric" <[EMAIL PROTECTED]> wrote:
> >
> > > If you are going to do script once and outs
On Mon, 4 Sep 2006 16:34:40 +0200
Enrico Morelli <[EMAIL PROTECTED]> wrote:
> On Mon, 4 Sep 2006 16:07:51 +0200
> "Andrija Zaric" <[EMAIL PROTECTED]> wrote:
>
> > If you are going to do script once and outside main application,
> > maybe this is going to be little faster:
> >
> > users = session
On Mon, 4 Sep 2006 16:07:51 +0200
"Andrija Zaric" <[EMAIL PROTECTED]> wrote:
> If you are going to do script once and outside main application, maybe
> this is going to be little faster:
>
> users = session.query(Users).select()
>
> ref_pairs = []
> for u in users:
> ref_pairs.extend([(u.id,
On Mon, 04 Sep 2006 15:51:06 +0200
Sol <[EMAIL PROTECTED]> wrote:
> Hello, not sure if i got you right, but here is what i think.
>
> > users_projects=Table('users_projects', metadata,
> > Column('id_users', Integer, ForeignKey('users.id_users')),
> > Column('id_projects', Integer,
> > Fo
If you are going to do script once and outside main application, maybe
this is going to be little faster:
users = session.query(Users).select()
ref_pairs = []
for u in users:
ref_pairs.extend([(u.id, int(pr_id)) for pr_id in u.fk_project.split(',')])
#this should do multi-value insert:
users
Hello, not sure if i got you right, but here is what i think.
> users_projects=Table('users_projects', metadata,
> Column('id_users', Integer, ForeignKey('users.id_users')),
> Column('id_projects', Integer, ForeignKey('projects.id_projects')),
> )
>
> users_projects.create()
>
> cl
Dear all,
I have a question regards many-to-many relationship.
I have the following script:
from sqlalchemy import *
engine=create_engine("postgres://[EMAIL PROTECTED]/NMR2")
metadata=BoundMetaData(engine)
session=create_session()
users=Table('users', metadata, autoload=True)
projects=Table('pr
8 matches
Mail list logo