How to access _database from query?
Presumably you would know something about the database that's executing the queries, right? Or is this library restricted to operating on queries in absence of any other context? The `_database` attr is fine to use, I don't anticipate it changing any time soon. @coleifer 

I'm writing a library that is to be used by other applications. The library doesn't know what database the user will use.

I need different behavior for postgres vs mysql. This function will return the updated result set if it is in postgres, or it will query the updated table and return the result if it is mysql.

I can use the `_database` attribute, but I suppose I would rather not rely on a private attribute if possible.

A Database Proxy cannot be used for this case, could it? Check out this example from the `playhouse` on how I've differentiated functionality by db: https://github.com/coleifer/peewee/blob/master/playhouse/kv.py#L16-L56

I would recommend using `_database` and then looking up the corresponding property, e.g. `if query._database.returning_clause:`. Common properties are listed in the `class Database(...):` in peewee.py.
I have a library function that needs to check the information about the `db` before taking action on a query:

```
def execute_update(query):
    if _is_returning_supported(query._database):
        return _execute_returning_dml(query)

    return _execute_nonreturning_update(query)
```

So far the only way I know how to do it is by requiring the `db` to be passed as a parameter to my function, or by accessing the private `query._database`.

Is there another way? If not, can we add a public member?