[sqlalchemy] Table Reflection Error

2021-04-23 Thread Jeff Griffin
Using sqlalchemy 1.4.5 and pymssql 2.1.5, I am reflecting an Oracle Table from one database (Oracle) and attempting to create it in a second database (MS SQL Server). On table.create I get the following error: Compiler http://www.sqlalchemy.org/ To post example code, please provide an MCVE:

[sqlalchemy] Assigning SQL expression to a version column.

2019-12-04 Thread Jeff Horemans
What is the expected behavior of assigning an SQL expression to a version column? Before migrating from version 1.2.4. to 1.3.3. the priority was given to the assigned expression, afterwards it seems to be the other way around. I think there is something to say about both, but I wanted to check

Re: [sqlalchemy] Problems with versioning when using a class mapped on a select of a table in SQLAlchemy 1.2

2018-02-22 Thread Jeff Horemans
Ok, thanks for the quick response! Keep up the exceptionally good work! Op woensdag 21 februari 2018 17:19:44 UTC+1 schreef Mike Bayer: > > On Wed, Feb 21, 2018 at 10:04 AM, Mike Bayer <mik...@zzzcomputing.com > > wrote: > > On Wed, Feb 21, 2018 at 6:33 AM, Jeff Horemans

[sqlalchemy] Problems with versioning when using a class mapped on a select of a table in SQLAlchemy 1.2

2018-02-21 Thread Jeff Horemans
When migrating from 1.1 tot 1.2, we noticed that the version_id is not getting set on a class that maps to a select of a table. I've added a test case class below to the test_versioning.py included in SQLAlchemy to confirm this behaviour. This case runs fine in versions 1.0 and 1.1, but gives a

[sqlalchemy] Re: pickled automap.metadata and AmbiguousForeignKeysError

2016-01-20 Thread Jeff Laughlin
I have the exact same issue. I create a new MetaData, use tometadata to copy the first to the second, and then if I use the second metadata it works fine. But if I pickle and unpickle it first then it doesn't work. So something about pickling/unpickling is breaking it. On Monday, February 24,

[sqlalchemy] FYI: Put up a blog post on how to manage PostgreSQL Materialized Views using SQLAlchemy

2016-01-07 Thread Jeff Widman
thanks to Mike Bayer for his help. Cheers, Jeff -- *Jeff Widman* jeffwidman.com <http://www.jeffwidman.com/> | 740-WIDMAN-J (943-6265) <>< ᐧ -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group

Re: [sqlalchemy] using savepoint transactions in unittests for a webapp which uses a scoped session?

2015-12-20 Thread Jeff Widman
You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sqlalchemy+unsubscr...@googlegroups.com. > To post to this group, send email to sqlalchemy@g

Re: [sqlalchemy] adjacency list to nested dictionary

2015-12-16 Thread Jeff Widman
Can this dictionary be built non-recursively? I am not sure how to > manually do this otherwise. > > Thanks in advance! > > Greg-- > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To unsubscribe from this g

Re: [sqlalchemy] adjacency list to nested dictionary

2015-12-16 Thread Jeff Widman
> > Greg-- > > On Wednesday, December 16, 2015 at 5:42:01 PM UTC-6, Jeff Widman wrote: >> >> What database are you using? >> >> Are you trying to solve data insert or retrieval? >> >> Do you want to do your traversal in your app or use SQLAlchemy to &g

Re: [sqlalchemy] How do a I create Postgres Materialized View using SQLAlchemy?

2015-12-14 Thread Jeff Widman
> > > the descriptions on that page for several other methods say 'see > > execute_at() for more information' so it doesn't exactly "feel" > deprecated. > > I see it just at DDLElement.execute() where that doc should be updated. > Where else? > I think here as well?

Re: [sqlalchemy] Determination of string lengths

2015-12-05 Thread Jeff Widman
lalchemy@googlegroups.com. > Visit this group at http://groups.google.com/group/sqlalchemy. > For more options, visit https://groups.google.com/d/optout. > -- *Jeff Widman* jeffwidman.com <http://www.jeffwidman.com/> | 740-WIDMAN-J (943-6265) <>< -- You received this me

Re: [sqlalchemy] Splitting a table ?

2015-12-02 Thread Jeff Widman
ving emails from it, send an > email to sqlalchemy+unsubscr...@googlegroups.com. > To post to this group, send email to sqlalchemy@googlegroups.com. > Visit this group at http://groups.google.com/group/sqlalchemy. > For more options, visit https://groups.google.com/d/optout. > --

Re: [sqlalchemy] How do a I create Postgres Materialized View using SQLAlchemy?

2015-11-15 Thread Jeff Widman
tion of creating the view? More than happy to submit a PR helping tidy up the docs on this, just not sure what I should be saying. Cheers, Jeff On Mon, Nov 9, 2015 at 1:58 PM, Mike Bayer <mike...@zzzcomputing.com> wrote: > > > On 11/09/2015 03:52 PM, Jeff Widman wrote: > &

