Ferreteria/v0.3/class/cPortalRow database: Difference between revisions

From Woozle Writes Code
< Ferreteria‎ | v0.3‎ | class
Jump to navigation Jump to search
(moved trait stuff here)
m (14 revisions imported: moving this project here)
 
(12 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{page/code/class|ferreteria}}
{{page/code/class}}
<source lang=php>
<source lang=php>
class cPortalRow_database extends cPortalRow_storage {
/*::::
    use tSourcedStorage;
  ABSTRACT: GetTableName(), FieldsString_forSelect()
    use tSequentialAccess;
*/
   
abstract class cPortalRow_database extends cPortalRow_storage {
    public function RewindRows() {
     use tDatabaseStorage;
    /*----
 
      ACTION: Retrieves the current row data and advances to the next
     public function __construct(cFieldRow $rs) {
      RETURNS: row data as an array, or NULL if no more rows
        $this->SetRowObject($rs);
      CEMENT
     }
    */
}
    public function NextRow() {
    /*----
      RETURNS: number of rows in the resultset
      CEMENT
    */
    public function GetFoundRowCount() {
     // TODO: rename to something like IsAnyRowFound()
    public function IsRowFound() {
    /*----
      RETURNS: Nothing
      OUTPUT: $this and $this->GetRowObject()
    */
     public function FetchRows($sql) {
    /*----
      RETURNS: nothing
      OUTPUT: same as $this->FetchRows()
    */
    public function SelectRows($sqlWhere=NULL,$sqlSort=NULL,$sqlOther=NULL) : cResultRows {
     public function GetRow_forKey($id) {
    protected function FigureSelectSQL($sqlWhere=NULL,$sqlSort=NULL,$sqlOther=NULL) {}
</source>
</source>
* '''file''': {{l/ferreteria/file|data/portals/rows/storage.php}}
* '''file''': {{l/ferreteria/file|data/core/systems.php}}
* '''extends''': {{l/ferreteria/class|cPortalRow_storage}}
* '''extends''': {{l/ferreteria/class|cPortalRow_storage}}
* '''uses''':
==old version==
** {{l/ferreteria/class|tSourcedStorage}}
* '''replaced by''': {{l/ferreteria/class|tDatabaseStorage}}, {{l/ferreteria/class|tQueryableSource}}
** {{l/ferreteria/class|tSequentialAccess}}
* '''uses''': {{l/ferreteria/class|tDatabaseStorage}}
* '''extenders''': ''none''
* '''extenders''': {{l/ferreteria/class|cPortalRow_Table}}

Latest revision as of 16:43, 22 May 2022

Template:Page/code/class

/*::::
  ABSTRACT: GetTableName(), FieldsString_forSelect()
*/
abstract class cPortalRow_database extends cPortalRow_storage {
    use tDatabaseStorage;

    public function __construct(cFieldRow $rs) {
        $this->SetRowObject($rs);
    }
}

old version