just assign to the same variable name.
query = guery.filter(Foo.x == 1)
The generative queries are a feature.
Making the queries mutable would allow functions to modify queries and
complicate debugging.
You can have functions return the modified query, or have functions return
the expressions
You really want to test this yourself on YOUR setup. I know my code is
sending a single execute for this scenario, but I'm not hitting any speed
bumps. Set echo to True and see what happens. (a_table.metadata.bind.echo
= True). Then set it back to False. You can change echo on the fly.
While primary_key is specified twice, once for each column, there is only
ONE primary key which is a composite.
You need to use ForeignKeyConstraint at the Table level to specify a
composite foreign key.
You need to provide two lists, the local table columns, and the
corresponding foreign
I should probably remove my fingers from the keyboard since I have so
little experience with mssql, but here goes:
Isn't the . only special in field and table names?
If that's where the user input was used, I think it's the programmer's
responsibility to validate/sanitize the input. A plugin
Would it make sense to add a __nonzero__ method to ResultProxy that
was tied to the rowcount?
def __nonzero__(self):
return bool(self.rowcount)
This would allow code like
if results:
process(results)
I was surprised when this did not work.
--
You received this message because you are
On Oct 14, 11:02 am, Michael Bayer mike...@zzzcomputing.com wrote:
On Oct 14, 2011, at 10:38 AM, Lloyd Kvam wrote:
Would it make sense to add a __nonzero__ method to ResultProxy that
was tied to the rowcount?
def __nonzero__(self):
return bool(self.rowcount)
This would allow
On Dec 17, 1:21 pm, Michael Bayer mike...@zzzcomputing.com wrote:
Doesn't seem like anyone has any thoughts here. Its certainly not something
I've tried, but the general area of study here is multi-master replication:
http://en.wikipedia.org/wiki/Multi-master_replication. The various
(Sorry, I mis-clicked before.)
I've used MySQL replication for sharing data from multiple databases.
You can organize the servers in a loop and configure them to pass
along the changes replicated by other servers. Of course if any
server fails, the loop is broken until that server is running
On Oct 14, 5:48 pm, Timmy Chan timmy.cha...@gmail.com wrote:
sorry if this is addressed, but i'm running
apache2
SQLAlchemy 0.5.8
Pylons 1.0
Python 2.5.2
and on a simple page (just retrieve data from DB), I get:
Error - class 'sqlalchemy.exc.OperationalError': (OperationalError) (2006,
I've just discovered that some tinyint (8-bit) fields have had their
values limited to 0 and 1 regardless of actual value supplied. Digging
through the documentation, I've learned that when MySQL tables are
reflected, tinyint(1) fields are processed as booleans.
I did not find emails from others
a fairly straight-forward way to have parallel independent
remote databases (think retail stores) and a central database.
--
Lloyd Kvam
Venix Corp
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group
11 matches
Mail list logo