mitsuhiko/flask-sqlalchemy — pull request #127 by biner (2013-05-24 06:09:04+00:00)
Title: add master/slave automatic selection when readonly sql

I have two database engine . one is readonly.
use the one when the sql is like "select ..." or "show ..."

```python
SQLALCHEMY_DATABASE_URI = 'mysql://%s:%s@%s:%s/%s' % (_DBUSER, _DBPASS,
_DBHOST, _DBPORT, _DBNAME)

SQLALCHEMY_BINDS = {
'slave': 'mysql://%s:%s@%s:%s/%s' % (_DBUSER, _DBPASS, _DBHOST_S,
_DBPORT, _DBNAME)
}
```

=========================================
This is not use in _bind_key way.

may be we count defind somethink like this:
```python
SQLALCHEMY_DATABASE_URI = 'mysql://%s:%s@%s:%s/%s' % (_DBUSER, _DBPASS,
_DBHOST, _DBPORT, _DBNAME)
SQLALCHEMY_DATABASE_URI_SLAVE = 'mysql://%s:%s@%s:%s/%s' % (_DBUSER, _DBPASS, _DBHOST_S,
_DBPORT, _DBNAME

SQLALCHEMY_BINDS = {'eg1':'...','eg2':'...'}
SQLALCHEMY_BINDS_SLAVE = {'eg1':'...','eg2':'...'}
```