Re: [sqlalchemy] Deadlocks when reflecting SQL Server metadata

2018-02-26 Thread Sean Harrington
Server Management Studio... On Mon, Feb 26, 2018 at 9:30 PM Mike Bayer wrote: > so do you have another thread or process that is running database > migrations, like create table or alter table, while that happens? > > On Mon, Feb 26, 2018 at 6:16 PM, Sean Harrington > wrote: > &

[sqlalchemy] Deadlocks when reflecting SQL Server metadata

2018-02-26 Thread Sean Harrington
We're getting the following deadlock error on SQL Server: [FreeTDS][SQL Server]Transaction (Process ID 65) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. (1205) (SQLExecDirectW)') [SQL: 'SELECT [ INFORMATION_SCHEMA].[TABL

[sqlalchemy] Percona Server

2015-10-28 Thread Sean Harrington
Has anybody tried to use SQLAlchemy on Percona Server? Percona Server is a "drop-in replacement" for MySQL with InnoDB optimizations -- however it contains additional INFORMATION_SCHEMA tables, and performance tables...Want to make sure that SQLAlchemy will still sit atop Percona the same way t

[sqlalchemy] how to auto set foreignkey column?

2015-08-11 Thread Sean Lin
Dear all, I have a question about how to automatic set the foreignkey column ? we have two class User and Address class User(Base): __tablename__ = 'user' id = Column(Integer, primary_key=True) name = Column(String) addresses = relationship("Address") def __init__(self, id

[sqlalchemy] Flask / sqlalchemy.exc.ResourceClosedError with SQLite

2013-07-25 Thread Sean Johnson
I have a Flask route(method) that assigns queries to 4 connect objects. 3 work fine, 1 was working, but now gives me a sqlalchemy.exc.ResourceClosedError and I can't get it working again. When I paste that same sql into a dbmanager it returns 5 records as expected. What else could be causing

Re: [sqlalchemy] Can SQLAlchemy execute multiple select statements in a single round trip?

2013-05-23 Thread Sean Lynch
gly small benefit. Have you identified a real speed issue with > some particular series of statements ? > > > On May 23, 2013, at 3:03 PM, Sean Lynch wrote: > > Thank you for the very detailed reply. I know with NHibernate a lot of > their drivers don't support it and

Re: [sqlalchemy] Can SQLAlchemy execute multiple select statements in a single round trip?

2013-05-23 Thread Sean Lynch
h at this point looks to just be MySQLdb). On Thursday, May 23, 2013 2:32:04 PM UTC-4, Michael Bayer wrote: > > > On May 23, 2013, at 2:10 PM, Sean Lynch > > wrote: > > Does SQLAlchemy have any builtin support to execute multiple SELECT > statements in a single round tri

[sqlalchemy] Can SQLAlchemy execute multiple select statements in a single round trip?

2013-05-23 Thread Sean Lynch
Does SQLAlchemy have any builtin support to execute multiple SELECT statements in a single round trip to the database, similar to NHibernate's .future() call (http://ayende.com/blog/3979/nhibernate-futures) or ActiveRecord::Futures (https://github.com/leoasis/activerecord-futures). I came acros

[sqlalchemy] Re: Running create_all() on Google Cloud SQL

2013-01-10 Thread Sean Lynch
I think I found the issue, and submitted a trak ticket with a possible workaround - http://www.sqlalchemy.org/trac/ticket/2649 On Wednesday, January 9, 2013 4:57:06 PM UTC-5, Sean Lynch wrote: > > I've been trying to get SQLAlchemy to work with Google Cloud SQL but so > far I&#x

[sqlalchemy] Running create_all() on Google Cloud SQL

2013-01-09 Thread Sean Lynch
I've been trying to get SQLAlchemy to work with Google Cloud SQL but so far I've only been met with frustration. I'm using 0.7.9, but can not get engine.connect() to force the OAuth request. I logged a StackOverflow issue with some details (http://stackoverflow.com/questions/14224679/unable-t

[sqlalchemy] Documenting sqlalchemy objects via sphinx automodule

2012-09-04 Thread Sean Davis
relationship('Study') When I try to run automodule documentation on meltzdbtools.solexa.objects, of course init_model() has not been run, so autoloading fails and Base is not bound to an engine. Any suggestions as to how to deal with this problem? Thanks, Sean -- You recei

Re: [sqlalchemy] Re: Extending sqlalchemy.schema.Column and metaprogramming traps

2011-02-28 Thread Sean Devlin
ver inputs #Apply validator if present My $.02 Sean On Mon, Feb 28, 2011 at 10:17 AM, Martijn Moeling wrote: > Hi, > > I know this is an "OLD" threat but I was searching the group to see If I > was not the first one doing this. > > I am not sure I understand very wel

[sqlalchemy] testing web.py apps, with database

2009-09-17 Thread Sean
to test a web.py app, including its database? How do others do this? TIA, Sean --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroup

[sqlalchemy] filtering eagerloaded properties?

2009-08-13 Thread Sean
ure this is easy. Apologies if this question is answered somewhere in the documentation, I just couldn't find it there and Google wasn't too helpful. - Sean --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &

[sqlalchemy] Class 'Users' entity name 'None' has no mapper

2008-12-14 Thread Sean Shepard
Greetings. I'm working on my first Pylons project and am just trying to get familiar with things in a test environment. I'm having no success linking to the MySQL database. I have stalled out with a problem that I've seen others report, but didn't see any responses that looked relevant (I could

[sqlalchemy] Re: Cannot adapt for insert

2008-10-04 Thread Sean Davis
On Oct 3, 10:58 pm, Sean Davis <[EMAIL PROTECTED]> wrote: > ProgrammingError: (ProgrammingError) can't adapt 'INSERT INTO > runbrowser_image (id, nobj, focusmetric, focusuniformity, choffset_x, > choffset_y, blu, flu, int_min, int_mean, int_stdev, int_max, >

[sqlalchemy] Cannot adapt for insert

2008-10-03 Thread Sean Davis
mn(Float) nse_min = Column(Float) nse_mean = Column(Float) nse_stdev = Column(Float) nse_max = Column(Float) base = Column(CHAR(1)) tile_id = Column(Integer,ForeignKey('runbrowser_tile.id')) tile = relation(RunBrowserTile,backref=backref('images'))

[sqlalchemy] Re: getting all indexes in a metadata instance

2008-09-30 Thread Sean Davis
On Sep 30, 11:18 am, Sean Davis <[EMAIL PROTECTED]> wrote: > I am mirroring a database from mysql to postgresql.  Mysql allows > indexes to have the same names as columns.  I would like to find all > the indexes and rename them systematically to avoid these name > collisions.

[sqlalchemy] getting all indexes in a metadata instance

2008-09-30 Thread Sean Davis
schema in postgres from the metadata? Thanks, Sean --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: Custom type definition and "can't adapt 'INSERT INTO...." error

2008-09-27 Thread Sean Davis
On Sep 27, 5:16 pm, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Sep 27, 2008, at 3:12 PM, Sean Davis wrote: > > > > > > > I have been playing with new types using sqlalchemy and have an error > > I do not understand.  Table

[sqlalchemy] Custom type definition and "can't adapt 'INSERT INTO...." error

2008-09-27 Thread Sean Davis
%(lastname)s, % (email)s, %(phone)s)' {'uuid': UUID('58d6bcb4-8cc6-11dd-983d-0016cb972e45'), 'firstname': u'Sean', 'lastname': u'Davis', 'email': u'sdavis2 AT mail.nih.gov', 'phone': u'301-435-2652'

[sqlalchemy] Re: Column metadata from mapped class

2008-07-21 Thread Sean Davis
On Jul 20, 11:28 am, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Jul 20, 2008, at 7:48 AM, Sean Davis wrote: > > > > > I have been playing with 0.5 and have a very simple question.  If I > > have a mapped class, User, how can I get at the columns of User?  I &

[sqlalchemy] Column metadata from mapped class

2008-07-20 Thread Sean Davis
I have been playing with 0.5 and have a very simple question. If I have a mapped class, User, how can I get at the columns of User? I see lots of constructs like User.c, but User has no 'c' attribute now. I am looking at finding the column types, names (to loop over), etc. Th

[sqlalchemy] Many-to-many back to single table

2007-10-12 Thread Sean Davis
manual and the many-to-many mapping section, and I haven't figured out how to go about coding this association table and referencing from table a to get subjects and objects of a given member of a. Is this possible to do? Thanks, Sean --~--~-~--~~~---~--~

[sqlalchemy] Re: Multiple foreign keys to the same table from another table

2007-07-20 Thread Sean Davis
On Jul 20, 11:57 pm, Sean Davis <[EMAIL PROTECTED]> wrote: > I have a table that has two columns that reference the same table in a > foreign-key relationship. What do I need to specify and where to > avoid the error below? > > : Error determining > primary a

[sqlalchemy] Multiple foreign keys to the same table from another table

2007-07-20 Thread Sean Davis
27; : relation(Element,backref='feature') }) sqlalchemy.orm.mapper(FeatureLoc,featureloc_t,properties={ 'srcfeature' : relation(Feature), 'feature': relation(Feature) }) Thanks, Sean --~--~-~--~~~---~--~~ You rec

