It is done now. Thank you for all your help.
Suha
On Mon, Mar 30, 2009 at 17:06, Michael Bayer mike...@zzzcomputing.comwrote:
On Mar 30, 2009, at 5:10 AM, Suha Onay wrote:
The problem is i defined the history class with the following way
(examining the test_versioning file):
Hello everyone,
Now that I have my PG db filled, I'm encountering this exception while
trying to use it:
ProgrammingError: (ProgrammingError) could not identify an ordering
operator for type virtualization
HINT: Use an explicit ordering operator or modify the query.
'SELECT hosts.id AS
On Tue, Mar 31, 2009 at 1:03 AM, Yassen Damyanov yassen@gmail.com wrote:
On Mon, Mar 30, 2009 at 5:30 PM, Michael Bayer mike...@zzzcomputing.com
wrote:
can you produce a small test case illustrating this ?
Sure, I'll do my best to produce one for you.
Mike,
A minimalistic test case
It's not so much that I'm querying but that I get a set of id's from the
user and I've got some logic that will often change some of the values.
I wanted to take advantage of SA's orm capabilities as opposed to
issuing selects and updates. It's possible in the logic that I already
have some
Hello, SQLAlchemy people,
So I spoke to jek on IRC to see if there was a way to use add_column
without causing the query to return a RowTuple and it doesn't look
like there is, so I wrote this:
class AdditiveQuery(Query):
Extended sqlalchemy.orm.Query class with add_named_column method
a class that doesn't extend your declarative base would have to be
mapped explicitly using the mapper() function, otherwise it can't be
referenced within a relation().
On Mar 31, 2009, at 8:04 AM, Alex Maslov wrote:
Hello,
We have been trying to mix a class inherited from
my guess is that its confusing the names virtualization between the
table and column name. im guessing the field you send to
order_by() is a string otherwise it would render it as
tablename.columnname and would be quoted for the upper cased
Virtualization.
On Mar 31, 2009, at 5:44
my guess is that its confusing the names virtualization between the
table and column name. im guessing the field you send to
order_by() is a string otherwise it would render it as
tablename.columnname and would be quoted for the upper cased
Virtualization.
On Mar 31, 2009, at 5:44
wouldn't this be accomplished more simply using contains_eager() ?
On Mar 31, 2009, at 9:12 AM, Bob Farrell wrote:
Hello, SQLAlchemy people,
So I spoke to jek on IRC to see if there was a way to use add_column
without causing the query to return a RowTuple and it doesn't look
like there
Yes, if this has been defined on the mapper. Generally I do a lot of
just using SQLAlchemy to as a way of writing SQL in Python code that
can be passed around for dynamically building up queries so my mappers
tend to be quite bare - or are you suggesting this can be done without
configuring the
no, you'd need the mapping to be set up.So yes, if you need to
compose your result objects together in some way that is specific to
your use case and has no relationship to your mappings or any standard
SQLAlchemy feature, you need to either post-process the result of
Query or create
Michael,
Thanks for the reply. Sorry, I am incredibly stupid for having forgotten
to replace 'object' with Base.
Anyway, after I have inherited Country from Base it looks like SQLAlchemy
cannot detect the relation:
URL: http://localhost:5010/pages/subscribe/
File
user_profiles_tbl and your declarative_meta need to share same
MetaData instance.
On Mar 31, 2009, at 9:56 AM, Alexey Maslov wrote:
Michael,
Thanks for the reply. Sorry, I am incredibly stupid for having
forgotten to replace 'object' with Base.
Anyway, after I have inherited
the stack trace would have said it all on this one, its just
autoflush. fixed in r5875.
On Mar 31, 2009, at 7:01 AM, Yassen Damyanov wrote:
On Tue, Mar 31, 2009 at 1:03 AM, Yassen Damyanov
yassen@gmail.com wrote:
On Mon, Mar 30, 2009 at 5:30 PM, Michael Bayer
Thanks, it works when I added the MetaData instance to the
declarative_meta() call.
Have a great day!
Regards,
Alexey Maslov
On Tue, Mar 31, 2009 at 6:02 PM, Michael Bayer mike...@zzzcomputing.comwrote:
user_profiles_tbl and your declarative_meta need to share same MetaData
instance.
On
Heres some input that used to work, and the error that now happens
from sqlalchemy.ext.sqlsoup import SqlSoup, MetaData
db_uri = 'postgres://user:passw...@127.0.0.1/games'
db = SqlSoup(db_uri)
db.devmap_device.join(db.devmap_manufacturer,
db.devmap_device.manufacturer_id ==
Hello all,
I'm working on a project for which I need to create sql files (the
sort that you get from a database dump) without actually connecting to
any database. The resulting code must be compatible with MySQL.
My first inclination was to write a bunch of functions that contain
sql code
You can't just throw filter expressions into the join call in modern sqla. Try
db.devmap_device.join(db.devmap_manufacturer).filter(db.devmap_device.manufacturer_id
== db.devmap_manufacturer.id).first()
-Jonathan
On Tue, Mar 31, 2009 at 8:23 AM, Stu.Axon stu.a...@gmail.com wrote:
Heres some
Michael Bayer wrote:
my guess is that its confusing the names virtualization between the
table and column name. im guessing the field you send to
order_by() is a string
Correct. I really have not much choice in the matter without somewhat
tedious programming, because column for order
oh, you could send that as a tuple to join, i.e.
db.devmap_device.join((db.devmap_manufacturer,
db.devmap_device.manufacturer_id == db.devmap_manufacturer.id)).first()
this because join() accepts a list of join conditions, a composite
condition is sent as a tuple.
On Mar 31, 2009, at
On Mar 31, 2009, at 11:13 AM, Marcin Krol wrote:
So there's a humble request/proposal from me for you: would it be
possible for SQLA to always quote column names in ORDER BY clauses for
PG backend, even when it's a string?
In the meantime I will probably just rename the columns to
On Tue, Mar 31, 2009 at 6:03 PM, Michael Bayer mike...@zzzcomputing.com wrote:
the stack trace would have said it all on this one, its just
autoflush. fixed in r5875.
Works like a charm with r5875; thank you, Mike!
Y.
--~--~-~--~~~---~--~~
You received this
Max,
I am an SA newbie so you should not take my words too seriously.
So here's what I think:
First, the only way to know and be sure that your code runs fine is to
run it against a real database server. MySQL is not that hard to set
up. (If you need help for that, let me know, I can help.)
you can use echo=True to metadata and/or logging to some extent.
there was also some recipe about how to print some query's actual sql
without issuing it, see recipes section at the site.
but i'm not sure u can really do all you want without having a
responding DB-api (which will at some point
On Mar 31, 2009, Maxim Khitrov mkhit...@gmail.com wrote:
I should also mention that I'm
using Python 2.6 on Windows. The latest stable MySQL-Python extension
doesn't support 2.6, and there doesn't seem to be a test version
available for Windows.
The 1.2.2 Windows version of mysql-python
I noticed a significant performance increase between 0.5.2 and 0.5.3.
While tracking down an unrelated issue I had written a dummy test that
ran some SA code inside of a for i in range(1000):
and going from 0.5.2 and 0.5.3 execution went from 14minutes to 12minutes.
Keep in mind this was a
26 matches
Mail list logo