- Table of Contents
- Introduction --
What DB_DataObject can do
- Configuration Options --
Setting the defaults for database access
- Auto Building --
creating the base Classes and Database schema
- ->get() -- Simple Get (Select) request
- DB_DataObject::staticGet() -- Simple Get (Select) request, abbreviated and Autoload.
- {Child Class}::staticGet() -- Simple Get (Select) request, abbreviated (autogenerated)
- ->find() -- find results
- ->fetch() -- fetch next row
- ->count() -- Perform a select count() request
- ->insert() -- Insert current objects variables into database
- ->update() -- Update objects variables into database
- ->delete() -- Delete items from table
- Advanced Filters --
Advanced Filters - ::query(), ::SelectAdd(), ::whereAdd(), ::Limit(), ::OrderBy(), ::GroupBy(),
- ->query() -- send a raw query
- ->selectAdd() -- Add selected columns
- ->whereAdd() -- Add WHERE statement
- ->escape() -- Escape a string for use with Like queries
- ->limit() -- Set limit
- ->orderBy() -- Add an order by condition
- ->groupBy() -- Add group by condition
- Automatic Table Linking and Joins --
Automatic Table Linking - ::getLink(), ::getLinks(), ::joinAdd()
- ->getLink() -- fetch and return a related object
- ->getLinks() -- load related objects
- ->joinAdd() -- add another dataobject to build a create join query
- ->setFrom() -- Copy items from Array or Object (for form posting)
- ->toArray() -- Get an array of the current result
- ->validate() -- check object data, and call objects validation methods.
- ->getDatabaseConnection() -- Get the PEAR Database Object
- ->getDatabaseResult() -- Get the PEAR Database Result Object
- DB_DataObject::debugLevel -- set the amount of debugging output
- ->debug() -- output debug information.
- DB_DataObject::raiseError -- throw an error
SQL Builder and Data Modeling Layer
This chapter describes how to use the DB_DataObject SQL Builder
and Data Modeling layer