[sqlalchemy] Define one to one and many-to-many relationship using SQLAlchemy Core

2018-02-14 Thread George
I have searched the documentation but didn't find anything useful. Please guide me in the right direction. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example.

[sqlalchemy] Recovering from StaleDataErrors

2015-04-19 Thread George Reilly
my considers this to be an unrecoverable error. Note: I think the client app must enforce serialization of requests if it wants a consistent worldview from its own actions. We do have a `version` column in the Avatar table, but that's used to handle concurrent/stale updates from two different de

[sqlalchemy] Capturing query parameters

2015-09-18 Thread George Reilly
s ({'%(4480418320 param)s': 37},) params {} query_params {u'param_1': None} I've put some sample code up at https://gist.github.com/georgevreilly/11f87d1d2f4664206df2 I'm using SQLAlchemy 0.9.9. Is there a reliable way of capturing the actual query parameters? -- /George V

Re: [sqlalchemy] Capturing query parameters

2015-09-18 Thread George Reilly
On Fri, Sep 18, 2015 at 1:33 PM, Mike Bayer wrote: > > On 9/18/15 3:22 PM, George Reilly wrote: > > I find [SQLTap](http://sqltap.inconshreveable.com/) invaluable for > profiling SQLAlchemy queries. Currently, I've reduced one operation in our > system from nearly 12,000

Re: [sqlalchemy] SQLTap 0.3.10 released

2015-10-01 Thread George Reilly
On Mon, Sep 28, 2015 at 1:04 AM, David Allouche wrote: > On 28 Sep 2015, at 05:21, George V. Reilly > wrote: > > SQLTap is a very useful library that helps you in profiling SQLAlchemy > queries. It helps you understand where and when SQLAlchemy issues queries, > how often th

Re: [sqlalchemy] SQLTap 0.3.10 released

2015-10-03 Thread George Reilly
On Sat, Oct 3, 2015 at 4:34 AM, David Allouche wrote: > On 2 Oct 2015, at 05:49, George Reilly wrote: > > On Mon, Sep 28, 2015 at 1:04 AM, David Allouche > wrote: > >> On 28 Sep 2015, at 05:21, George V. Reilly >> wrote: >> >> SQLTap is a very use

[sqlalchemy] order_by hybrid property fails when specifed as string in a relationship

2013-06-19 Thread George Sakkis
e test case below. Thanks, George # from sqlalchemy import Column, Integer, String, ForeignKey, case from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy.orm

Re: [sqlalchemy] order_by hybrid property fails when specifed as string in a relationship

2013-06-20 Thread George Sakkis
On Wednesday, June 19, 2013 9:47:08 PM UTC+1, Michael Bayer wrote: > > > On Jun 19, 2013, at 4:19 PM, George Sakkis > > wrote: > > > It seems that hybrid properties are not allowed to be specified as > strings for the order_by parameter of a relationship;

[sqlalchemy] Code organization with declarative models

2013-08-12 Thread George Sakkis
tioned explicitly in the docs and can't put my finger on it. Any insight would be appreciated. Thanks, George -- 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] Code organization with declarative models

2013-08-13 Thread George Sakkis
On Tuesday, August 13, 2013 12:59:57 AM UTC+3, Ams Fwd wrote: > > On 08/12/2013 02:50 PM, George Sakkis wrote: > > Hello everyone, > > > > this is more of a code architecture and design question but I'm > > wondering what the best practices are regarding

[sqlalchemy] One-off listeners

2013-11-25 Thread George Sakkis
lambda session: email_user(new_user.email, "welcome {}!".format(new_user.name)) Thanks, George -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from i

Re: [sqlalchemy] One-off listeners

2013-11-26 Thread George Sakkis
On Monday, 25 November 2013 17:27:02 UTC+2, Michael Bayer wrote: > > > On Nov 25, 2013, at 9:00 AM, George Sakkis > > wrote: > > > Hi all, > > > > is there a feature or pattern for adding a listener that is to be > executed (at most) once? For exam

[sqlalchemy] deleting from a many-to-many association table

2014-05-19 Thread George Reilly
erson() person.name = p['name'] session.add(person) session.flush() ap = AppointmentPerson(appointment_id=appt.id, person_id= person.id) session.add(ap) # update rel1 and rel2 This isn't especially efficent and leads

[sqlalchemy] Belonging to a session vs being in the session

2014-07-24 Thread George Sakkis
has no effect. - What is the difference between the two? - How can an instance be dissociated from the session? - Is a (False, True) combination possible and if yes how? Thanks, George -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To

Re: [sqlalchemy] Belonging to a session vs being in the session

2014-07-25 Thread George Sakkis
On Thursday, 24 July 2014 21:56:11 UTC+3, Michael Bayer wrote: > > > expunge() is a bug: > > > https://bitbucket.org/zzzeek/sqlalchemy/issue/3139/expunge-after-delete-fails > > it’s supposed to raise (hence can’t fix this til 1.0). > > so ignore expunge. if you were to emit session.rollback(), y

Re: [sqlalchemy] use session inside the class

2011-09-02 Thread george hu
Thanks Michael, that gives me more understanding of using the session. Actually the DBSession is initialized from: DBSession = scoped_session(sessionmaker( extension=ZopeTransactionExtension())) as the following description: ZopeTransactionExtension is a little piec

Re: [sqlalchemy] Having problem with constructing "update ...from..." with sqlalchemy

2011-09-12 Thread george hu
Thanks Michael, that solves my problem. On Mon, Sep 12, 2011 at 3:18 PM, Michael Bayer wrote: > > On Sep 12, 2011, at 5:50 PM, Geo wrote: > > > I have a tested update ... from.. statement, like so: > > UPDATE...FROM syntax, which is non-standard, isn't built into SQLAlchemy > right now. You'

[sqlalchemy] bindparam ignores required=True

2012-01-21 Thread George Sakkis
thing or is it a regression? Thanks, George -- 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...@googlegroup

[sqlalchemy] Non-deterministic insertion order

2012-10-02 Thread George Sakkis
s not deterministic? Thanks! George -- 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. F

[sqlalchemy] Re: Non-deterministic insertion order

2012-10-02 Thread George Sakkis
On Oct 2, 10:39 pm, Michael Bayer wrote: > On Oct 2, 2012, at 4:29 PM, George Sakkis wrote: > > > I had the impression that the Session’s unit of work figures out > > automatically the potential object dependencies and makes sure that > > the insertion order is consiste

Re: [sqlalchemy] update table record

2012-11-28 Thread George Xie
synchronize_session='evaluate' so, how this option really work? On Saturday, February 4, 2012 10:47:13 AM UTC+8, Michael Bayer wrote: On Feb 3, 2012, at 1:04 PM, Mason wrote: > Hi, > > If i have a table named 'message' and it has the following columns: > message_id, tar_del, src_del. I pass in

[sqlalchemy] Session identity map and PyPy

2013-01-30 Thread George Sakkis
nning SQLAlchemy on PyPY? Thanks for any tip, George -- 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. T

[sqlalchemy] Re: Session identity map and PyPy

2013-01-31 Thread George Sakkis
On Jan 30, 3:54 pm, Michael Bayer wrote: > On Jan 30, 2013, at 5:43 AM, George Sakkis wrote: > > > Hello, > > > I am in the process of migrating to PyPy and have a handful of unit test > > failing due to the different garbage collector and SQLAlchemy's usag

[sqlalchemy] Re: Session identity map and PyPy

2013-02-06 Thread George Sakkis
On Jan 31, 5:52 pm, Michael Bayer wrote: > This issue seems vaguely familiar and I feel like I would have done something > about it when it was reportedah this is #2583.  It's fixed in 0.7.10 > (if/when I release that) and is in all released 0.8 versions as well. Great, that was it; it hasn

[sqlalchemy] Bulk insert on related tables

2009-03-23 Thread George Sakkis
ur, ~170 rows/second. That's in a PostgreSQL database running with synchronous_commit turned off and all foreign and unique constraints dropped during the bulk load. George --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

[sqlalchemy] Specifying Foreign Keys not enough for join

2009-06-01 Thread George Sakkis
join() figure out the join condition, and is there a way to make it work without having to pass it explicitly every time ? George --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post t

[sqlalchemy] Re: Specifying Foreign Keys not enough for join

2009-06-01 Thread George Sakkis
On Jun 1, 3:34 pm, "Michael Bayer" wrote: > George Sakkis wrote: > > > I'm trying to use the primaryjoin/foreign_keys parameters (http:// > >www.sqlalchemy.org/docs/05/mappers.html#specifying-foreign-keys) to > > specify a relation between tables that d

[sqlalchemy] Relation spanning multiple tables

2009-06-01 Thread George Sakkis
t the docs or at least a recipe on the wiki since apparently it's not obvious at all. Below are some of my failed attempts; any help will be very much appreciated. George # from sqlalchemy.orm import relation, sessionmaker from sqlalchemy.

[sqlalchemy] Re: Relation spanning multiple tables

2009-06-02 Thread George Sakkis
o-many relations by hiding the association object and it requires a regular relation to be defined anyway. In my example there are two independent one-to-many relationships and the intermediate table (User) is not just an association object, it's a standalone object. George > On Mon, Jun

[sqlalchemy] Query -> column names

2009-06-03 Thread George Sakkis
stable and robust this is. George --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: Query -> column names

2009-06-04 Thread George Sakkis
Thanks, didn't know that, though in this case I want the keys in the same column order but keys() doesn't preserve it. George On Jun 3, 8:59 pm, Michael Bayer wrote: > each row has a keys() attribute if that helps... > > On Jun 3, 2009, at 8:49 PM, George Sakkis wrote: &

[sqlalchemy] Re: Query -> column names

2009-06-04 Thread George Sakkis
On Jun 4, 5:09 am, "King Simon-NFHD78" wrote: > George Sakkis wrote: > > > Is there a (public) API for getting the column names of a given Query > > instance and other similar introspection needs  ? I didn't find > > anything related in the docs but after

[sqlalchemy] Stored procedures

2006-10-17 Thread George Sakkis
e I'll probably rewrite my_proc in sqlalchemy, which may not be that bad after all, but I'd rather avoid this if possible. Thanks, George --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy&quo

[sqlalchemy] Re: Stored procedures

2006-10-17 Thread George Sakkis
#x27;s pretty cool, too bad I can't use it for MySQL. Nevermind, I rewrote the stored proc using sqlalchemy and numarray to do the heavy number crunching and I'm happy with the result. Not only is the code shorter, but it's at least as fast as before ! George --~--~-

[sqlalchemy] AttributeError: ResultProxy instance has no attribute '__len__'

2006-10-19 Thread George Sakkis
reason why there's not a __len__ that returnes this rowcount ? Thanks, George --~--~-~--~~~---~--~~ 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] FlushError ("unsaved, pending instance and is an orphan")

2007-04-05 Thread George Sakkis
child to parent (as above), but apparently the latter doesn't seem to work. Is this the case or something else is wrong ? George --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group.

[sqlalchemy] Re: FlushError ("unsaved, pending instance and is an orphan")

2007-04-06 Thread George Sakkis
s above), but apparently the latter doesn't seem to work. Is this > > the case or something else is wrong ? > > > George It's one2many from Ranker to Result. class Ranker(Entity): has_many('results', of_kind='Result', cascade='all, delete- orph

[sqlalchemy] Querying a dict collection by key/value pair

2016-08-11 Thread Dominik George
Hi, first of all, thanks for SQLAlchemy - it's the one project that actually made me enjoy working with large data collections in applications ;)! I have an SQLAlchemy model that associates tags (key/value pairs) with elements, like in attached mwe.py. Element.tags is a dictionary collection,

Re: [sqlalchemy] Querying a dict collection by key/value pair

2016-08-12 Thread Dominik George
to work-around it for now? I would probably go with monkey-patching SQLAlchemy at runtime and I am afraid Python would actually allow that. Or is there another simple way of getting that kind of query? -nik -- PGP-Fingerprint: 3C9D 54A4 7575 C026 FB17 FD26 B79A 3C16 A0C4 F296 Dominik George

Re: [sqlalchemy] Querying a dict collection by key/value pair

2016-08-12 Thread Dominik George
Hi, Am Freitag, 12. August 2016 11:12:37 UTC+2 schrieb Dominik George: > > I would probably go with monkey-patching SQLAlchemy at runtime and I am > afraid Python would actually allow that. > > > Did it, and it actually works nicely: https://github.com/Natureshadow/OSMA

[sqlalchemy] Get nested query from Exists clause

2016-08-14 Thread Dominik George
clause got already compiled to a Selectable and thus I cannot inspect it like I can the uncompiled query. Any hints on how to achieve that? Cheers, Nik -- PGP-Fingerprint: 3C9D 54A4 7575 C026 FB17 FD26 B79A 3C16 A0C4 F296 Dominik George · Mobil: +49-1520-1981389 Teckids e.V. · FrOSCon e.V

Re: [sqlalchemy] Get nested query from Exists clause

2016-08-25 Thread Dominik George
Hi, Am Montag, 15. August 2016 15:32:35 UTC+2 schrieb Mike Bayer: > > > nothing is string-compiled at that point, everything is just nested > inside. the Exists() should have something like "element" inside of it > (look in its __dict__) that is the underlying Selectable. > > > .element is a F

[sqlalchemy] Re: Get nested query from Exists clause

2016-08-25 Thread Dominik George
To be more precise: I have a query like this one: session.query(osmalchemy.node).filter(osmalchemy.node.tags.any(key="name", value="Grill-Corner")).all() It ultimately compiles to this QL expression: query = SELECT osm_nodes.element_id AS osm_nodes_element_id, osm_elements.element_id AS osm_

[sqlalchemy] Strange (Heisen)bug with dictionary association_proxy

2016-09-08 Thread Dominik George
C9D 54A4 7575 C026 FB17 FD26 B79A 3C16 A0C4 F296 Dominik George · Mobil: +49-1520-1981389 Teckids e.V. · FrOSCon e.V. · OpenRheinRuhr e.V. Fellowship of the FSFE · Piratenpartei Deutschland Opencaching Deutschland e.V. · Debian Contributor LPIC-3 Linux Enterprise Professional (Security) -- You

Re: [sqlalchemy] Strange (Heisen)bug with dictionary association_proxy

2016-09-09 Thread Dominik George
Hi, thanks for your reply! make sure you set the environment variable PYTHONHASHSEED=random, then > run your tests repeatedly. This variable produces a random hash seed > for dictionaries and will smoke out dictionary-ordering based bugs more > clearly so that you can localize the source of i

Re: [sqlalchemy] Strange (Heisen)bug with dictionary association_proxy

2016-09-09 Thread Dominik George
om that happens inside SQLAlchemy. Cheers, Nik -- PGP-Fingerprint: 3C9D 54A4 7575 C026 FB17 FD26 B79A 3C16 A0C4 F296 Dominik George · Mobil: +49-1520-1981389 Teckids e.V. · FrOSCon e.V. · OpenRheinRuhr e.V. Fellowship of the FSFE · Piratenpartei Deutschland Opencaching Deutschland e.V. · D

Re: [sqlalchemy] Strange (Heisen)bug with dictionary association_proxy

2016-09-10 Thread Dominik George
Hi Mike, here it is. See attached mwe.py. Test: % for i in $(seq 1 10); do PYTHONHASHSEED=$i python3 mwe.py; done foo = , bang = foo = , bang = foo = bar , bang = baz foo = bar , bang = baz foo = , bang = foo = , bang = foo = , bang = foo = bar , bang = baz foo = , bang = foo = , ba

Re: [sqlalchemy] Strange (Heisen)bug with dictionary association_proxy

2016-09-10 Thread Dominik George
Am Samstag, 10. September 2016 09:02:32 UTC+2 schrieb Dominik George: > > Hi Mike, > > here it is. See attached mwe.py. > Which is here ;). -nik -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe

