davical/docs/api/awl/PdoQuery/PdoDialect.html
2009-09-14 14:00:54 +12:00

315 lines
13 KiB
HTML

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class PdoDialect</title>
<link rel="stylesheet" href="../../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name"><img src="../../media/images/Class_logo.png"
alt=" Class"
title=" Class"
style="vertical-align: middle"> PdoDialect</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The PdoDialect class handles</p>
<p class="notes">
Located in <a class="field" href="_inc---PdoQuery.php.html">/inc/PdoQuery.php</a> (line <span class="field">41</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-var-summary"></a>
<div class="info-box">
<div class="info-box-title">Variable Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="var-summary">
<div class="var-title">
<img src="../../media/images/Variable.png" alt=" " />
<span class="var-type">mixed</span>
<a href="#$dialect" title="details" class="var-name">$dialect</a>
</div>
</div>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<img src="../../media/images/Constructor.png" alt=" "/>
<span class="method-result">PdoDialect</span>
<a href="#__construct" title="details" class="method-name">__construct</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$connection_string</span>)
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#GetFields" title="details" class="method-name">GetFields</a>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$tablename_string</span>)
</div>
<div class="method-definition">
<img src="../../media/images/Method.png" alt=" "/>
<span class="method-result">void</span>
<a href="#Quote" title="details" class="method-name">Quote</a>
(<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="#ReplaceParameters" title="details" class="method-name">ReplaceParameters</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">void</span>
<a href="#Translate" title="details" class="method-name">Translate</a>
(<span class="var-type"></span>&nbsp;<span class="var-name">$sql_string</span>)
</div>
</div>
</div>
</div>
<a name="sec-vars"></a>
<div class="info-box">
<div class="info-box-title">Variables</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<a name="var$dialect" id="$dialect"><!-- --></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">$dialect</span>
(line <span class="line-number">49</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Holds the name of the database dialect</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<img src="../../media/images/Constructor.png" />
<span class="method-title">Constructor __construct</span> (line <span class="line-number">60</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Parses the connection string to ascertain the database dialect. Returns true if the dialect is supported and fails if the dialect is not supported. All code to support any given database should be within in an external include.</p>
<div class="method-signature">
<span class="method-result">PdoDialect</span>
<span class="method-name">
__construct
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$connection_string</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$connection_string</span><span class="var-description">: The full PDO connection string</span> </li>
</ul>
</div>
<a name="methodGetFields" id="GetFields"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">GetFields</span> (line <span class="line-number">76</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the SQL for the current database dialect which will return a two-column resultset containing a list of fields and their associated data types.</p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
GetFields
</span>
(<span class="var-type">string</span>&nbsp;<span class="var-name">$tablename_string</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$tablename_string</span><span class="var-description">: The name of the table we want fields from</span> </li>
</ul>
</div>
<a name="methodQuote" id="Quote"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">Quote</span> (line <span class="line-number">114</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns $value escaped in an appropriate way for this database dialect.</p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
Quote
</span>
(<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>
<ul class="parameters">
<li>
<span class="var-type">mixed</span>
<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>
</ul>
</div>
<a name="methodReplaceParameters" id="ReplaceParameters"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">ReplaceParameters</span> (line <span class="line-number">167</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Replaces query parameters 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 '?' 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). In such cases the parameter can be forced to be inserted unquoted by passing it as &quot;array( 'plain' =&gt; $param )&quot;.</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">
ReplaceParameters
</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 '?' characters.</span> </li>
<li>
<span class="var-type">mixed</span>
<span class="var-name">1</span><span class="var-description">: The values to replace into the SQL string.</span> </li>
</ul>
</div>
<a name="methodTranslate" id="Translate"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<img src="../../media/images/Method.png" />
<span class="method-title">Translate</span> (line <span class="line-number">101</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Translates the given SQL string into a form that will hopefully work for this database dialect. This hook is expected to be used by developers to provide support for differences in database operation by translating the query string in an arbitrary way, such as through a file or database lookup.</p>
<p class="description"><p>The actual translation to other SQL dialects will usually be application-specific, so that any routines called by this will usually be external to this library, or will use resources external to this library.</p></p>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
Translate
</span>
(<span class="var-type"></span>&nbsp;<span class="var-name">$sql_string</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type"></span>
<span class="var-name">$sql_string</span> </li>
</ul>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Sat, 12 Sep 2009 00:12:00 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.2</a>
</p>
</div></body>
</html>