Re: [sqlalchemy] SQLAlchemy: Database Access Using Python - Developer's Library book

2015-11-08 Thread Ken Lareau
On Thu, Nov 5, 2015 at 7:34 AM, Mike Bayer <mike...@zzzcomputing.com> wrote: > > > On 11/03/2015 06:55 PM, Ken Lareau wrote: > >> I came across this during a search, and in the four different sites >> I've checked, I've seen four different release dates varying fro

[sqlalchemy] SQLAlchemy: Database Access Using Python - Developer's Library book

2015-11-03 Thread Ken Lareau
hoping I might be able to find out more here. :) -- Ken Lareau -- 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.co

Re: [sqlalchemy] Sane way to monitor external DB changes from application?

2015-09-02 Thread Ken Lareau
async IO if needed. You may find postgres' > advisory locks useful if any synchronization needs arise. > > References: > http://www.postgresql.org/docs/9.4/static/sql-listen.html > http://initd.org/psycopg/docs/advanced.html#asynchronous-notifications > > - Dave > > > On 9/2/20

[sqlalchemy] Sane way to monitor external DB changes from application?

2015-09-02 Thread Ken Lareau
rs on the DB side, but I'm unsure if that's a valid possibility here? Hopefully this made sense, but if any clarification is needed, please let me know. -- Ken Lareau klar...@ifwe.co -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To u

[sqlalchemy] Multiple delete attempts of same rows with a star schema configuration

2014-09-04 Thread Ken Lareau
once, but each relationship in project is triggering its own delete which is bad. So... help? Am I missing something simple here, or is my model not good enough to do the right thing? -- - Ken Lareau -- You received this message because you are subscribed to the Google Groups sqlalchemy group

Re: [sqlalchemy] Multiple delete attempts of same rows with a star schema configuration

2014-09-04 Thread Ken Lareau
On Thu, Sep 4, 2014 at 3:30 PM, Michael Bayer mike...@zzzcomputing.com wrote: On Sep 4, 2014, at 5:37 PM, Ken Lareau klar...@tagged.com wrote: So I have a few tables as follows (abbreviated for unnecessary columns): class Project(Base): __tablename__ = 'projects' id = Column

Re: [sqlalchemy] Multiple delete attempts of same rows with a star schema configuration

2014-09-04 Thread Ken Lareau
On Thu, Sep 4, 2014 at 4:35 PM, Michael Bayer mike...@zzzcomputing.com wrote: On Sep 4, 2014, at 6:58 PM, Ken Lareau klar...@tagged.com wrote: On Thu, Sep 4, 2014 at 3:30 PM, Michael Bayer mike...@zzzcomputing.com wrote: On Sep 4, 2014, at 5:37 PM, Ken Lareau klar...@tagged.com wrote

Re: [sqlalchemy] Multiple delete attempts of same rows with a star schema configuration

2014-09-04 Thread Ken Lareau
On Thu, Sep 4, 2014 at 4:54 PM, Michael Bayer mike...@zzzcomputing.com wrote: On Sep 4, 2014, at 7:50 PM, Ken Lareau klar...@tagged.com wrote: Is there a way to essentially allow something like 'for app in project.applications:' without having to make an explicit query to the DB first

[sqlalchemy] (Semi-)automated way to adjust constraint names via Alembic?

2014-07-02 Thread Ken Lareau
and determine each by hand, but I was wondering if there was a less manual (and error-prone) way to approach this, possibly via the autogeneration feature? In case it matters, the database server is MySQL. -- - Ken Lareau -- You received this message because you are subscribed to the Google

Re: [sqlalchemy] (Semi-)automated way to adjust constraint names via Alembic?

2014-07-02 Thread Ken Lareau
'PRIMARY' for the name of the constraint and I'm not even sure that's changeable (been putting together a test data- base to try it out on)). But I'll see what I can hack together. :) - Ken On 7/2/14, 6:08 PM, Ken Lareau wrote: So, in my ongoing quest to make my team's operations

[sqlalchemy] Regarding the use of reciprocal relationships

2014-07-01 Thread Ken Lareau
reciprocal relationships is okay, and are there certain things that should be done to mitigate potential issues that can be caused by doing so, or are there better ways to accomplish the same thing? -- - Ken Lareau -- You received this message because you are subscribed to the Google Groups

Re: [sqlalchemy] Regarding the use of reciprocal relationships

