[Cs-webapplibs-commits] SF.net SVN: cs-webapplibs:[199] trunk/0.4/cs_dbTableHandler.class.php
Status: Beta
Brought to you by:
crazedsanity
From: <cra...@us...> - 2011-01-27 04:04:17
|
Revision: 199 http://cs-webapplibs.svn.sourceforge.net/cs-webapplibs/?rev=199&view=rev Author: crazedsanity Date: 2011-01-27 04:04:11 +0000 (Thu, 27 Jan 2011) Log Message: ----------- New class for handling insert/delete/select statements for a single table. /cs_dbTableHandler.class.php [NEW]: * class that simply extends cs_singleTableHandlerAbstract{}, for the simple purpose of being able to create a sub-object for this handler instead of extending it directly. Added Paths: ----------- trunk/0.4/cs_dbTableHandler.class.php Copied: trunk/0.4/cs_dbTableHandler.class.php (from rev 195, trunk/0.4/abstract/cs_singleTableHandler.abstract.class.php) =================================================================== --- trunk/0.4/cs_dbTableHandler.class.php (rev 0) +++ trunk/0.4/cs_dbTableHandler.class.php 2011-01-27 04:04:11 UTC (rev 199) @@ -0,0 +1,35 @@ +<?php +/* + * SVN INFORMATION::: + * ------------------- + * Last Author::::::::: $Author$ + * Current Revision:::: $Revision$ + * Repository Location: $HeadURL$ + * Last Updated:::::::: $Date$ + */ + +class cs_dbTableHandler extends cs_singleTableHandlerAbstract { + + + //------------------------------------------------------------------------- + /** + * Generic way of using a class to define how to update a single database table. + * + * @param $dbObj (object) Connected instance of cs_phpDB{}. + * @param $tableName (str) Name of table inserting/updating. + * @param $seqName (str) Name of sequence, used with PostgreSQL for retrieving the last inserted ID. + * @param $pkeyField (str) Name of the primary key field, for performing updates & retrieving specific records. + * @param $cleanStringArr (array) Array of {fieldName}=>{dataType} for allowing updates & creating records. + */ + public function __construct(cs_phpDB $dbObj, $tableName, $seqName, $pkeyField, array $cleanStringArr) { + try { + parent::__construct($dbObj, $tableName, $seqName, $pkeyField, $cleanStringArr); + } + catch(Exception $e) { + throw new exception(__METHOD__ .": unable to start, DETAILS::: ". $e->getMessage()); + } + }//end __construct() + //------------------------------------------------------------------------- + +} + Property changes on: trunk/0.4/cs_dbTableHandler.class.php ___________________________________________________________________ Added: svn:keywords + Id Author Revision HeadURL Date Added: svn:mergeinfo + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |