Query/apiDocumentation/source/Drivers/Pgsql/SQL.php.html

32 lines
53 KiB
HTML
Raw Normal View History

2018-01-24 15:31:27 -05:00
<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><title>phpDox - Source of SQL.php</title><link rel="stylesheet" type="text/css" href="../../../css/style.css" media="screen"/><link rel="stylesheet" href="../../../css/source.css"/><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="../../../source/index.html">Source</a></li></ul></div><h1>Source of file SQL.php</h1><p>
2018-01-26 09:16:13 -05:00
Size: 5,455 Bytes - Last Modified: 2018-01-25T14:51:55+00:00</p><section><h2><small>src/Drivers/Pgsql/</small>SQL.php</h2><table class="source"><tr><td class="no"><a class="anker" href="#line1">1</a><a class="anker" href="#line2">2</a><a class="anker" href="#line3">3</a><a class="anker" href="#line4">4</a><a class="anker" href="#line5">5</a><a class="anker" href="#line6">6</a><a class="anker" href="#line7">7</a><a class="anker" href="#line8">8</a><a class="anker" href="#line9">9</a><a class="anker" href="#line10">10</a><a class="anker" href="#line11">11</a><a class="anker" href="#line12">12</a><a class="anker" href="#line13">13</a><a class="anker" href="#line14">14</a><a class="anker" href="#line15">15</a><a class="anker" href="#line16">16</a><a class="anker" href="#line17">17</a><a class="anker" href="#line18">18</a><a class="anker" href="#line19">19</a><a class="anker" href="#line20">20</a><a class="anker" href="#line21">21</a><a class="anker" href="#line22">22</a><a class="anker" href="#line23">23</a><a class="anker" href="#line24">24</a><a class="anker" href="#line25">25</a><a class="anker" href="#line26">26</a><a class="anker" href="#line27">27</a><a class="anker" href="#line28">28</a><a class="anker" href="#line29">29</a><a class="anker" href="#line30">30</a><a class="anker" href="#line31">31</a><a class="anker covered" href="#line32">32</a><div class="coverage_details"><span>
2018-01-24 15:31:27 -05:00
Covered by 1 test(s):
</span><ul><li>Query\Tests\Drivers\PgSQL\PgSQLQueryBuilderTest::testQueryExplain</li></ul></div><a class="anker" href="#line33">33</a><a class="anker" href="#line34">34</a><a class="anker" href="#line35">35</a><a class="anker" href="#line36">36</a><a class="anker" href="#line37">37</a><a class="anker" href="#line38">38</a><a class="anker" href="#line39">39</a><a class="anker" href="#line40">40</a><a class="anker" href="#line41">41</a><a class="anker covered" href="#line42">42</a><div class="coverage_details"><span>
Covered by 1 test(s):
</span><ul><li>Query\Tests\Drivers\PgSQL\PgSQLQueryBuilderTest::testOrderByRandom</li></ul></div><a class="anker" href="#line43">43</a><a class="anker" href="#line44">44</a><a class="anker" href="#line45">45</a><a class="anker" href="#line46">46</a><a class="anker" href="#line47">47</a><a class="anker" href="#line48">48</a><a class="anker" href="#line49">49</a><a class="anker" href="#line50">50</a><a class="anker" href="#line51">51</a><a class="anker" href="#line52">52</a><a class="anker covered" href="#line53">53</a><div class="coverage_details"><span>
Covered by 1 test(s):
</span><ul><li>Query\Tests\Drivers\PgSQL\PgSQLDriverTest::testGetDBs</li></ul></div><a class="anker" href="#line54">54</a><a class="anker" href="#line55">55</a><a class="anker" href="#line56">56</a><a class="anker" href="#line57">57</a><a class="anker" href="#line58">58</a><a class="anker" href="#line59">59</a><a class="anker" href="#line60">60</a><a class="anker" href="#line61">61</a><a class="anker" href="#line62">62</a><a class="anker" href="#line63">63</a><a class="anker" href="#line64">64</a><a class="anker" href="#line65">65</a><a class="anker" href="#line66">66</a><a class="anker covered" href="#line67">67</a><div class="coverage_details"><span>
Covered by 3 test(s):
</span><ul><li>Query\Tests\Drivers\PgSQL\PgSQLDriverTest::testCreateTable</li><li>Query\Tests\Drivers\PgSQL\PgSQLDriverTest::testGetTables</li><li>Query\Tests\Drivers\PgSQL\PgSQLDriverTest::testBackupData</li></ul></div><a class="anker" href="#line68">68</a><a class="anker" href="#line69">69</a><a class="anker" href="#line70">70</a><a class="anker" href="#line71">71</a><a class="anker" href="#line72">72</a><a class="anker" href="#line73">73</a><a class="anker" href="#line74">74</a><a class="anker" href="#line75">75</a><a class="anker" href="#line76">76</a><a class="anker" href="#line77">77</a><a class="anker" href="#line78">78</a><a class="anker" href="#line79">79</a><a class="anker" href="#line80">80</a><a class="anker" href="#line81">81</a><a class="anker" href="#line82">82</a><a class="anker covered" href="#line83">83</a><div class="coverage_details"><span>
Covered by 1 test(s):
</span><ul><li>Query\Tests\Drivers\PgSQL\PgSQLDriverTest::testGetSystemTables</li></ul></div><a class="anker" href="#line84">84</a><a class="anker" href="#line85">85</a><a class="anker" href="#line86">86</a><a class="anker" href="#line87">87</a><a class="anker" href="#line88">88</a><a class="anker" href="#line89">89</a><a class="anker" href="#line90">90</a><a class="anker" href="#line91">91</a><a class="anker" href="#line92">92</a><a class="anker" href="#line93">93</a><a class="anker" href="#line94">94</a><a class="anker" href="#line95">95</a><a class="anker" href="#line96">96</a><a class="anker" href="#line97">97</a><a class="anker" href="#line98">98</a><a class="anker covered" href="#line99">99</a><div class="coverage_details"><span>
Covered by 1 test(s):
</span><ul><li>Query\Tests\Drivers\PgSQL\PgSQLDriverTest::testGetViews</li></ul></div><a class="anker" href="#line100">100</a><a class="anker" href="#line101">101</a><a class="anker" href="#line102">102</a><a class="anker" href="#line103">103</a><a class="anker" href="#line104">104</a><a class="anker" href="#line105">105</a><a class="anker" href="#line106">106</a><a class="anker" href="#line107">107</a><a class="anker" href="#line108">108</a><a class="anker" href="#line109">109</a><a class="anker" href="#line110">110</a><a class="anker" href="#line111">111</a><a class="anker" href="#line112">112</a><a class="anker" href="#line113">113</a><a class="anker" href="#line114">114</a><a class="anker covered" href="#line115">115</a><div class="coverage_details"><span>
Covered by 1 test(s):
</span><ul><li>Query\Tests\Drivers\PgSQL\PgSQLDriverTest::testGetTriggers</li></ul></div><a class="anker" href="#line116">116</a><a class="anker" href="#line117">117</a><a class="anker" href="#line118">118</a><a class="anker" href="#line119">119</a><a class="anker" href="#line120">120</a><a class="anker" href="#line121">121</a><a class="anker" href="#line122">122</a><a class="anker" href="#line123">123</a><a class="anker" href="#line124">124</a><a class="anker" href="#line125">125</a><a class="anker" href="#line126">126</a><a class="anker" href="#line127">127</a><a class="anker" href="#line128">128</a><a class="anker covered" href="#line129">129</a><div class="coverage_details"><span>
Covered by 1 test(s):
</span><ul><li>Query\Tests\Drivers\PgSQL\PgSQLDriverTest::testGetFunctions</li></ul></div><a class="anker" href="#line130">130</a><a class="anker" href="#line131">131</a><a class="anker" href="#line132">132</a><a class="anker" href="#line133">133</a><a class="anker" href="#line134">134</a><a class="anker" href="#line135">135</a><a class="anker" href="#line136">136</a><a class="anker" href="#line137">137</a><a class="anker" href="#line138">138</a><a class="anker" href="#line139">139</a><a class="anker covered" href="#line140">140</a><div class="coverage_details"><span>
Covered by 1 test(s):
</span><ul><li>Query\Tests\Drivers\PgSQL\PgSQLDriverTest::testGetProcedures</li></ul></div><a class="anker" href="#line141">141</a><a class="anker" href="#line142">142</a><a class="anker" href="#line143">143</a><a class="anker" href="#line144">144</a><a class="anker" href="#line145">145</a><a class="anker" href="#line146">146</a><a class="anker" href="#line147">147</a><a class="anker" href="#line148">148</a><a class="anker" href="#line149">149</a><a class="anker" href="#line150">150</a><a class="anker" href="#line151">151</a><a class="anker" href="#line152">152</a><a class="anker" href="#line153">153</a><a class="anker" href="#line154">154</a><a class="anker" href="#line155">155</a><a class="anker covered" href="#line156">156</a><div class="coverage_details"><span>
Covered by 1 test(s):
</span><ul><li>Query\Tests\Drivers\PgSQL\PgSQLDriverTest::testGetSequences</li></ul></div><a class="anker" href="#line157">157</a><a class="anker" href="#line158">158</a><a class="anker" href="#line159">159</a><a class="anker" href="#line160">160</a><a class="anker" href="#line161">161</a><a class="anker" href="#line162">162</a><a class="anker" href="#line163">163</a><a class="anker" href="#line164">164</a><a class="anker" href="#line165">165</a><a class="anker" href="#line166">166</a><a class="anker" href="#line167">167</a><a class="anker" href="#line168">168</a><a class="anker" href="#line169">169</a><a class="anker" href="#line170">170</a><a class="anker" href="#line171">171</a><a class="anker" href="#line172">172</a><a class="anker" href="#line173">173</a><a class="anker" href="#line174">174</a><a class="anker" href="#line175">175</a><a class="anker" href="#line176">176</a><a class="anker" href="#line177">177</a><a class="anker" href="#line178">178</a><a class="anker" href="#line179">179</a><a class="anker covered" href="#line180">180</a><div class="coverage_details"><span>
Covered by 1 test(s):
</span><ul><li>Query\Tests\Drivers\PgSQL\PgSQLDriverTest::testGetColumns</li></ul></div><a class="anker" href="#line181">181</a><a class="anker" href="#line182">182</a><a class="anker" href="#line183">183</a><a class="anker" href="#line184">184</a><a class="anker" href="#line185">185</a><a class="anker" href="#line186">186</a><a class="anker" href="#line187">187</a><a class="anker" href="#line188">188</a><a class="anker" href="#line189">189</a><a class="anker" href="#line190">190</a><a class="anker" href="#line191">191</a><a class="anker" href="#line192">192</a><a class="anker covered" href="#line193">193</a><div class="coverage_details"><span>
Covered by 1 test(s):
</span><ul><li>Query\Tests\Drivers\PgSQL\PgSQLDriverTest::testGetTypes</li></ul></div><a class="anker" href="#line194">194</a><a class="anker" href="#line195">195</a><a class="anker" href="#line196">196</a><a class="anker" href="#line197">197</a><a class="anker" href="#line198">198</a><a class="anker" href="#line199">199</a><a class="anker" href="#line200">200</a><a class="anker" href="#line201">201</a><a class="anker" href="#line202">202</a><a class="anker" href="#line203">203</a><a class="anker" href="#line204">204</a><a class="anker" href="#line205">205</a><a class="anker" href="#line206">206</a><a class="anker" href="#line207">207</a><a class="anker" href="#line208">208</a><a class="anker" href="#line209">209</a><a class="anker" href="#line210">210</a><a class="anker" href="#line211">211</a><a class="anker" href="#line212">212</a><a class="anker" href="#line213">213</a><a class="anker" href="#line214">214</a><a class="anker" href="#line215">215</a><a class="anker" href="#line216">216</a><a class="anker" href="#line217">217</a><a class="anker" href="#line218">218</a><a class="anker" href="#line219">219</a><a class="anker" href="#line220">220</a><a class="anker" href="#line221">221</a><a class="anker" href="#line222">222</a><a class="anker" href="#line223">223</a><a class="anker" href="#line224">224</a><a class="anker" href="#line225">225</a><a class="anker" href="#line226">226</a><a class="anker covered" href="#line227">227</a><div class="coverage_details"><span>
Covered by 1 test(s):
</span><ul><li>Query\Tests\Drivers\PgSQL\PgSQLDriverTest::testGetFKs</li></ul></div><a class="anker" href="#line228">228</a><a class="anker" href="#line229">229</a><a class="anker" href="#line230">230</a><a class="anker" href="#line231">231</a><a class="anker" href="#line232">232</a><a class="anker" href="#line233">233</a><a class="anker" href="#line234">234</a><a class="anker" href="#line235">235</a><a class="anker" href="#line236">236</a><a class="anker" href="#line237">237</a><a class="anker" href="#line238">238</a><a class="anker" href="#line239">239</a><a class="anker" href="#line240">240</a><a class="anker" href="#line241">241</a><a class="anker" href="#line242">242</a><a class="anker" href="#line243">243</a><a class="anker" href="#line244">244</a><a class="anker" href="#line245">245</a><a class="anker" href="#line246">246</a><a class="anker" href="#line247">247</a><a class="anker" href="#line248">248</a><a class="anker" href="#line249">249</a><a class="anker" href="#line250">250</a><a class="anker" href="#line251">251</a><a class="anker" href="#line252">252</a><a class="anker" href="#line253">253</a><a class="anker" href="#line254">254</a><a class="anker" href="#line255">255</a><a class="anker" href="#line256">256</a><a class="anker" href="#line257">257</a><a class="anker" href="#line258">258</a><a class="anker" href="#line259">259</a><a class="anker" href="#line260">260</a><a class="anker" href="#line261">261</a><a class="anker" href="#line262">262</a><a class="anker" href="#line263">263</a><a class="anker" href="#line264">264</a><a class="anker" href="#line265">265</a><a class="anker" href="#line266">266</a><a class="anker covered" href="#line267">267</a><div class="coverage_details"><span>
Covered by 1 test(s):
</span><ul><li>Query\Tests\Drivers\PgSQL\PgSQLDriverTest::testGetIndexes</li></ul></div><a class="anker" href="#line268">268</a><a class="anker" href="#line269">269</a><a class="anker" href="#line270">270</a><a class="anker" href="#line271">271</a><a class="anker" href="#line272">272</a><a class="anker" href="#line273">273</a><a class="anker" href="#line274">274</a><a class="anker" href="#line275">275</a><a class="anker" href="#line276">276</a></td><td class="line"><div id="line1"><pre><span class="token T_OPEN_TAG">&lt;?php </span><span class="token T_DECLARE">declare</span><span class="token T_PHPDOX_OPEN_BRACKET">(</span><span class="token T_STRING">strict_types</span><span class="token T_PHPDOX_EQUAL">=</span><span class="token T_LNUMBER">1</span><span class="token T_PHPDOX_CLOSE_BRACKET">)</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line2"><pre><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line3"><pre><span class="token T_DOC_COMMENT"> * Query</span></pre></div><div id="line4"><pre><span class="token T_DOC_COMMENT"> *</span></pre></div><div id="line5"><pre><span class="token T_DOC_COMMENT"> * SQL Query Builder / Database Abstraction Layer</span></pre></div><div id="line6"><pre><span class="token T_DOC_COMMENT"> *</span></pre></div><div id="line7"><pre><span class="token T_DOC_COMMENT"> * PHP version 7.1</span></pre></div><div id="line8"><pre><span class="token T_DOC_COMMENT"> *</span></pre></div><div id="line9"><pre><span class="token T_DOC_COMMENT"> * @package Query</span></pre></div><div id="line10"><pre><span class="token T_DOC_COMMENT"> * @author Timothy J. Warren &lt;tim@timshomepage.net&gt;</span></pre></div><div id="line11"><pre><span class="token T_DOC_COMMENT"> * @copyright 2012 - 2018 Timothy J. Warren</span></pre></div><div id="line12"><pre><span class="token T_DOC_COMMENT"> * @license http://www.opensource.org/licenses/mit-license.html MIT License</span></pre></div><div id="line13"><pre><span class="token T_DOC_COMMENT"> * @link https://git.timshomepage.net/aviat4ion/Query</span></pre></div><div id="line14"><pre><span class="token T_DOC_COMMENT"> */</span></pre></div><div id="line15"><pre><span class="token T_NAMESPACE">namespace</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">Query</span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">Drivers</span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">Pgsql</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line16"><br/></div><div id="line17"><pre><span class="token T_USE">use</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">Query</span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">Drivers</span><span class="token T_NS_SEPARATOR">\</span><span class="token T_STRING">AbstractSQL</span><span class="token T_PHPDOX_SEMICOLON">;</span></pre></div><div id="line18"><br/></div><div id="line19"><pre><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line20"><pre><span class="token T_DOC_COMMENT"> * PostgreSQL specific SQL</span></pre></div><div id="line21"><pre><span class="token T_DOC_COMMENT"> */</span></pre></div><div id="line22"><pre><span class="token T_CLASS">class</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">SQL</span><span class="token T_WHITESPACE"> </span><span class="token T_EXTENDS">extends</span><span class="token T_WHITESPACE"> </span><span class="token T_STRING">AbstractSQL</span><span class="token T_WHITESPACE"> </span><span class="token T_PHPDOX_OPEN_CURLY">{</span></pre></div><div id="line23"><br/></div><div id="line24"><pre><span class="token T_WHITESPACE"> </span><span class="token T_DOC_COMMENT">/**</span></pre></div><div id="line25"><pre><span class="token T_DOC_COMMENT"> * Get the query plan for the sql query</span></pre></div><div id="line26"><pre><span class="token T_DOC_COMMENT"> *</span></pre></div><div id="line27"><pre><span class="token T_DOC_CO