class CentralColumns (View source)

Properties

Template $template

Methods

__construct(DatabaseInterface $dbi)

No description

array|false
getParams()

Returns the configuration storage settings for central columns or false if no storage is available

array
getColumnsList(string $db, int $from = 0, int $num = 25)

get $num columns of given database from central columns list starting at offset $from

int
getCount(string $db)

Get the number of columns present in central list for given db

array
findExistingColNames(string $db, array $cols)

return the existing columns in central list among the given list of columns

Message
syncUniqueColumns(DatabaseName $databaseName, array $fieldSelect, bool $isTable = true, string $containingTable = '')

If $isTable is true then unique columns from given tables as $field_select are added to central list otherwise the $field_select is considered as list of columns and these columns are added to central list if not already added

Message
deleteColumnsFromList(string $database, array $fieldSelect, bool $isTable = true)

if $isTable is true it removes all columns of given tables as $field_select from central columns list otherwise $field_select is columns list and it removes given columns if present in central list

Message
makeConsistentWithList(string $db, array $selectedTables)

Make the columns of given tables consistent with central list of columns.

Message
updateOneColumn(string $db, string $origColName, string $colName, string $colType, string $colAttribute, string $colLength, bool $colIsNull, string $collation, string $colExtra, string $colDefault)

update a column in central columns list if a edit is requested

Message
updateMultipleColumn(array $params)

Update Multiple column in central columns list if a change is requested

array
getListRaw(string $db, string $table)

get the list of columns in given database excluding the columns present in current table

string
getHtmlForEditingPage(array $selectedFld, string $selectedDb)

Get HTML for editing page central columns

int
getColumnsCount(string $db, int $from = 0, int $num = 25)

get number of columns of given database from central columns list starting at offset $from

array
getColumnsNotInCentralList(string $db, string $table)

No description

array
getTemplateVariablesForMain(string $db, int $totalRows, int $pos, string $textDir)

Adding a new user defined column to central list

Details

__construct(DatabaseInterface $dbi)

No description

Parameters

DatabaseInterface $dbi

array|false getParams()

Returns the configuration storage settings for central columns or false if no storage is available

Return Value

array|false

array getColumnsList(string $db, int $from = 0, int $num = 25)

get $num columns of given database from central columns list starting at offset $from

Parameters

string $db

selected database

int $from

starting offset of first result

int $num

maximum number of results to return

Return Value

array

list of $num columns present in central columns list starting at offset $from for the given database

int getCount(string $db)

Get the number of columns present in central list for given db

Parameters

string $db

current database

Return Value

int

number of columns in central list of columns for $db

array findExistingColNames(string $db, array $cols)

return the existing columns in central list among the given list of columns

Parameters

string $db

the selected database

array $cols

list of given columns

Return Value

array

list of columns in central columns among given set of columns

Message syncUniqueColumns(DatabaseName $databaseName, array $fieldSelect, bool $isTable = true, string $containingTable = '')

If $isTable is true then unique columns from given tables as $field_select are added to central list otherwise the $field_select is considered as list of columns and these columns are added to central list if not already added

Parameters

DatabaseName $databaseName
array $fieldSelect

if $isTable is true selected tables list otherwise selected columns list

bool $isTable

if passed array is of tables or columns

string $containingTable

if $isTable is false, then table name to which columns belong

Return Value

Message

Message deleteColumnsFromList(string $database, array $fieldSelect, bool $isTable = true)

if $isTable is true it removes all columns of given tables as $field_select from central columns list otherwise $field_select is columns list and it removes given columns if present in central list

Parameters

string $database

Database name

array $fieldSelect

if $isTable selected list of tables otherwise selected list of columns to remove from central list

bool $isTable

if passed array is of tables or columns

Return Value

Message

Message makeConsistentWithList(string $db, array $selectedTables)

Make the columns of given tables consistent with central list of columns.

Updates only those columns which are not being referenced.

Parameters

string $db

current database

array $selectedTables

list of selected tables.

Return Value

Message

Message updateOneColumn(string $db, string $origColName, string $colName, string $colType, string $colAttribute, string $colLength, bool $colIsNull, string $collation, string $colExtra, string $colDefault)

update a column in central columns list if a edit is requested

Parameters

string $db

current database

string $origColName

original column name before edit

string $colName

new column name

string $colType

new column type

string $colAttribute

new column attribute

string $colLength

new column length

bool $colIsNull

value 1 if new column isNull is true, 0 otherwise

string $collation

new column collation

string $colExtra

new column extra property

string $colDefault

new column default value

Return Value

Message

Message updateMultipleColumn(array $params)

Update Multiple column in central columns list if a change is requested

Parameters

array $params

Request parameters

Return Value

Message

array getListRaw(string $db, string $table)

get the list of columns in given database excluding the columns present in current table

Parameters

string $db

selected database

string $table

current table name

Return Value

array

encoded list of columns present in central list for the given database

string getHtmlForEditingPage(array $selectedFld, string $selectedDb)

Get HTML for editing page central columns

Parameters

array $selectedFld

Array containing the selected fields

string $selectedDb

String containing the name of database

Return Value

string

HTML for complete editing page for central columns

int getColumnsCount(string $db, int $from = 0, int $num = 25)

get number of columns of given database from central columns list starting at offset $from

Parameters

string $db

selected database

int $from

starting offset of first result

int $num

maximum number of results to return

Return Value

int

count of $num columns present in central columns list starting at offset $from for the given database

array getColumnsNotInCentralList(string $db, string $table)

No description

Parameters

string $db
string $table

Return Value

array

array getTemplateVariablesForMain(string $db, int $totalRows, int $pos, string $textDir)

Adding a new user defined column to central list

Parameters

string $db

current database

int $totalRows

number of rows in central columns

int $pos

offset of first result with complete result set

string $textDir

table footer arrow direction

Return Value

array