[sqlalchemy] Dogpile session caching

2023-08-02 Thread 'Joe Black' via sqlalchemy
seems to break the example code for dogpile caching. I was hoping to get some advice on how to implement the caching using the new unified sa.select and Session.execute/Session.scalars interface, or even whether dogpile cache supports this interface yet? Thanks in advance, Joe -- SQLA

Re: [sqlalchemy] Upgrading from 0.8 to 1.2 and how to deal with joined collection eager loading and yield_per

2018-01-22 Thread Joe Biggert
Ah crap, thanks for the verbose response. I got to the part where I forgot to mention what we're using for the db - Postgres w/ psycopg. Sorry for leaving out a vital piece. Still analyzing the rest of the response! Thanks again. -- SQLAlchemy - The Python SQL Toolkit and Object Relational

[sqlalchemy] Upgrading from 0.8 to 1.2 and how to deal with joined collection eager loading and yield_per

2018-01-21 Thread Joe Biggert
Hello, We're currently investigating the upgrade from SQLAlchemy 0.8 to 1.2. Right off the bat, we've encountered the well-documented change of how yield_per will now throw an exception for queries with joined collection eager loading. We've got an intermediary piece of software that basically

Re: [sqlalchemy] Usage of Pool.dispose() to close connections using SQLAlchemy 0.8

2018-01-16 Thread Joe Biggert
Thank you Mr. Bayer! I appreciate the detailed responses! On Tuesday, 16 January 2018 17:26:34 UTC-6, Mike Bayer wrote: > > On Tue, Jan 16, 2018 at 5:09 PM, Joe Biggert <jbig...@gmail.com > > wrote: > > Mr. Vanasco, > > > > Can you point me to where I ca

Re: [sqlalchemy] Usage of Pool.dispose() to close connections using SQLAlchemy 0.8

2018-01-16 Thread Joe Biggert
PM UTC-5, Joe Biggert wrote: >> >> we've got a wrapper around our requests that basically looks like this: >> > > On Tuesday, January 16, 2018 at 2:34:25 PM UTC-5, Mike Bayer wrote: >> >> the dispose at the end is completely wrong, sorry. >> > ...

[sqlalchemy] Usage of Pool.dispose() to close connections using SQLAlchemy 0.8

2018-01-16 Thread Joe Biggert
We've got some legacy code using SQLAlchemy 0.8 (we're actively looking to upgrade to the latest) and we've got a wrapper around our requests that basically looks like this: try: # work Session.commit() except: Session.rollback() raise finally: Session.remove()

[sqlalchemy] GeoAlchemy2 mutation tracking on Geometry Column?

2015-04-09 Thread joe meiring
Is there some way to implement mutation tracking on a sqlalchemy2 Geometry (POLYGON) Column? Can I just wrap it in a MutableDict can I? -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from

Re: [sqlalchemy] Postgres JSON/JSONB column NULL or null or None

2015-04-06 Thread joe meiring
Great, that works On Tuesday, March 31, 2015 at 12:56:18 PM UTC-5, Michael Bayer wrote: joe meiring joseph...@gmail.com javascript: wrote: So I've got a model like such and using sqlalchemy v0.9.8 class myModel(Base): id = Column(Integer, primary_key=True

[sqlalchemy] Postgres JSON/JSONB column NULL or null or None

2015-03-31 Thread joe meiring
So I've got a model like such and using sqlalchemy v0.9.8 class myModel(Base): id = Column(Integer, primary_key=True) border = Column(JSONB) How can I query for rows that don't have a border? I've tried: filter(myModel.border != None) #nope filter(myModel.border != 'null') #nopefrom

Re: [sqlalchemy] Does SQLAlchemy support UPDATE...FROM syntax for postgres?

2014-04-11 Thread Joe Dallago
@localhost/test, echo=True) m1.create_all(e) sess = Session(e) sess.query(T).filter(T.mykey==t2.c.mykey).\ update(dict(mytext=t2.c.mytext, myint=t2.c.myint)) On Apr 11, 2014, at 12:01 AM, Joe Dallago jay...@clusterflunk.com wrote: I want to write a query like so

[sqlalchemy] Does SQLAlchemy support UPDATE...FROM syntax for postgres?

2014-04-10 Thread Joe Dallago
I want to write a query like so with SQLAlchemy: UPDATE mytable SET mytext = myvalues.mytext, myint = myvalues.myint FROM ( VALUES (1, 'textA', 99), (2, 'textB', 88), ...) AS myvalues (mykey, mytext, myint) WHERE mytable.mykey = myvalues.mykey Is this kind of thing supported

Re: [sqlalchemy] dynamic schema with postgresql

2013-09-15 Thread Joe Martin
Thank you for your kind help; it was really helpful. On Fri, Sep 13, 2013 at 2:40 AM, Michael Bayer mike...@zzzcomputing.comwrote: On Sep 11, 2013, at 10:36 PM, Joe Martin jandos...@gmail.com wrote: Thank you for your reply. Then I thought the following would work

Re: [sqlalchemy] dynamic schema with postgresql

2013-09-11 Thread Joe Martin
original metadata I was able to create both tables: app.company and public.customer. So, I'm confused with the issue. Thanks for your time. On Wed, Sep 11, 2013 at 11:25 PM, Michael Bayer mike...@zzzcomputing.comwrote: On Sep 10, 2013, at 11:48 PM, Joe Martin jandos...@gmail.com wrote: I

[sqlalchemy] dynamic schema with postgresql

2013-09-10 Thread Joe Martin
I need to create a new schema with some tables in it whenever a new company record is added. Below are my entities (defined with Flask-SqlAlchemy framework extension): class Company(db.Model): __tablename__ = 'company' __table_args__ = {schema:app} id = db.Column(db.Integer,

[sqlalchemy] Unique constraint on non-primary key fields of a many-to-many relationship

2013-08-07 Thread Joe Jean
Hi All, I'm using flask-sqlalchemy. I have a many-to-many relationship between a professor table and a course table as follow: course_professors = db.Table('course_professors', db.Column('course_id', db.Integer, db.ForeignKey('course.id')),

[sqlalchemy] Retrieving Unicode or utf-8 values

2009-09-23 Thread Joe
. Is it possible, or do I have to filter every string retrieved from the database through encoding(value, encoding='utf-8)? For reference, this is on Debian, using Python 2.5.4 and SA 0.5.5. Joe --~--~-~--~~~---~--~~ You received this message because you