Class SQLUtils

Description

This is a static class that provides functions for the running of arbitrary SQL strings and files.

  • static:
  • version: $Id: SQLUtils.static.php,v 1.11 2007/09/17 13:54:31 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright © 2005, Middlebury College

Located in /harmoni/core/DBHandler/SQLUtils.static.php (line 25)


	
			
Method Summary
void multiQuery (string $queryString, integer $dbIndex)
string parseSQLFile (string $file)
string parseSQLString (string $queryString)
void runSQLdir (string $dir, integer $dbIndex, [optional $extn = 'sql'])
void runSQLfile (string $file, integer $dbIndex)
Methods
multiQuery (line 79)

Break up a SQL string with multiple queries (separated by ';') and run each query

  • static:
  • access: public
  • since: 7/2/04
void multiQuery (string $queryString, integer $dbIndex)
  • string $queryString: The string of queries.
  • integer $dbIndex: The database index to run the queries on.
parseSQLFile (line 36)

Parse SQL textfile to remove comments and line returns.

  • return: The parsed SQL string.
  • static:
  • access: public
  • since: 7/2/04
string parseSQLFile (string $file)
  • string $file: The file to be parsed
parseSQLString (line 53)

Parse SQL string to remove comments and line returns.

  • return: The parsed SQL string.
  • static:
  • access: public
  • since: 7/2/04
string parseSQLString (string $queryString)
  • string $queryString: The string to be parsed
runSQLdir (line 122)

Run all of the files with a given extention in a directory as SQL files.

  • static:
  • access: public
  • since: 9/11/07
void runSQLdir (string $dir, integer $dbIndex, [optional $extn = 'sql'])
  • string $dir
  • integer $dbIndex: The index of the database to run the queries on.
  • optional $extn: string $extn The file extention to execute, default: 'sql'.
runSQLfile (line 107)

Run all of the queries in a text file. Comments must start with '#' and queries must be separated by ';'.

  • static:
  • access: public
  • since: 7/2/04
void runSQLfile (string $file, integer $dbIndex)
  • string $file: The input file containing the queries.
  • integer $dbIndex: The index of the database to run the queries on.

Documentation generated on Wed, 19 Sep 2007 10:26:40 -0400 by phpDocumentor 1.3.0RC3