This model file maintains tables of application integration informations
Functions available :-
function __construct() - class constructor
function exists() - checks for existing primary key
function getArray() - gets table header array
function getHeader() - gets record column information
function get_data() - gets recrdset
function set_query() - sets query to quiry the table
function count_data() - counts the record set
function save() - saves submitted data
function delete() - deletes records
function getMetadata() - gets table column information
function get_app_data() - gets application data from db
Creation date :- Jun 5, 2014 Last Modified on :- Last Modification :-
package |
AIR\Models\AppIntegrator_model |
---|---|
author |
Mohamed Ruzaik Mohamed Roshan roshan@ekwa.com |
version |
V 2.7.0 |
created |
Jun 5, 2014 |
__construct()
Meta Information will be generated at the class initialization
count_data( $data) : \All
gets complete data from the table with the facility of selection and filters. Then counts returned records
is a composit array with elements for selection - fields that are to be selected / default *, filter - the conditions for where clause, group by , having and order by Ex: Array(['selection']=>'table_name.field_name1,table_name.field_name2', ['filter']=>array(field_name=>value), ['group_by']=>'field_name1,field_name2', ['having']=>array(filed_name => value) , ['order_by']=>array(filed_name => order)); ['order_by']=>array(filed_name => order) - order is asc/desc
\All
data, as an associative array with use of getArray() function
delete( $pks) : \status
Delete record(s) from table
\status
of Query execution , TRUE if successful, otherwise FALSE
exists( $primekey) : TRUE
Checks whether given entity exists in database or not
is an array of key field and value, starting index of dataset, useful for pagination etc Ex: Array($field_name=>value);
TRUE
if exists, FALSE if not
get_app_data(integer $integration_id, integer $calling_app_id, integer $called_app_id, integer $calling_app_func_id) : array
This method gets application information from db for given parameters
integer
integer
integer
integer
array
get_data( $data) : \All
gets complete data from the table with the facility of selection and filters.Records can be grouped and ordered
is a composit array with elements for selection - fields that are to be selected / default *, filter - the conditions for where clause, group by , having and order by Ex: Array( ['selection']=>'table_name.field_name1,table_name.field_name2', ['filter']=>array(field_name=>value), ['group_by']=>'field_name1,field_name2', ['having']=>array(filed_name => value) , ['order_by']=>array(filed_name => order)); ['order_by']=>array(filed_name => order) - order is asc/desc
$data['search'] is a an associative array
will have the field, value and query method as array object
array('search_field' => $field, 'search_text' => $search_text,'query_method'=>$query_method);
search_field=> table field name
search_text=> text / id to be searched
query_method=> equal/like the query method to be used for the search
\All
data, as an associative array with use of getArray() function
getArray( $data) : \An
converts database query resultset to an associative array
\An
associative array of resultset and associate db table field comments
getHeader(array $data) : array
This is a standard model function to get table column information
array
array
record set
getMetadata() : boolean
This function will retun the Metadata array for the use of the controller a any other purpose
boolean
save( &$ar_applications_data, $key = false) : \status
Insert data as a new record, if not exists, otherwise do Update
an array of key field names and values
\status
of Query execution , TRUE if successful, otherwise FALSE
set_query(array $data, boolean $limit_enable)
This function is a standard model function. It sets query string to retrive table records based on given params
array
boolean