Re: [sqlalchemy] Strange (Heisen)bug with dictionary association_proxy

2016-09-10 Thread Dominik George
Hi Mike, thank you so much for this insight into your way of tracing this, and for the provided work-around (which I could really have come up with myself…). 3. next I want to whack the monkeypatched thing, because that's a lot of > code that I don't want to be involved in the issue. Fortunate

[sqlalchemy] Apparent bug when combining not_() and label() in expression language

2017-04-20 Thread George London
I noticed some strange behavior while using the SQLAlchemy expression language. I'm using Python 3.5 and SQLAlchemy 1.1.19 against MySQL 5.7.13 via the mysqlclient v1.3.10 connector. The problem happens when I build up a boolean expression using and_() / or_(), then give that expression a name

Re: [sqlalchemy] Re: Apparent bug when combining not_() and label() in expression language

2017-04-20 Thread George London
Thank you for your reply Jonathan. I tried your suggestion and tested the effect of adding .compile statements. I think it provides some insight into my point #2, i.e. different results when I run the literal bound query vs. when I run the unbound expression. Point #1, i.e. the lack of parentheses

[sqlalchemy] filter like using a string in a column of timestamps without time zones - postgres

2018-09-11 Thread George Brande
Hello. My angular is using a datepicker to send a date in string format(ex: 2018-09-11) to my flask app to postgres via sqlalchemy. In my postgres all rows have a column ef_time of timestamps type.(ex: 2018-09-07 13:24:30.138) @app.route('/orders/') def get_orders(ide): session = Session() or