[sqlalchemy] How do a I create Postgres Materialized View using SQLAlchemy?

2015-11-09 Thread Jeff Widman
SQLAlchemy as well. 2) How do I query this materialized view? 3) Is there a special method for refreshing? Or should I just do *db.engine.execute("REFRESH MATERIALIZED VIEW view_name CONCURRENTLY") *? Cheers, Jeff -- You received this message because you are subscribed to the Goo

Re: [sqlalchemy] Routing Session and query count problem

2014-10-16 Thread Jeff Oliver
On Wednesday, October 15, 2014 2:55:22 PM UTC-7, Michael Bayer wrote: The system currently locates the bind via the tables present in the selectable, as when you bind to a mapper, the tables that the mapper selects from are extracted and also set up. Issue is added at

[sqlalchemy] Routing Session and query count problem

2014-10-15 Thread Jeff Oliver
a mapper for the whole thing? Of course, what I can do to fix this? Is there a way in the get_bind() to maybe detect if there are subqueries and select the engine based upon something in there? Jeff -- You received this message because you are subscribed to the Google Groups sqlalchemy group

Re: [sqlalchemy] queue pooling, mysql sleeping, for very occasional use apps?

2014-09-19 Thread Jeff Dairiki
On Fri, Sep 19, 2014 at 10:40:28AM -0700, Iain Duncan wrote: Hi folks, I'm putting together something for a client that will get used very occasionally, and has a some worker processes that use SQLA. I'm wondering what the right approach is for the dreaded MySQL has gone away. Should I just

Re: [sqlalchemy] Re: queue pooling, mysql sleeping, for very occasional use apps?

2014-09-19 Thread Jeff Dairiki
On Fri, Sep 19, 2014 at 05:43:46PM -0700, Iain Duncan wrote: So can anyone tell me what exactly happens with NullPool, I'm not clear from the docs. Does that mean a fresh connection will be made on a new hit, and we'll never get the gone away, but at the expense of slower connections? Yes,

[sqlalchemy] Re: tools to print sql statement in pyramid with sqlalchemy

2014-08-08 Thread Jeff Dairiki
On Thursday, August 7, 2014 6:28:24 PM UTC-7, 王凯凯 wrote: Hi, I am using pyramid with sqlalchemy. I wonder wether there are some tools like 'django-admin.py sqlall' in django that print the sql statement of 'CREATE TABLE'. I’m unfamiliar with Django, so maybe you’re looking for something

Re: [sqlalchemy] SQLAlchemy 0.9.2 UnicodeEncodeErrors with PG 9.3.2 on Amazon RDS

2014-02-18 Thread Jeff Dairiki
execute a query (before there is a possibility of a multi-thread race.) E.g. engine = sa.create_engine(...) # early query to force dialect.initialize() engine.execute(sa.sql.select([1])) Jeff -- You received this message because you are subscribed to the Google Groups sqlalchemy

[sqlalchemy] Re: using Utf8 problem

2014-01-30 Thread Jeff Dairiki
On Thursday, January 30, 2014 6:11:15 AM UTC-8, Alexander Peprepelica wrote: I have such code engine = create_engine(u'mysql+mysqldb:// login:pass@127.0.0.1:3307/mydb?charset=utf8use_unicode=1') in windows all is fine But when I execute code in linux I have problem with unicode What I

Re: [sqlalchemy] Anybody have twophase/zope.sqlalchemy/MySQL working?

2014-01-13 Thread Jeff Dairiki
, preliminary testing here (with the web app that was causing the original trouble) indicates that this fixes the issue. Jeff -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send

Re: [sqlalchemy] Anybody have twophase/zope.sqlalchemy/MySQL working?

2014-01-09 Thread Jeff Dairiki
Thank you for the reply! Sorry for the delayed response. (Holidays.) On Mon, Dec 23, 2013 at 11:52:25PM -0800, Laurence Rowe wrote: On Thursday, 12 December 2013 16:30:59 UTC-8, Jeff Dairiki wrote: Do you understand why the datamanager is finding the SessionTransaction and using

Re: [sqlalchemy] Anybody have twophase/zope.sqlalchemy/MySQL working?

2013-12-14 Thread Jeff Dairiki
Thanks for the replies! On Fri, Dec 13, 2013 at 08:40:33AM -0800, Jonathan Vanasco wrote: Also, I'm remembering the stuff about the need to use 'mark_changed'. on the project page ( https://pypi.python.org/pypi/zope.sqlalchemy ) search for the section about `mark_changed` -- that info might

Re: [sqlalchemy] Anybody have twophase/zope.sqlalchemy/MySQL working?

