From 8a35248de6fee25e817fa1c6a78d54a19ba58b8a Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sat, 17 Apr 2010 15:57:03 +1200 Subject: [PATCH] Release 0.43 --- debian/changelog | 2 +- docs/api/awl/AuthPlugin/AuthPlugin.html | 2 +- docs/api/awl/AuthPlugin/_AuthPlugin.php.html | 2 +- docs/api/awl/AuthPlugin/_AuthPlugins.php.html | 2 +- docs/api/awl/AwlDatabase/AwlDBDialect.html | 580 ++++++++++ docs/api/awl/AwlDatabase/AwlDatabase.html | 575 ++++++++++ docs/api/awl/AwlDatabase/AwlQuery.html | 1132 ++++++++++++++++++++ .../AwlUpgrader.html} | 128 ++- .../_AwlDBDialect.php.html} | 49 +- .../_AwlDatabase.php.html} | 30 +- .../_AwlQuery.php.html} | 46 +- .../_AwlUpgrader.php.html} | 23 +- docs/api/awl/Browser/Browser.html | 2 +- docs/api/awl/Browser/BrowserColumn.html | 2 +- docs/api/awl/Browser/_classBrowser.php.html | 2 +- docs/api/awl/DataEntry/EntryField.html | 2 +- docs/api/awl/DataEntry/EntryForm.html | 2 +- docs/api/awl/DataEntry/_DataEntry.php.html | 2 +- docs/api/awl/DataUpdate/DBRecord.html | 30 +- docs/api/awl/DataUpdate/_DataUpdate.php.html | 2 +- docs/api/awl/EMail/EMail.html | 2 +- docs/api/awl/EMail/_EMail.php.html | 2 +- docs/api/awl/MenuSet/MenuOption.html | 2 +- docs/api/awl/MenuSet/MenuSet.html | 2 +- docs/api/awl/MenuSet/_MenuSet.php.html | 2 +- docs/api/awl/PgQuery/PgQuery.html | 55 +- docs/api/awl/PgQuery/_PgQuery.php.html | 16 +- docs/api/awl/Session/Session.html | 54 +- docs/api/awl/Session/_Session.php.html | 12 +- docs/api/awl/Translation/_Translation.php.html | 10 +- docs/api/awl/User/User.html | 20 +- docs/api/awl/User/_User.php.html | 10 +- docs/api/awl/Utilities/_AWLUtilities.php.html | 91 +- docs/api/awl/Validation/Validation.html | 22 +- docs/api/awl/Validation/_Validation.php.html | 4 +- docs/api/awl/XMLDocument/XMLDocument.html | 2 +- docs/api/awl/XMLDocument/_XMLDocument.php.html | 6 +- docs/api/awl/XMLElement/XMLElement.html | 44 +- docs/api/awl/XMLElement/_XMLElement.php.html | 8 +- docs/api/awl/classEditor/Editor.html | 98 +- docs/api/awl/classEditor/EditorField.html | 16 +- docs/api/awl/classEditor/_classEditor.php.html | 2 +- docs/api/awl/iCalendar/_iCalendar.php.html | 67 +- docs/api/awl/iCalendar/_vEvent.php.html | 2 +- docs/api/awl/iCalendar/iCalComponent.html | 12 +- docs/api/awl/iCalendar/iCalProp.html | 24 +- docs/api/awl/iCalendar/iCalendar.html | 90 +- docs/api/awl/iCalendar/vEvent.html | 22 +- docs/api/classtrees_awl.html | 16 +- docs/api/elementindex.html | 744 ++++++++++--- docs/api/elementindex_awl.html | 542 +++++++++- docs/api/errors.html | 79 +- docs/api/index.html | 2 +- docs/api/li_awl.html | 82 +- docs/api/todolist.html | 2 +- 55 files changed, 4115 insertions(+), 664 deletions(-) create mode 100644 docs/api/awl/AwlDatabase/AwlDBDialect.html create mode 100644 docs/api/awl/AwlDatabase/AwlDatabase.html create mode 100644 docs/api/awl/AwlDatabase/AwlQuery.html copy docs/api/awl/{EMail/_EMail.php.html => AwlDatabase/AwlUpgrader.html} (59%) copy docs/api/awl/{XMLDocument/_XMLDocument.php.html => AwlDatabase/_AwlDBDialect.php.html} (74%) copy docs/api/awl/{XMLDocument/_XMLDocument.php.html => AwlDatabase/_AwlDatabase.php.html} (67%) copy docs/api/awl/{XMLElement/_XMLElement.php.html => AwlDatabase/_AwlQuery.php.html} (71%) copy docs/api/awl/{EMail/_EMail.php.html => AwlDatabase/_AwlUpgrader.php.html} (83%) diff --git a/debian/changelog b/debian/changelog index 7027f39..3a150a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,7 @@ awl (0.43-0) unstable; urgency=low * New upstream release. (closes: #538598) - -- Andrew McMillan Wed, 14 Apr 2010 17:25:01 +1200 + -- Andrew McMillan Thu, 15 Apr 2010 20:22:55 +1200 awl (0.42-0) unstable; urgency=low diff --git a/docs/api/awl/AuthPlugin/AuthPlugin.html b/docs/api/awl/AuthPlugin/AuthPlugin.html index 6fdd9c7..e43078d 100644 --- a/docs/api/awl/AuthPlugin/AuthPlugin.html +++ b/docs/api/awl/AuthPlugin/AuthPlugin.html @@ -218,7 +218,7 @@

- Documentation generated on Mon, 08 Mar 2010 18:19:46 +1300 by phpDocumentor 1.3.2 + Documentation generated on Thu, 15 Apr 2010 20:23:01 +1200 by phpDocumentor 1.3.2

\ No newline at end of file diff --git a/docs/api/awl/AuthPlugin/_AuthPlugin.php.html b/docs/api/awl/AuthPlugin/_AuthPlugin.php.html index 75ad884..eb5930c 100644 --- a/docs/api/awl/AuthPlugin/_AuthPlugin.php.html +++ b/docs/api/awl/AuthPlugin/_AuthPlugin.php.html @@ -140,7 +140,7 @@

- Documentation generated on Mon, 08 Mar 2010 18:19:46 +1300 by phpDocumentor 1.3.2 + Documentation generated on Thu, 15 Apr 2010 20:23:01 +1200 by phpDocumentor 1.3.2

\ No newline at end of file diff --git a/docs/api/awl/AuthPlugin/_AuthPlugins.php.html b/docs/api/awl/AuthPlugin/_AuthPlugins.php.html index b04230b..212a58e 100644 --- a/docs/api/awl/AuthPlugin/_AuthPlugins.php.html +++ b/docs/api/awl/AuthPlugin/_AuthPlugins.php.html @@ -224,7 +224,7 @@

- Documentation generated on Mon, 08 Mar 2010 18:19:46 +1300 by phpDocumentor 1.3.2 + Documentation generated on Thu, 15 Apr 2010 20:23:01 +1200 by phpDocumentor 1.3.2

\ No newline at end of file diff --git a/docs/api/awl/AwlDatabase/AwlDBDialect.html b/docs/api/awl/AwlDatabase/AwlDBDialect.html new file mode 100644 index 0000000..16f064b --- /dev/null +++ b/docs/api/awl/AwlDatabase/AwlDBDialect.html @@ -0,0 +1,580 @@ + + + + + + Docs For Class AwlDBDialect + + + + + +
+

 Class AwlDBDialect

+ + +
+
Description
+ +
+ +

The AwlDBDialect class handles support for different SQL dialects

+

This subpackage provides dialect specific support for PostgreSQL, and may, over time, be extended to provide support for other SQL dialects.

If you are looking for the place to add support for other SQL dialects, this is the class that you should be looking at. You might also look at the AwlDatabase class which extends this one, but these are the core capabilities which most probably need attention.

+

+ Located in /AwlDBDialect.php (line 33) +

+ + +

+	
+			
+
+ + +
+
Direct descendents
+ +
+ + + + + + + + + +
ClassDescription
+  class + AwlDatabase + + Typically there will only be a single instance of the database level class in an application. +
+
+
+ + + +
+
Variable Summary
+ +
+
+
+  + mixed + $db +
+
+  + mixed + $dialect +
+
+
+
+ + +
+
Method Summary
+ +
+
+ +
+  + AwlDBDialect + __construct + (string $connection_string, [string $dbuser = null], [string $dbpass = null], [array $options = null]) +
+ +
+  + void + GetFields + (string $tablename_string) +
+ +
+  + void + GetVersion + (handle $pdo) +
+ +
+  + void + Quote + (mixed $value, [string $value_type = null]) +
+ +
+  + The + ReplaceNamedParameters + (string 0, mixed 1) +
+ +
+  + The + ReplaceParameters + (string 0, mixed 1) +
+ +
+  + void + SetSearchPath + ([ $search_path = null]) +
+ +
+  + void + TranslateSQL + ( $sql_string) +
+
+
+
+ + +
+
Variables
+ +
+ + +
+ +
+ + + mixed + $db + (line 46) + +
+ + +

Holds the PDO database connection

+
    +
  • access: protected
  • +
+ + + + + +
+ +
+ +
+ + + mixed + $dialect + (line 41) + +
+ + +

Holds the name of the database dialect

+
    +
  • access: protected
  • +
+ + + + + +
+ +
+
+ + +
+
Methods
+ +
+ + +
+ +
+ + Constructor __construct (line 68) +
+ + +

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.

+

The database will be opened.

+ +
+ AwlDBDialect + + __construct + + (string $connection_string, [string $dbuser = null], [string $dbpass = null], [array $options = null]) +
+ +
    +
  • + string + $connection_string: The PDO connection string, in all it's glory
  • +
  • + string + $dbuser: The database username to connect as
  • +
  • + string + $dbpass: The database password to connect with
  • +
  • + array + $options: An array of driver options
  • +
+ + +
+ +
+ +
+ + GetFields (line 134) +
+ + +

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.

+ +
+ void + + GetFields + + (string $tablename_string) +
+ +
    +
  • + string + $tablename_string: The name of the table we want fields from
  • +
+ + +
+ +
+ +
+ + GetVersion (line 105) +
+ + +

Sets the current search path for the database.

+ +
+ void + + GetVersion + + (handle $pdo) +
+ +
    +
  • + handle + $pdo: A handle to an opened database
  • +
+ + +
+ +
+ +
+ + Quote (line 178) +
+ + +

Returns $value escaped in an appropriate way for this database dialect.

+ +
+ void + + Quote + + (mixed $value, [string $value_type = null]) +
+ +
    +
  • + mixed + $value: The value to be escaped
  • +
  • + string + $value_type: The type of escaping desired. If blank this will be worked out from the type of the $value. The special type of 'identifier' can also be used for escaping of SQL identifiers.
  • +
+ + +
+ +
+ +
+ + ReplaceNamedParameters (line 322) +
+ + +

Replaces named query parameters of the form :name with appropriately escaped substitutions.

+

The function takes a variable number of arguments, the first is the SQL string, with replaceable ':name' characters (a la DBI). The subsequent parameters being the values to replace into the SQL string.

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).