Re: [sqlalchemy] filter like using a string in a column of timestamps without time zones - postgres

2018-09-11 Thread George Brande
Thank you! You eliberated me to finally move to the next step in my project, this kept me at a standstill. Thank you ! marți, 11 septembrie 2018, 12:59:18 UTC+3, Simon King a scris: > > On Tue, Sep 11, 2018 at 9:39 AM George Brande > wrote: > > > > Hello. > >

Re: [sqlalchemy] Capturing query parameters

2015-09-27 Thread George V. Reilly
On Saturday, September 19, 2015 at 8:14:31 AM UTC-7, Michael Bayer wrote: > > > > On 9/18/15 7:58 PM, George Reilly wrote: > > > Thanks for the prompt answer. I tried after_cursor_execute, but it didn't > really help as I just got a tuple of the values, without a c

[sqlalchemy] SQLTap 0.3.10 released

2015-09-27 Thread George V. Reilly
SQLTap is a very useful library that helps you in profiling SQLAlchemy queries. It helps you understand where and when SQLAlchemy issues queries, how often they are issued, how many rows are returned, and if you are issuing queries with duplicate parameters. The last two are new in tonight's 0.

[sqlalchemy] deleting many-to-many association records

2014-05-21 Thread George V. Reilly
I've spent time unsuccessfully trying to fix some problems with a many-to-many table and lazy joins. Here's a simplified repro: #!/usr/bin/env python # -*- coding: utf-8 -*- import random from sqlalchemy import create_engine, ForeignKey from sqlalchemy import Column, Integer