2013-12-14 Thread Jeff Dairiki
On Sat, Dec 14, 2013 at 06:58:14PM -0800, Jeff Dairiki wrote: Thanks for the replies! On Fri, Dec 13, 2013 at 08:40:33AM -0800, Jonathan Vanasco wrote: Also, I'm remembering the stuff about the need to use 'mark_changed'. on the project page ( https://pypi.python.org/pypi/zope.sqlalchemy

Re: [sqlalchemy] Anybody have twophase/zope.sqlalchemy/MySQL working?

2013-12-12 Thread Jeff Dairiki
be MySQL specific thing, but maybe postgres and others are more forgiving of a two-phase XA BEGIN being terminated by a regular one-phase ROLLBACK? Anyhow, I'll keep poking when I find a moment. Cheers, Jeff I just noticed my connection pool isn't pooling. Whenever a connection which has

[sqlalchemy] Anybody have twophase/zope.sqlalchemy/MySQL working?

2013-12-10 Thread Jeff Dairiki
I just noticed my connection pool isn't pooling. Whenever a connection which has been used only for reading is returned to the pool an XAER_RMFAIL operational error is returned in response to the pools rollback-on-return. (This causes the connection to be closed rather than returned to the pool.

Re: [sqlalchemy] SQLAlchemy 0.8.3 / 0.9.0b1 released

2013-10-30 Thread Jeff Dairiki
Thanks for the quick fix, Mike! On Wed, Oct 30, 2013 at 10:37:48AM -0400, Michael Bayer wrote: this is a regression from http://www.sqlalchemy.org/trac/ticket/2818 and that is fixed in eee219bc7e0656fb8afa9879 / 2576b5cdfb09fd1fb28 . On Oct 29, 2013, at 11:40 PM, Jeff Dairiki dair

Re: [sqlalchemy] SQLAlchemy 0.8.3 / 0.9.0b1 released

2013-10-29 Thread Jeff Dairiki
On Sat, Oct 26, 2013 at 05:41:04PM -0400, Michael Bayer wrote: I’ve released (hopefully without mistakes…) SQLAlchemy 0.8.3 and 0.9.0b1. Having just updated to 0.8.3 I'm seeing a new SAWarning. (I'm not quite sure whether this qualifies as a bug, or whether maybe I was just doing it wrong.)

RE: [sqlalchemy] timing / profiling object loading ?

2013-09-27 Thread Jeff Peck
for post-launch / investing though ! I'll toss you a preview when it's close to launch. It's built on quite a bit of Bayer-Tech. [Jeff Peck] Jonathan, I'm late to this, but I was debugging a Flask app last night and found an excellent extension called flask_debugtoolbar. I just did a quick check

RE: [sqlalchemy] Automatically create secondary tables for many to many relationship?

2013-09-22 Thread Jeff Peck
, target_cls) Thanks, Jeff Peck -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email

RE: [sqlalchemy] How-to filter by the time part of a datetime field?

2013-08-30 Thread Jeff Peck
) Regards, Jeff Peck -Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Warwick Prince Sent: Friday, August 30, 2013 8:01 AM To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] How-to filter by the time part of a datetime field

RE: [sqlalchemy] SQLAlchemy hot-copy capability

2013-08-30 Thread Jeff Peck
with many simultaneous transactions. If you still run into performance problems you could look into introducing a caching layer such as memcached, but I wouldn't cross that bridge until I had thoroughly tweaked my db settings and identified real bottlenecks in my application(s). Jeff Peck -- You

Re: [sqlalchemy] TypeDecorator to store bool as ENUM('N', 'Y')?

2013-08-16 Thread Jeff Dairiki
On Thu, Aug 15, 2013 at 12:21:43PM -0400, Michael Bayer wrote: On Aug 14, 2013, at 9:24 PM, Jeff Dairiki dair...@dairiki.org wrote: I'm working with an existing MySQL schema that has lots of columns of type ENUM('N', 'Y'). I'd like to deal with them as real booleans on the python side

[sqlalchemy] TypeDecorator to store bool as ENUM('N', 'Y')?

2013-08-14 Thread Jeff Dairiki
in expressions won't work.) Thank you for any help. Jeff -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post

[sqlalchemy] Re: Can't make an association table use InnoDB

