Changeset 213

Show
Ignore:
Timestamp:
08/02/07 01:13:28 (1 year ago)
Author:
hans
Message:

#67 - Adding the documentation for PDOSQLExecTask

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/docs/phing_guide/book/chapters/appendixes/AppendixC-OptionalTasks.html

    r211 r213  
    409409  <li>comment 
    410410    <p>Custom text that is added to the start of each encoded file.</p> 
     411  </li> 
     412</ul> 
     413 
     414<h2><a name="PDOSQLExecTask"></a>PDOSQLExecTask</h2> 
     415 
     416<p>The <em>PDOSQLExecTask</em> executes SQL statements using PDO.</p> 
     417 
     418<h3>Examples</h3> 
     419 
     420<pre>&lt;pdo url="pgsql:host=localhost dbname=test"> 
     421  &lt;fileset dir=&quot;sqlfiles&quot;&gt; 
     422          &lt;include name=&quot;*.sql&quot;/&gt; 
     423  &lt;/fileset&gt; 
     424&lt;/pdo&gt; 
     425</pre> 
     426 
     427<pre>&lt;pdo url="mysql:host=localhost;dbname=test" userid="username" password="password"> 
     428  &lt;transaction src=&quot;path/to/sqlfile.sql&quot;/&gt; 
     429&lt;/pdo&gt; 
     430</pre> 
     431 
     432<h3>Attributes</h3> 
     433<table> 
     434  <thead> 
     435    <tr> 
     436      <th>Name</th> 
     437      <th>Type</th> 
     438      <th>Description</th> 
     439      <th>Default</th> 
     440      <th>Required</th> 
     441    </tr> 
     442  </thead> 
     443  <tbody> 
     444    <tr> 
     445      <td>url</td> 
     446      <td>String</td> 
     447      <td>PDO connection URL (DSN) </td> 
     448      <td>none</td> 
     449      <td>Yes</td> 
     450    </tr> 
     451    <tr> 
     452      <td>userid</td> 
     453      <td>String</td> 
     454      <td>Username for connection (if it cannot be specified in URL) </td> 
     455      <td>none</td> 
     456      <td>No</td> 
     457    </tr> 
     458    <tr> 
     459      <td>password</td> 
     460      <td>String</td> 
     461      <td>The password to use for the connection (if it cannot be specified in URL) </td> 
     462      <td>none</td> 
     463      <td>No</td> 
     464    </tr> 
     465        <tr> 
     466      <td>encoding</td> 
     467      <td>String</td> 
     468      <td>The database encoding.</td> 
     469      <td>none</td> 
     470      <td>No</td> 
     471    </tr> 
     472        <tr> 
     473      <td>src</td> 
     474      <td>File</td> 
     475      <td>A single source file of SQL statements to execute.</td> 
     476      <td>none</td> 
     477      <td>No</td> 
     478    </tr> 
     479        <tr> 
     480      <td>onerror</td> 
     481      <td>String</td> 
     482      <td>The action to perform on error (continue, stop, or abort)</td> 
     483      <td>abort</td> 
     484      <td>No</td> 
     485    </tr> 
     486        <tr> 
     487      <td>output</td> 
     488      <td>File</td> 
     489      <td>The file to which output should be logged.</td> 
     490      <td>none</td> 
     491      <td>No</td> 
     492    </tr> 
     493        <tr> 
     494      <td>print</td> 
     495      <td>Boolean</td> 
     496      <td>Whether to print results of query.</td> 
     497      <td>false</td> 
     498      <td>No</td> 
     499    </tr> 
     500        <tr> 
     501      <td>showheaders</td> 
     502      <td>Boolean</td> 
     503      <td>Whether to show column headers.</td> 
     504      <td>false</td> 
     505      <td>No</td> 
     506    </tr> 
     507        <tr> 
     508      <td>delimiter</td> 
     509      <td>String</td> 
     510      <td>The delimeter to separate SQL statements (e.g. &quot;GO&quot; in MSSQL)</td> 
     511      <td>;</td> 
     512      <td>No</td> 
     513    </tr> 
     514        <tr> 
     515      <td>delimitertype</td> 
     516      <td>String</td> 
     517      <td>The delimiter type (&quot;normal&quot; or &quot;row&quot;). Normal means that any occurence of the delimiter 
     518     terminate the SQL command whereas with row, only a line containing just 
     519     the delimiter is recognized as the end of the command.</td> 
     520      <td>normal</td> 
     521      <td>No</td> 
     522    </tr> 
     523  </tbody> 
     524</table> 
     525 
     526<h3>Supported Nested Tags</h3> 
     527<ul> 
     528  <li>transaction 
     529    <p>Wrapper for a single transaction.</p> 
     530  </li> 
     531  <li>fileset 
     532    <p>Files containing SQL statements.</p> 
    411533  </li> 
    412534</ul> 
  • trunk/docs/phing_guide/book/toc/FrameToC.html

    r212 r213  
    127127<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#IoncubeEncoderTask" target="Content">IoncubeEncoderTask</a></li> 
    128128<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#IoncubeLicenseTask" target="Content">IoncubeLicenseTask</a></li> 
     129<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PDOSQLExecTask" target="Content">PDOSQLExecTask</a></li> 
    129130<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PearPackageTask" target="Content">PearPackageTask</a></li> 
    130131<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PearPackage2Task" target="Content">PearPackage2Task</a></li> 
  • trunk/docs/phing_guide/book/toc/ToC.html

    r212 r213  
    112112<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#IoncubeEncoderTask">IoncubeEncoderTask</a></li> 
    113113<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#IoncubeLicenseTask">IoncubeLicenseTask</a></li> 
     114<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PDOSQLExecTask">PDOSQLExecTask</a></li> 
    114115<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PearPackageTask">PearPackageTask</a></li> 
    115116<li><a href="../chapters/appendixes/AppendixC-OptionalTasks.html#PearPackage2Task">PearPackage2Task</a></li>