2014-07-01 Thread Ken Lareau
On Tue, Jul 1, 2014 at 2:17 PM, Mike Bayer mike...@zzzcomputing.com wrote: On 7/1/14, 4:54 PM, Ken Lareau wrote: Related to one of my recent posted threads here, I'm recalling a certain conversation at PyCon where I was mentioning how a friend would define a many-to-many relationship

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-07-01 Thread Ken Lareau
On Thu, Jun 26, 2014 at 7:47 PM, Ken Lareau klar...@tagged.com wrote: On Jun 26, 2014 7:40 PM, Mike Bayer mike...@zzzcomputing.com wrote: right, so a few emails ago I said: you need to put .label('environment') on that column before it finds its way into subq. I dont have

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-07-01 Thread Ken Lareau
**SIGH** Please ignore last message... I had forgotten to actually update the database schema itself. :( Pardon me while I go shoot myself... - Ken On Tue, Jul 1, 2014 at 4:19 PM, Ken Lareau klar...@tagged.com wrote: On Thu, Jun 26, 2014 at 7:47 PM, Ken Lareau klar...@tagged.com wrote

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-26 Thread Ken Lareau
On Thu, Jun 26, 2014 at 5:57 AM, Mike Bayer mike...@zzzcomputing.com wrote: On 6/25/14, 8:06 PM, Ken Lareau wrote: On Wed, Jun 25, 2014 at 6:28 AM, Mike Bayer mike...@zzzcomputing.com wrote: On 6/25/14, 2:26 AM, Ken Lareau wrote: On Tue, Jun 24, 2014 at 3:35 PM, Mike Bayer mike

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-26 Thread Ken Lareau
that might come from the code itself; hopefully I didn't miss any, but if there's still confusion, let me know. - Ken On 6/26/14, 4:11 PM, Ken Lareau wrote: On Thu, Jun 26, 2014 at 5:57 AM, Mike Bayer mike...@zzzcomputing.com wrote: On 6/25/14, 8:06 PM, Ken Lareau wrote: On Wed, Jun 25

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-26 Thread Ken Lareau
Done, new file attached (this gives the same error message as the one I showed initially, at least on my system). - Ken -- 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

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-26 Thread Ken Lareau
, considered it insane. :) - Ken On 6/26/14, 9:50 PM, Ken Lareau wrote: Done, new file attached (this gives the same error message as the one I showed initially, at least on my system). - Ken -- You received this message because you are subscribed to the Google Groups sqlalchemy group

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-25 Thread Ken Lareau
On Tue, Jun 24, 2014 at 3:35 PM, Mike Bayer mike...@zzzcomputing.com wrote: On 6/23/14, 8:09 PM, Ken Lareau wrote: if apptier: subq = ( Session.query( Package.pkg_name, Package.version, Package.revision

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-24 Thread Ken Lareau
Anyone? This has me dead in the water and nothing in the documentation has been helping. - Ken On Mon, Jun 23, 2014 at 5:09 PM, Ken Lareau klar...@tagged.com wrote: On Fri, Jun 20, 2014 at 3:46 PM, Ken Lareau klar...@tagged.com wrote: On Fri, Jun 20, 2014 at 1:23 PM, Mike Bayer mike

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-23 Thread Ken Lareau
On Fri, Jun 20, 2014 at 3:46 PM, Ken Lareau klar...@tagged.com wrote: On Fri, Jun 20, 2014 at 1:23 PM, Mike Bayer mike...@zzzcomputing.com wrote: On 6/20/14, 3:38 PM, Ken Lareau wrote: So in the ongoing improvement of one of our internal databases, we created a new table named

[sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-20 Thread Ken Lareau
occur, so I turn to those with more expertise to find out if there is a way to accomplish what I desire, or if there's really no hope. :) Any insight would be greatly appreciated. -- - Ken Lareau -- You received this message because you are subscribed to the Google Groups sqlalchemy group

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-20 Thread Ken Lareau
On Fri, Jun 20, 2014 at 1:23 PM, Mike Bayer mike...@zzzcomputing.com wrote: On 6/20/14, 3:38 PM, Ken Lareau wrote: So in the ongoing improvement of one of our internal databases, we created a new table named 'environments' whose SQLA code looks something like this: class Environment

[sqlalchemy] Trying to get a 'global' session to work for SQLAlchemy database library tests

2013-10-11 Thread Ken Lareau
enough to always understand why my current code works (and I have a full application using this without issue at the moment). So I guess the question is: am I missing something really obvious here, or will I need to rethink how I deal with sessions in my library code? Thanks in advance. -- - Ken

Re: [sqlalchemy] Trying to get a 'global' session to work for SQLAlchemy database library tests

2013-10-11 Thread Ken Lareau
On Fri, Oct 11, 2013 at 5:53 PM, Michael Bayer mike...@zzzcomputing.comwrote: On Oct 11, 2013, at 7:14 PM, Ken Lareau klar...@tagged.com wrote: In the process of trying to find an efficient way to manage a test database for a large set of tests for a database library I'm writing that uses

Re: [sqlalchemy] Re: Duplicating primary key value into another column upon insert?

2013-09-25 Thread Ken Lareau
this time, there will be future column renames that are far more insidious and may require it, so I would also like to know if the above will work as well. :) -- - Ken Lareau -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from

Re: [sqlalchemy] Duplicating primary key value into another column upon insert?

2013-09-24 Thread Ken Lareau
On Tue, Sep 24, 2013 at 7:25 AM, Michael Bayer mike...@zzzcomputing.comwrote: On Sep 23, 2013, at 10:04 PM, Ken Lareau klar...@tagged.com wrote: Hopefully this will make sense... I have a database which is in need of some normalization of the column naming in various tables

Re: [sqlalchemy] Duplicating primary key value into another column upon insert?

2013-09-24 Thread Ken Lareau
On Tue, Sep 24, 2013 at 10:32 AM, Michael Bayer mike...@zzzcomputing.comwrote: On Sep 24, 2013, at 12:00 PM, Ken Lareau klar...@tagged.com wrote: Of course, this leads back to the original question... how exactly does one accomplish this? :) Hopefully the clarification above helps

Re: [sqlalchemy] Duplicating primary key value into another column upon insert?

2013-09-24 Thread Ken Lareau
On Tue, Sep 24, 2013 at 11:10 AM, Ken Lareau klar...@tagged.com wrote: On Tue, Sep 24, 2013 at 10:32 AM, Michael Bayer mike...@zzzcomputing.comwrote: On Sep 24, 2013, at 12:00 PM, Ken Lareau klar...@tagged.com wrote: Of course, this leads back to the original question... how

Re: [sqlalchemy] Duplicating primary key value into another column upon insert?

2013-09-24 Thread Ken Lareau
On Tue, Sep 24, 2013 at 2:53 PM, Michael Bayer mike...@zzzcomputing.comwrote: On Sep 24, 2013, at 5:42 PM, Ken Lareau klar...@tagged.com wrote: On Tue, Sep 24, 2013 at 11:10 AM, Ken Lareau klar...@tagged.com wrote: On Tue, Sep 24, 2013 at 10:32 AM, Michael Bayer mike...@zzzcomputing.com

[sqlalchemy] Duplicating primary key value into another column upon insert?

2013-09-23 Thread Ken Lareau
the docs so far hasn't turned up anything useful, I'm afraid... Thanks in advance. -- - Ken Lareau -- 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

Re: [sqlalchemy] How to handle 'sub-commits'?

2013-01-17 Thread Ken Lareau
and sqlalchemy.exc.InvalidRequestError: Object 'HostDeployments at 0x21cd050' is already attached to session '1' (this is '3') Sadly it's not immediately obvious as to what's going on... not even certain how to start debugging this problem. - Ken On Tue, Jan 8, 2013 at 2:59 PM, Ken Lareau klar...@tagged.com wrote: On Tue

Re: [sqlalchemy] How to handle 'sub-commits'?

2013-01-17 Thread Ken Lareau
On Thu, Jan 17, 2013 at 4:13 PM, Michael Bayer mike...@zzzcomputing.comwrote: On Jan 17, 2013, at 7:01 PM, Ken Lareau wrote: On Thu, Jan 17, 2013 at 3:54 PM, Michael Bayer mike...@zzzcomputing.comwrote: On Jan 17, 2013, at 6:45 PM, Ken Lareau wrote: Sadly, it looks like when I try

Re: [sqlalchemy] How to handle 'sub-commits'?

2013-01-17 Thread Ken Lareau
On Thu, Jan 17, 2013 at 4:26 PM, Michael Bayer mike...@zzzcomputing.comwrote: On Jan 17, 2013, at 7:24 PM, Ken Lareau wrote: On Thu, Jan 17, 2013 at 4:13 PM, Michael Bayer mike...@zzzcomputing.comwrote: On Jan 17, 2013, at 7:01 PM, Ken Lareau wrote: On Thu, Jan 17, 2013 at 3:54 PM

Re: [sqlalchemy] How to handle 'sub-commits'?

2013-01-08 Thread Ken Lareau
On Tue, Jan 8, 2013 at 2:16 PM, Michael Bayer mike...@zzzcomputing.comwrote: On Jan 8, 2013, at 4:00 PM, Ken Lareau wrote: Given this and your previous comments, and after some conversations with a coworker, I decided to expose the 'engine' variable from the database library and create

Re: [sqlalchemy] How to handle 'sub-commits'?

2013-01-06 Thread Ken Lareau
Michael, Thanks for the response, see further questions/issues below... On Fri, Jan 4, 2013 at 8:41 AM, Michael Bayer mike...@zzzcomputing.comwrote: On Jan 3, 2013, at 10:18 PM, Ken Lareau wrote: I recently (today) ran into an issue that has me perplexed as to how to resolve it, so I'm

[sqlalchemy] How to handle 'sub-commits'?

2013-01-03 Thread Ken Lareau
give. -- - Ken Lareau -- 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...@googlegroups.com. For more options, visit