2012-05-31 Thread Jeff
at the MySQL console to help confirm this, as well as the same CREATE TABLE statement below. On May 30, 2012, at 11:31 PM, Jeff wrote: Having difficulty creating a database that includes the following plumbing: class Base(object):    id = Column(Integer, primary_key=True

[sqlalchemy] Re: Can't make an association table use InnoDB

2012-05-31 Thread Jeff
the tables anyway, regardless of their order in the database definition .py file. Thanks! On May 31, 2:21 pm, Jeff jeffalst...@gmail.com wrote: The tables don't exist yet. The Base.metadata.create_all(engine) is to create them. Thanks! On May 30, 11:52 pm, Michael Bayer mike...@zzzcomputing.com

[sqlalchemy] Re: Can't make an association table use InnoDB

2012-05-31 Thread Jeff
that mixing a fully mapped association object and secondary is a bit unusual and you'll want viewonly=True if you're doing that. On May 31, 2012, at 2:32 PM, Jeff wrote: Perhaps it's relevant (though I suspect not) that the class Avalanche actually contains: class Avalanche(Base

[sqlalchemy] Re: Can't make an association table use InnoDB

2012-05-31 Thread Jeff
for the tip on capitalization, though. Good to know! On May 31, 3:55 pm, Michael Bayer mike...@zzzcomputing.com wrote: On May 31, 2012, at 3:49 PM, Jeff wrote: Thanks! I don't quite follow the statement about fully mapped association table being unusual. your name

[sqlalchemy] Re: Lock table, do things to table, unlock table: Best way?

2012-05-30 Thread Jeff
Unique constraints have worked well. Thanks! On May 29, 1:44 pm, Michael Bayer mike...@zzzcomputing.com wrote: yup On May 29, 2012, at 1:01 PM, Jeff wrote: Thanks  Michael, Just to make clear what exactly begin_nested() is contributing: Normal case: session.rollback() goes

[sqlalchemy] Can't make an association table use InnoDB

2012-05-30 Thread Jeff
Having difficulty creating a database that includes the following plumbing: class Base(object): id = Column(Integer, primary_key=True) __table_args__ = {'mysql_engine': 'InnoDB'} Base = declarative_base(cls=Base) class Event(Base): Avalanche_Event_Association =

[sqlalchemy] Re: Lock table, do things to table, unlock table: Best way?

2012-05-29 Thread Jeff
(criteiron).one() the difference between using locks to prevent concurrent dupes versus using constraints and expecting dupes to fail is known as pessimistic versus optimistic locking. On May 28, 2012, at 10:38 AM, Jeff wrote: The unique constraint sounds like a workable solution

[sqlalchemy] Re: Multiple inserts with .append()'d associations

2012-05-29 Thread Jeff
a lot less elegant/simple, making me think I'm missing something. Thanks! On May 28, 12:11 pm, Michael Bayer mike...@zzzcomputing.com wrote: On May 28, 2012, at 10:52 AM, Jeff wrote: There are Analyses, which have Events. There's an Analysis_Event_Association table. Events are written

[sqlalchemy] Re: Lock table, do things to table, unlock table: Best way?

2012-05-28 Thread Jeff
The unique constraint sounds like a workable solution! I'll implement that with a try/except and report back if that was effective. Thanks! On May 28, 5:43 am, Simon King si...@simonking.org.uk wrote: On Sun, May 27, 2012 at 6:18 PM, Jeff jeffalst...@gmail.com wrote: Thanks, I have indeed

[sqlalchemy] Multiple inserts with .append()'d associations

2012-05-28 Thread Jeff
There are Analyses, which have Events. There's an Analysis_Event_Association table. Events are written before the Analyses. Later, I have a for loop calculating multiple Analyses. For each Analysis, we identify the Events it includes and append them, using sqlalchemy's relationship plumbing. This

[sqlalchemy] Re: Lock table, do things to table, unlock table: Best way?

2012-05-27 Thread Jeff
...@themactionfaction.com wrote: On May 27, 2012, at 1:07 AM, Jeff wrote: I have multiple processes accessing  a table. All of these processes want to read a set of rows from the table, and if the rows are not present they will make a calculation and insert the rows themselves. The issue

[sqlalchemy] Lock table, do things to table, unlock table: Best way?

2012-05-26 Thread Jeff
I have multiple processes accessing a table. All of these processes want to read a set of rows from the table, and if the rows are not present they will make a calculation and insert the rows themselves. The issue comes where process A does a query to see if the target set of rows is present in

[sqlalchemy] Re: Lock table, do things to table, unlock table: Best way?

2012-05-26 Thread Jeff
Hmmm. It also appears that the 4 step solution I gave above doesn't work consistently. Any ideas as to why not? On May 27, 1:07 am, Jeff jeffalst...@gmail.com wrote: I have multiple processes accessing  a table. All of these processes want to read a set of rows from the table, and if the rows

[sqlalchemy] Efficient Inserting to Same Table Across 100s of Processes

2012-05-23 Thread Jeff
cluster :-( What are routes available in SQLAlchemy to improve this situation? Thanks! Jeff -- 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

[sqlalchemy] Re: Efficient Inserting to Same Table Across 100s of Processes

2012-05-23 Thread Jeff
SQLAlchemy have functionality that might help in this direction? On May 23, 4:19 pm, Jeff jeffalst...@gmail.com wrote: Hello, I have hundreds of independent jobs on a cluster all writing entries to the same MySQL database table. Every time one job INSERTs, it locks the table, and the other jobs

[sqlalchemy] Re: Efficient Inserting to Same Table Across 100s of Processes

2012-05-23 Thread Jeff
for that, such as a Celery process.    This might be the way you want to go if you get large bursts of data with quiet periods, and it's OK that the MySQL database receives all the data eventually. On May 23, 2012, at 4:56 PM, Jeff wrote: More data: A typical not-quite-worst

Re: [sqlalchemy] stucco_evolution 0.4 released

2012-04-20 Thread Jeff Dairiki
-column version tables which can be shared between Alembic environments. (If you want to veto the two-column version table idea, I can whittle it down to just the configurable-version-table-name part pretty easily.) Cheers, Jeff -- You received this message because you are subscribed to the Google

Re: [sqlalchemy] Eager loading a relationship which spans databases

2012-04-15 Thread Jeff Dairiki
As always, thank you for the quick reply, Mike! On Sat, Apr 14, 2012 at 06:34:10PM -0400, Michael Bayer wrote: On Apr 14, 2012, at 5:38 PM, Jeff Dairiki wrote: I have a one-to-one relationship to a table in a different database which I'd like to, effectively, eager-load. Lazy='joined

[sqlalchemy] Eager loading a relationship which spans databases

2012-04-14 Thread Jeff Dairiki
I have a one-to-one relationship to a table in a different database which I'd like to, effectively, eager-load. Lazy='joined' and lazy='subquery' won't work, since they rely an impossible JOIN between tables in two different databases. Lazy='immediate' works, but results in one query per

[sqlalchemy] 'Too many connections': Where am I handling sessions incorrectly?

2011-09-15 Thread Jeff
SQLAlchemy version 0.7.1 MySQL Ver 14.12 Distrib 5.0.77 We have a series of tables with one to many connections: A - B - C - D-E etc. Script1 has a big for loop over several hundred/thousand values. In each loop iteration it goes through A,B,C, makes some new entries, then calls Function1

[sqlalchemy] Re: 'Too many connections': Where am I handling sessions incorrectly?

2011-09-15 Thread Jeff
...@zzzcomputing.com wrote: On Sep 15, 2011, at 6:39 AM, Jeff wrote: SQLAlchemy version 0.7.1 MySQL Ver 14.12 Distrib 5.0.77 We have a series of tables with one to many connections: A - B - C - D-E etc. Script1 has a big for loop over several hundred/thousand values. In each

[sqlalchemy] Re: 'Too many connections': Where am I handling sessions incorrectly?

2011-09-15 Thread Jeff
Great. I implemented your suggestions and it was (predictably) a significant speedup. Cheers! On Sep 15, 4:31 pm, Michael Bayer mike...@zzzcomputing.com wrote: On Sep 15, 2011, at 10:20 AM, Jeff wrote: Thanks for the guidance! In a situation which a script submits a swarm of independent

[sqlalchemy] commit after every insert

2011-05-19 Thread jeff
I have an app that does an update or insert (can't guarantee the entry exists to start with). I'm trying to increase efficiency and notice a commit after every insert or update. Is there a way to hold off on the commit until one final commit? Not using the ORM for this particular piece. create

[sqlalchemy] Re: [Grok-dev] [Solved? ] Creating a simple 1:2 relationship with MeGrok and SqlAlchemy

2010-11-01 Thread Jeff Peterson
Would make a nice addition to the ORM docs on grok.zope.org. -- Jeff Peterson Sent from my iPod On Nov 1, 2010, at 5:31 PM, Hector Blanco white.li...@gmail.com wrote: Hi List... I have been asking a lot lately about a 1:2 relationship with MeGrok and SqlAlchemy, and I think I've solved

RE: [sqlalchemy] Containers/collections with SQLAlchemy

2010-10-26 Thread Jeff Peterson
http://grok.zope.org/documentation/how-to/orm-using-megrok.rdb-and-sqlalchemy http://www.sqlalchemy.org/docs/ -- Jeffrey D Peterson Webmaster Crary Industries, Inc. 237 12th St NW West Fargo, ND 58078 P: 701-499-5928 E: jeff.peter...@crary.com -Original Message- From:

[sqlalchemy] Microsoft Access

2010-09-20 Thread Jeff Peterson
Microsoft Access is supported, albeit experimentally in 0.5.8. Will this functionality make it past that at any point or has that been basically scrapped? -- Jeffrey D Peterson Webmaster Crary Industries, Inc. 237 12th St NW West Fargo, ND 58078 P: 701-499-5928 E: jeff.peter...@crary.com --

Re: [sqlalchemy] How to map to read only descriptor

2010-06-11 Thread Jeff Peck
On Fri, Jun 11, 2010 at 4:16 AM, jpeck peck.j...@gmail.com wrote: I am trying to map to a simple read only property. According to the docs, I *think* I am supposed to use synonym. The problem is that I am getting a None value for the mapped descriptor's column. Ok, so I got this working with

[sqlalchemy] 0.6 Beta 3: specifying bindparams in update()

2010-04-12 Thread Jeff Peck
? Thanks, Jeff Peck -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group

[sqlalchemy] Calling functions from a package from the session

2010-03-01 Thread Jeff Peterson
I have a function in an Oracle package called CRARY_WEB_USERS_SECURITY_API it looks like this: function GetPassword( parent_ in varchar2, user_ in varchar2 ) return varchar2; How would I call that function from a session? Or can I even do that. TIA, -- Jeffrey D Peterson Webmaster

RE: [sqlalchemy] Warnings take a really long time / NotImplementedError

2010-02-11 Thread Jeff Peterson
/ NotImplementedError On Feb 10, 2010, at 6:05 PM, Jeff Peterson wrote: It's touching a ton of tables, hundreds...if I had to guess I'd say every table in the schema. The reasons for this are unknown to me, certainly all those tables are not related specifically to the single view I am attempting

RE: [sqlalchemy] Warnings take a really long time / NotImplementedError

2010-02-11 Thread Jeff Peterson
': 'CFA_CASH_FLOW_STATUS_TAB' and 'table_name': 'CFA_CASH_FLOW_TAB'. that's two tables. Jeff Peterson wrote: -- Jeffrey D Peterson Webmaster Crary Industries, Inc. From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Michael Bayer Sent

RE: [sqlalchemy] Warnings take a really long time / NotImplementedError

2010-02-11 Thread Jeff Peterson
] On Behalf Of Michael Bayer Sent: Thursday, February 11, 2010 12:05 PM To: sqlalchemy@googlegroups.com Subject: RE: [sqlalchemy] Warnings take a really long time / NotImplementedError I thought you were reflecting a view ? a table will fan out to all of its constraints, yes. Jeff Peterson

RE: [sqlalchemy] Warnings take a really long time / NotImplementedError

2010-02-11 Thread Jeff Peterson
Bayer Sent: Thursday, February 11, 2010 12:59 PM To: sqlalchemy@googlegroups.com Subject: RE: [sqlalchemy] Warnings take a really long time / NotImplementedError Jeff Peterson wrote: That is the troubling part, I am reflecting a view, and yet it is still touching all those tables

RE: [sqlalchemy] Warnings take a really long time / NotImplementedError

2010-02-11 Thread Jeff Peterson
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Michael Bayer Sent: Thursday, February 11, 2010 1:26 PM To: sqlalchemy@googlegroups.com Subject: RE: [sqlalchemy] Warnings take a really long time / NotImplementedError Jeff

[sqlalchemy] Warnings take a really long time / NotImplementedError

2010-02-10 Thread Jeff Peterson
First spin though, I get these errors/warnings: /home/zope/.buildout/eggs/SQLAlchemy-0.6-py2.5.egg/sqlalchemy/engine/reflection.py:40: SAWarning: Did not recognize type 'ROWID' of column 'objid' ret = fn(self, con, *args, **kw)

[sqlalchemy] RE: Warnings take a really long time / NotImplementedError

2010-02-10 Thread Jeff Peterson
BTW, this is using 0.6 beta1 build 6743 on Grok, reflecting a view from an Oracle (10.2) 10g DB. -- Jeffrey D Peterson Webmaster Crary Industries, Inc. From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Jeff Peterson Sent: Wednesday, February 10, 2010 2:29 PM

RE: [sqlalchemy] Warnings take a really long time / NotImplementedError

2010-02-10 Thread Jeff Peterson
/ NotImplementedError On Feb 10, 2010, at 3:28 PM, Jeff Peterson wrote: First spin though, I get these errors/warnings: /home/zope/.buildout/eggs/SQLAlchemy-0.6-py2.5.egg/sqlalchemy/engine/reflection.py:40: SAWarning: Did not recognize type 'ROWID' of column 'objid' ret = fn(self, con, *args, **kw

RE: [sqlalchemy] Warnings take a really long time / NotImplementedError

2010-02-10 Thread Jeff Peterson
From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Michael Bayer Sent: Wednesday, February 10, 2010 2:38 PM To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] Warnings take a really long time / NotImplementedError On Feb 10, 2010, at 3:28 PM, Jeff

RE: [sqlalchemy] Warnings take a really long time / NotImplementedError

2010-02-10 Thread Jeff Peterson
/ NotImplementedError On Feb 10, 2010, at 4:13 PM, Jeff Peterson wrote: The first time I render that view, the reflection takes place and it takes the 30-40 seconds to load the page (during which time the warnings are being generated), once it's mapped it is very fast. You should probably have

RE: [sqlalchemy] Oracle, ownership and unrecognized type warnings

2010-01-11 Thread Jeff Peterson
Sorry for not getting back sooner. -- Jeffrey D Peterson Webmaster Crary Industries, Inc. -Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of Michael Bayer Sent: Wednesday, January 06, 2010 1:23 PM To: sqlalchemy@googlegroups.com

RE: [sqlalchemy] Oracle, ownership and unrecognized type warnings

2010-01-11 Thread Jeff Peterson
2:31 PM To: sqlalchemy@googlegroups.com Subject: RE: [sqlalchemy] Oracle, ownership and unrecognized type warnings Jeff Peterson wrote: its true that there's no built in functionality to reflect views. In the case of your views, just create Table instances manually, specifying the view names

RE: [sqlalchemy] Oracle, ownership and unrecognized type warnings

2010-01-11 Thread Jeff Peterson
] On Behalf Of Jeff Peterson Sent: Monday, January 11, 2010 3:14 PM To: sqlalchemy@googlegroups.com Subject: RE: [sqlalchemy] Oracle, ownership and unrecognized type warnings Hmmm, must be something megrok.rdb is doing I am not seeing, I will look into it. -- Jeffrey D Peterson Webmaster Crary

[sqlalchemy] Getting a join in one object

2009-11-21 Thread Jeff Cook
Hi all. I want to get a join in one object. I have ret = db.query(a, b).select_from(orm.join(a, b, a.a == b.a)).all() and that returns a tuple with an a object in [0] and a b object in [1]. I want to have SA return the object directly, and I want that object to include the joined fields, so that

[sqlalchemy] Re: Saved Queries (or text representation of the SQL)

2009-10-23 Thread jeff
my own by doing string replaces on the parameters with the parameters as found in .context? Seems like the raw SQL has to be available at some point but don't know if the user has access to it. Thanks! Jeff On Oct 22, 7:06 pm, Michael Bayer mike...@zzzcomputing.com wrote: On Oct 22, 2009, at 6

[sqlalchemy] Re: invalid transaction rollback etc and making a join join

2009-10-19 Thread Jeff Cook
the help everyone. On Sat, Oct 17, 2009 at 8:08 PM, cd34 mcd...@gmail.com wrote: On Oct 17, 6:49 pm, Jeff Cook cookieca...@gmail.com wrote: Unfortunately, from a support-seeker point of view, such rhetoric is often necessary. How many times have you written a mailing list or hit

[sqlalchemy] Re: invalid transaction rollback etc and making a join join

2009-10-17 Thread Jeff Cook
here could help correct any latent problems in my code, so please don't be offended, I didn't mean it a bad or offensive way. Thanks for your response, though. On Fri, Oct 16, 2009 at 5:57 PM, empty mtr...@gmail.com wrote: On Oct 15, 11:50 pm, Jeff Cook cookieca...@gmail.com wrote: So

[sqlalchemy] Re: invalid transaction rollback etc and making a join join

2009-10-16 Thread Jeff Cook
Thanks for the help. I wasn't assigning the session to SQLSoup's session, but I am now, and I'm still getting stale data and I don't know yet if I'll still be getting the invalid transaction/MySQL has gone away thing. I think I'll try just taking SQLSoup out of the thing all together and try

[sqlalchemy] invalid transaction rollback etc and making a join join

2009-10-15 Thread Jeff Cook
, preferably with SQLSoup. It doesn't work right now. All help is loved and appreciated. Signed Jeff --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy

[sqlalchemy] Re: invalid transaction rollback etc and making a join join

2009-10-15 Thread Jeff Cook
/jeff/vspy/lib/python2.6/site-packages/WebError-0.10.1-py2.6.egg/weberror/evalexception.py', line 431 in respond app_iter = self.application(environ, detect_start_response) File '/home/jeff/vspy/lib/python2.6/site-packages/Beaker-1.4.1-py2.6.egg/beaker/middleware.py', line 73 in __call__ return

[sqlalchemy] Re: invalid transaction rollback etc and making a join join

2009-10-15 Thread Jeff Cook
I see. So Pylons should handle this by default, but it's not doing so? That's highly disappointing. Clearly, something is quite incorrect here. Is my usage of SQLSoup causing rollback not to run? On Thu, Oct 15, 2009 at 1:16 PM, Michael Bayer mike...@zzzcomputing.com wrote: Jeff Cook wrote: I

[sqlalchemy] Re: invalid transaction rollback etc and making a join join

2009-10-15 Thread Jeff Cook
. How can I remove these problems? Would pool_recycle be of any use? On Thu, Oct 15, 2009 at 1:27 PM, Jeff Cook cookieca...@gmail.com wrote: I see. So Pylons should handle this by default, but it's not doing so? That's highly disappointing. Clearly, something is quite incorrect here. Is my usage

[sqlalchemy] Re: invalid transaction rollback etc and making a join join

2009-10-15 Thread Jeff Cook
with lots of errors. Your docs need work. I'm sorry if this idea offends you. : ( I still like you and I still like SQLAlchemy. Let's cultivate an environment of mutual professional respect here. : ) Love Jeff On Thu, Oct 15, 2009 at 6:13 PM, Michael Bayer mike...@zzzcomputing.com wrote: On Oct

