So I'm working on porting a version of the TPC benchmarks to MySQL. I'm
porting some queries by hand when it hit me - SQLAlchemy has already
done this work. So I thought, why not implement the TPC benchmarks in
SQLAlchemy? Then you would have a benchmark that could be run on all the
databases
Hi everyone,
I'm creating a web service using CherryPy + SQLAlchemy. So far, coding
has been a pleasure, but it seems that i have a bit of a performance
problem with my software. In short, the service is a messaging system,
where users can send, receive and browse messages in different
Port has to be added to the connection string with pyodbc, the same
way as adodbapi and pymssql
def make_connect_string(self, keys):
connectors = [Driver={SQL Server}]
if keys.has_key(port):
keys[host] = keys[host] + , + str(keys[port])
del keys[port]
Michael Bayer wrote:
use 'sites':relation(Site, backref=backref('attachments',
order_by=attachment_table.c.name)) for now.
Ok, should I open a ticket for that ?
On Mar 30, 5:50 am, Alexandre CONRAD [EMAIL PROTECTED] wrote:
Hello,
I have a problem with order_by on a many-to-many
After getting the results, i will filter them with Python filters,
as i don't know how to filter many-to-many queries directly.
Should i somehow make custom queries that handles many-to-many
relationships etc. or is there something else i'm missing that
makes the system slow? I have ran the
Hi all,
I'm trying to create the following query using SA:
SELECT DISTINCT operatore.id, anagrafica.nome, acl.cod_ruolo
FROM operatore JOIN anagrafica
ON operatore.id_anagrafica = anagrafica.id
LEFT OUTER JOIN acl ON acl.id_operatore = operatore.id
LEFT OUTER JOIN ruolo_permesso ON
King Simon-NFHD78 ha scritto:
Shouldn't acl.cod_ruolo be inside the [] - part of the first parameter
to 'select'?
The parameters to select are 'columns=None, whereclause=None,
from_obj=[], **kwargs', so your 'and_' part is going in as the from_obj
parameter, and then you are supplying
Column('content_id', Integer, ForeignKey('contents.id'),
primary_key=True, nullable=False))
'primary_key=True' when you define one already, will work?
On Apr 2, 6:44 pm, Julien Cigar [EMAIL PROTECTED] wrote:
Hello,
I'm playing a bit with Multiple Table Inheritance (the Non-polymorphic
way)
izekia wrote:
Column('content_id', Integer, ForeignKey('contents.id'),
primary_key=True, nullable=False))
'primary_key=True' when you define one already, will work?
yep, you can have multiple primary_key for one Table() object :)
On Apr 2, 6:44 pm, Julien Cigar [EMAIL PROTECTED] wrote:
Each of the three connection mechanisms seem to use a slightly different
syntax for specifying the port in the connection string. I believe pymssql
and adodbapi are all set at this point. I'll look into pyodbc later today.
Rick
On 4/2/07, El Gringo [EMAIL PROTECTED] wrote:
Port has to be
defintiely do not call flush() on root_folder, call it for the
session overall. thats probably the issue, since its failing to get
the full set of child objects properly in the flush.
On Apr 2, 2007, at 10:44 AM, Julien Cigar wrote:
Hello,
I'm playing a bit with Multiple Table
I'm working over latest version and i appreciate a lot all news...
There is a lot of pretty think i'm implementing in our lib..
now some question:
---
OK it was that !
Thanks
On Mon, 2007-04-02 at 12:19 -0400, Michael Bayer wrote:
defintiely do not call flush() on root_folder, call it for the
session overall. thats probably the issue, since its failing to get
the full set of child objects properly in the flush.
On Apr 2, 2007, at
I'm using sqlalcehmy 2.5 with cx_Oracle 4.2.1. What is the proper way
to detect an sqlalchemy operation has lost its database connection and
reconnection/retry? The manual doesn't seem to say much about the
topic. When connection loss occurs, does SA throw the native dbapi
exception? If not,
Perhaps I missed it, but it would be great if you guys would update
the Latest News section on the SA homepage when a new release is made
available.
Greg
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy
sqlalchemy relationships are currently only fully loading - meaning
you cant directly filter on an instances collection attribute.
however you can construct your own query based on the relationship
and use that, and theres plenty of tools to make that easy.
such as, if you set up a
this feature is not supported right now for most DB's except mysql
but is being addressed in a current ongoing ticket and will be
available in the next release.
however, its possible that some DBAPIs do not raise the error in a
manner which can ever be consistently caught; for example
releases are announced on this mailing list as well as the Python
cheeseshop (and all feeds which aggregate it, such as planet
python). you can also subscribe to be a watcher on sourceforge
where release emails also get sent out.
im hesitant to add to the regular news sidebar on the site
Greg,
If you can send the traceback you get when such an error occurs, that
would be helpful for providing Oracle support for this condition.
Paul
Greg Copeland wrote:
I'm using sqlalcehmy 2.5 with cx_Oracle 4.2.1. What is the proper way
to detect an sqlalchemy operation has lost its
On Apr 2, 12:27 pm, Michael Bayer [EMAIL PROTECTED] wrote:
this feature is not supported right now for most DB's except mysql
but is being addressed in a current ongoing ticket and will be
available in the next release.
I'm assuming you are talking about autoreconnect here? If so, I would
heres two examples from the current unit tests:
# tables:
users = Table('users', metadata,
Column('user_id', Integer, Sequence('user_id_seq',
optional=True), primary_key = True),
Column('user_name', String(40)),
)
addresses = Table('email_addresses', metadata,
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello SQLAlchemists,
Over in the Mailman project, we've hit a concurrency problem that we
don't know how to (properly) fix. Any suggestions you might have
would be greatly appreciated.
The full thread starts here:
Well, according to the website, Version 3.0 of SQLAlchemy is the
latest exciting release. ;) And that was was October 2006. As is, I
have to go to the download page to see if a new release is available.
Then I have to download the release to see if any of the features/
fixes interest me. One
Frankly I'm very surprised this class of error has not been previously
addressed.
I'll have to test and see what happens. I was planning on doing the
defensive coding, followed by the testing to make sure it is caught
and recovers correctly.
Greg
On Apr 2, 12:36 pm, Paul Johnston [EMAIL
if you care to view trac, its ticket #516.
also, reasons like these are why i keep SA at a relatively low
version number (0.3) despite some saying this is underestimating.
in any case, as the experience with psycopg2 is illustrating, i am
not totally confident the state of DBAPI is going to
On Apr 2, 2007, at 1:46 PM, Barry Warsaw wrote:
The problem is that if we call session.expire(mlist) /after/ the
MailList.__lock attribute gets set, it appears as though SA 'messes'
with this attribute. I've proven that if the session.expire() gets
called after MailList.Lock(), during the
Please don't take my comment the wrong way. It's actually an off
handed compliment. SA seems fairly robust and developmentally
strong. As such, it's just surprising that something like error
handling doesn't have comprehensive coverage. Now I can certainly
understand why, since the DBAPI
On Apr 2, 2007, at 1:51 PM, Greg Copeland wrote:
I must say, it's very strange to go to a product's website to find out
I have to go elsewhere to find out the latest skinny... Or that I
have to download it to find out if I'm interested in it. The last
thing I want is to subscribe to yet
On Apr 2, 2007, at 2:31 PM, Greg Copeland wrote:
Okay, so what's SA's take on this problem domain? Applcation executes
a query but the database has died between the time the connection was
established and the time the query was executed. Does SA attempt to
return an SA specific exception
On Apr 2, 12:36 pm, Paul Johnston [EMAIL PROTECTED] wrote:
Greg,
If you can send the traceback you get when such an error occurs, that
would be helpful for providing Oracle support for this condition.
Paul
I assume this means that the exception is not being caught and wrapped
by an
we should probably be wrapping the commit()/rollback() etc methods
for DB exceptions as well, currently its just execute() and cursor()
AFAIK.
On Apr 2, 2007, at 3:41 PM, Greg Copeland wrote:
On Apr 2, 12:36 pm, Paul Johnston [EMAIL PROTECTED] wrote:
Greg,
If you can send the
Hi,
I assume this means that the exception is not being caught and wrapped
by an SQLAlchemy.exceptions exception?
We're going to identify the exception in a database-specific bit of code.
cx_Oracle.DatabaseError: ORA-03114: not connected to ORACLE
Excellent, that's the snippet I need.
connection, I then pulled my network cable and issued the execute on
my connection.
Nice. I've been restarting the database server (for MSSQL, MySQL,
Postgres) but I wonder if that will yield slightly different results.
If you need me to shutdown the database and retry, I can try that
If anyone cares, the next release of PyInstaller has have support for
SQLAlchemy. I tested with version 3.5 of SQLAlchemy and 1.3 of
PyInstaller. Support has already been checked into the RC system. So
look for any release newer than 1.3 of PyInstaller. If you don't
already know, PyInstaller
our current work with auto-reconnect is checked in to the trunk,
including exception catches around rollbacks and commits.
so far it does seem to work with postgres, in a rudimental test.
the oracle routine is still not checked in.
On Apr 2, 2007, at 5:21 PM, Greg Copeland wrote:
thats great. we are going to be checking in some code soon that will
look for alternate database modules via pkg_resources...is that
supported by PyInstaller also ?
On Apr 2, 2007, at 5:32 PM, Greg Copeland wrote:
If anyone cares, the next release of PyInstaller has have support for
I hate to say it, but I honestly don't know. I've seen mention of
pkg_resources in various blogs and messages but I've never bothered to
learn exactly what it is. As such, I can't answer your question.
I did some quick googling and found mention that pkg_resource
datafiles are known to work.
Hi,
I want to make a relation such that.. i have users post some
articles.. and can link them as relatd to other articles.
I have the Article table like this:
articles = Table('articles', metadata,
Column('id', Integer, primary_key=True),
Column('topic', Unicode(256), nullable=False),
38 matches
Mail list logo