At present, I use the following way to find whether db contains a
record or not. I know that this will create MyModel instance and fetch
the db info and set the mymodel with db values if the record exists.
Are there any lighter way to check it. just a simple boolean return?
And id is primary key
Thanks Michael. dialects works great..
On Feb 26, 1:03 pm, Michael Trier mtr...@gmail.com wrote:
Hello,
On Feb 26, 2010, at 2:32 AM, karikris...@gmail.com wrote:
I could not get from sqlalchemy.databases.mysql import MSBinary
working on my windows XP as well as my Ubuntu 32 and 64 bit
I could not get from sqlalchemy.databases.mysql import MSBinary
working on my windows XP as well as my Ubuntu 32 and 64 bit machines.
Are they dropped?
Here are summary
ActivePython 2.6.0.0 (ActiveState Software Inc.) based on
Python 2.6 (r26:66714, Nov 11 2008, 10:21:19) [MSC v.1500 32 bit
...@zzzcomputing.com wrote:
On Dec 23, 2009, at 10:11 PM, karikris...@gmail.com wrote:
I have this scenario.
I have two libraries developed independently using SQLAlchemy. each
library has its own model, own session connection. Now I have
application using those two libraries. Application has its
associated with the session before, it won't add
it again.
Here's sample code I use:
def save(self, flush=False):
self.session.add(self)
if flush:
self.session.flush()
def delete(self):
self.session.delete(self)
Serge.
karikris...@gmail.com wrote:
I am using
I have the follwing setting and I create engine from config.
sqlalchemy.url : mysql://sfdev:sf...@localhost:3306/sfdev
sqlalchemy.pool_recycle : 3600
sqlalchemy.convert_unicode : true
I am getting the following error. Seems like recycle required, but I
have mentioned recycle in the
I am using declarative style models and very much happy about it.
I see __table__ contains the classic sa.Table reference for advanced
queries. Like that do we have session is attached to the model class
derived from declarative_base?
I am very much curious to make django/rail style save,
I have this scenario.
I have two libraries developed independently using SQLAlchemy. each
library has its own model, own session connection. Now I have
application using those two libraries. Application has its own models.
application is having its own session.
Data stored into the same database