JDatabaseImporterMySQLi
Extends \JDatabaseImporterMySQLMySQL import driver.
| package |
Joomla.Platform |
|---|---|
| subpackage |
Database |
| since |
11.1 |
Methods
__construct
Constructor.
__construct()
Sets up the default options for the exporter.
| since |
11.1 |
|---|
asXml
Set the output option for the exporter to XML format.
asXml() : \JDatabaseImporterMySQL
check
Checks if all data and options are in order prior to exporting.
check() : \JDatabaseImporterMySQL
| since |
11.1 |
|---|---|
| throws |
|
Response
\JDatabaseImporterMySQLMethod supports chaining.
from
Specifies the data source to import.
from(mixed $from) : \JDatabaseImporterMySQL
| since |
11.1 |
|---|
Arguments
- $from
mixedThe data source to import.
Response
\JDatabaseImporterMySQLMethod supports chaining.
getAddColumnSQL
Get the SQL syntax to add a column.
getAddColumnSQL(string $table, \SimpleXMLElement $field) : string
| since |
11.1 |
|---|
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 |
11.1 |
|---|
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 |
11.1 |
|---|
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 |
11.1 |
|---|
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 |
11.1 |
|---|
Arguments
- $field
\SimpleXMLElementThe XML field definition.
Response
string
getDropColumnSQL
Get the SQL syntax to drop a column.
getDropColumnSQL(string $table, string $name) : string
| since |
11.1 |
|---|
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 |
11.1 |
|---|
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 |
11.1 |
|---|
Arguments
- $table
stringThe table name.
Response
string
getKeyLookup
Get the details list of keys for a table.
getKeyLookup(array $keys) : array
| since |
11.1 |
|---|---|
| throws |
|
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 |
11.1 |
|---|
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
| since |
11.1 |
|---|
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
| note |
Currently only supports XML format. |
|---|---|
| since |
11.1 |
| throws |
|
| todo |
If it's not XML convert to XML first. |
setDbo
Sets the database connector to use for exporting structure and/or data from MySQL.
setDbo(\JDatabaseMySQL $db) : \JDatabaseImporterMySQL
| since |
11.1 |
|---|
Arguments
- $db
\JDatabaseMySQLThe database connector.
Response
\JDatabaseImporterMySQLMethod supports chaining.
withStructure
Sets an internal option to merge the structure based on the input data.
withStructure(boolean $setting = true) : \JDatabaseImporterMySQL
| since |
11.1 |
|---|
Arguments
- $setting
booleanTrue to export the structure, false to not.
Response
\JDatabaseImporterMySQLMethod supports chaining.
Properties
cache
An array of cached data.
| since |
11.1 |
|---|
Type(s)
array
db
The database connector to use for exporting structure and/or data.
from
The input source.
| since |
11.1 |
|---|
Type(s)
mixed
asFormat
The type of input format (XML).
| since |
11.1 |
|---|
Type(s)
string