[sqlalchemy] Re: query().all() OK, query().delete() can't locate bind

2009-09-16 Thread Jeff Enderwick
}) TIA, Jeff --~--~-~--~~~---~--~~ 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 sqlalchemy+unsubscr

[sqlalchemy] Re: TimeoutError: QueuePool limit of size 5 overflow 10 reached, connection timed out, timeout 30

2009-05-24 Thread Jeff FW
/dbengine.html#configuring-logging It's nice to be able to log your pool status at some points, so that you can see how many connections are open. -Jeff On May 22, 4:41 am, Marcin Krol mrk...@gmail.com wrote: Hello everyone, After some time of operation (a day or so), from time to time I'm getting

[sqlalchemy] Re: django middleware or signals for sqlalchemy Session

2009-04-24 Thread Jeff FW
if necessary. Coincidentally, I actually wrote in that first thread you linked to. :-) -Jeff On Apr 23, 5:30 pm, Michael Trier mtr...@gmail.com wrote: Hi, On Thu, Apr 23, 2009 at 4:05 PM, davidlmontgomery davidlmontgom...@gmail.com wrote: I would like to know if there is a consensus

[sqlalchemy] Re: Using sqlalchemy in twisted.

2009-03-16 Thread Jeff FW
really a pretty ordinary set-up. Unfortunately, all this code is for work, so I can't share it. I'll happily answer your questions, though. -Jeff On Mar 15, 2:42 pm, Pedro Algarvio, aka, s0undt3ch u...@ufsoft.org wrote: On Mar 11, 2:13 pm, 一首诗 newpt...@gmail.com wrote: Hi Jeff, In my