+
    +
  • return: built query string
  • +
+ +
+ The + + ReplaceNamedParameters + + (string 0, mixed 1) +
+ +
    +
  • + string + 0: The query string with replacable ':name' identifiers
  • +
  • + mixed + 1: A ':name' => 'value' hash of values to replace into the SQL string.
  • +
+ + +
+ +
+ +
+ + ReplaceParameters (line 266) +
+ + +

Replaces query parameters with appropriately escaped substitutions.

+

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.

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 "array( 'plain' => $param )".

+
    +
  • return: built query string
  • +
+ +
+ The + + ReplaceParameters + + (string 0, mixed 1) +
+ +
    +
  • + string + 0: The query string with replacable '?' characters.
  • +
  • + mixed + 1: The values to replace into the SQL string.
  • +
+ + +
+ +
+ +
+ + SetSearchPath (line 87) +
+ + +

Sets the current search path for the database.

+ +
+ void + + SetSearchPath + + ([ $search_path = null]) +
+ +
    +
  • + + $search_path
  • +
+ + +
+ +
+ +
+ + TranslateSQL (line 164) +
+ + +

Translates the given SQL string into a form that will hopefully work for this database dialect. This hook is intended 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.

+

The actual translation to other SQL dialects will be application-specific, so that any routines called by this will be external to this library, or will use resources loaded from some source external to this library.

