Property | Type | Description | |
---|---|---|---|
$enabled | Whether tracking is ready. |
Method | Description | |
---|---|---|
activateTracking ( string $dbname, string $tablename, string $version ) : integer | Activates tracking of a table. | |
changeTrackingData ( string $dbname, string $tablename, string $version, string $type, string | array $new_data ) : boolean | Changes tracking data of a table. | |
createDatabaseVersion ( string $dbname, string $version, string $query, string $tracking_set = 'CREATE DATABASE,ALTER DATABASE,DROP DATABASE' ) : integer | Creates tracking version of a database (in other words: create a job to track future changes on the database). | |
createVersion ( string $dbname, string $tablename, string $version, string $tracking_set = '', boolean $is_view = false ) : integer | Creates tracking version of a table / view (in other words: create a job to track future changes on the table). | |
deactivateTracking ( string $dbname, string $tablename, string $version ) : integer | Deactivates tracking of a table. | |
deleteTracking ( string $dbname, string $tablename, string $version = '' ) : integer | Removes all tracking data for a table or a version of a table | |
enable ( ) : void | Actually enables tracking. This needs to be done after all underlaying code is initialized. | |
getLogComment ( ) : string | Returns the comment line for the log. | |
getTrackedData ( string $dbname, string $tablename, string $version ) : mixed | Gets the record of a tracking job. | |
getVersion ( string $dbname, string $tablename, string $statement = null ) : integer | Gets the newest version of a tracking job (in other words: gets the HEAD version). | |
handleQuery ( string $query ) : void | Analyzes a given SQL statement and saves tracking data. | |
isActive ( ) : boolean | Gets the on/off value of the Tracker module, starts initialization. | |
isTracked ( string $dbname, string $tablename ) : boolean | Gets the tracking status of a table, is it active or deactive ? | |
parseQuery ( string $query ) : mixed | Parses a query. Gets - statement identifier (UPDATE, ALTER TABLE, . |
Method | Description | |
---|---|---|
getTableName ( string $string ) : string | Parses the name of a table from a SQL statement substring. |
Method | Description | |
---|---|---|
_changeTracking ( string $dbname, string $tablename, string $version, integer $new_state ) : integer | Changes tracking of a table. | |
_getTrackingTable ( ) : string | Returns the tracking table |
public static changeTrackingData ( string $dbname, string $tablename, string $version, string $type, string | array $new_data ) : boolean | ||
$dbname | string | name of database |
$tablename | string | name of table |
$version | string | version |
$type | string | type of data(DDL || DML) |
$new_data | string | array | the new tracking data |
return | boolean | result of change |
public static createDatabaseVersion ( string $dbname, string $version, string $query, string $tracking_set = 'CREATE DATABASE,ALTER DATABASE,DROP DATABASE' ) : integer | ||
$dbname | string | name of database |
$version | string | version |
$query | string | query |
$tracking_set | string | set of tracking statements |
return | integer | result of version insertion |
public static createVersion ( string $dbname, string $tablename, string $version, string $tracking_set = '', boolean $is_view = false ) : integer | ||
$dbname | string | name of database |
$tablename | string | name of table |
$version | string | version |
$tracking_set | string | set of tracking statements |
$is_view | boolean | if table is a view |
return | integer | result of version insertion |
public static getLogComment ( ) : string | ||
return | string | Comment, contains date and username |
protected static getTableName ( string $string ) : string | ||
$string | string | part of SQL statement |
return | string | the name of table |
public static handleQuery ( string $query ) : void | ||
$query | string | a SQL query |
return | void |
public static parseQuery ( string $query ) : mixed | ||
$query | string | query |
return | mixed | Array containing identifier, type and tablename. |