Hi everyone.
I've been experiencing a very weird issue, and I hope someone could help me
with it.
I've mapped a Redshift table using SQL Alchemy's ORM.
Here is my code.
from sqlalchemy.ext.automap import automap_base
from sqlalchemy import Column, Integer, String, ForeignKey
from sqlalchemy
Hello all,
What is the proper way to fully remove a one-to-one related object ? I I do
Session.delete(a.b)
print a.b # b is still here ...
What am I missing ?
Thanks,
Laurent
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe
-to extract the time part of my DateTime field in
.filter(). Should I add a Time column ? Or is it possible to use only
the DateTime column?
Thanks.
--
Laurent Meunier laur...@deltalima.net
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group
as expected, but
I'm looking for a more efficient way of doing this.
Thanks.
--
Laurent Meunier laur...@deltalima.net
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe from this group and stop receiving emails from it, send an email
with a lot of between 2013-08-30 06:00:00 and 2013-08-30 11:00:00
(one for each day). This will certainly work as expected, but I'm looking
for a more efficient way of doing this.
Thanks.
--
Laurent Meunier laur...@deltalima.net
Ahh - I see. Oh well, I'm sure someone with infinitely better SQL skills
Hello,
You should also take a look at http://pypi.python.org/pypi/sqlamp/0.5.2, an
implementation of Materialized Path for SQLAlchemy.
Regards,
Laurent
Le 13 déc. 2010 à 23:30, Russell Warren a écrit :
Sorry, I just saw I messed up the nested sets SQLA example link. Here
is the right one
On Thu, 2010-01-14 at 05:29 -0800, Kosu wrote:
try this:
user.__table__.c.keys()
should work
Kos Rafal
AttributeError: 'User' object has no attribute '__table__'
thanks anyway
On 14 Sty, 11:39, laurent FRANCOIS lau.franc...@worldonline.fr
wrote:
Hello everybody
Let's say
no?
Thanks
Laurent FRANCOIS
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com.
For more options
Hello,
What is the pattern for more than one relation one to many.
I have on parent with 2 childs.
parent_table = Table('parent', metadata,
Column('parent_id', Integer, primary_key=True)
)
child1_table = Table('child1', metadata,
On Wed, 2009-10-21 at 09:24 -0700, David Gardner wrote:
Using setattr() shouldn't be a problem, however the __dict__ attribute
also has other things in there like _sa_instance_state that I don't
believe you
want to copy to the new item. Try this instead:
for col in object_mapper(update):
On Wed, 2009-10-21 at 09:24 -0700, David Gardner wrote:
Using setattr() shouldn't be a problem, however the __dict__ attribute
also has other things in there like _sa_instance_state that I don't
believe you
want to copy to the new item. Try this instead:
for col in object_mapper(update):
Hi,
I'm currently using a webframework which uses sqlalchemy. Each time a
request hits the server, the framework creates a session object I can
use during the page creation.
I wish you could update this session with one of my SessionExtension but
I'm facing a small problem:
I tested my code
'extensions'
= Sounds like my scoped session doesn't have any extension at all
(even empty)
Regards,
Laurent
On 10 sep, 14:09, Mike Conley mconl...@gmail.com wrote:
Well, it looks like configure is a class method on Session, so when you do
session.configure() you are configuring future sessions
a primaryjoin and a secondaryjoin but with no success.
Sounds like I don't understand what are primaryjoin and a secondaryjoin
expressions.
Any idea ?
Regards,
Laurent
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Thanks Michael,
Everything is OK now.
Sorry for the typo, I was renaming my classes.
Regards,
Laurent
Le 04/09/2009 16:30, Michael Bayer a écrit :
asrenzo wrote:
Here is a primaryjoin, secondaryjoin I tried without success:
neighbors = relation(Place, primaryjoin=(Place.id
on my pgsql shell, everything is OK.
Does anybody have any clue ?
Regards,
Laurent
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
Hi,
You should take a look at MapperExtension. Then you'll be able to add
method which would be called depending on the orm actions.
For example, you'll be able to add your own custom before_insert or
after_insert or after_delete methods.
Regards,
Laurent
Le 15/06/2009 17:36, Didip Kerabat
):
__tablename__ = 'mymodel_table'
id = Column(Integer, primary_key=True)
slug = Column('type', String(50))
...
__mapper_args__ = {'extension': MyModelExtension()}
Then everything should be OK
Regards,
Laurent
Tcourbon a écrit :
Hi there !
I'm new to SQLAlchemy (and python actually
Hi,
As you are defining Country when you use it within your relation, you
need to define your relation like this :
parent = relation(Country, backref=backref('child'), cascade=all)
Note the quotes around Country.
Regards,
Laurent
Cedric a écrit :
Hi,
I'm trying to migrate my
Thanks for this quick response
Michael Bayer a écrit :
look into using MapperExtension and/or SessionExtension to add hooks
within the flush process.
Laurent Rahuel wrote:
Hi,
I'm currently trying to port a Django based application using sqlalchemy
and I'm a bit confused with some
Declarative models to be able to do the same ?
Regards,
Laurent
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from
Hello,
There's a behaviour in SA that is not clear to me: if we look at the
example (User and Address) from the docs, we can change either the
related object or the foreign key
For example:
ad = Address(email_address='j...@google.com')
ad.user = jack
OR
ad.user_id = 1
What is the prefered
Hello
Is it obvious that this model:
%
##Class Table
user_table = Table(
'user', metadata,
Column('user_id', Integer, primary_key=True),
Column('fname', Unicode(50), default=''),
values from the XML and session.commit()
will update the database
else
create a new mapped object with values from the XML file,
session.add(ob), and session.commit() will add the record into database
Regards,
Laurent
n00b a écrit :
greetings,
i'm batch processing xml documents
On Jan 9, 9:24 pm, Michael Bayer [EMAIL PROTECTED] wrote:
So if I understand what youre looking to do here, youd like a keyword
to be deleted when the last parent is removed ?
That is exactly what I would like...
if youd like to check for this condition after each flush you can do
it
On Jan 10, 4:00 pm, Michael Bayer [EMAIL PROTECTED] wrote:
A statement issued in SessionExtension would fire unconditionally upon
any flush(), so thats the trigger there. not sure what you mean by
track here, if it means you want to know the keywords that were
deleted, you'd just issue the
how about, go into sessionextension.after_flush(), make a new session
local to the operation, issue a Query with the Select for all orphan
keywords, delete them all and flush that sub-session, then expunge()
those keywords from the parent session sent to after_flush, like this:
[...]
Can anybody help me ?
...No one ??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to
an owner to my Bases objects.
Any idea ??
Regards,
Laurent.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from
-8 -*-
# * BEGIN LICENSE BLOCK *
# This file is part of NOMDUPRODUIT.
# Copyright (c) 2004 laurent Rahuel and contributors. All rights
# reserved.
#
# NOMDUPRODUIT is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
Tried with a postgresql database and I get another error right in my
metadata.create_all().
I get a SQLError: (ProgrammingError) from postgres telling me I got
something wrong while creating constraint on unexisting key into table
bases.
CREATE TABLE folders (
id INTEGER NOT NULL,
31 matches
Mail list logo