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
\JDatabaseImporterMySQL
Method supports chaining.
from
Specifies the data source to import.
from(mixed $from) : \JDatabaseImporterMySQL
since |
11.1 |
---|
Arguments
- $from
mixed
The data source to import.
Response
\JDatabaseImporterMySQL
Method supports chaining.
getAddColumnSQL
Get the SQL syntax to add a column.
getAddColumnSQL(string $table, \SimpleXMLElement $field) : string
since |
11.1 |
---|
Arguments
- $table
string
The table name.- $field
\SimpleXMLElement
The 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
string
The table name.- $keys
array
An 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
\SimpleXMLElement
The 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
string
The name of the database table to alter.- $field
\SimpleXMLElement
The 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
\SimpleXMLElement
The 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
string
The table name.- $name
string
The 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
string
The table name.- $name
string
The 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
string
The table name.
Response
string
getKeyLookup
Get the details list of keys for a table.
getKeyLookup(array $keys) : array
since |
11.1 |
---|---|
throws |
|
Arguments
- $keys
array
An array of objects that comprise the keys for the table.
Response
array
The lookup array. array({key name} => array(object, ...))
getKeySQL
Get the SQL syntax for a key.
getKeySQL(array $columns) : string
since |
11.1 |
---|
Arguments
- $columns
array
An 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
string
The name of the table.
Response
string
The 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
\JDatabaseMySQL
The database connector.
Response
\JDatabaseImporterMySQL
Method 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
boolean
True to export the structure, false to not.
Response
\JDatabaseImporterMySQL
Method 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