Hey, I was wondering if it would be possible to add some extra logging to
the QueuePool for when its using overflow connections vs a connection out
of the pool.
We currently are using a pool_size of 1 and a max overflow of 10. These
were just random settings set in a library and no one really
I'm trying to adopt the examples from:
https://bitbucket.org/zzzeek/sqlalchemy/src/e2b8c893ca98/examples/dogpile_caching/
to work with my code base and so I've copy and pasted the caching_query.py
into my project and started doing queries like this:
DBSession = scoped_session(
provide a test case that generates that warning?
On May 27, 2013, at 9:01 PM, John Anderson son...@gmail.com javascript:
wrote:
I'm trying to adopt the examples from:
https://bitbucket.org/zzzeek/sqlalchemy/src/e2b8c893ca98/examples/dogpile_caching/
to work with my code base and so I've copy
Hey, we have a lot of stored procedures that use out params like:
CREATE PROCEDURE create_stuff
@value INT,
@id INT OUTPUT
AS
BEGIN
INSERT into stuff ...
SET @id = @@Identity
END
and when we rows = DBSession.execute() we reference these outparams via
row['@id'] and this is fine in
I would like to generate this query:
SELECT a.pk, aa.response
FROM attendee as a
JOIN field as f on f.conference_pk = a.conference_pk
LEFT JOIN attendee_answer as aa ON aa.field_pk = f.pk
AND aa.attendee_pk = a.pk;
Using the ORM, I came up
On Wednesday, January 2, 2013 1:39:28 PM UTC-3, Michael Bayer wrote:
On Jan 2, 2013, at 8:33 AM, John Anderson wrote:
I would like to generate this query:
SELECT a.pk, aa.response
FROM attendee as a
JOIN field as f on f.conference_pk = a.conference_pk
Thanks! I used @validate and it worked well for what I needed.
On Tuesday, November 6, 2012 3:23:47 PM UTC-3, John Anderson wrote:
I update certain columns with default=foo and want that same 'foo'
function to run onupdate as well, but sometimes an update will be ran only
updating
I have a mixin that declares a primary key but would like to dynamically
override the name of it.
So for instance this is the base:
class BaseModel(object):
@declared_attr
def pk(self):
return sa.Column(sa.Integer, autoincrement=True, primary_key=True)
but in some circumstances
I'm using 0.8 but the library itself is open source so it might be good to
support older versions. Does the 0.7 version work for both? Or is the
mapper hack the best way for backwards compatibility?
On Tuesday, November 6, 2012 7:42:17 PM UTC-3, John Anderson wrote:
I have a mixin
If I have a DB structure similar to this:
class Parent(Base):
pass
class Child(Base):
parent = relation(Parent, backref='children')
and I have an instanced of Parent and want to figure out what the
class of instance.children is, how would I do that?
--
You received this message
I like to manage my static assets pipeline with a framework called
webassets and i'm trying to write an extension for mako and can't quite
figure out what is needed based on the docs. Trying to get something like
this to work:
http://paste2.org/p/2098832
What is the proper way to do this?
Just realized I accidentally sent this to the SQLAlchemy list instead of
mako. Disregard ;)
On Wednesday, August 8, 2012 1:08:16 PM UTC-5, John Anderson wrote:
I like to manage my static assets pipeline with a framework called
webassets and i'm trying to write an extension for mako
In my pyramid apps I have a create script that generates my database for
production and a different script that generates my database for my tests.
But if I don't import the module the models are in then they aren't
discovered even though they all share the same Base which is the class I
get
.
if the Python interpreter is never told of the existence of some .py file,
it doesn't exist. it doesn't matter that Base is used in that file, the
classes within don't exist until their owning module is imported.
On Aug 1, 2012, at 12:07 PM, John Anderson wrote:
In my pyramid apps I have
I have a bunch of Mixins for SQL alchemy objects for doing standard stuff
that I use in multiple projects and this all works well by using
@declared_attr like this:
class CategoryMixin(object):
@declared_attr
def title(self):
Unique title for the category
return
I'm wondering how alembic decides if a database is out of date or not, I
was trying to use it to autogenerate a new migration but it kept saying my
database was out of date even though it wasn't.
I hadn't ever ran a migration script on the database, it was an
autogenerated one using create_all()
16 matches
Mail list logo