DATA stands for Database Access Through Arrays. This package can be used to access data stored in MySQL tables like accessing arrays. It uses SPL to implement several classes and iterators interfaces to access MySQL databases.
Examples:
$DB['test_table'][] = array(
'name' => 'first',
'value' => 'the first row'
);
foreach ($DB['test_table'] as $i => $row) {
...
}
$DB['test_table']['first']['value'] = '1st';
unset($DB['test_table']['first']);
No application links were specified for this class.
| File |
Role |
Description |
example.php |
Example |
An usage example |
example.sqltypes.php |
Example |
An usage example |
data.lib.php |
Appl. |
Main include file of the DATA library. |
data.mysql5.lib.php |
Appl. |
Include to use the DATA library using a MySQL5 database. |
DATA |
AssociativeIndexingStrategy.php |
Class |
An interface to algorithmic solutions for mapping an associative array index to rows in a database table. |
CannotRemoveField.php |
Class |
An exception thrown when an unset has been tried on a row field. |
Exception.php |
Class |
All exceptions inside the DATA library extend this exception. |
FieldDoesntExist.php |
Class |
An exception thrown when trying to read a field that doesn't exist on the table. |
IndexingStrategyException.php |
Class |
All exceptions that occur on indexing strategies extend this exception. |
InvalidDate.php |
Class |
An exception thrown when a sql date field is filled with an invalid value. |
InvalidDatetime.php |
Class |
An exception thrown when a sql datetime field is filled with an invalid value. |
InvalidDecimal.php |
Class |
An exception thrown when a sql decimal field is filled with an invalid value or has overflown its capacity. |
InvalidInt.php |
Class |
An exception thrown when a sql int field is filled with an invalid value or has overflown its capacity. |
InvalidTime.php |
Class |
An exception thrown when a sql time field is filled with an invalid value. |
NotImplemented.php |
Class |
An exception thrown when a feature hasn't been implemented yet. |
NotNullable.php |
Class |
An exception thrown when trying to null a not nullable sql field. |
Number.php |
Class |
Interface for numerical objects. |
PrimaryKeyNeeded.php |
Class |
An exception thrown when a primary key is required for the operation requested. |
PrimaryKeyTooLarge.php |
Class |
An exception thrown when a primary key is too large for the operation requested. |
ReadOnly.php |
Class |
An exception thrown when access to the database through an object is read only. |
RowDoesntExist.php |
Class |
An exception thrown when trying to read a row that doesn't exist on the table. |
SQLChar.php |
Class |
ANSI SQL Character data type representation. |
SQLCharFactory.php |
Class |
A concrete factory for inboxing strings into char fields. |
SQLDate.php |
Class |
ANSI SQL Date data type representation. |
SQLDatetime.php |
Class |
ANSI SQL Datetime data type representation. |
SQLDecimal.php |
Class |
ANSI SQL arbitrary size number with decimals data type representation. |
SQLDecimalFactory.php |
Class |
A concrete factory for inboxing php values into decimal fields. |
SQLInt.php |
Class |
ANSI SQL Integer data type representation. |
SQLIntFactory.php |
Class |
A concrete factory for inboxing php values into int fields. |
SQLSmallInt.php |
Class |
ANSI SQL small integer data type representation. |
SQLSmallIntFactory.php |
Class |
A concrete factory for inboxing php values into small int fields. |
SQLTime.php |
Class |
ANSI SQL Time data type representation. |
SQLType.php |
Class |
SQL type representation. |
SQLTypeConstraintFailed.php |
Class |
An exception thrown when an sql type constraint fails to apply to a value. |
SQLTypeFactory.php |
Class |
Abstract factory for SQL types representations. |
SQLVarchar.php |
Class |
ANSI SQL Character Varying data type representation. |
SQLVarcharFactory.php |
Class |
A concrete factory for inboxing strings into varchar fields. |
StringTooLarge.php |
Class |
An exception thrown when a sql character field cannot hold the string provided by the user. |
DATA/MySQL5 |
Access.php |
Class |
This class provides basic interaction with a MySQL5 database. |
Database.php |
Class |
This class is the abstraction of a MySQL5 database implementing the array access behavior. |
DefaultIndexingStrategy.php |
Class |
Default strategy for mapping an associative array index to rows in a database table. |
Error.php |
Class |
An exception thrown when an error is detected on an operation with a MySQL5 database. |
PrimaryKeyIndexingStrategy.php |
Class |
Strategy for mapping array offsets to primary key values. |
Row.php |
Class |
This class is the abstraction of a MySQL5 table row implementing the array access and iteration behavior. |
Schema.php |
Class |
MySQL5 schema observation functions class |
SQLDateFactory.php |
Class |
A concrete factory for inboxing string with mysql date format into date objects. |
SQLDatetimeFactory.php |
Class |
A concrete factory for inboxing string with mysql datetime format into datetime objects. |
SQLTimeFactory.php |
Class |
A concrete factory for inboxing string with mysql time format into time objects. |
Table.php |
Class |
This class is the abstraction of a MySQL5 table implementing the array access and iteration behavior. |
TableIterator.php |
Class |
Table rows iterator. |