[sqlalchemy] Re: save_or_update() with a unique but not primary key

2007-03-13 Thread Sean Davis
On Tuesday 13 March 2007 07:35, Sean Davis wrote: > We are creating a database that will have a set of autoincrement primary > keys on the tables. However, many of the tables also have one or more > unique keys associated with them. Can we use save_or_update() (and, by > extens

[sqlalchemy] save_or_update() with a unique but not primary key

2007-03-13 Thread Sean Davis
nique keys rather than specifying the primary key directly? Thanks, Sean --~--~-~--~~~---~--~~ 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 u

[sqlalchemy] Re: Is it possible to know the size of a deferred PickleType?

2007-03-06 Thread Sean Davis
On Tuesday 06 March 2007 05:32, Sanjay wrote: > Hi All, > > Wondering if it is possible to know the size of a file stored in a > deferred column (PickleType), without retrieving the file itself. I usually try to save the filesize as a separate c

[sqlalchemy] Re: Tool to autogenerate code from db schema

2007-02-24 Thread Sean Davis
of the existing db than to type in stuff that is already available somewhere else. It does seem pretty straightforward, depending on the level of detail that you want to include. Sean --~--~-~--~~~---~--~~ You received this message because you are subscribed

[sqlalchemy] Re: non-autoincrementing, but DB-assigned primary keys

2007-02-23 Thread Sean Davis
On Friday 23 February 2007 10:52, Michael Bayer wrote: > PassiveDefault is used for this. Thanks. Works perfectly. > On Feb 23, 2007, at 6:35 AM, Sean Davis wrote: > > If I have a table that generates primary keys like this (in postgres): > > > > create table ...( >

[sqlalchemy] non-autoincrementing, but DB-assigned primary keys

2007-02-23 Thread Sean Davis
autoload the tables (I have about 150 of them, and they are potentially somewhat mutable), but I don't have to. Thanks, Sean --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. T

[sqlalchemy] Tool to autogenerate code from db schema

2007-02-20 Thread Sean Davis
, Sean --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For mo

[sqlalchemy] Re: Is there any way to call a python function for primary key generation

2007-02-13 Thread Sean Davis
On 2/13/07, vinjvinj <[EMAIL PROTECTED]> wrote: > > > I use the mx.UID package to generate all my keys. Is there any way to > specify that this function be called to generate the primary key for > inserts? > > Thanks, Could this not be done on the database side (d

[sqlalchemy] schema comments

2007-02-12 Thread Sean Davis
I looked over the docs but didn't find an answer (so the answer is probably "no"). Does SA allow descriptions (database comments) of tables and/or columns? Thanks, Sean --~--~-~--~~~---~--~~ You received this message because you are subscribe

[sqlalchemy] Re: Accessing DBAPI cursor object from connection

2007-01-18 Thread Sean Davis
On Thursday 18 January 2007 17:42, Jonathan Ellis wrote: engine.raw_connection().cursor() Ah, yes! Thanks. Sean On 1/18/07, Sean Davis <[EMAIL PROTECTED]> wrote: > I would like to access the underlying psycopg2 connection to get at a > DBAPI2 cursor with the ultimate goal

[sqlalchemy] Accessing DBAPI cursor object from connection

2007-01-18 Thread Sean Davis
a way (assuming that I am using postgres)? Thanks, Sean --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: Full Text Search using PostgreSQL and tsearch2

2007-01-18 Thread Sean Davis
cle/21674 There are other similar sites available via google. Sean --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: Full Text Search using PostgreSQL and tsearch2

2007-01-18 Thread Sean Davis
an create a new type for SA; there is a recent message in the archives about doing that (not with tsvector, but). As for querying, I'm not sure how that would be best implemented in SA. Sean --~--~-~--~~~---~--~~ You received this message because you a

[sqlalchemy] Re: Oracle autoload problem?

2007-01-09 Thread Sean Davis
e the issue. I'll sort it out in more detail, but bound parameters are not working for me in any queries I have tried. It works otherwise, but not with bind params. Sean --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

[sqlalchemy] Oracle autoload problem?

2007-01-09 Thread Sean Davis
ariables bound 'select distinct OWNER from ALL_TAB_COLUMNS where TABLE_NAME = :table_name' {'table_name': 'GENE2REFSEQ'} Any thoughts? Thanks, Sean --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

[sqlalchemy] Re: Problem with array fields in postgres

2007-01-06 Thread Sean Davis
On 1/2/07, Mando <[EMAIL PROTECTED]> wrote: Sorry, but I don't understand how create, insert or select data with the array field in postgres. I don't think array fields are supported yet. There is a post from this week that discusses

[sqlalchemy] Re: Lazy load a single column

2007-01-05 Thread Sean Davis
On 1/5/07, Lee McFadden <[EMAIL PROTECTED]> wrote: On 1/5/07, Sean Davis <[EMAIL PROTECTED]> wrote: > A simple question: > > I have a table with one HUGE column. Is there a way to make this column > lazy-loaded? > http://www.sqlalchemy.o

[sqlalchemy] Lazy load a single column

2007-01-05 Thread Sean Davis
A simple question: I have a table with one HUGE column. Is there a way to make this column lazy-loaded? Thanks, Sean --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this g

[sqlalchemy] Re: SqlSoup error

2006-12-22 Thread Sean Davis
using straight sqlalchemy and BoundMetaData that you suggested in an earlier thread might be related to a postgresql version change. Sean --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy" gr

[sqlalchemy] Re: SqlSoup error

2006-12-22 Thread Sean Davis
above klass_query =... : klass._mapper.compile() and see if it works. Alan, This was, indeed, the fix. And, to clarify for Michael, I did include a primary key on the g_refseq table but neglected to include it in the table def--sorry for being misleading. Thanks for

[sqlalchemy] SqlSoup error

2006-12-22 Thread Sean Davis
_compile_all File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/mapper.py", line 497, in _initialize_properties AttributeError: 'Mapper' object has no attribute '_Mapper__props' I am using: SQLAlchemy-0.3.3-py2.5.egg Any suggestions on what I am missing? Tha

[sqlalchemy] Re: Misunderstanding something with autoloading

2006-12-19 Thread Sean Davis
value of > 'args' and 'kwargs'. > > Also, please remember that this glitch could be postgresql-related. 8.2 is > very new, and I don't know if either SQLAlchemy or psycopg2 are well-tested > against it. You could try another DB-adapter as well. Thanks again

[sqlalchemy] Re: Misunderstanding something with autoloading

2006-12-19 Thread Sean Davis
Apple XServer), psycopy2.0.5.1, SA 0.3.3. I played a bit more and it happens only with a particular database. When connecting to another database, it seems to work just fine. I'll look into it more here, as it seems to be idiosyncratic. If I come to any hard conclusions, I'll forward

[sqlalchemy] Misunderstanding something with autoloading

2006-12-18 Thread Sean Davis
after I do this call, I can autoload the table without problem. >>> tb = Table('gffdata',metadata,autoload=True) And selecting, etc., works fine at this point. What am I missing? Thanks, Sean --~--~-~--~~~---~--~~ You received this message becaus