The application developer is expected to use this functionality to solve harder translation problems, but is less likely to call this directly, hopefully switching ->Prepare to ->PrepareTranslated in those cases, and then adding that statement to whatever SQL translation infrastructure is in place.

+ +
+ void + + TranslateSQL + + ( $sql_string) +
+ +
    +
  • + + $sql_string
  • +
+ + +
+ +
+
+ + +

+ Documentation generated on Thu, 15 Apr 2010 20:23:02 +1200 by phpDocumentor 1.3.2 +

+
+ \ No newline at end of file diff --git a/docs/api/awl/AwlDatabase/AwlDatabase.html b/docs/api/awl/AwlDatabase/AwlDatabase.html new file mode 100644 index 0000000..ff76e7b --- /dev/null +++ b/docs/api/awl/AwlDatabase/AwlDatabase.html @@ -0,0 +1,575 @@ + + + + + + Docs For Class AwlDatabase + + + + + +
+

 Class AwlDatabase

+ + +
+
Description
+ +
+ +

Typically there will only be a single instance of the database level class in an application.

+

+ Located in /AwlDatabase.php (line 58) +

+ + +
AwlDBDialect
+   |
+   --AwlDatabase
+ +
+
+ + + + +
+
Variable Summary
+ +
+
+
+  + mixed + $translate_all +
+
+  + mixed + $txnstate +
+
+
+
+ + +
+
Method Summary
+ +
+
+ +
+  + void + Begin + () +
+ +
+  + void + Commit + () +
+ +
+  + void + ErrorInfo + () +
+ +
+  + void + prepare + ( $statement, [array $driver_options = array()], string $sql_query_string) +
+ +
+  + void + PrepareTranslated + ( $statement, [ $driver_options = array()]) +
+ +
+  + void + query + ( $statement, string $sql_query_string, mixed 1) +
+ +
+  + void + Rollback + () +
+ +
+  + void + TransactionState + () +
+ +
+  + void + TranslateAll + ( $onoff_boolean) +
+
+
+
+ + +
+
Variables
+ +
+ + +
+ +
+ + + mixed + $translate_all + = false (line 71) + +
+ + +

