ZurmoMySqlQueryWriter Class Reference

Public Member Functions

 doesTableExist ($tableName)
 doesColumnExist ($tableName, $columnName)
 getColumnsWithDetails ($tableName)
 getIndexes ($tableName)
 getColumnCountByTableName ($tableName, $excludeIdColumn=true)
 getFirstRowByTableName ($tableName)
 dropTableByTableName ($tableName)
 safeTable ($name, $noQuotes=false)

Detailed Description

Definition at line 37 of file ZurmoMySqlQueryWriter.php.


Member Function Documentation

doesTableExist ( tableName  ) 

Returns true/false depending on if the supplied tableName exists

Parameters:
$tableName 
Returns:
bool

Definition at line 44 of file ZurmoMySqlQueryWriter.php.

doesColumnExist ( tableName,
columnName 
)

Returns true/false depending on if the supplied columnName exists in table.

Parameters:
$tableName 
$columnName 
Returns:
bool

Definition at line 57 of file ZurmoMySqlQueryWriter.php.

getColumnsWithDetails ( tableName  ) 

Generates an array with column details such as not null, type, etc.

Parameters:
$tableName 
Returns:
array

Definition at line 69 of file ZurmoMySqlQueryWriter.php.

getIndexes ( tableName  ) 

Returns array of indexes for provided tableName

Parameters:
$tableName 
Returns:
array

Definition at line 86 of file ZurmoMySqlQueryWriter.php.

getColumnCountByTableName ( tableName,
excludeIdColumn = true 
)

Gets the count of how many columns there are in a table minus the initial 'id' column.

Parameters:
string $tableName
bool $excludeIdColumn
Returns:
integer

Definition at line 115 of file ZurmoMySqlQueryWriter.php.

getFirstRowByTableName ( tableName  ) 

Get the first row of a table. if no rows exist, an NoRowsInTableException is thrown.

Parameters:
string $tableName

Definition at line 130 of file ZurmoMySqlQueryWriter.php.

dropTableByTableName ( tableName  ) 

Drops a table by the given table name.

Parameters:
string $tableName

Definition at line 149 of file ZurmoMySqlQueryWriter.php.

safeTable ( name,
noQuotes = false 
)

Do everything that needs to be done to format a table name.

Parameters:
string $name of table
Returns:
string table name

Definition at line 160 of file ZurmoMySqlQueryWriter.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Thu Mar 30 07:10:32 2017