diff options
author | Simon Holywell <[email protected]> | 2013-01-24 11:35:23 +0000 |
---|---|---|
committer | Simon Holywell <[email protected]> | 2013-01-24 11:35:23 +0000 |
commit | 8859b44551a95c098ba5687f1785c4d4e3ed8b91 (patch) | |
tree | f7cf26b8053834b5f5c182805e02e0e6ae55f240 /docs | |
parent | 99ce402a29efbc5e13dd0279bf9fc9b127f020c9 (diff) |
Multi-connections: Code style and docs
Diffstat (limited to 'docs')
-rw-r--r-- | docs/connections.rst | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/docs/connections.rst b/docs/connections.rst index 18db804..d34d6a7 100644 --- a/docs/connections.rst +++ b/docs/connections.rst @@ -51,10 +51,16 @@ query on *any* connection. :: + // Using default connection, explicitly + $person = ORM::for_table('person')->find_one(5); + + // Using named connection + $person = ORM::for_table('different_person', 'remote')->find_one(5); + // Last query on *any* connection ORM::get_last_query(); // returns query on 'different_person' using 'remote' - // returns query on 'person' using default + // returns query on 'person' using default by passing in the connection name ORM::get_last_query(ORM::DEFAULT_CONNECTION); Notes @@ -64,7 +70,7 @@ Notes one connection has logging set to ``true`` and the other does not, only queries from the logged connection will be available via ``ORM::get_last_query()`` and ``ORM::get_query_log()``. -* A new method has been added, ``ORM::get_connection_keys()``, which returns +* A new method has been added, ``ORM::get_connection_names()``, which returns an array of connection names. * Caching *should* work with multiple connections (remember to turn caching on for each connection), but the unit tests are not robust. Please report |