Release 0.9.9

This commit is contained in:
Andrew McMillan committed 2010-04-19 12:31:14 +12:00
1 parent 3bb0c8aff1
commit 520ebb5e26
97 files changed
+5349 -1781

No files matched your search

+58 -17
View File
@@ -26,9 +26,10 @@
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The AwlDBDialect class handles</p>
<p class="short-description">The AwlDBDialect class handles support for different SQL dialects</p>
<p class="description"><p>This subpackage provides dialect specific support for PostgreSQL, and may, over time, be extended to provide support for other SQL dialects.</p><p>If you are looking for the place to add support for other SQL dialects, this is the class that you should be looking at. You might also look at the AwlDatabase class which extends this one, but these are the core capabilities which most probably need attention.</p></p>
<p class="notes">
Located in <a class="field" href="_inc---AwlDBDialect.php.html">/inc/AwlDBDialect.php</a> (line <span class="field">24</span>)
Located in <a class="field" href="_inc---AwlDBDialect.php.html">/inc/AwlDBDialect.php</a> (line <span class="field">33</span>)
</p>
@@ -110,7 +111,7 @@
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<div class="method-definition">
<img src="../../media/images/Constructor.png" alt=" "/>
<span class="method-result">AwlDBDialect</span>
<a href="#__construct" title="details" class="method-name">__construct</a>
@@ -135,6 +136,12 @@
(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$value</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$value_type</span> = <span class="var-default">null</span>])
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">The</span>
<a href="#ReplaceNamedParameters" title="details" class="method-name">ReplaceNamedParameters</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">0</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">1</span>)
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">The</span>
<a href="#ReplaceParameters" title="details" class="method-name">ReplaceParameters</a>
@@ -179,7 +186,7 @@
<span class="var-title">
<span class="var-type">mixed</span>
<span class="var-name">$db</span>
(line <span class="line-number">37</span>)
(line <span class="line-number">46</span>)
</span>
</div>
@@ -202,7 +209,7 @@
<span class="var-title">
<span class="var-type">mixed</span>
<span class="var-name">$dialect</span>
(line <span class="line-number">32</span>)
(line <span class="line-number">41</span>)
</span>
</div>
@@ -238,7 +245,7 @@
<div class="method-header">
<img src="../../media/images/Constructor.png" />
<span class="method-title">Constructor __construct</span> (line <span class="line-number">59</span>)
<span class="method-title">Constructor __construct</span> (line <span class="line-number">68</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
@@ -275,7 +282,7 @@
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">GetFields</span> (line <span class="line-number">125</span>)
<span class="method-title">GetFields</span> (line <span class="line-number">134</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
@@ -302,7 +309,7 @@
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">GetVersion</span> (line <span class="line-number">96</span>)
<span class="method-title">GetVersion</span> (line <span class="line-number">105</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
@@ -329,7 +336,7 @@
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">Quote</span> (line <span class="line-number">168</span>)
<span class="method-title">Quote</span> (line <span class="line-number">178</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
@@ -349,17 +356,51 @@
<span class="var-name">$value</span><span class="var-description">: The value to be escaped</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$value_type</span><span class="var-description">: The type of escaping desired. If blank this will be worked out from gettype($value). The special type of 'identifier' can also be used for escaping of SQL identifiers.</span> </li>
<span class="var-name">$value_type</span><span class="var-description">: The type of escaping desired. If blank this will be worked out from the type of the $value. The special type of 'identifier' can also be used for escaping of SQL identifiers.</span> </li>
</ul>
</div>
<a name="methodReplaceNamedParameters" id="ReplaceNamedParameters"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">ReplaceNamedParameters</span> (line <span class="line-number">322</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Replaces named query parameters of the form :name with appropriately escaped substitutions.</p>
<p class="description"><p>The function takes a variable number of arguments, the first is the SQL string, with replaceable ':name' characters (a la DBI). The subsequent parameters being the values to replace into the SQL string.</p><p>The values passed to the routine are analyzed for type, and quoted if they appear to need quoting. This can go wrong for (e.g.) NULL or other special SQL values which are not straightforwardly identifiable as needing quoting (or not).</p></p>
<ul class="tags">
<li><span class="field">return:</span> built query string</li>
</ul>
<div class="method-signature">
<span class="method-result">The</span>
<span class="method-name">
ReplaceNamedParameters
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">0</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">1</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">0</span><span class="var-description">: The query string with replacable ':name' identifiers</span> </li>
<li>
<span class="var-type">mixed</span>
<span class="var-name">1</span><span class="var-description">: A ':name' =&gt; 'value' hash of values to replace into the SQL string.</span> </li>
</ul>
</div>
<a name="methodReplaceParameters" id="ReplaceParameters"><!-- --></a>
<div class="evenrow">
<div class="oddrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">ReplaceParameters</span> (line <span class="line-number">258</span>)
<span class="method-title">ReplaceParameters</span> (line <span class="line-number">266</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
@@ -389,11 +430,11 @@
</div>
<a name="methodSetSearchPath" id="SetSearchPath"><!-- --></a>
<div class="oddrow">
<div class="evenrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">SetSearchPath</span> (line <span class="line-number">78</span>)
<span class="method-title">SetSearchPath</span> (line <span class="line-number">87</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
@@ -416,11 +457,11 @@
</div>
<a name="methodTranslateSQL" id="TranslateSQL"><!-- --></a>
<div class="evenrow">
<div class="oddrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">TranslateSQL</span> (line <span class="line-number">155</span>)
<span class="method-title">TranslateSQL</span> (line <span class="line-number">164</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
@@ -449,7 +490,7 @@
<p class="notes" id="credit">
Documentation generated on Thu, 25 Feb 2010 11:39:17 +1300 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
Documentation generated on Sat, 17 Apr 2010 12:32:23 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
</p>
</div></body>
</html>␍
+53 -15
View File
@@ -27,7 +27,7 @@
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Typically there will only be a single instance of the database level class in an application.</p>
<p class="notes">
Located in <a class="field" href="_inc---AwlDatabase.php.html">/inc/AwlDatabase.php</a> (line <span class="field">55</span>)
Located in <a class="field" href="_inc---AwlDatabase.php.html">/inc/AwlDatabase.php</a> (line <span class="field">58</span>)
</p>
@@ -52,7 +52,12 @@
</div>
<div class="info-box-body">
<div class="var-summary">
<div class="var-title">
<div class="var-title">
<img src="../../media/images/Variable.png" alt=" " />
<span class="var-type">mixed</span>
<a href="#$translate_all" title="details" class="var-name">$translate_all</a>
</div>
<div class="var-title">
<img src="../../media/images/Variable.png" alt=" " />
<span class="var-type">mixed</span>
<a href="#$txnstate" title="details" class="var-name">$txnstate</a>
@@ -101,7 +106,7 @@
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#PrepareTranslated" title="details" class="method-name">PrepareTranslated</a>
()
(<span class="var-type"></span>&nbsp;<span class="var-name">$statement</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$driver_options</span> = <span class="var-default">array()</span>])
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
@@ -145,6 +150,29 @@
</div>
<div class="info-box-body">
<a name="var$translate_all" id="$translate_all"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<img src="../../media/images/Variable.png" />
<span class="var-title">
<span class="var-type">mixed</span>
<span class="var-name">$translate_all</span>
= <span class="var-default"> false</span> (line <span class="line-number">71</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Holds whether we are translating all statements.</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$txnstate" id="$txnstate"><!-- --></A>
<div class="oddrow">
@@ -153,7 +181,7 @@
<span class="var-title">
<span class="var-type">mixed</span>
<span class="var-name">$txnstate</span>
= <span class="var-default"> 0</span> (line <span class="line-number">63</span>)
= <span class="var-default"> 0</span> (line <span class="line-number">66</span>)
</span>
</div>
@@ -201,7 +229,7 @@
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">Begin</span> (line <span class="line-number">90</span>)
<span class="method-title">Begin</span> (line <span class="line-number">101</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
@@ -223,7 +251,7 @@
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">Commit</span> (line <span class="line-number">104</span>)
<span class="method-title">Commit</span> (line <span class="line-number">116</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
@@ -245,7 +273,7 @@
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">ErrorInfo</span> (line <span class="line-number">154</span>)
<span class="method-title">ErrorInfo</span> (line <span class="line-number">172</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
@@ -266,7 +294,7 @@
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">prepare</span> (line <span class="line-number">72</span>)
<span class="method-title">prepare</span> (line <span class="line-number">80</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
@@ -299,7 +327,7 @@
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">PrepareTranslated</span> (line <span class="line-number">139</span>)
<span class="method-title">PrepareTranslated</span> (line <span class="line-number">153</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
@@ -310,9 +338,17 @@
<span class="method-name">
PrepareTranslated
</span>
()
(<span class="var-type"></span>&nbsp;<span class="var-name">$statement</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$driver_options</span> = <span class="var-default">array()</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type"></span>
<span class="var-name">$statement</span> </li>
<li>
<span class="var-type"></span>
<span class="var-name">$driver_options</span> </li>
</ul>
</div>
@@ -321,7 +357,7 @@
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">query</span> (line <span class="line-number">82</span>)
<span class="method-title">query</span> (line <span class="line-number">93</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
@@ -354,7 +390,7 @@
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">Rollback</span> (line <span class="line-number">115</span>)
<span class="method-title">Rollback</span> (line <span class="line-number">128</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
@@ -376,7 +412,7 @@
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">TransactionState</span> (line <span class="line-number">130</span>)
<span class="method-title">TransactionState</span> (line <span class="line-number">144</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
@@ -398,7 +434,7 @@
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">TranslateAll</span> (line <span class="line-number">147</span>)
<span class="method-title">TranslateAll</span> (line <span class="line-number">163</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
@@ -434,6 +470,8 @@
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-name"><a href="../../awl/AwlDatabase/AwlDBDialect.html#methodQuote">AwlDBDialect::Quote()</a></span><br />
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-name"><a href="../../awl/AwlDatabase/AwlDBDialect.html#methodReplaceNamedParameters">AwlDBDialect::ReplaceNamedParameters()</a></span><br />
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-name"><a href="../../awl/AwlDatabase/AwlDBDialect.html#methodReplaceParameters">AwlDBDialect::ReplaceParameters()</a></span><br />
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-name"><a href="../../awl/AwlDatabase/AwlDBDialect.html#methodSetSearchPath">AwlDBDialect::SetSearchPath()</a></span><br />
@@ -446,7 +484,7 @@
<p class="notes" id="credit">
Documentation generated on Thu, 25 Feb 2010 11:39:17 +1300 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
Documentation generated on Sat, 17 Apr 2010 12:32:22 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
</p>
</div></body>
</html>␍
@@ -22,7 +22,7 @@
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">AwlDatabase - support for different SQL dialects</p>
<p class="description"><p>This subpackage provides dialect specific support for PostgreSQL, and may, over time, be extended to provide support for other SQL dialects.</p><p>See http://wiki.davical.org/w/Coding/PdoDatabase for design and usage information.</p></p>
<p class="description"><p>This subpackage provides dialect specific support for PostgreSQL, and may, over time, be extended to provide support for other SQL dialects.</p><p>See http://wiki.davical.org/w/Coding/AwlQuery for design and usage information.</p></p>
<ul class="tags">
<li><span class="field">author:</span> Andrew McMillan &lt;<a href="mailto:andrew@morphoss.com">andrew@morphoss.com</a>&gt;</li>
<li><span class="field">copyright:</span> Morphoss Ltd</li>
@@ -54,7 +54,7 @@
<a href="../../awl/AwlDatabase/AwlDBDialect.html">AwlDBDialect</a>
</td>
<td>
The AwlDBDialect class handles
The AwlDBDialect class handles support for different SQL dialects
</td>
</tr>
</table>
@@ -72,7 +72,7 @@
</div>
<div class="info-box-body">
<a name="defineE_USER_ERROR"><!-- --></a>
<div class="oddrow">
<div class="evenrow">
<div>
<img src="../../media/images/Constant.png" />
@@ -83,13 +83,6 @@
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">AwlDatabase - support for different SQL dialects</p>
<p class="description"><p>This subpackage provides dialect specific support for PostgreSQL, and may, over time, be extended to provide support for other SQL dialects.</p><p>See http://wiki.davical.org/w/Coding/PdoDatabase for design and usage information.</p></p>
<ul class="tags">
<li><span class="field">author:</span> Andrew McMillan &lt;<a href="mailto:andrew@morphoss.com">andrew@morphoss.com</a>&gt;</li>
<li><span class="field">copyright:</span> Morphoss Ltd</li>
<li><span class="field">license:</span> <a href="http://gnu.org/copyleft/gpl.html">GNU GPL v3 or later</a></li>
</ul>
</div>
@@ -99,7 +92,7 @@
<p class="notes" id="credit">
Documentation generated on Thu, 25 Feb 2010 11:39:17 +1300 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
Documentation generated on Sat, 17 Apr 2010 12:32:23 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
</p>
</div></body>
</html>␍
@@ -22,7 +22,7 @@
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">AwlDatabase query/statement class and associated functions</p>
<p class="description"><p>This subpackage provides some functions that are useful around database activity and a AwlDialect, AwlDatabase and AwlStatement classes to simplify handling of database queries and provide some access for a limited ability to handle varying database dialects.</p><p>The class is intended to be a very lightweight wrapper with some features that have proved useful in developing and debugging web-based applications: <ul><li>All queries are timed, and an expected time can be provided.</li><li>Parameters replaced into the SQL will be escaped correctly in order to
<p class="description"><p>This subpackage provides some functions that are useful around database activity and a AwlDBDialect, AwlDatabase and AwlStatement classes to simplify handling of database queries and provide some access for a limited ability to handle varying database dialects.</p><p>The class is intended to be a very lightweight wrapper with some features that have proved useful in developing and debugging web-based applications: <ul><li>All queries are timed, and an expected time can be provided.</li><li>Parameters replaced into the SQL will be escaped correctly in order to
minimise the chances of SQL injection errors.</li><li>Queries which fail, or which exceed their expected execution time, will
be logged for potential further analysis.</li><li>Debug logging of queries may be enabled globally, or restricted to
particular sets of queries.</li><li>Simple syntax for iterating through a result set.</li></ul> See http://wiki.davical.org/w/AwlDatabase for design and usage information.</p><p>If not already connected, AwlDatabase will attempt to connect to the database, successively applying connection parameters from the array in $c-&gt;pdo_connect.</p><p>We will die if the database is not currently connected and we fail to find a working connection.</p></p>
@@ -86,16 +86,6 @@
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">AwlDatabase query/statement class and associated functions</p>
<p class="description"><p>This subpackage provides some functions that are useful around database activity and a AwlDialect, AwlDatabase and AwlStatement classes to simplify handling of database queries and provide some access for a limited ability to handle varying database dialects.</p><p>The class is intended to be a very lightweight wrapper with some features that have proved useful in developing and debugging web-based applications: <ul><li>All queries are timed, and an expected time can be provided.</li><li>Parameters replaced into the SQL will be escaped correctly in order to
minimise the chances of SQL injection errors.</li><li>Queries which fail, or which exceed their expected execution time, will
be logged for potential further analysis.</li><li>Debug logging of queries may be enabled globally, or restricted to
particular sets of queries.</li><li>Simple syntax for iterating through a result set.</li></ul> See http://wiki.davical.org/w/AwlDatabase for design and usage information.</p><p>If not already connected, AwlDatabase will attempt to connect to the database, successively applying connection parameters from the array in $c-&gt;pdo_connect.</p><p>We will die if the database is not currently connected and we fail to find a working connection.</p></p>
<ul class="tags">
<li><span class="field">author:</span> Andrew McMillan &lt;<a href="mailto:andrew@morphoss.com">andrew@morphoss.com</a>&gt;</li>
<li><span class="field">copyright:</span> Morphoss Ltd</li>
<li><span class="field">license:</span> <a href="http://gnu.org/copyleft/gpl.html">GNU GPL v3 or later</a></li>
</ul>
</div>
</div>
@@ -105,7 +95,7 @@
<p class="notes" id="credit">
Documentation generated on Thu, 25 Feb 2010 11:39:17 +1300 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
Documentation generated on Sat, 17 Apr 2010 12:32:22 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
</p>
</div></body>
</html>␍