[ Index ]
 

Code source de Symfony 1.0.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/vendor/phing/tasks/ext/ -> CreoleSQLExecTask.php (sommaire)

(pas de description)

Poids: 556 lignes (18 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 2 classes

CreoleSQLExecTask:: (16 méthodes):
  setSrc()
  addText()
  addFileset()
  createTransaction()
  setEncoding()
  setDelimiter()
  setDelimiterType()
  setPrint()
  setShowheaders()
  setOutput()
  setAppend()
  setOnerror()
  main()
  runStatements()
  execSQL()
  printResults()

SQLExecTransaction:: (4 méthodes):
  __construct()
  setSrc()
  addText()
  runTransaction()


Classe: CreoleSQLExecTask  - X-Ref

Executes a series of SQL statements on a database using Creole.

<p>Statements can
either be read in from a text file using the <i>src</i> attribute or from
between the enclosing SQL tags.</p>

<p>Multiple statements can be provided, separated by semicolons (or the
defined <i>delimiter</i>). Individual lines within the statements can be
commented using either --, // or REM at the start of the line.</p>

<p>The <i>autocommit</i> attribute specifies whether auto-commit should be
turned on or off whilst executing the statements. If auto-commit is turned
on each statement will be executed and committed. If it is turned off the
statements will all be executed as one transaction.</p>

<p>The <i>onerror</i> attribute specifies how to proceed when an error occurs
during the execution of one of the statements.
The possible values are: <b>continue</b> execution, only show the error;
<b>stop</b> execution and commit transaction;
and <b>abort</b> execution and transaction and fail task.</p>

setSrc(PhingFile $srcFile)   X-Ref
Set the name of the SQL file to be run.
Required unless statements are enclosed in the build file


addText($sql)   X-Ref
Set an inline SQL command to execute.
NB: Properties are not expanded in this text.


addFileset(FileSet $set)   X-Ref
Adds a set of files (nested fileset attribute).


createTransaction()   X-Ref
Add a SQL transaction to execute


setEncoding($encoding)   X-Ref
Set the file encoding to use on the SQL files read in

param: encoding the encoding to use on the files

setDelimiter($delimiter)   X-Ref
Set the statement delimiter.

<p>For example, set this to "go" and delimitertype to "ROW" for
Sybase ASE or MS SQL Server.</p>

param: delimiter

setDelimiterType($delimiterType)   X-Ref
Set the Delimiter type for this sql task. The delimiter type takes two
values - normal and row. Normal means that any occurence of the delimiter
terminate the SQL command whereas with row, only a line containing just
the delimiter is recognized as the end of the command.

param: string $delimiterType

setPrint($print)   X-Ref
Set the print flag.

param: boolean $print

setShowheaders($showheaders)   X-Ref
Print headers for result sets from the
statements; optional, default true.

param: boolean $showheaders

setOutput(PhingFile $output)   X-Ref
Set the output file;
optional, defaults to the console.

param: PhingFile $output

setAppend($append)   X-Ref
whether output should be appended to or overwrite
an existing file.  Defaults to false.

param: $append

setOnerror($action)   X-Ref
Action to perform when statement fails: continue, stop, or abort
optional; default &quot;abort&quot;


main()   X-Ref
Load the sql file and then execute it


runStatements(Reader $reader, $out = null)   X-Ref
read in lines and execute them


execSQL($sql, $out = null)   X-Ref
Exec the sql statement.


printResults($out = null)   X-Ref
print any results in the statement.


Classe: SQLExecTransaction  - X-Ref

"Inner" class that contains the definition of a new transaction element.
Transactions allow several files or blocks of statements
to be executed using the same JDBC connection and commit
operation in between.

__construct($parent)   X-Ref
Pas de description

setSrc(PhingFile $src)   X-Ref
Pas de description

addText($sql)   X-Ref
Pas de description

runTransaction($out = null)   X-Ref




Généré le : Fri Mar 16 22:42:14 2007 par Balluche grâce à PHPXref 0.7