Skip to content

icms_db_legacy_updater_Table

Raimondas Rimkevičius edited this page Mar 9, 2020 · 1 revision
Notice: Wiki was automatic generated from project sources as project API documentation. Do not edit manually!

icms_db_legacy_updater_Table

icms_db_legacy_updater_Table class

Information about an individual table

  • Class name: icms_db_legacy_updater_Table
  • Namespace:

Properties

$_name

public string $_name
  • Visibility: public

$_structure

public string $_structure
  • Visibility: public

$_data

public array $_data
  • Visibility: public

$_alteredFields

public array $_alteredFields
  • Visibility: public

$_newFields

public array $_newFields
  • Visibility: public

$_dropedFields

public array $_dropedFields
  • Visibility: public

$_flagForDrop

public array $_flagForDrop = \false
  • Visibility: public

$_updateAll

public array $_updateAll
  • Visibility: public

$_deleteAll

public array $_deleteAll
  • Visibility: public

$_existingFieldsArray

public mixed $_existingFieldsArray = \false
  • Visibility: public

$force

public bool $force = \false
  • Visibility: public

$_db

public mixed $_db

For backward compat

  • Visibility: public

$db

public \icms_db_legacy_IDatabase $db

xoopsDB database object

  • Visibility: public

$_messages

public array $_messages = array()
  • Visibility: public

Methods

__construct

mixed icms_db_legacy_updater_Table::__construct(string name)

Constructor

  • Visibility: public

Arguments

  • name string - <p>name of the table</p>

exists

bool icms_db_legacy_updater_Table::exists()

Detemines if a table exists in the current db

Checks if the table already exists in the database

  • Visibility: public

name

string icms_db_legacy_updater_Table::name()

Return the table name, prefixed with site table prefix

  • Visibility: public

fieldExists

mixed icms_db_legacy_updater_Table::fieldExists(mixed field)
  • Visibility: public

Arguments

  • field mixed

getExistingFieldsArray

mixed icms_db_legacy_updater_Table::getExistingFieldsArray()
  • Visibility: public

addData

bool icms_db_legacy_updater_Table::addData()

Use to insert data in a table

  • Visibility: public

getData

array icms_db_legacy_updater_Table::getData()

Get the data array

  • Visibility: public

setData

mixed icms_db_legacy_updater_Table::setData(string data)

Add values of a record to be added

  • Visibility: public

Arguments

  • data string - <p>values of a record</p>

addAlteredField

mixed icms_db_legacy_updater_Table::addAlteredField(string name, string properties, mixed newname, mixed showerror)

Add a field to be added

  • Visibility: public

Arguments

  • name string - <p>name of the field</p>
  • properties string - <p>properties of the field</p>
  • newname mixed
  • showerror mixed

addNewField

mixed icms_db_legacy_updater_Table::addNewField(string name, string properties)

Add new field of a record to be added

  • Visibility: public

Arguments

  • name string - <p>name of the field</p>
  • properties string - <p>properties of the field</p>

addUpdateAll

mixed icms_db_legacy_updater_Table::addUpdateAll(string fieldname, string fieldvalue, \icms_db_criteria_Element criteria, bool fieldvalueIsOperation)

Add item to be updated on the the table via the UpdateAll method

  • Visibility: public

Arguments

  • fieldname string - <p>Name of the field</p>
  • fieldvalue string - <p>Value to write</p>
  • criteria icms_db_criteria_Element - <p>Criteria</p>
  • fieldvalueIsOperation bool - <p>TRUE if fieldvalue is an operation, for example, conf_order+1</p>

addDeleteAll

void icms_db_legacy_updater_Table::addDeleteAll(\icms_db_criteria_Element criteria)

Add item to be updated on the the table via the UpdateAll method

  • Visibility: public

Arguments

addDropedField

mixed icms_db_legacy_updater_Table::addDropedField(string name)

Add values of a record to be added

  • Visibility: public

Arguments

  • name string - <p>name of the field</p>

setFlagForDrop

mixed icms_db_legacy_updater_Table::setFlagForDrop()

Set the flag to drop the table

  • Visibility: public

createTable

bool icms_db_legacy_updater_Table::createTable()

Use to create a table

  • Visibility: public

getStructure

string icms_db_legacy_updater_Table::getStructure()

Returns the table structure

  • Visibility: public

setStructure

mixed icms_db_legacy_updater_Table::setStructure(string structure)

Set the table structure

Example :

$table->setStructure("transactionid int(11) NOT NULL auto_increment, date int(11) NOT NULL default '0', status int(1) NOT NULL default '-1', itemid int(11) NOT NULL default '0', uid int(11) NOT NULL default '0', price float NOT NULL default '0', currency varchar(100) NOT NULL default '', PRIMARY KEY (transactionid)");

  • Visibility: public

Arguments

  • structure string - <p>table structure</p>

dropTable

bool icms_db_legacy_updater_Table::dropTable()

Use to drop a table

  • Visibility: public

alterTable

bool icms_db_legacy_updater_Table::alterTable()

Use to alter a table

  • Visibility: public

getAlteredFields

array icms_db_legacy_updater_Table::getAlteredFields()

Get fields that need to be altered

  • Visibility: public

addNewFields

bool icms_db_legacy_updater_Table::addNewFields()

Use to add new fileds in the table

  • Visibility: public

getNewFields

array icms_db_legacy_updater_Table::getNewFields()

Get new fields to be added

  • Visibility: public

updateAll

bool icms_db_legacy_updater_Table::updateAll()

Change a value for objects with a certain criteria

  • Visibility: public

getUpdateAll

array icms_db_legacy_updater_Table::getUpdateAll()

Get items to be updated

  • Visibility: public

deleteAll

bool icms_db_legacy_updater_Table::deleteAll()

delete all objects meeting the conditions

  • Visibility: public

getDeleteAll

array icms_db_legacy_updater_Table::getDeleteAll()

Get items to be deleted

  • Visibility: public

dropFields

bool icms_db_legacy_updater_Table::dropFields()

Use to drop fields

  • Visibility: public

getDropedFields

array icms_db_legacy_updater_Table::getDropedFields()

Get fields that need to be droped

  • Visibility: public
Clone this wiki locally