437 lines
22 KiB
HTML
437 lines
22 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
||
<!DOCTYPE html SYSTEM "about:legacy-compat">
|
||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
||
<head>
|
||
<title>phpDox - Query\AbstractQueryBuilder</title>
|
||
<link rel="stylesheet" type="text/css" href="../css/style.css" media="screen"/>
|
||
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
|
||
</head>
|
||
<body>
|
||
<nav class="topnav">
|
||
<ul>
|
||
<li>
|
||
<div class="logo"><span>/**</span>phpDox</div>
|
||
</li>
|
||
<li class="separator">
|
||
<a href="../index.html">Overview</a>
|
||
</li>
|
||
<li class="separator">
|
||
<a href="../namespaces.html">Namespaces</a>
|
||
</li>
|
||
<li>
|
||
<a href="../interfaces.html">Interfaces</a>
|
||
</li>
|
||
<li>
|
||
<a href="../classes.html">Classes</a>
|
||
</li>
|
||
<li class="separator">
|
||
<a href="../source/index.html">Source</a>
|
||
</li>
|
||
</ul>
|
||
</nav>
|
||
<div id="mainstage">
|
||
<div class="box">
|
||
<ul class="breadcrumb">
|
||
<li>
|
||
<a href="../index.html">Overview</a>
|
||
</li>
|
||
<li class="separator">
|
||
<a href="../classes.html">Classes</a>
|
||
</li>
|
||
<li class="separator">
|
||
<a href="../classes.html#Query">Query</a>
|
||
</li>
|
||
<li class="separator">AbstractQueryBuilder</li>
|
||
</ul>
|
||
</div>
|
||
<nav class="box">
|
||
<ul>
|
||
<li>
|
||
<a href="#introduction">Introduction</a>
|
||
</li>
|
||
<li>
|
||
<a href="#synopsis">Synopsis</a>
|
||
</li>
|
||
<li>
|
||
<a href="#coverage">Coverage</a>
|
||
</li>
|
||
<li>
|
||
<a href="#constants">Constants</a>
|
||
</li>
|
||
<li>
|
||
<a href="#members">Members</a>
|
||
</li>
|
||
<li>
|
||
<a href="#methods">Methods</a>
|
||
</li>
|
||
<li>
|
||
<a href="#history">History</a>
|
||
</li>
|
||
<li>
|
||
<a href="../source/Query/AbstractQueryBuilder.php.html#line24">Source</a>
|
||
</li>
|
||
</ul>
|
||
</nav>
|
||
<section>
|
||
<h1 id="introduction"><small>Query\</small>AbstractQueryBuilder</h1>
|
||
<h4>Abstract Class for internal implementation methods of the Query Builder</h4>
|
||
<p/>
|
||
<ul/>
|
||
<h2 id="synopsis">Synopsis</h2>
|
||
<div class="synopsis">class AbstractQueryBuilder
|
||
{<br/><ul class="none"><li>// constants</li><li>const KEY = 0;</li><li>const VALUE = 1;</li><li>const BOTH = 2;</li></ul><ul class="none"><li>// members</li><li>protected string <a href="#members">$select_string</a> =
|
||
'';
|
||
</li><li>protected <a href="#members">$from_string</a>;
|
||
</li><li>protected <a href="#members">$set_string</a>;
|
||
</li><li>protected <a href="#members">$order_string</a>;
|
||
</li><li>protected <a href="#members">$group_string</a>;
|
||
</li><li>protected array <a href="#members">$set_array_keys</a> =
|
||
;
|
||
</li><li>protected array <a href="#members">$order_array</a> =
|
||
;
|
||
</li><li>protected array <a href="#members">$group_array</a> =
|
||
;
|
||
</li><li>protected array <a href="#members">$values</a> =
|
||
;
|
||
</li><li>protected array <a href="#members">$where_values</a> =
|
||
;
|
||
</li><li>protected <a href="#members">$limit</a>;
|
||
</li><li>protected <a href="#members">$offset</a>;
|
||
</li><li>protected array <a href="#members">$query_map</a> =
|
||
;
|
||
</li><li>protected <a href="#members">$having_map</a>;
|
||
</li><li>public string <a href="#members">$conn_name</a> =
|
||
"";
|
||
</li><li>public <a href="#members">$queries</a>;
|
||
</li><li>protected <span title="Query\bool">bool</span> <a href="#members">$explain</a>;
|
||
</li><li>public <span title="Query\Driver_Interface">Driver_Interface</span> <a href="#members">$db</a>;
|
||
</li><li>public <span title="Query\Query_Parser">Query_Parser</span> <a href="#members">$parser</a>;
|
||
</li><li>public <span title="\Query\Driver\Abstract_Util">Abstract_Util</span> <a href="#members">$util</a>;
|
||
</li><li>public <span title="\Query\Driver\SQL_Interface">SQL_Interface</span> <a href="#members">$sql</a>;
|
||
</li></ul><ul class="none"><li>// methods</li><li>protected array <a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_mixed_set.html">_mixed_set</a>()
|
||
</li><li>protected string <a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_select.html">_select</a>()
|
||
</li><li>protected string <a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_get_compile.html">_get_compile</a>()
|
||
</li><li>protected Query_Builder <a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_like.html">_like</a>()
|
||
</li><li>protected Query_Builder <a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_having.html">_having</a>()
|
||
</li><li>protected array <a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_where.html">_where</a>()
|
||
</li><li>protected Query_Builder <a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_where_string.html">_where_string</a>()
|
||
</li><li>protected Query_Builder <a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_where_in.html">_where_in</a>()
|
||
</li><li>protected PDOStatement <a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_run.html">_run</a>()
|
||
</li><li>protected void <a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_append_map.html">_append_map</a>()
|
||
</li><li>protected void <a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_append_query.html">_append_query</a>()
|
||
</li><li>protected string <a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_compile_type.html">_compile_type</a>()
|
||
</li><li>protected string <a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_compile.html">_compile</a>()
|
||
</li></ul>
|
||
|
||
}<br/></div>
|
||
<h2 id="coverage">Coverage</h2>
|
||
<table class="styled">
|
||
<tr>
|
||
<td>Methods</td>
|
||
<td class="percent">100%</td>
|
||
<td class="nummeric">13 / 13</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Lines</td>
|
||
<td class="percent">100%</td>
|
||
<td class="nummeric">153 / 153</td>
|
||
</tr>
|
||
</table>
|
||
<h2 id="constants">Constants</h2>
|
||
<table class="styled">
|
||
<thead>
|
||
<tr>
|
||
<th>Name</th>
|
||
<th>Value</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td id="KEY">KEY</td>
|
||
<td>0</td>
|
||
</tr>
|
||
<tr>
|
||
<td id="VALUE">VALUE</td>
|
||
<td>1</td>
|
||
</tr>
|
||
<tr>
|
||
<td id="BOTH">BOTH</td>
|
||
<td>2</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<h2 id="members">Members</h2>
|
||
<div class="styled members">
|
||
<h4>protected</h4>
|
||
<ul class="members">
|
||
<li id="explain"><strong>$explain</strong>
|
||
—
|
||
<a title="Query\bool" href="../classes/Query_bool.html">Query\bool</a><br/><span class="indent">Whether to do only an explain on the query</span></li>
|
||
<li id="from_string"><strong>$from_string</strong>
|
||
—
|
||
string<br/><span class="indent">Compiled 'from' clause</span></li>
|
||
<li id="group_array"><strong>$group_array</strong>
|
||
—
|
||
array<br/><span class="indent">Key/val pairs for group by clause</span></li>
|
||
<li id="group_string"><strong>$group_string</strong>
|
||
—
|
||
string<br/><span class="indent">Group by clause</span></li>
|
||
<li id="having_map"><strong>$having_map</strong>
|
||
—
|
||
array<br/><span class="indent">Map for having clause</span></li>
|
||
<li id="limit"><strong>$limit</strong>
|
||
—
|
||
string<br/><span class="indent">Value for limit string</span></li>
|
||
<li id="offset"><strong>$offset</strong>
|
||
—
|
||
int<br/><span class="indent">Value for offset in limit string</span></li>
|
||
<li id="order_array"><strong>$order_array</strong>
|
||
—
|
||
array<br/><span class="indent">Key/val pairs for order by clause</span></li>
|
||
<li id="order_string"><strong>$order_string</strong>
|
||
—
|
||
string<br/><span class="indent">Order by clause</span></li>
|
||
<li id="query_map"><strong>$query_map</strong>
|
||
—
|
||
array<br/><span class="indent">Query component order mapping for complex select queries</span></li>
|
||
<li id="select_string"><strong>$select_string</strong>
|
||
—
|
||
string<br/><span class="indent">Compiled 'select' clause</span></li>
|
||
<li id="set_array_keys"><strong>$set_array_keys</strong>
|
||
—
|
||
array<br/><span class="indent">Keys for insert/update statement</span></li>
|
||
<li id="set_string"><strong>$set_string</strong>
|
||
—
|
||
string<br/><span class="indent">Compiled arguments for insert / update</span></li>
|
||
<li id="values"><strong>$values</strong>
|
||
—
|
||
array<br/><span class="indent">Values to apply to prepared statements</span></li>
|
||
<li id="where_values"><strong>$where_values</strong>
|
||
—
|
||
array<br/><span class="indent">Values to apply to where clauses in prepared statements</span></li>
|
||
</ul>
|
||
<h4>public</h4>
|
||
<ul class="members">
|
||
<li id="conn_name"><strong>$conn_name</strong>
|
||
—
|
||
string<br/><span class="indent">Convenience property for connection management</span></li>
|
||
<li id="db"><strong>$db</strong>
|
||
—
|
||
<a title="Query\Driver_Interface" href="../classes/Query_Driver_Interface.html">Query\Driver_Interface</a><br/><span class="indent">The current database driver</span></li>
|
||
<li id="parser"><strong>$parser</strong>
|
||
—
|
||
<a title="Query\Query_Parser" href="../classes/Query_Query_Parser.html">Query\Query_Parser</a><br/><span class="indent">Query parser class instance</span></li>
|
||
<li id="queries"><strong>$queries</strong>
|
||
—
|
||
array<br/><span class="indent">List of queries executed</span></li>
|
||
<li id="sql"><strong>$sql</strong>
|
||
—
|
||
<a title="\Query\Driver\SQL_Interface" href="../classes/_Query_Driver_SQL_Interface.html">\Query\Driver\SQL_Interface</a><br/><span class="indent">Alias to driver sql class</span></li>
|
||
<li id="util"><strong>$util</strong>
|
||
—
|
||
<a title="\Query\Driver\Abstract_Util" href="../classes/_Query_Driver_Abstract_Util.html">\Query\Driver\Abstract_Util</a><br/><span class="indent">Alias to driver util class</span></li>
|
||
</ul>
|
||
</div>
|
||
<h2 id="methods">Methods</h2>
|
||
<div class="styled">
|
||
<h4>protected</h4>
|
||
<ul>
|
||
<li id="_append_map"><a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_append_map.html">_append_map()</a>
|
||
— Add an additional set of mapping pairs to a internal map</li>
|
||
<li id="_append_query"><a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_append_query.html">_append_query()</a>
|
||
— Convert the prepared statement into readable sql</li>
|
||
<li id="_compile"><a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_compile.html">_compile()</a>
|
||
— String together the sql statements for sending to the db</li>
|
||
<li id="_compile_type"><a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_compile_type.html">_compile_type()</a>
|
||
— Sub-method for generating sql strings</li>
|
||
<li id="_get_compile"><a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_get_compile.html">_get_compile()</a>
|
||
— Helper function for returning sql strings</li>
|
||
<li id="_having"><a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_having.html">_having()</a>
|
||
— Simplify building having clauses</li>
|
||
<li id="_like"><a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_like.html">_like()</a>
|
||
— Simplify 'like' methods</li>
|
||
<li id="_mixed_set"><a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_mixed_set.html">_mixed_set()</a>
|
||
— Set values in the class, with either an array or key value pair</li>
|
||
<li id="_run"><a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_run.html">_run()</a>
|
||
— Executes the compiled query</li>
|
||
<li id="_select"><a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_select.html">_select()</a>
|
||
— Method to simplify select_ methods</li>
|
||
<li id="_where"><a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_where.html">_where()</a>
|
||
— Do all the repeditive stuff for where/having type methods</li>
|
||
<li id="_where_in"><a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_where_in.html">_where_in()</a>
|
||
— Simplify where_in methods</li>
|
||
<li id="_where_string"><a title="Query\AbstractQueryBuilder" href="../classes/Query_AbstractQueryBuilder/_where_string.html">_where_string()</a>
|
||
— Simplify generating where string</li>
|
||
</ul>
|
||
</div>
|
||
<h2 id="history">History</h2>
|
||
<ul class="styled history">
|
||
<li>
|
||
<h3>2015-11-10T10:12:23-05:00 (commit #<span title="b5a141ffc741a4f271bf4e110814ac8861a2312f">b5a141f</span>)</h3>
|
||
<div>
|
||
<p>
|
||
Author: Timothy J Warren (tim@timshomepage.net) /
|
||
Commiter: Timothy J Warren (tim@timshomepage.net)
|
||
</p>
|
||
<pre class="wrapped">Make class names Pascal Case</pre>
|
||
</div>
|
||
</li>
|
||
<li>
|
||
<h3>2015-11-10T09:24:18-05:00 (commit #<span title="39cd2ecff8ae1c8c6bd587a5108ac30fe2bd8baf">39cd2ec</span>)</h3>
|
||
<div>
|
||
<p>
|
||
Author: Timothy J Warren (tim@timshomepage.net) /
|
||
Commiter: Timothy J Warren (tim@timshomepage.net)
|
||
</p>
|
||
<pre class="wrapped">Fix borkeed tests</pre>
|
||
</div>
|
||
</li>
|
||
<li>
|
||
<h3>2015-07-31T10:24:34-04:00 (commit #<span title="056e8bf6d9f78943b397010657f29b43b45e9e12">056e8bf</span>)</h3>
|
||
<div>
|
||
<p>
|
||
Author: Timothy J. Warren (tim@timshomepage.net) /
|
||
Commiter: Timothy J. Warren (tim@timshomepage.net)
|
||
</p>
|
||
<pre class="wrapped">Re-add some missing tests, and update README</pre>
|
||
</div>
|
||
</li>
|
||
<li>
|
||
<h3>2015-07-30T16:40:30-04:00 (commit #<span title="225017adeeeaa26d1348397124d2a4469124506f">225017a</span>)</h3>
|
||
<div>
|
||
<p>
|
||
Author: Timothy J. Warren (tim@timshomepage.net) /
|
||
Commiter: Timothy J. Warren (tim@timshomepage.net)
|
||
</p>
|
||
<pre class="wrapped">Lots of refactoring -- accessors/mutators instead of direct access, reduce query builder test database connections, and simplify some logic</pre>
|
||
</div>
|
||
</li>
|
||
<li>
|
||
<h3>2015-07-30T13:13:12-04:00 (commit #<span title="8669fcc4be52c007f6471283cd57c77aad50a3cb">8669fcc</span>)</h3>
|
||
<div>
|
||
<p>
|
||
Author: Timothy J. Warren (tim@timshomepage.net) /
|
||
Commiter: Timothy J. Warren (tim@timshomepage.net)
|
||
</p>
|
||
<pre class="wrapped">Some scrutinizer fixes</pre>
|
||
</div>
|
||
</li>
|
||
<li>
|
||
<h3>2015-07-29T16:51:17-04:00 (commit #<span title="8511c6a445e935547b59a1d3736e7c08cf9633ea">8511c6a</span>)</h3>
|
||
<div>
|
||
<p>
|
||
Author: Timothy J. Warren (tim@timshomepage.net) /
|
||
Commiter: Timothy J. Warren (tim@timshomepage.net)
|
||
</p>
|
||
<pre class="wrapped">Move library into src folder, fix simpletest test runner</pre>
|
||
</div>
|
||
</li>
|
||
<li>
|
||
<h3>2015-07-16T16:56:13-04:00 (commit #<span title="bfc3ea33ca5c8ddc8500b3d2d8857b9f95304417">bfc3ea3</span>)</h3>
|
||
<div>
|
||
<p>
|
||
Author: Timothy J. Warren (tim@timshomepage.net) /
|
||
Commiter: Timothy J. Warren (tim@timshomepage.net)
|
||
</p>
|
||
<pre class="wrapped">Reorganize drivers into a more modern layout</pre>
|
||
</div>
|
||
</li>
|
||
<li>
|
||
<h3>2014-11-07T12:21:49-05:00 (commit #<span title="6c757f1cb1a9496ca655bb1019276126d23ddb85">6c757f1</span>)</h3>
|
||
<div>
|
||
<p>
|
||
Author: Timothy J. Warren (tim@timshomepage.net) /
|
||
Commiter: Timothy J. Warren (tim@timshomepage.net)
|
||
</p>
|
||
<pre class="wrapped">Update docs</pre>
|
||
</div>
|
||
</li>
|
||
<li>
|
||
<h3>2014-11-07T12:14:46-05:00 (commit #<span title="675581823288b094043f6c4f7d60f79573d361b2">6755818</span>)</h3>
|
||
<div>
|
||
<p>
|
||
Author: Timothy J. Warren (tim@timshomepage.net) /
|
||
Commiter: Timothy J. Warren (tim@timshomepage.net)
|
||
</p>
|
||
<pre class="wrapped">Fix some issues with multiple array items in where statements</pre>
|
||
</div>
|
||
</li>
|
||
<li>
|
||
<h3>2014-08-08T13:48:20-04:00 (commit #<span title="dd672df81d8f6e423b4b8ed6d7b8077306a191a3">dd672df</span>)</h3>
|
||
<div>
|
||
<p>
|
||
Author: Timothy J. Warren (tim@timshomepage.net) /
|
||
Commiter: Timothy J. Warren (tim@timshomepage.net)
|
||
</p>
|
||
<pre class="wrapped">Reorganize classes to autoload by namespace</pre>
|
||
</div>
|
||
</li>
|
||
<li>
|
||
<h3>2014-07-15T11:01:47-04:00 (commit #<span title="2ae206462d3dc498e7ff8e057ff7d1f12faf61b5">2ae2064</span>)</h3>
|
||
<div>
|
||
<p>
|
||
Author: Timothy J. Warren (tim@timshomepage.net) /
|
||
Commiter: Timothy J. Warren (tim@timshomepage.net)
|
||
</p>
|
||
<pre class="wrapped">Fix some very minor code quality issues</pre>
|
||
</div>
|
||
</li>
|
||
<li>
|
||
<h3>2014-06-30T11:14:37-04:00 (commit #<span title="618a561c71c96adb720b86aa1450885bd913c245">618a561</span>)</h3>
|
||
<div>
|
||
<p>
|
||
Author: Timothy J. Warren (tim@timshomepage.net) /
|
||
Commiter: Timothy J. Warren (tim@timshomepage.net)
|
||
</p>
|
||
<pre class="wrapped">Fix minor issue of where clause disappearing after a number of joins</pre>
|
||
</div>
|
||
</li>
|
||
<li>
|
||
<h3>2014-06-09T17:02:14-04:00 (commit #<span title="1abd835f47cb9b1b8640655e49f3c1e14d15aacc">1abd835</span>)</h3>
|
||
<div>
|
||
<p>
|
||
Author: Timothy J. Warren (tim@timshomepage.net) /
|
||
Commiter: Timothy J. Warren (tim@timshomepage.net)
|
||
</p>
|
||
<pre class="wrapped">Attempting some Quercus compatibility, test-suite runs with simpletest as well as PHPUnit</pre>
|
||
</div>
|
||
</li>
|
||
<li>
|
||
<h3>2014-04-28T16:41:46-04:00 (commit #<span title="6a38213a62c63da11cb4df1b6b82a264199dd6ef">6a38213</span>)</h3>
|
||
<div>
|
||
<p>
|
||
Author: Timothy J. Warren (tim@timshomepage.net) /
|
||
Commiter: Timothy J. Warren (tim@timshomepage.net)
|
||
</p>
|
||
<pre class="wrapped">Improve some tests and docblocks</pre>
|
||
</div>
|
||
</li>
|
||
<li>
|
||
<h3>2014-04-24T21:29:40-04:00 (commit #<span title="315dc5e1c51eac9691273de861c1c3fa11585bf6">315dc5e</span>)</h3>
|
||
<div>
|
||
<p>
|
||
Author: Timothy J. Warren (tim@timshomepage.net) /
|
||
Commiter: Timothy J. Warren (tim@timshomepage.net)
|
||
</p>
|
||
<pre class="wrapped">method shortening</pre>
|
||
</div>
|
||
</li>
|
||
<li>
|
||
<h3>2014-04-24T20:14:19-04:00 (commit #<span title="2ae38bea8816a61688dfaedcd8195ad01ca6adfe">2ae38be</span>)</h3>
|
||
<div>
|
||
<p>
|
||
Author: Timothy J. Warren (tim@timshomepage.net) /
|
||
Commiter: Timothy J. Warren (tim@timshomepage.net)
|
||
</p>
|
||
<pre class="wrapped">Remove some variable setting logic duplication</pre>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</section>
|
||
</div>
|
||
<footer>
|
||
<span>Generated using phpDox 0.8.2-dev - Copyright (C) 2010 - 2015 by Arne Blankerts</span>
|
||
</footer>
|
||
</body>
|
||
</html>
|