Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
checkDb Class Reference
+ Collaboration diagram for checkDb:

Public Member Functions

 __construct ($connect)
 
 checkConnection ()
 
 checkUnreferenceUsers ()
 
 checkDateStyle ()
 
 checkStandardConformingStrings ()
 
 checkUserAsGroup ()
 
 checkUnreferencedAction ()
 
 checkUnreferencedParameters ()
 
 checkUnreferencedAcl ()
 
 getUnreferencedPermission ()
 
 checkDoubleFrom ()
 
 checkDoubleName ()
 
 checkMultipleAlive ()
 
 checkInheritance ()
 
 checkNetworkUser ()
 
 checkcleanContext ()
 
 checkAttributeType ()
 
 checkAttributeOrphan ()
 
 getSQLDropColumns (&$node, &$cmds=array(), $combined=true)
 
 computeDropColumns (&$node=null, $fromId=0)
 
 getFullAnalyse ()
 
 checkUnnamedFamilies ()
 
 checkMissingDocumentsInDocread ()
 
 checkSpuriousDocumentsInDocread ()
 

Static Public Member Functions

static verifyDbFamily ($famid, NormalAttribute $aoa=null)
 
static getOrphanAttributes ($famid)
 
static isDroppedInNode (&$node, $column)
 

Data Fields

const OK = "green"
 
const KO = "red"
 
const BOF = "orange"
 

Detailed Description

Definition at line 17 of file Class.CheckDb.php.

Constructor & Destructor Documentation

__construct (   $connect)

Definition at line 37 of file Class.CheckDb.php.

Member Function Documentation

checkAttributeOrphan ( )

verify attribute sql type

Returns
void

Definition at line 504 of file Class.CheckDb.php.

+ Here is the call graph for this function:

checkAttributeType ( )

verify attribute sql type

Returns
void

Definition at line 484 of file Class.CheckDb.php.

+ Here is the call graph for this function:

checkcleanContext ( )

Definition at line 332 of file Class.CheckDb.php.

+ Here is the call graph for this function:

checkConnection ( )

Definition at line 45 of file Class.CheckDb.php.

checkDateStyle ( )

Definition at line 69 of file Class.CheckDb.php.

+ Here is the call graph for this function:

checkDoubleFrom ( )

Definition at line 179 of file Class.CheckDb.php.

checkDoubleName ( )

Definition at line 193 of file Class.CheckDb.php.

checkInheritance ( )

Definition at line 223 of file Class.CheckDb.php.

checkMissingDocumentsInDocread ( )

Definition at line 751 of file Class.CheckDb.php.

checkMultipleAlive ( )

Definition at line 208 of file Class.CheckDb.php.

checkNetworkUser ( )

PhpUndefinedFunctionInspection

Definition at line 243 of file Class.CheckDb.php.

checkSpuriousDocumentsInDocread ( )

Definition at line 770 of file Class.CheckDb.php.

checkStandardConformingStrings ( )

Definition at line 84 of file Class.CheckDb.php.

+ Here is the call graph for this function:

checkUnnamedFamilies ( )

Definition at line 705 of file Class.CheckDb.php.

checkUnreferencedAcl ( )

Definition at line 148 of file Class.CheckDb.php.

checkUnreferencedAction ( )

Definition at line 114 of file Class.CheckDb.php.

checkUnreferencedParameters ( )

Definition at line 129 of file Class.CheckDb.php.

checkUnreferenceUsers ( )

Definition at line 54 of file Class.CheckDb.php.

checkUserAsGroup ( )

Definition at line 99 of file Class.CheckDb.php.

computeDropColumns ( $node = null,
  $fromId = 0 
)

Compute a tree of families with columns to drop

Parameters
array$nodeThe families tree returned with columns to drop
int$fromIdFamily id to start from (default is 0)
Returns
string empty string on success, non-empty string containing the error message on failure
Exceptions
\Dcp\Db\Exception

Definition at line 600 of file Class.CheckDb.php.

+ Here is the call graph for this function:

getFullAnalyse ( )

Do all analyses

Returns
array

Definition at line 662 of file Class.CheckDb.php.

+ Here is the call graph for this function:

static getOrphanAttributes (   $famid)
static

Definition at line 448 of file Class.CheckDb.php.

+ Here is the call graph for this function:

getSQLDropColumns ( $node,
$cmds = array(),
  $combined = true 
)

Compute the required SQL commands to drop the columns marked for deletion in the given family tree.

Parameters
array$nodeThe family tree obtained with ::computeDropColumns()
array$cmdsResulting SQL commands
bool$combinedbool(true) to combine multiple DROP instructions into a single ALTER TABLE instruction, bool(false) to generate multiple ALTER TABLE instructions containing each a single DROP instruction.

Definition at line 564 of file Class.CheckDb.php.

getUnreferencedPermission ( )

Definition at line 163 of file Class.CheckDb.php.

static isDroppedInNode ( $node,
  $column 
)
static

Recursively walk up the tree node to find if a specific column has already been marked for deletion in a parent family.

Parameters
array$nodeThe tree node starting point
string$columnThe column's name to lookup for
Returns
bool bool(true) if the column is already marked for deletion in a parent family or bool(false) if not

Definition at line 542 of file Class.CheckDb.php.

static verifyDbFamily (   $famid,
NormalAttribute  $aoa = null 
)
static

detected sql type inconsistence with declaration

Parameters
$famid
NormalAttribute$aoaif wan't test only one attribute
Exceptions
Dcp\Exception
Returns
array empty array if no error, else an item string by error detected

Definition at line 412 of file Class.CheckDb.php.

+ Here is the call graph for this function:

Field Documentation

const BOF = "orange"

Definition at line 35 of file Class.CheckDb.php.

const KO = "red"

Definition at line 34 of file Class.CheckDb.php.

const OK = "green"

Definition at line 33 of file Class.CheckDb.php.


The documentation for this class was generated from the following file:
← centre documentaire © anakeen