[sqlalchemy] deleting from many-to-many association tables

2014-05-21 Thread George V. Reilly
I've spent time unsuccessfully trying to fix some problems with a many-to-many relationship and lazy joins. Here's a simplified repro: #!/usr/bin/env python # -*- coding: utf-8 -*- import random from sqlalchemy import create_engine, ForeignKey from sqlalchemy import Column, I

Re: [sqlalchemy] deleting from a many-to-many association table

2014-05-21 Thread George V. Reilly
Thanks! I went with Appointment.persons = relationship( 'AppointmentPerson', cascade='delete-orphan, delete, save-update, merge, expunge', lazy=LAZYJOIN) and used the slice notation to empty the InstrumentedList: appt.persons[:] = [] In my real app, I spent som

[sqlalchemy] Training or consultant?

2010-08-17 Thread George V. Reilly
Is there such a thing as SQLAlchemy training or a SA consultant? I'm starting to think that my team might benefit from some time with someone who really knows their stuff. /George Reilly, Seattle -- You received this message because you are subscribed to the Google Groups "sqlalch

[sqlalchemy] MySQL Conference & Expo 2011 Call for Participation

2010-09-23 Thread George V. Reilly
I attended this year's MySQL Conference and generally found it worthwhile. One big disappointment: there was very little coverage of interacting with MySQL from Python, Ruby, or other programming languages. A session on SQLAlchemy would be great. http://en.oreilly.com/mysql2011/public/cfp/126 --

