MysqlImporter

Extends DatabaseImporter

MySQL Database Importer.

since

1.0

package

Joomla Framework

Methods

__construct

Constructor.

__construct() : mixed
inherited

Sets up the default options for the exporter.

since

1.0

Response

mixed

asXml

Set the output option for the exporter to XML format.

asXml() : \Joomla\Database\DatabaseImporter
inherited
since

1.0

Response

\Joomla\Database\DatabaseImporterMethod supports chaining.

check

Checks if all data and options are in order prior to exporting.

check() : \Joomla\Database\DatabaseImporter
inherited abstract
since

1.0

throws

\Exceptionif an error is encountered.

Response

\Joomla\Database\DatabaseImporterMethod supports chaining.

from

Specifies the data source to import.

from(mixed from) : \Joomla\Database\DatabaseImporter
inherited
since

1.0

Arguments

from

mixedThe data source to import.

Response

\Joomla\Database\DatabaseImporterMethod supports chaining.

getAddColumnSQL

Get the SQL syntax to add a column.

getAddColumnSQL(string table, \SimpleXMLElement field) : string
inherited
since

1.0

Arguments

table

stringThe table name.

field

\SimpleXMLElementThe XML field definition.

Response

string

getAddKeySql

Get the SQL syntax to add a key.

getAddKeySql(string table, array keys) : string
since

1.0

Arguments

table

stringThe table name.

keys

arrayAn array of the fields pertaining to this key.

Response

string

getAlterTableSql

Get alters for table if there is a difference.

getAlterTableSql(\SimpleXMLElement structure) : array
since

1.0

Arguments

structure

\SimpleXMLElementThe XML structure pf the table.

Response

array

getChangeColumnSql

Get the syntax to alter a column.

getChangeColumnSql(string table, \SimpleXMLElement field) : string
since

1.0

Arguments

table

stringThe name of the database table to alter.

field

\SimpleXMLElementThe XML definition for the field.

Response

string

getChangeColumnSQL

Get the syntax to alter a column.

getChangeColumnSQL(string table, \SimpleXMLElement field) : string
inherited
since

1.0

Arguments

table

stringThe name of the database table to alter.

field

\SimpleXMLElementThe XML definition for the field.

Response

string

getColumnSql

Get the SQL syntax for a single column that would be included in a table create or alter statement.

getColumnSql(\SimpleXMLElement field) : string
since

1.0

Arguments

field

\SimpleXMLElementThe XML field definition.

Response

string

getDropColumnSql

Get the SQL syntax to drop a column.

getDropColumnSql(string table, string name) : string
inherited
since

1.0

Arguments

table

stringThe table name.

name

stringThe name of the field to drop.

Response

string

getDropKeySql

Get the SQL syntax to drop a key.

getDropKeySql(string table, string name) : string
since

1.0

Arguments

table

stringThe table name.

name

stringThe name of the key to drop.

Response

string

getDropPrimaryKeySql

Get the SQL syntax to drop a key.

getDropPrimaryKeySql(string table) : string
since

1.0

Arguments

table

stringThe table name.

Response

string

getKeyLookup

Get the details list of keys for a table.

getKeyLookup(array keys) : array
inherited
since

1.0

Arguments

keys

arrayAn array of objects that comprise the keys for the table.

Response

arrayThe lookup array. array({key name} => array(object, ...))

getKeySql

Get the SQL syntax for a key.

getKeySql(array columns) : string
since

1.0

Arguments

columns

arrayAn array of SimpleXMLElement objects comprising the key.

Response

string

getRealTableName

Get the real name of the table, converting the prefix wildcard string if present.

getRealTableName(string table) : string
inherited
since

1.0

Arguments

table

stringThe name of the table.

Response

stringThe real name of the table.

mergeStructure

Merges the incoming structure definition with the existing structure.

mergeStructure() : void
inherited
note

Currently only supports XML format.

since

1.0

throws

\RuntimeExceptionon error.

setDbo

Sets the database connector to use for exporting structure and/or data.

setDbo(\Joomla\Database\DatabaseDriver db) : \Joomla\Database\DatabaseImporter
inherited
since

1.0

Arguments

db

\Joomla\Database\DatabaseDriverThe database connector.

Response

\Joomla\Database\DatabaseImporterMethod supports chaining.

withStructure

Sets an internal option to merge the structure based on the input data.

withStructure(bool setting = true) : \Joomla\Database\DatabaseImporter
inherited
since

1.0

Arguments

setting

boolTrue to export the structure, false to not.

Response

\Joomla\Database\DatabaseImporterMethod supports chaining.

Properties

cache

An array of cached data.

inherited
since

1.0

Type(s)

array

db

The database connector to use for exporting structure and/or data.

inherited
since

1.0

Type(s)

\Joomla\Database\DatabaseDriver

from

The input source.

inherited
since

1.0

Type(s)

mixed

asFormat

The type of input format.

inherited
since

1.0

Type(s)

string

options

An array of options for the exporter.

inherited
since

1.0

Type(s)

object