lib/ezdbschema/classes/ezpgsqlschema.php

Show: inherited
Table of Contents

File containing the eZPgsqlSchema class.

Copyright
Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.  
License
eZ Business Use License Agreement Version 2.0  
Package
lib  
Version
4.6.0  

\eZPgsqlSchema

Package: lib

File containing the eZPgsqlSchema class.

Parent(s)
\eZDBSchemaInterface
Copyright
Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.  
License
eZ Business Use License Agreement Version 2.0  
Version
4.6.0  

Constants

Constant  SHOW_TABLES_QUERY = ' SELECT n.nspname as "Schema", c.relname as "Name", CASE c.relkind WHEN \'r\' THEN \'table\' WHEN \'v\' THEN \'view\' WHEN \'i\' THEN \'index\' WHEN \'S\' THEN \'sequence\' WHEN \'s\' THEN \'special\' END as "Type", u.usename as "Owner" FROM pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_user u ON u.usesysid = c.relowner LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind IN (\'r\',\'\') AND n.nspname NOT IN (\'pg_catalog\', \'pg_toast\') AND pg_catalog.pg_table_is_visible(c.oid) ORDER BY 1, 2'
Constant  FETCH_TABLE_OID_QUERY = ' SELECT c.oid, n.nspname, c.relname FROM pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace WHERE pg_catalog.pg_table_is_visible(c.oid) AND c.relname ~ \'^<<tablename>>$\' ORDER BY 2, 3'
Constant  FETCH_TABLE_DEF_QUERY = ' SELECT a.attname, pg_catalog.format_type(a.atttypid, a.atttypmod), (SELECT substring(d.adsrc for 128) FROM pg_catalog.pg_attrdef d WHERE d.adrelid = a.attrelid AND d.adnum = a.attnum AND a.atthasdef) as default, a.attnotnull, a.attnum FROM pg_catalog.pg_attribute a WHERE a.attrelid = \'<<oid>>\' AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum'
Constant  FETCH_INDEX_DEF_QUERY = ' SELECT c.relname, i.* FROM pg_catalog.pg_index i, pg_catalog.pg_class c WHERE indrelid = \'<<oid>>\' AND i.indexrelid = c.oid'
Constant  FETCH_INDEX_COL_NAMES_QUERY = ' SELECT a.attnum, a.attname FROM pg_catalog.pg_attribute a WHERE a.attrelid = \'<<indexrelid>>\' AND a.attnum IN (<<attids>>) AND NOT a.attisdropped ORDER BY a.attnum'

Properties

Propertypublic  $DBInstance= ''
inheritedInherited from: \eZDBSchemaInterface::$$DBInstance
Details
Type
n/a
Inherited_from
\eZDBSchemaInterface::$$DBInstance  
Propertypublic  $Data= ''
inheritedInherited from: \eZDBSchemaInterface::$$Data
Details
Type
n/a
Inherited_from
\eZDBSchemaInterface::$$Data  
Propertypublic  $Schema= ''
inheritedInherited from: \eZDBSchemaInterface::$$Schema
Details
Type
n/a
Inherited_from
\eZDBSchemaInterface::$$Schema  

Methods

methodpublicappendSQLComments(  $def,  $sql ) : void
inherited

Inherited from: \eZDBSchemaInterface::appendSQLComments()
Parameters
Name Type Description
$def
$sql
methodpublicconvertFromStandardType(  $type,  $length ) : void

Parameters
Name Type Description
$type
$length
methodpublicconvertToStandardType(  $type,  $length ) : void

Parameters
Name Type Description
$type
$length
methodpublicdata(  $schema = false,  $tableNameList = false,  $params = array() ) : void
inherited

Inherited from: \eZDBSchemaInterface::data()
Parameters
Name Type Description
$schema
$tableNameList
$params
methodpubliceZDBSchemaInterface(  $params ) : void
Parameters
Name Type Description
$params
methodpubliceZPgsqlSchema(  $db ) : void

Parameters
Name Type Description
$db
methodpublicescapeSQLString(  $value ) : void

Parameters
Name Type Description
$value
methodpublicfetchTableData(  $tableInfo,  $offset = false,  $limit = false ) : void
inherited

Inherited from: \eZDBSchemaInterface::fetchTableData()
Parameters
Name Type Description
$tableInfo
$offset
$limit
methodpublicfetchTableFields(  $table,  $params ) : void

Parameters
Name Type Description
$table
$params
methodpublicfetchTableIndexes(  $table,  $params ) : void

Parameters
Name Type Description
$table
$params
methodpublicgenerateAddFieldSql(  $table_name,  $field_name,  $def,  $params ) : void

Parameters
Name Type Description
$table_name
$field_name
$def
$params
methodpublicgenerateAddIndexSql(  $table_name,  $index_name,  $def,  $params,  $withClosure = true ) : void

Parameters
Name Type Description
$table_name
$index_name
$def
$params
$withClosure
methodpublicgenerateAlterFieldSql(  $table_name,  $field_name,  $def,  $params ) : void