Holds whether we are translating all statements.

+
    +
  • access: protected
  • +
+ + + + + +
+ +
+ +
+ + + mixed + $txnstate + = 0 (line 66) + +
+ + +

Holds the state of the transaction 0 = not started, 1 = in progress, -1 = error pending rollback/commit

+
    +
  • access: protected
  • +
+ + + + + +
+

Inherited Variables

+ +

Inherited from AwlDBDialect

+
+ + + AwlDBDialect::$db
+
+ + + AwlDBDialect::$dialect
+
+
+ +
+
+ + +
+
Methods
+ +
+ + +
+ +
+ + Begin (line 101) +
+ + +

Begin a transaction.

+ +
+ void + + Begin + + () +
+ + + +
+ +
+ +
+ + Commit (line 116) +
+ + +

Complete a transaction.

+ +
+ void + + Commit + + () +
+ + + +
+ +
+ +
+ + ErrorInfo (line 172) +
+ + + +
+ void + + ErrorInfo + + () +
+ + + +
+ +
+ +
+ + prepare (line 80) +
+ + +

Returns a PDOStatement object created using this database, the supplied SQL string, and any parameters given.

+ +
+ void + + prepare + + ( $statement, [array $driver_options = array()], string $sql_query_string) +
+ +
    +
  • + string + $sql_query_string: The SQL string containing optional variable replacements
  • +
  • + array + $driver_options: PDO driver options to the prepare statement, commonly to do with cursors
  • +
  • + + $statement
  • +
+ + +
+ +
+ +
+ + PrepareTranslated (line 153) +
+ + +

Operates identically to AwlDatabase::Prepare, except that $this->Translate() will be called on the query before any processing.

+ +
+ void + + PrepareTranslated + + ( $statement, [ $driver_options = array()]) +
+ +
    +
  • + + $statement
  • +
  • + + $driver_options
  • +
+ + +
+ +
+ +
+ + query (line 93) +
+ + +

Returns a PDOStatement object created using this database, the supplied SQL string, and any parameters given.

+ +
+ void + + query + + ( $statement, string $sql_query_string, mixed 1) +
+ +
    +
  • + string + $sql_query_string: The SQL string containing optional variable replacements
  • +
  • + mixed + 1: ... Subsequent arguments are positionally replaced into the $sql_query_string
  • +
  • + + $statement
  • +
+ + +
+ +
+ +
+ + Rollback (line 128) +
+ + +

Cancel a transaction in progress.

+ +
+ void + + Rollback + + () +
+ + + +
+ +
+ +
+ + TransactionState (line 144) +
+ + +

Returns the current state of a transaction, indicating if we have begun a transaction, whether the transaction has failed, or if we are not in a transaction.

+ +
+ void + + TransactionState + + () +
+ + + +
+ +
+ +
+ + TranslateAll (line 163) +
+ + +

Switches on or off the processing flag controlling whether subsequent calls to AwlDatabase::Prepare are translated as if PrepareTranslated() had been called.

+ +
+ void + + TranslateAll + + ( $onoff_boolean) +
+ +
    +
  • + + $onoff_boolean
  • +
+ + +
+

Inherited Methods

+ + +

Inherited From AwlDBDialect

+
+  + AwlDBDialect::__construct()
+  + AwlDBDialect::GetFields()
+  + AwlDBDialect::GetVersion()
+  + AwlDBDialect::Quote()
+  + AwlDBDialect::ReplaceNamedParameters()
+  + AwlDBDialect::ReplaceParameters()
+  + AwlDBDialect::SetSearchPath()
+  + AwlDBDialect::TranslateSQL()
+
+ +
+
+ + +

+ Documentation generated on Thu, 15 Apr 2010 20:23:01 +1200 by phpDocumentor 1.3.2 +

+
+ \ No newline at end of file diff --git a/docs/api/awl/AwlDatabase/AwlQuery.html b/docs/api/awl/AwlDatabase/AwlQuery.html new file mode 100644 index 0000000..62ab64d --- /dev/null +++ b/docs/api/awl/AwlDatabase/AwlQuery.html @@ -0,0 +1,1132 @@ + + + + + + Docs For Class AwlQuery + + + + + +
+

 Class AwlQuery

+ + +
+
Description
+ +
+ +

The AwlQuery Class.

+

This class builds and executes SQL Queries and traverses the set of results returned from the query.

Example usage

  1.  $sql "SELECT * FROM mytable WHERE mytype = ?";
  2. +
  3.  $qry new AwlQuery$sql$myunsanitisedtype );
  4. +
  5.  if $qry->Exec("typeselect"__line____file__ )
  6. +
  7.       && $qry->rows > )
  8. +
  9.  {
  10. +
  11.    while$row $qry->Fetch() ) {
  12. +
  13.      do_something_with($row);
  14. +
  15.    }
  16. +
  17.  }
  18. +

+

+ Located in /AwlQuery.php (line 116) +

+ + +

+	
+			
+
+ + + + +
+
Variable Summary
+ +
+
+
+  + array + $bound_parameters +
+
+  + string + $bound_querystring +
+
+  + resource + $connection +
+
+  + string + $error_info +
+
+  + string + $execution_time +
+
+  + string + $location +
+
+  + string + $querystring +
+
+  + double + $query_time_warning +
+
+  + resource + $result +
+
+  + int + $rownum +
+
+  + int + $rows +
+
+  + string + $sth +
+
+
+
+ + +
+
Method Summary
+ +
+
+ +
+  + The + __construct + (string 0, mixed 1) +
+ +
+  + void + Begin + () +
+ +
+  + void + Bind + (mixed $args) +
+ +
+  + void + Commit + () +
+ +
+  + boolean + Exec + ([string $location = null], [int $line = null], [string $file = null]) +
+ +
+  + void + Execute + () +
+ +
+  + mixed + Fetch + ([boolean $as_array = false]) +
+ +
+  + void + Parameters + () +
+ +
+  + void + Prepare + () +
+ +
+  + boolean + QDo + (string 0, mixed 1) +
+ +
+  + void + QueryString + () +
+ +
+  + string + quote + ([mixed $str = null]) +
+ +
+  + void + Rollback + () +
+ +
+  + void + rows + () +
+ +
+  + void + SetConnection + (resource $new_connection, [ $options = null]) +
+ +
+  + void + SetSql + (string $sql) +
+ +
+  + void + _log_query + (string $locn, string $tag, string $string, [int $line = 0], [string $file = ""]) +
+
+
+
+ + +
+
Variables
+ +
+ + +
+ +
+ + + array + $bound_parameters + (line 143) + +
+ + +

The current array of bound parameters

+
    +
  • access: protected
  • +
+ + + + + +
+ +
+ +
+ + + string + $bound_querystring + (line 137) + +
+ + +

The actual query string, after we've replaced parameters in it

+
    +
  • access: protected
  • +
