Class JSchemaChangeitemmysql

Description

Checks the database schema against one MySQL DDL query to see if it has been run.

  • since: 2.5

Located in /libraries/cms/schema/changeitemmysql.php (line 19)

JObject
   |
   --JSchemaChangeitem
      |
      --JSchemaChangeitemmysql
Method Summary
void buildCheckQuery ()
string fixInteger (string $type1, string $type2)
string fixQuote (string $string)
Variables
Methods
buildCheckQuery (line 39)

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.

If successful, the $msgElements, $queryType, $checkStatus and $checkQuery fields are populated. The $msgElements contains the text to create the user message. The $checkQuery contains the SQL query to check whether the schema change has been run against the current database. The $queryType contains the type of DDL query that was run (for example, CREATE_TABLE, ADD_COLUMN, CHANGE_COLUMN_TYPE, ADD_INDEX). The $checkStatus field is set to zero if the query is created

If not successful, $checkQuery is empty and , and $checkStatus is -1. For example, this will happen if the current line is a non-DDL statement.

  • since: 2.5
  • access: protected
void buildCheckQuery ()
fixInteger (line 141)

Fix up integer. Fixes problem with MySQL integer descriptions.

If you change a column to "integer unsigned" it shows as "int(10) unsigned" in the check query.

  • return: The original or changed column type.
  • since: 2.5
  • access: private
string fixInteger (string $type1, string $type2)
  • string $type1: the column type
  • string $type2: the column attributes
fixQuote (line 161)

Fixes up a string for inclusion in a query.

Replaces name quote character with normal quote for literal. Drops trailing semi-colon. Injects the database prefix.

  • return: The modified string.
  • since: 2.5
  • access: private
string fixQuote (string $string)
  • string $string: The input string to be cleaned up.

Inherited Methods

Inherited From JSchemaChangeitem

JSchemaChangeitem::__construct()
JSchemaChangeitem::check()
JSchemaChangeitem::fix()
JSchemaChangeitem::getInstance()

Inherited From JObject

JObject::__construct()
JObject::def()
JObject::get()
JObject::getError()
JObject::getErrors()
JObject::getProperties()
JObject::set()
JObject::setError()
JObject::setProperties()
JObject::toString()
JObject::__toString()

Documentation generated on Mon, 25 Jun 2012 13:53:00 -0500 by phpDocumentor 1.4.4