/** * Returns the random function * @param epDbObject $db the db connection * @return false|string */ public static function sqlRandom($db) { // get the portable if (!($dbp =& epObj2Sql::getPortable($db->dbType()))) { return false; } // call portability object to get random function return $dbp->randomFunc(); }
/** * Makes a SQL truncate table if exists statement for a class map * @param epDbObject $db the db connection * @param epClassMap the class map for the object * @return string */ public static function sqlTruncate($db, $cm) { // get the portable if (!($dbp =& epObj2Sql::_getPortable($db->dbType()))) { return false; } // call portability object to produce return $dbp->truncateTable($cm->getTable(), $db); }