+ + + + + +
+ +
+ +
+ + + resource + $connection + (line 125) + +
+ + +

Our database connection, normally copied from a global one

+
    +
  • access: protected
  • +
+ + + + + +
+ +
+ +
+ + + string + $error_info + (line 173) + +
+ + +

The Database error information, if the query fails.

+
    +
  • access: protected
  • +
+ + + + + +
+ +
+ +
+ + + string + $execution_time + (line 180) + +
+ + +

Stores the query execution time - used to deal with long queries.

+

should be read-only

+
    +
  • access: protected
  • +
+ + + + + +
+ +
+ +
+ + + string + $location + (line 192) + +
+ + +

Where we called this query from so we can find it in our code! Debugging may also be selectively enabled for a $location.

+
    +
  • access: public
  • +
+ + + + + +
+ +
+ +
+ + + string + $querystring + (line 131) + +
+ + +

The original query string

+
    +
  • access: protected
  • +
+ + + + + +
+ +
+ +
+ + + double + $query_time_warning + = 0.3 (line 201) + +
+ + +

How long the query should take before a warning is issued.

+

This is writable, but a method to set it might be a better interface. The default is 0.3 seconds.

+
    +
  • access: public
  • +
+ + + + + +
+ +
+ +
+ + + resource + $result + (line 155) + +
+ + +

Result of the last execution

+
    +
  • access: protected
  • +
+ + + + + +
+ +
+ +
+ + + int + $rownum + = null (line 161) + +
+ + +

number of current row - use accessor to get/set

+
    +
  • access: protected
  • +
+ + + + + +
+ +
+ +
+ + + int + $rows + (line 167) + +
+ + +

number of rows from pg_numrows - use accessor to get value

+
    +
  • access: protected
  • +
+ + + + + +
+ +
+ +
+ + + string + $sth + (line 149) + +
+ + +

The PDO statement handle, or null if we don't have one yet.

+
    +
  • access: protected
  • +
+ + + + + +
+ +
+
+ + +
+
Methods
+ +
+ + +
+ +
+ + Constructor __construct (line 211) +
+ + +

Constructor

+
    +
  • return: AwlQuery object
  • +
+ +
+ The + + __construct + + (string 0, mixed 1) +
+ +
    +
  • + string + 0: The query string in PDO syntax with replacable '?' characters or bindable parameters.
  • +
  • + mixed + 1: The values to replace into the SQL string.
  • +
+ + +
+ +
+ +
+ + Begin (line 438) +
+ + +

Wrap the parent DB class Begin() so we can $qry->Begin() sometime before we $qry->Exec()

+
    +
  • access: public
  • +
+ +
+ void + + Begin + + () +
+ + + +
+ +
+ +
+ + Bind (line 321) +
+ + +

Bind some parameters. This can be called in three ways:

+

1) As Bind(':key','value), when using named parameters 2) As Bind('value'), when using ? placeholders 3) As Bind(array()), to overwrite the existing bound parameters. The array may be ':name' => 'value' pairs or ordinal values, depending on whether the SQL is using ':name' or '?' style placeholders.

+ +
+ void + + Bind + + (mixed $args) +
+ +
    +
  • + mixed + $args: See details above.
  • +
+ + +
+ +
+ +
+ + Commit (line 451) +
+ + +

Wrap the parent DB class Commit() so we can $qry->Commit() sometime after we $qry->Exec()

+
    +
  • access: public
  • +
+ +
+ void + + Commit + + () +
+ + + +
+ +
+ +
+ + Exec (line 527) +
+ + +

Execute the query, logging any debugging.

+

Example So that you can nicely enable/disable the queries for a particular class, you could use some of PHPs magic constants in your call.

  1.  $qry->Exec(__CLASS____LINE____FILE__);
  2. +

+
    +
  • return: Success (true) or Failure (false)
  • +
+ +
+ boolean + + Exec + + ([string $location = null], [int $line = null], [string $file = null]) +
+ +
    +
  • + string + $location: The name of the location for enabling debugging or just to help our children find the source of a problem.
  • +
  • + int + $line: The line number where Exec was called
  • +
  • + string + $file: The file where Exec was called
  • +
+ + +
+ +
+ +
+ + Execute (line 365) +
+ + +

Tell the database to execute the query

+ +
+ void + + Execute + + () +
+ + + +
+ +
+ +
+ + Fetch (line 591) +
+ + +

Fetch the next row from the query results

+
    +
  • return: query row
  • +
+ +
+ mixed + + Fetch + + ([boolean $as_array = false]) +
+ +
    +
  • + boolean + $as_array: True if thing to be returned is array
  • +
+ + +
+ +
+ +
+ + Parameters (line 422) +
+ + +

Return the parameters we are planning to substitute into the query string

+ +
+ void + + Parameters + + () +
+ + + +
+ +
+ +
+ + Prepare (line 342) +
+ + +

Tell the database to prepare the query that we will execute

+ +
+ void + + Prepare + + () +
+ + + +
+ +
+ +
+ + QDo (line 494) +
+ + +

Simple QDo() class which will re-use this query for whatever was passed in, and execute it returning the result of the Exec() call. We can't call it Do() since that's a reserved word...

+
    +
  • return: Success (true) or Failure (false)
  • +
  • access: public
  • +
+ +
+ boolean + + QDo + + (string 0, mixed 1) +
+ +
    +
  • + string + 0: The query string in PDO syntax with replacable '?' characters or bindable parameters.
  • +
  • + mixed + 1: The values to replace into the SQL string.
  • +
+ + +
+ +
+ +
+ + QueryString (line 414) +
+ + +

Return the query string we are planning to execute

+ +
+ void + + QueryString + + () +
+ + + +
+ +
+ +
+ + quote (line 302) +
+ + +

Quote the given string so it can be safely used within string delimiters in a query. To be avoided, in general.

+
    +
  • return: NULL, TRUE, FALSE, a plain number, or the original string quoted and with ' and \ characters escaped
  • +
+ +
+ string + + quote + + ([mixed $str = null]) +
+ +
    +
  • + mixed + $str: Data to be converted to a string suitable for including as a value in SQL.
  • +
+ + +
+ +
+ +
+ + Rollback (line 462) +
+ + +

Wrap the parent DB class Rollback() so we can $qry->Rollback() sometime after we $qry->Exec()

+
    +
  • access: public
  • +
+ +
+ void + + Rollback + + () +
+ + + +
+ +
+ +
+ + rows (line 430) +
+ + +

Return the count of rows retrieved/affected

+ +
+ void + + rows + + () +
+ + + +
+ +
+ +
+ + SetConnection (line 239) +
+ + +

Use a different database connection for this query

+ +
+ void + + SetConnection + + (resource $new_connection, [ $options = null]) +
+ +
    +
  • + resource + $new_connection: The database connection to use.
  • +
  • + + $options
  • +
+ + +
+ +
+ +
+ + SetSql (line 474) +
+ + +

Simple SetSql() class which will reset the object with the querystring from the first argument.

+
    +
  • access: public
  • +
+ +
+ void + + SetSql + + (string $sql) +
+ +
    +
  • + string + $sql: The query string in PDO syntax with replacable '?' characters or bindable parameters.
  • +
+ + +
+ +
+ +
+ + _log_query (line 280) +
+ + +

Log query, optionally with file and line location of the caller.

+

This function should not really be used outside of AwlQuery. For a more useful generic logging interface consider calling dbg_error_log(...);

+ +
+ void + + _log_query + + (string $locn, string $tag, string $string, [int $line = 0], [string $file = ""]) +
+ +
    +
  • + string + $locn: A string identifying the calling location.
  • +
  • + string + $tag: A tag string, e.g. identifying the type of event.
  • +
  • + string + $string: The information to be logged.
  • +
  • + int + $line: The line number where the logged event occurred.
  • +
  • + string + $file: The file name where the logged event occurred.
  • +
+ + +
+ +
+
+ + +

+ Documentation generated on Thu, 15 Apr 2010 20:23:02 +1200 by phpDocumentor 1.3.2 +

+
+ \ No newline at end of file diff --git a/docs/api/awl/EMail/_EMail.php.html b/docs/api/awl/AwlDatabase/AwlUpgrader.html similarity index 59% copy from docs/api/awl/EMail/_EMail.php.html copy to docs/api/awl/AwlDatabase/AwlUpgrader.html index c7b1dc1..1d595b9 100644 --- a/docs/api/awl/EMail/_EMail.php.html +++ b/docs/api/awl/AwlDatabase/AwlUpgrader.html @@ -3,7 +3,7 @@ - Docs for page EMail.php + Docs For Class AwlUpgrader