[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Schema/ChangeItem/ -> PostgresqlChangeItem.php (summary)

Joomla! Content Management System

Copyright: (C) 2012 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 318 lines (14 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

PostgresqlChangeItem:: (3 methods):
  buildCheckQuery()
  fixInteger()
  fixQuote()


Class: PostgresqlChangeItem  - X-Ref

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

buildCheckQuery()   X-Ref
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.

return: void

fixInteger($type1, $type2)   X-Ref
Fix up integer. Fixes problem with PostgreSQL integer descriptions.
If you change a column to "integer unsigned" it shows
as "int(10) unsigned" in the check query.

param: string  $type1  the column type
param: string  $type2  the column attributes
return: string  The original or changed column type.

fixQuote($string)   X-Ref
Fixes up a string for inclusion in a query.
Replaces name quote character with normal quote for literal.
Drops trailing semicolon. Injects the database prefix.

param: string  $string  The input string to be cleaned up.
return: string  The modified string.



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer