There are a few places in my code that does `q.filter(None)`, e.g.
something like this:
def base_filter(self):
# subclasses may set this, or not
pass
def base_query(self):
q = self.model_cls.query
q = q.filter(self.base_filter())
return q
Hi,
I've to parse raw user input which ends up as filter-parameters for querys.
Consider the following examples, which will end up as where-clauses against
date- and decimal-columns (among others).
FooDate = 2005/12/04
FooDate = 04.12.2005
BarValue = 100,000.00$
BarValue = USD 10
My
I thought about it more. You are correct, there's no way to make this work
well (I didn't think of proxying __dict__, I thought of placing pre-bound
object proxies inside __dict__ for relations with interface mimicking a-la
Werkzeug's object proxies, but those will be brittle and not as
Ah, wait, I forgot something important to ask: how should I implement the
custom serialization hook?
I mean, can someone offer a mixing object with a method that will return a
dictionary representation an arbitrary SQLAlchemy instance, including
(optional) relation recursion?
I'd be grateful
Hi Michael,
This is the only regression I saw migrating from 0.7.9 to 0.8b2:
https://travis-ci.org/plq/spyne/jobs/3711648/#L568
The fix was to remove the pformat call:
https://github.com/plq/spyne/commit/56580c280945e6d484a5f4ce3fbca682ca698778
The sqla_mapper attribute contains the table
pyodbc version = 2.1.9-beta16
Trying to connect sqlalchemy to quickbooks enterprise database. Have a DSN
setup with Qodbc called quickbooks
This connection string works for pyodbc
cnxn = pyodbc.connect(‘dsn=quickbooks’, autocommit=True) #Must set
autocommit flag or get error message found below.
I've attached an example showing the issue. I have a class, Test, with a
single polymorphic subclass, TestOne. I also have TestChild, which has a fk
to Test, and a relation using that fk.
When I execute:
session.query(TestChild) \
.options(joinedload(TestChild.parent)) \
On Dec 18, 2012, at 3:53 AM, Yap Sok Ann wrote:
There are a few places in my code that does `q.filter(None)`, e.g. something
like this:
def base_filter(self):
# subclasses may set this, or not
pass
def base_query(self):
q = self.model_cls.query
I stick with autoflush=True, and flask probably shouldn't make a decision here.
But there really shouldn't be any major behavioral changes with
autoflush=False other than data stays pending longer, so dynamic here
definitely needs some fixes.
On Dec 16, 2012, at 2:53 PM, Donald Stufft wrote:
there might not be a choice here as the QODBC driver might not support some of
the operations that table reflection needs. It's also critical that this
database is in fact Microsoft SQL Server, and not something more like Access,
because it won't work at all if not.
You'd want to set
On Dec 18, 2012, at 3:50 PM, Gerald Thibault wrote:
I've attached an example showing the issue. I have a class, Test, with a
single polymorphic subclass, TestOne. I also have TestChild, which has a fk
to Test, and a relation using that fk.
When I execute:
session.query(TestChild) \
seems like it's hitting some revised rules for evaluating clauses in a boolean
context, as pprint attempts to sort the contents of the Mapper object's
__dict__.In particular, you can't say bool(Column('x') Column('y'))
anymore, in 0.7 it would basically make a random guess as to what the
Thanks Audrius,
Your answer was very helpful, is exactly what I was looking.
2012/12/17 Audrius Kažukauskas audr...@neutrino.lt
On Mon, 2012-12-17 at 11:54:20 -0800, Gabriel Pozo wrote:
I am a new user of sqlalchemy, I need to know how I can filter the
weekdays, to exclude Saturdays and
13 matches
Mail list logo