Hi,
In a turbogears application that I am developing, in a single
transaction, I need to delete certain records of a table, and update
another table. the code is something like:
from sqlalchemy import *
from turbogears import metadata, session
.
.
.
Hi,
It seems SQLAlchemy provides no database connector for MySQL's SAPDB/MaxDB
database and that there is no ongoing work in this direction.
I'm currently working on a project, which relies on MaxDB, therefore I need
such a connector. As I am not involved in the SQLAlchemy development, writing
I'm using Sqlalchemy with PostgreSQL in a project.
Some of the relations (foreign keys) in the database (postgresql) have
ON_DELETE=RESTRICT which should prevent parent objects with existing
child objects from being deleted (tested, works in pg client).
The problem is that Sqlalchemy doesn't
Michael Bayer wrote:
On Jun 4, 2007, at 9:58 PM, Eric V. Smith wrote:
I'm new to this list. I've searched the archives, and could not find
this issue addressed. Apologies if I've missed it.
I'm using 0.3.8. In ansisql.py, the tests for max_identifier_length()
are of the form:
if
Sanjay ha scritto:
Need help on how to do it. Being a turbogears application where db
entities like metadata and session are imported rather than created by
me, I am confused and could not successfully implement the pattern
provided in the docs.
I'm sure there are cleaner ways, but this
On Jun 5, 2007, at 6:39 AM, lingo wrote:
I'm using Sqlalchemy with PostgreSQL in a project.
Some of the relations (foreign keys) in the database (postgresql) have
ON_DELETE=RESTRICT which should prevent parent objects with existing
child objects from being deleted (tested, works in pg
On Jun 5, 2007, at 11:20 AM, lingo wrote:
now it looks like:
Parent_table = sa.Table('Parent', metadata, autoload=True)
Child_table = sa.Table('Child', metadata, autoload=True)
orm.mapper(Parent,Parent_table, properties={
'Children' : relation(Child, cascade=save-update)
}
)
I want to wake this thread up again. can we get some arguments pro/
con to converting select() to work in a generative style ?
generative means either just the first, or both of these two things:
- methods like append_whereclause() return a select object with
which to call further genreative
hmm, actualy, in such
select.append_whereclause().order_by().group_by().whatever1
().whatever2()...
What is the point of anything except the very first funccall to be
generative? the direct results are thrown away, and the copies are
used - whyfore?
(i guess this applies to query() as
Hi Folks,
In my current environment, I get one database connection per web
application. That connection has to access tables in a data warehouse
as well as an application specific database. Both databases live on
the same SQL Server instance.
It seems as though I can't use the sql generation
I don't think so, not directly.
Short-term, here's a couple of things to try:
-- you may be able to create views in the local database that reference the
warehouse tables, and access these views as if they were local tables.
-- you may be able to hack up something by using the schema support in
Hi Rick,
On Jun 5, 4:05 pm, Rick Morrison [EMAIL PROTECTED] wrote:
I don't think so, not directly.
I was afraid of this.
Short-term, here's a couple of things to try:
[snip suggestions]
I appreciate the suggestions. I may see about adding a view for this
purpose. We decided against it when
On Jun 5, 2007, at 4:05 PM, Rick Morrison wrote:
I don't think so, not directly.
Short-term, here's a couple of things to try:
-- you may be able to create views in the local database that
reference the warehouse tables, and access these views as if they
were local tables.
-- you
ah, well the owner attribute is news to me, and if that's already
supported all the way through SA, and if the dialect can build the
schema.owner.table string, then that's already a
huge part of the way there.
As for DBAPI concerns, I know that at least pymssql will take the
database.owner.table
On Jun 5, 2007, at 7:01 PM, Mike Orr wrote:
Not sure if this is a bug or just how SQLAlchemy works. I have a
table with an int field used as a boolean. I can do a positive query
like this:
q.filter(Incident.c.is_top)= WHERE `IN_Incident`.is_top
But a negative query does not
Michael Bayer wrote:
I want to wake this thread up again. can we get some arguments pro/
con to converting select() to work in a generative style ?
generative means either just the first, or both of these two things:
- methods like append_whereclause() return a select object with
which to
I'm going through the wiki cookbook
http://docs.pythonweb.org/display/pylonscookbook/SQLAlchemy+for+people+in+a+hurry
and I'm discovering that even though 'model.class.c.column_name.like'
is available it doesn't perform a LIKE in the query.
from 'paster shell'
In [20]:
Marco Mariani wrote:
Sanjay ha scritto:
Need help on how to do it. Being a turbogears application where db
entities like metadata and session are imported rather than created by
me, I am confused and could not successfully implement the pattern
provided in the docs.
I'm sure
I'm newish to SqlAlchemy and for the life of me I can't figure out how
to properly set things up so that lookup tables(objects) are cached
and/or it is easy for new parent objects to associate to their
childing upon initialization. See below for code snippet and sample
problem.
from sqlalchemy
On 6/5/07, Michael Bayer [EMAIL PROTECTED] wrote:
I want to wake this thread up again. can we get some arguments pro/
con to converting select() to work in a generative style ?
generative means either just the first, or both of these two things:
- methods like append_whereclause() return
Hi John,
Check out the doc section entitled Mapping a class with table
inheritance:
http://www.sqlalchemy.org/docs/adv_datamapping.html#advdatamapping_inheritance
Although it's not the only way to do it, you might be interested in
polymorphic multiple-table inheritance, which SQLAlchemy already
On 6/5/07, Techniq [EMAIL PROTECTED] wrote:
I'm going through the wiki cookbook
http://docs.pythonweb.org/display/pylonscookbook/SQLAlchemy+for+people+in+a+hurry
and I'm discovering that even though 'model.class.c.column_name.like'
is available it doesn't perform a LIKE in the query.
from
What's more, I should have just said to look in your sqlalchemy
subdirectory /examples/polymorph/polymorph.py.
I forgot that's where I learned the above techniques a month ago...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
23 matches
Mail list logo