[ANNOUNCEMENT] DB_DataObject-1.3 (stable) Released.
| From: | PEAR Announce | Date: | Sat, 15 Nov 2003 02:47:30 +0000 |
| Subject: | [ANNOUNCEMENT] DB_DataObject-1.3 (stable) Released. | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-8957@lists.php.net to get a copy of this message | ||
The new PEAR package DB_DataObject-1.3 (stable) has been released at http://pear.php.net/.
Release notes
-------------
New Features
- Inserts and updates do not use keys in the data creation part of the query
(Markus Wolff)
- MsSQL native get_last_insert ID using SELECT @@IDENTITY
** you may want to consider using this with transactions eg.
$dataobject->query('BEGIN') and $dataobject->query('COMMIT')
to ensure thread safety. (Markus Wolff)
- DB_DataObject_Cast - a experimental generic casting feature for assigning variables
* Common usages:
// blobs
$dataObject->someblobfield =
DB_DataObject_Cast::blob(file_get_contents('xxx.jpg'));
$dataObject->someblobfield = DB_DataObject_Cast::string('xxxxx');
// dates?
$dataObject->at_date = DB_DataObject_Cast::date('12/12/2000'); //Human
$dataObject->at_date = DB_DataObject_Cast::date('2000-12-12'); //ISO
$dataObject->at_date = DB_DataObject_Cast::date(2000,12,12); //YYYY,dd,mm
$d2 = DB_DataObject_Cast::date(); // today!
// some addition
$dataObject->expires = DB_DataObject_Cast::date($d1->year, $d1->month+30,
$d1->day+30);
// raw sql????
$dataObject->maxids = DB_DataObject_Cast::sql('max(id) > 12');
$dataObject->emptyfield = DB_DataObject_Cast::sql('NULL');
You can extend this object to provide your own datatypes..
- PHP5 Compatibility
Return values should work with PHP5beta2
Overload (__call) should work with PHP5beta2
- table() and keys() Allow setting of data with a value
(so you can use dataobjects without extended instances.)
- factory/ getLinks and autoloading
Will use the full path location in config to check if the file exists,
after that it is included without warnings turned off..
(autoloading check to see if class exists first - should be faster)
Fixes:
- Validate is an optional dependency (Arnaud Limbourg)
- Bug #228, BOOL type on postgresql correctly quoted.
- Bug #133, No error is raised when calling fetch with no data returned,
just produces a debug warning now
- Bug #172,Turning of Overload
If you define DB_DATAOBJECT_NO_OVERLOAD to any value, then dataobjects will not be overloaded,
This is usefull when working with ZendOptimizer, that may segfault with certain optimization
levels
Package Info
-------------
DataObject performs 2 tasks:
1. Builds SQL statements based on the objects vars and the builder methods.
2. acts as a datastore for a table row.
The core class is designed to be extended for each of your tables so that you put the
data logic inside the data classes.
included is a Generator to make your configuration files and your base classes.
nd
Related Links
-------------
Package home: http://pear.php.net/package/DB_DataObject
Changelog: http://pear.php.net/package-changelog.php?package=DB_DataObject
Download: http://pear.php.net/get/DB_DataObject-1.3.tgz
Authors
-------------
Alan Knowles <alan@akbkhome.com> (lead)