Parameters
Name Type Description
$table_name
$field_name
$def
$params
methodpublicgenerateDataFile(  $schema,  $data,  $params ) : void
inherited

Inherited from: \eZDBSchemaInterface::generateDataFile()
Parameters
Name Type Description
$schema
$data
$params
methodpublicgenerateDataValueTextSQL(  $fieldDef,  $value ) : void
Parameters
Name Type Description
$fieldDef
$value
methodpublicgenerateDefaultDef(  $table_name,  $field_name,  $def,  $params ) : void

Parameters
Name Type Description
$table_name
$field_name
$def
$params
methodpublicgenerateDropFieldSql(  $table_name,  $field_name,  $params ) : void
Parameters
Name Type Description
$table_name
$field_name
$params
methodpublicgenerateDropIndexSql(  $table_name,  $index_name,  $def,  $withClosure = true ) : void

Parameters
Name Type Description
$table_name
$index_name
$def
$withClosure
methodpublicgenerateDropTable(  $table ) : void

Parameters
Name Type Description
$table
methodpublicgenerateFieldDef(  $table_name,  $field_name,  $def,  $add_default_not_null = true,  $params ) : void

Parameters
Name Type Description
$table_name
$field_name
$def
$add_default_not_null
$params
methodpublicgenerateNullDef(  $table_name,  $field_name,  $def,  $params ) : void

Parameters
Name Type Description
$table_name
$field_name
$def
$params
methodpublicgenerateSchemaFile(  $schema,  $params = array() ) : void

Parameters
Name Type Description
$schema
$params
methodpublicgenerateTableArrays(  $table,  $table_def,  $params,  $withClosure = true ) : void

Parameters
Name Type Description
$table
$table_def
$params
$withClosure
methodpublicgenerateTableInsert(  $tableName,  $tableDef,  $dataEntries,  $params ) : void
Parameters
Name Type Description
$tableName
$tableDef
$dataEntries
$params
methodpublicgenerateTableInsertSQLList(  $tableName,  $tableDef,  $dataEntries,  $params,  $withClosure = true ) : void

Parameters
Name Type Description
$tableName
$tableDef
$dataEntries
$params
$withClosure
methodpublicgenerateTableSQLList(  $table,  $table_def,  $params,  $separateTypes ) : void

Parameters
Name Type Description
$table
$table_def
$params
$separateTypes
methodpublicgenerateTableSchema(  $table,  $table_def,  $params ) : void

Parameters
Name Type Description
$table
$table_def
$params
methodpublicgenerateUpgradeFile(  $differences,  $params = array() ) : void
Parameters
Name Type Description
$differences
$params
methodpublicinsertSchema(  $params = array() ) : void
inherited

Inherited from: \eZDBSchemaInterface::insertSchema()
Parameters
Name Type Description
$params
methodpublicisMultiInsertSupported( ) : void
methodpublicisTypeLengthSupported(  $pgType ) : void

Parameters
Name Type Description
$pgType
methodpublicloadSchemaTransformationRules(  $schemaType ) : void
Parameters
Name Type Description
$schemaType
methodpublicparseDefault(  $default,  $autoinc ) : void

Parameters
Name Type Description
$default
$autoinc
methodpublicparseType(  $type_info,  $length_info ) : void

Parameters
Name Type Description
$type_info
$length_info
methodpublicprimaryKeyIndexName(  $tableName,  $indexName,  $fields ) : void

Parameters
Name Type Description
$tableName
$indexName
$fields
methodpublicreservedKeywordList( ) : void

methodpublicschema(  $params = array() ) : void

Parameters
Name Type Description
$params
methodpublicschemaName( ) : void

methodpublicschemaType( ) : void

methodpublictransformData(  $data,  $toLocal ) : void
inherited

Inherited from: \eZDBSchemaInterface::transformData()
Parameters
Name Type Description
$data
$toLocal
methodpublictransformSchema(  $schema,  $toLocal ) : void
inherited

Inherited from: \eZDBSchemaInterface::transformSchema()
Parameters
Name Type Description
$schema
$toLocal
methodpublicvalidate( ) : void
inherited

Inherited from: \eZDBSchemaInterface::validate()
methodpublicwriteArraySchemaFile(  $filename,  $params = array() ) : void
Parameters
Name Type Description
$filename
$params
methodpublicwriteSQLSchemaFile(  $filename,  $params = array() ) : void
inherited

Inherited from: \eZDBSchemaInterface::writeSQLSchemaFile()
Parameters
Name Type Description
$filename
$params
methodpublicwriteSerializedSchemaFile(  $filename,  $params = array() ) : void
Parameters
Name Type Description
$filename
$params
methodpublicwriteUpgradeFile(  $differences,  $filename,  $params = array() ) : void
inherited

Inherited from: \eZDBSchemaInterface::writeUpgradeFile()
Parameters
Name Type Description
$differences
$filename
$params
Documentation was generated by DocBlox 0.18.1.