[sqlalchemy] Logging raw SQL statements

2011-02-09 Thread George V. Reilly
explain query plans and the like, to understand performance issues. I specifically care about MySQL and SQLite queries. /George Reilly, Seattle -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@goog

Re: [sqlalchemy] Logging raw SQL statements

2011-02-09 Thread George V. Reilly
The combination of create_engine(..., echo=True) and logging.basicConfig(level=logging.DEBUG) logging.getLogger('sqlalchemy').setLevel(logging.DEBUG) does the trick for me now. Thanks! /George -- You received this message because you are subscribed to the Google Groups "sq

[sqlalchemy] Cross-shard queries

2012-03-11 Thread George V. Reilly
We ran into a nasty problem with sharding a while back. We came up with an effective workaround, but we don't fully understand the problem. Perhaps someone here can provide more insight. We shard requests to our production MySQL databases using sqlalchemy.ext.horizontal_shard.ShardedSession. Ou

Re: [sqlalchemy] Cross-shard queries

2012-03-21 Thread George V. Reilly
On Sunday, March 11, 2012 10:56:44 PM UTC-7, Michael Bayer wrote: > > > On Mar 11, 2012, at 8:03 PM, George V. Reilly wrote: > > > We ran into a nasty problem with sharding a while back. We came up with > an effective workaround, but we don't fully understand the p

[sqlalchemy] Sharding with _BindParamClause

2010-03-30 Thread George V. Reilly
list_item_id = :param_2 and :param1 is of the form _BindParamClause(u'%(63636624 param)s', None, type_=UUID()) Typically, I'm seeing this come out of the innards of SQLAlchemy, as one of several queries triggered by, say, a session.merge(). How do we work around this? Thanks! /Georg

[sqlalchemy] Re: Sharding with _BindParamClause

2010-04-01 Thread George V. Reilly
On Mar 30, 4:42 pm, "Michael Bayer" wrote: > George V. Reilly wrote: > > We're using SQLAlchemy sharding to partition accounts across a couple > > of databases. We want to add more partitions, but first we need to > > eliminate some unnecessary cross-partit

[sqlalchemy] Re: Sharding with _BindParamClause

2010-04-02 Thread George V. Reilly
Michael Bayer wrote: > check out r0ddd638f1d90 in mercurial.  I've added the function from the > example below, plus support for in_op(), to the attribute_shard example. > The old ClauseVisitor method is removed and replaced with this more robust > method. Very nice! Thanks,

[sqlalchemy] Re: Sharding with _BindParamClause

2010-04-02 Thread George V. Reilly
On Apr 2, 4:43 pm, "George V. Reilly" wrote: > Michael Bayer wrote: > > check out r0ddd638f1d90 in mercurial.  I've added the function from the > > example below, plus support for in_op(), to the attribute_shard example. > > The old ClauseVisitor method is

[sqlalchemy] Inserting comments into SQL queries

2010-04-13 Thread George V. Reilly
has a /* comment */ inserted by my code. /George V. Reilly, Seattle -- 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 sqla

[sqlalchemy] Sharing types between dialects

2010-05-06 Thread George V. Reilly
Our production database uses MySQL. For various reasons, the schema often uses MySQL-specific DDL. We want that represented in our mapper classes. We also awant to be able to exercise our SQLAlchemy unit tests against both local MySQL databases and SQLite databases. Using the MySQL-specific types

[sqlalchemy] Re: Sharing types between dialects

2010-05-06 Thread George V. Reilly
Thanks, Michael. On May 6, 7:48 am, Michael Bayer wrote: > On May 6, 2010, at 3:35 AM, George V. Reilly wrote: > > > Our production database uses MySQL. For various reasons, the schema > > often uses MySQL-specific DDL. We want that represented in our > > mapper classes.

[sqlalchemy] Alembic migrations hanging on busy RDS PostgreSQL servers

2018-01-16 Thread George V. Reilly
that are hardly ever modified—and not at all while the Alembic migrations were executing. However, many of our most frequent SELECTs JOIN to these tables, so they're constantly being read from. Aside, from making a planned outage, do we have any good options? Thanks! /George Reilly -- SQL

Re: [sqlalchemy] Alembic migrations hanging on busy RDS PostgreSQL servers

2018-01-17 Thread George V. Reilly
ixed SQL script, test it on > a staging database first, then run in production. > > then again, the ALTER will probably be extremely quick if you can in > fact pause the load for a few minutes, since you are defaulting to > NULL. > > On Tue, Jan 16, 2018 at 3:42 PM, Georg