Skip to content

Commit

Permalink
Add a method to get the schema collection.
Browse files Browse the repository at this point in the history
This makes mocking simpler, and doesn't force callers to construct
a Schema\Collection making a hard dependency.
  • Loading branch information
markstory committed May 26, 2013
1 parent 0711368 commit 603de3c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/Cake/Database/Connection.php
Expand Up @@ -243,6 +243,15 @@ public function newQuery() {
return new Query($this);
}

/**
* Get a Schema\Collection object for this connection.
*
* @return Cake\Database\Schema\Collection
*/
public function schemaCollection() {
return new \Cake\Database\Schema\Collection($this);
}

/**
* Executes an INSERT query on the specified table
*
Expand Down

0 comments on commit 603de3c

Please sign in to comment.