Update docs and readme

This commit is contained in:
Timothy Warren 2012-11-09 15:01:41 -05:00
parent 5a626629d7
commit 4664111ce4
35 changed files with 62 additions and 40 deletions

View File

@ -38,11 +38,33 @@ Create a connection array or object similar to this:
// Only required
// SQLite or Firebird
'file' => '/path/to/db/file',
// Optional paramaters
'prefix' => 'tbl_', // Database table prefix
'alias' => 'old' // Connection name for the Query function
);
$db = Query($params);
The parameters required depend on the database.
### Query function
You can use the `Query()` function as a reference to the last connected database. E.g.
Query()->get('table_name');
or
$result = Query()->query($sql);
If the `alias` key is set in the parameters, you can refer to a specific database connection
// Set the alias in the connection parameters
$params['alias'] = 'old';
// Connect to the legacy database
Query('old')->query($sql);
### Running Queries
Query uses the same interface as CodeIgniter's [Active Record class](http://codeigniter.com/user_guide/database/active_record.html). However, it does not implement the `insert_batch`, `update_batch` or caching methods.

View File

@ -219,7 +219,7 @@
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -219,7 +219,7 @@
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -757,7 +757,7 @@ the connection/database</h2>
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -244,7 +244,7 @@ specified table</h2>
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -210,7 +210,7 @@
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -941,7 +941,7 @@ the last query executed</h2>
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -505,7 +505,7 @@ the query</h2>
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -234,7 +234,7 @@
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -213,7 +213,7 @@
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -977,7 +977,7 @@ the connection/database</h2>
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -239,7 +239,7 @@
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -209,7 +209,7 @@
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -979,7 +979,7 @@ the connection/database</h2>
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -234,7 +234,7 @@
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -204,7 +204,7 @@
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -979,7 +979,7 @@ the connection/database</h2>
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -234,7 +234,7 @@
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -209,7 +209,7 @@
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -1361,7 +1361,7 @@ passed array with key / value pairs</h2>
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -145,7 +145,7 @@
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -994,7 +994,7 @@ method if the database does not support 'TRUNCATE';</h2>
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -234,7 +234,7 @@
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -209,7 +209,7 @@
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -68,7 +68,7 @@
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -236,7 +236,7 @@
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -65,7 +65,7 @@
</script><div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -146,7 +146,7 @@
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -333,7 +333,7 @@ instantiates the specific db driver</p>
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -68,7 +68,7 @@
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -95,7 +95,7 @@
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -212,7 +212,7 @@ data-fetching methods</p>
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -140,7 +140,7 @@ instantiates the specific db driver</p>
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -355,7 +355,7 @@ instantiates the specific db driver</p>
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a2</a> and<br>
generated on 2012-11-08T14:31:05-05:00.<br></footer></div>
generated on 2012-11-09T15:01:27-05:00.<br></footer></div>
</div>
</body>
</html>

View File

@ -2469,7 +2469,7 @@ in place of the get() method]]></description>
</argument>
</function>
</file>
<file path="common.php" hash="c9726ca0e20463be7e405ffc7c8cf5a4" package="Query">
<file path="common.php" hash="ee98955dddef16a2b1e1e91a89795860" package="Query">
<docblock line="2">
<description><![CDATA[Query]]></description>
<long-description><![CDATA[<p>Free Query Builder / Database Abstraction Layer</p>]]></long-description>
@ -2543,22 +2543,22 @@ with array_map and glob]]></description>
<type/>
</argument>
</function>
<function namespace="default" line="98" package="Query">
<function namespace="default" line="100" package="Query">
<name>Query</name>
<type>function</type>
<docblock line="92">
<docblock line="94">
<description><![CDATA[Connection function]]></description>
<long-description><![CDATA[]]></long-description>
<tag line="92" name="param" description="" type="mixed" variable="$params">
<tag line="94" name="param" description="" type="mixed" variable="$params">
<type by_reference="false">mixed</type>
</tag>
<tag line="92" name="return" description="" type="\Query_Builder">
<tag line="94" name="return" description="" type="\Query_Builder">
<type by_reference="false">\Query_Builder</type>
</tag>
</docblock>
<argument line="98">
<argument line="100">
<name>$params</name>
<default><![CDATA[]]></default>
<default><![CDATA['']]></default>
<type/>
</argument>
</function>