Consider 3 tables A,B,C
A JOIN B ON A.id = B.id
produce all the columns required for an insert into C.
I can write:
C.insert().values(dict(zip(record.keys(), record.items()))
With use_labels == True and fold_equivalents == False the above
solution does not work
because the join columns labels
On Mar 19, 2010, at 11:23 AM, marco vaccari wrote:
Consider 3 tables A,B,C
A JOIN B ON A.id = B.id
produce all the columns required for an insert into C.
I can write:
C.insert().values(dict(zip(record.keys(), record.items()))
With use_labels == True and fold_equivalents == False the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
On Feb 17, 2010, at 9:56 AM, Manlio Perillo wrote:
Michael Bayer ha scritto:
[...]
By the way, I have found an incorrect behaviour in SQLAlchemy, when the
select column list is empty.
query = sql.select(
None,
On Feb 18, 2010, at 6:02 AM, Manlio Perillo wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
On Feb 17, 2010, at 9:56 AM, Manlio Perillo wrote:
Michael Bayer ha scritto:
[...]
By the way, I have found an incorrect behaviour in SQLAlchemy, when the
select
On Feb 18, 2010, at 10:18 AM, Michael Bayer wrote:
Ok.
My idea was to implement the equivalent of SQL '*' column.
I can't use the literal '*' in the select column list, since it will
disable (?) SQLAlchemy type system.
And I don't want to manually add the columns, since I will end up with
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
On Feb 18, 2010, at 10:18 AM, Michael Bayer wrote:
Ok.
My idea was to implement the equivalent of SQL '*' column.
I can't use the literal '*' in the select column list, since it will
disable (?) SQLAlchemy type
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
On Feb 16, 2010, at 7:07 PM, Manlio Perillo wrote:
Michael Bayer ha scritto:
[...]
just so I can understand fully can you modify the paste I sent to
illustrate exactly how the results are happening, as that can help me
On Feb 17, 2010, at 8:58 AM, Manlio Perillo wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
On Feb 16, 2010, at 7:07 PM, Manlio Perillo wrote:
Michael Bayer ha scritto:
[...]
just so I can understand fully can you modify the paste I sent to
illustrate
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
[...]
By the way, I have found an incorrect behaviour in SQLAlchemy, when the
select column list is empty.
query = sql.select(
None, contents.c.slug == 'python', from_obj=[join])
SQLAlchemy generates an
On Feb 17, 2010, at 9:56 AM, Manlio Perillo wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
[...]
By the way, I have found an incorrect behaviour in SQLAlchemy, when the
select column list is empty.
query = sql.select(
None, contents.c.slug ==
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
Here is a simple example of using joins in SQLAlchemy:
from sqlalchemy import schema, types, sql, create_engine
metadata = schema.MetaData()
x = schema.Table(
'x', metadata,
schema.Column('id', types.Integer, primary_key=True),
Manlio Perillo wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi.
Here is a simple example of using joins in SQLAlchemy:
from sqlalchemy import schema, types, sql, create_engine
metadata = schema.MetaData()
x = schema.Table(
'x', metadata,
schema.Column('id',
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
Manlio Perillo wrote:
[...]
query = sql.join(x, y).select()
r = engine.execute(query).fetchone()
[...]
This code will raise an:
sqlalchemy.exc.InvalidRequestError: Ambiguous column name 'id' in result
set!
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
[...]
Unfortunately, fold_equivalents is not a generic solution for me
I have a generative query, where I later add the select_from object.
The query is generative, since the tables involved are not know in
advance.
I
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
Manlio Perillo wrote:
Here is the code I have:
http://paste.pocoo.org/show/178959/
What each plugin do is:
- add additional columns in the select list
- add additional where clauses or order_by clauses
I don't see
Manlio Perillo wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
Manlio Perillo wrote:
Here is the code I have:
http://paste.pocoo.org/show/178959/
What each plugin do is:
- add additional columns in the select list
- add additional where clauses or order_by
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
[...]
just so I can understand fully can you modify the paste I sent to
illustrate exactly how the results are happening, as that can help me to
formulate the best version of this feature.
I have pasted a complete
On Feb 16, 2010, at 7:07 PM, Manlio Perillo wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Bayer ha scritto:
[...]
just so I can understand fully can you modify the paste I sent to
illustrate exactly how the results are happening, as that can help me to
formulate the best
18 matches
Mail list logo