CORE POS - IS4C
The CORE POS front end
Public Member Functions | Protected Attributes | List of all members
ViewModel Class Reference
Inheritance diagram for ViewModel:
BasicModel CcReceiptViewModel MemberCardsViewModel ScreenDisplayModel TaxViewModel

Public Member Functions

 definition ()
 
 create ()
 
 delete ()
 
 save ()
 
 normalize ($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK, $doCreate=false)
 
- Public Member Functions inherited from BasicModel
 db ()
 
 preferredDB ()
 
 __construct ($con)
 
 create ()
 
 createIfNeeded ($db_name)
 
 load ()
 
 reset ()
 
 getColumns ()
 
 getName ()
 
 find ($sort='', $reverse=false)
 
 delete ()
 
 save ()
 
 normalize ($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK, $doCreate=False)
 
 generate ($filename)
 
 newModel ($name)
 
 getModels ()
 

Protected Attributes

 $name = '__VirtualClass_ShouldNotExist'
 
- Protected Attributes inherited from BasicModel
 $name
 
 $columns = array()
 
 $unique = array()
 
 $meta_types
 
 $connection = false
 
 $instance = array()
 
 $preferred_db = ''
 

Additional Inherited Members

- Public Attributes inherited from BasicModel
const NORMALIZE_MODE_CHECK = 1
 
const NORMALIZE_MODE_APPLY = 2
 
- Protected Member Functions inherited from BasicModel
 getMeta ($type, $dbms)
 
 insertRecord ()
 
 updateRecord ()
 

Member Function Documentation

ViewModel::create ( )

Create specified view

Returns
[boolean]
ViewModel::definition ( )

Generate SQL definition of view. Is a method rather than property in case any part of the query needs to be generated based on DBMS and/or configuration values

Returns
[string] view definition

Note: This should be everything that follows the "CREATE VIEW view_name AS". Do not include that part.

ViewModel::delete ( )

Deletes the view. This will drop an existing view but will not drop an existing table.

Returns
[boolean]
ViewModel::normalize (   $db_name,
  $mode = BasicModel::NORMALIZE_MODE_CHECK,
  $doCreate = false 
)

Normalize will drop a table and recreate as a view if needed

ViewModel::save ( )

Does nothing. No meaning in context of a view.


The documentation for this class was generated from the following file: