diff options
author | Tom Gregory <[email protected]> | 2013-01-22 01:39:15 -0500 |
---|---|---|
committer | Tom Gregory <[email protected]> | 2013-01-22 01:39:15 -0500 |
commit | a49bd88e715ec77355c26ac07225fc9807b3640f (patch) | |
tree | 35cb47ff821f2ab1b5883e04c56b605f3a269b51 /docs | |
parent | 98b806652bab694797c0d09b41f198b7bf6f2c4c (diff) |
Apparently not all files were included in previous commit.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/connections.rst | 22 | ||||
-rw-r--r-- | docs/index.rst | 2 |
2 files changed, 16 insertions, 8 deletions
diff --git a/docs/connections.rst b/docs/connections.rst index ca2e32c..18db804 100644 --- a/docs/connections.rst +++ b/docs/connections.rst @@ -30,16 +30,11 @@ calls in the chain use the correct 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 - ORM::get_last_query(ORM::DEFAULT_CONNECTION); Supported Methods ^^^^^^^^^^^^^^^^^ -In each of these cases, the ``$connection_name`` parameter is optional, and is an arbitrary -key identifying the named connection. +In each of these cases, the ``$connection_name`` parameter is optional, and is +an arbitrary key identifying the named connection. * ``ORM::configure($key, $value, $connection_name)`` * ``ORM::for_table($table_name, $connection_name)`` @@ -49,6 +44,19 @@ key identifying the named connection. * ``ORM::get_last_query($connection_name)`` * ``ORM::get_query_log($connection_name)`` +Of these methods, only ``ORM::get_last_query($connection_name)`` does *not* +fallback to the default connection when no connection name is passed. +Instead, passing no connection name (or ``null``) returns the most recent +query on *any* connection. + +:: + + // Last query on *any* connection + ORM::get_last_query(); // returns query on 'different_person' using 'remote' + + // returns query on 'person' using default + ORM::get_last_query(ORM::DEFAULT_CONNECTION); + Notes ~~~~~ * **There is no support for joins across connections** diff --git a/docs/index.rst b/docs/index.rst index 44ff9ee..d4e4bb9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,7 +17,7 @@ Contents: querying models transactions - + connections Indices and tables |