[sqlalchemy] getting the number of records in a result set from select

2009-03-13 Thread jeff
hi. this question should be easy. i've searched around though and haven't found the answer. all i want to do is know the number of records in a result set i get using an execute statement with a simple select. so if i do: s=select([raw_table],and_(raw_table.c.name==m

[sqlalchemy] getting the record count of records returned in a select

2009-03-13 Thread jeff
hi. this question should be easy. i've searched around though and haven't found the answer. all i want to do is know the number of records in a result set i get using an execute statement with a simple select. so if i do: s=select([raw_table],and_(raw_table.c.name==m

[sqlalchemy] Re: getting the number of records in a result set from select

2009-03-13 Thread jeff
the number of rows in the last executed statement) but I just get 0 from it. Perhaps someone could explain how to use it correctly. Stephen Emslie On Thu, Mar 12, 2009 at 5:20 PM, jeff jeffre...@gmail.com wrote: hi. this question should be easy. i've searched around though and haven't found

[sqlalchemy] Re: getting the number of records in a result set from select

2009-03-13 Thread jeff
at 4:42 PM, jeff jeffre...@gmail.com wrote: thanks i will use select count (*) i was making a leap that there would be something in pgdb which allows a function like: sql_txt = select * from addresses cursor.execute(sql_txt) rows=cursor.fetchall() rows_returned = cursor_result.rowcount

[sqlalchemy] Re: Using sqlalchemy in twisted.

2009-03-11 Thread Jeff FW
connecting to the database multiple times by accident. Just a thought. -Jeff On Mar 10, 10:38 am, 一首诗 newpt...@gmail.com wrote: Hi Jeff, Thanks for your kind suggestion. I first add some log decorators, but i found when it might cause to print sqalchemy objects which has not been bound to any

[sqlalchemy] Re: Using sqlalchemy in twisted.

2009-03-05 Thread Jeff FW
in all cases. Assuming you're using Twisted in a similar way, you could write a simple decorator to wrap any functions that need a database session in the begin/commit stuff as necessary. If you can give more details of how you're using Twisted, I might be able to offer some more insight. -Jeff

[sqlalchemy] Execute statement sends ROLLBACK commands to database

2009-02-19 Thread Jeff Cook
() fixed it, but as seen here, that's not working right now. All help is deeply appreciated and needed. Thank you. : ) Signed Jeff --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post

[sqlalchemy] Re: DataError inserting CURRVAL in an inline query with SQLAlchemy and SQLSoup

2009-02-19 Thread Jeff Cook
', 'employee_address': u'150', 'employee_id': 3L, 'employee_extension': u'1112', 'employee_user_id': nextval('users_user_id_seq'), 'employee_zip': u'66062', 'employee_last_name': u'Poller' } j Jeff Cook wrote: Hi all, I want to use the return value of a CURRVAL call as the value of a column in a row I'm

[sqlalchemy] Re: Execute statement sends ROLLBACK commands to database

2009-02-19 Thread Jeff Cook
More specifically, it seems to be erroring out with this: DEBUG: SET TRANSACTION ISOLATION LEVEL must be called before any query before the ROLLBACK happens. On Thu, Feb 19, 2009 at 4:42 PM, Jeff Cook cookieca...@gmail.com wrote: Using the following code with Pylons, SQLAlchemy and SQLSoup

  1   2   >