[sqlalchemy] Re: For a better understanding of merge()

2014-07-24 Thread Bao Niu
Could somebody help clarify this difference between *reconciling* and *stamp*(load=True vs. load=False) with session.merge(), ideally by an example? Thanks very much. On Thursday, July 17, 2014 8:01:42 PM UTC-7, Bao Niu wrote: If the load=True flag is left at its default, this copy process

[sqlalchemy] Re: [SQLAlchemy.Flask][2.x] OperationError unable to open databaes

2014-07-24 Thread Imk Hacked
He is explaining, here http://flask.pocoo.org/docs/patterns/sqlalchemy/ -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To

Re: [sqlalchemy] [SQLAlchemy.Flask][2.x] OperationError unable to open databaes

2014-07-24 Thread Simon King
SQLAlchemy doesn't know what database driver (sqlite/mysql/postgres etc.) to use for the string forum.db. You need to use one of the forms described at: http://docs.sqlalchemy.org/en/rel_0_9/core/engines.html#sqlite In your case, something like: app.config['SQLALCHEMY_DATABASE_URI'] =

Re: [sqlalchemy] [SQLAlchemy.Flask][2.x] OperationError unable to open databaes

2014-07-24 Thread Jonathan Vanasco
Adding to what Simon said, the Flask docs use a database placed in `/tmp`, not in the top-level root '/` of the computer. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an

Re: [sqlalchemy] after_bulk_update table/column info?

2014-07-24 Thread clarkie
Hi, I am trying to do something similar - I am using the versioning example from here - http://docs.sqlalchemy.org/en/rel_0_7/orm/examples.html?highlight=examples#versioned-objects But instead of using before_flush I want to use after_builk_insert. This is because we use update query in our

Re: [sqlalchemy] after_bulk_update table/column info?

2014-07-24 Thread clarkie
Hi, I am trying to do something similar - I am using the versioning example from here - http://docs.sqlalchemy.org/en/rel_0_7/orm/examples.html?highlight=examples#versioned-objects But instead of using before_flush I want to use after_bulk_update. This is because we use update query in our

Re: [sqlalchemy] Belonging to a session vs being in the session

2014-07-24 Thread Michael Bayer
On Jul 24, 2014, at 3:25 AM, George Sakkis george.sak...@gmail.com wrote: I'm a bit confused about the difference between (a) an instance belonging to a session as determined by object_session(obj) and (b) being in the session as determined by obj in session. To illustrate: from

Re: [sqlalchemy] after_bulk_update table/column info?

2014-07-24 Thread clarkie
Thanks for your quick response. Sorry, my question was not very clear. This is the version library I am using - https://github.com/zzzeek/sqlalchemy/blob/master/examples/versioned_history/history_meta.py In this I want to replace the before_flush with after_bulk_update - since both have session

Re: [sqlalchemy] after_bulk_update table/column info?

2014-07-24 Thread Michael Bayer
I think I got your question fully, and I know what example you're using. The example relies on SQL rows being represented by objects that are in memory in Python. When you use query().update(), this is not the case; a SQL string is emitted to the database and there doesn't need to be any

Re: [sqlalchemy] after_bulk_update table/column info?

2014-07-24 Thread clarkie
Great! yes, your comments made more sense after reading more of the extensive documentation. thanks again..I ended up doing the same with a slight variation - @event.listens_for(session, ‘after_bulk_update') def after_bulk_update(session, query, query_context, result): (still using 0.7)

[sqlalchemy] Re: [SQLAlchemy.Flask][2.x] OperationError unable to open databaes

2014-07-24 Thread Imk Hacked
So, I know this but it is doesn't work. I am trying on the Windows 8. Where is the *sqlite:*? How is it work? Maybe I want to know how is it work. Because It can't create database so show us *unable connect* error. 21 Temmuz 2014 Pazartesi 21:58:33 UTC+3 tarihinde Imk Hacked yazdı: Hello