\JSchemaChangeitemSqlsrv
Checks the database schema against one SQL Server DDL query to see if it has been run.
Synopsis
class JSchemaChangeitemSqlsrv
extends JSchemaChangeitem
{
- // Inherited members from JSchemaChangeitem
- public $file;
- public $updateQuery;
- public $checkQuery;
- public $checkQueryExpected;
- public JDatabaseDriver $db;
- public $queryType;
- public $msgElements;
- public $checkStatus;
- public $rerunStatus;
- // methods
- protected void buildCheckQuery()
- private string fixInteger()
- private string fixQuote()
- // Inherited methods from JSchemaChangeitem
- public void __construct()
- public static JSchemaChangeitem getInstance()
- protected abstract void buildCheckQuery()
- public boolean check()
- public void fix()
Hierarchy
Extends
Members
public
- $checkQuery
—
string
Check query: query used to check the db schema - $checkQueryExpected
—
string
Check query result: expected result of check query if database is up to date - $checkStatus
—
integer
Checked status - $db
—
JDatabaseDriver
JDatabaseDriver object - $file
—
string
Update file: full path file name where query was found - $msgElements
—
array
Array with values for use in a JText::sprintf statment indicating what was checked - $queryType
—
string
Query type: To be used in building a language key for a message to tell user what was checked / changed Possible values: ADD_TABLE, ADD_COLUMN, CHANGE_COLUMN_TYPE, ADD_INDEX - $rerunStatus
—
int
Rerun status - $updateQuery
—
string
Update query: query used to change the db schema (one line from the file)
Methods
private
- fixInteger() — Fix up integer. Fixes problem with MySQL integer descriptions.
- fixQuote() — Fixes up a string for inclusion in a query.
protected
- buildCheckQuery() — Checks a DDL query to see if it is a known type If yes, build a check query to see if the DDL has been run on the database.
Inherited from JSchemaChangeitem
protected
- buildCheckQuery() — Checks a DDL query to see if it is a known type If yes, build a check query to see if the DDL has been run on the database.
public
- check() — Runs the check query and checks that 1 row is returned If yes, return true, otherwise return false
- fix() — Runs the update query to apply the change to the database
- getInstance() — Returns a reference to the JSchemaChangeitem object.