.

IDBRelation Interface Reference
[Interfaces]

Interface for a DB relation. More...

Inheritance diagram for IDBRelation:
IPolicyHolder DBRelation

List of all members.

Public Member Functions

  get_fields ()
  Returns field taking parts in this relation.
  get_null_allowed ()
  Returns true, if null values are allowed.
  get_reversed_fields ()
  Returns array of fields, but fields get reversed before.
  get_target_table_name ()
  Return target table name.
  get_type ()
  Returns type of relation.
  validate ($arr_fields)
  Check if relation conditions are fullfiled.

Detailed Description

Interface for a DB relation.

We use terminology source and target here. Of course what is source and what is target depends on the perspective, so we could also call this A and B.

A relation is defined for one field on source table that relates to one field on target table

Author:
Gerd Riesselmann

Definition at line 13 of file idbrelation.cls.php.


Member Function Documentation

IDBRelation::get_fields (  ) 

Returns field taking parts in this relation.

Returns:
array Associative array with column name as key and IDFieldRelation instance as value

Implemented in DBRelation.

IDBRelation::get_null_allowed (  ) 

Returns true, if null values are allowed.

Returns:
bool

Implemented in DBRelation.

IDBRelation::get_reversed_fields (  ) 

Returns array of fields, but fields get reversed before.

Returns:
array Associative array with column name as key and IDFieldRelation instance as value

Implemented in DBRelation.

IDBRelation::get_target_table_name (  ) 

Return target table name.

Returns:
string

Implemented in DBRelation.

IDBRelation::get_type (  ) 

Returns type of relation.

Returns:
int

Implemented in DBRelation.

IDBRelation::validate ( arr_fields  ) 

Check if relation conditions are fullfiled.

This checks from a source perspective, that is:

  • See if source field conditions are met (e.g. NOT NULL)
  • Check if there is a least one record on target table
Parameters:
array  Associative array of form fieldname => fieldvalue
Returns:
Status

Implemented in DBRelation.


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