JDatabaseImporterMysql
Extends \JDatabaseImporterMysqliMySQL import driver.
since |
1.7.0 |
---|---|
deprecated |
4.0 Use MySQLi or PDO MySQL instead |
package |
Joomla.Platform |
Methods
__construct
Constructor.
__construct()
Sets up the default options for the exporter.
since |
3.2.0 |
---|
asXml
Set the output option for the exporter to XML format.
asXml() : \JDatabaseImporter
check
Checks if all data and options are in order prior to exporting.
check() : \JDatabaseImporter
since |
3.2.0 |
---|---|
throws |
|
Response
\JDatabaseImporter
Method supports chaining.
from
Specifies the data source to import.
from(mixed $from) : \JDatabaseImporter
since |
3.2.0 |
---|
Arguments
- $from
mixed
The data source to import.
Response
\JDatabaseImporter
Method supports chaining.
getAddColumnSql
Get the SQL syntax to add a column.
getAddColumnSql(string $table, \SimpleXMLElement $field) : string
since |
1.7.0 |
---|
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 |
1.7.0 |
---|
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 |
1.7.0 |
---|
Arguments
- $structure
\SimpleXMLElement
The XML structure of the table.
Response
array
getChangeColumnSql
Get the syntax to alter a column.
getChangeColumnSql(string $table, \SimpleXMLElement $field) : string
since |
1.7.0 |
---|
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 |
1.7.0 |
---|
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 |
3.2.0 |
---|
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 |
1.7.0 |
---|
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 |
1.7.0 |
---|
Arguments
- $table
string
The table name.
Response
string
getKeyLookup
Get the details list of keys for a table.
getKeyLookup(array $keys) : array
since |
1.7.0 |
---|---|
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 |
1.7.0 |
---|
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 |
3.2.0 |
---|
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 |
3.2.0 |
throws |
|
setDbo
Sets the database connector to use for exporting structure and/or data.
setDbo(\JDatabaseDriver $db) : \JDatabaseImporter
since |
3.2.0 |
---|
Arguments
- $db
\JDatabaseDriver
The database connector.
Response
\JDatabaseImporter
Method supports chaining.
withStructure
Sets an internal option to merge the structure based on the input data.
withStructure(boolean $setting = true) : \JDatabaseImporter
since |
3.2.0 |
---|
Arguments
- $setting
boolean
True to export the structure, false to not.
Response
\JDatabaseImporter
Method supports chaining.
xmlToCreate
Get the SQL syntax to add a table.
xmlToCreate(\SimpleXMLElement $table) : string
since |
1.7.0 |
---|---|
throws |
|
Arguments
- $table
\SimpleXMLElement
The table information.
Response
string
Properties
cache
An array of cached data.
since |
3.2.0 |
---|
Type(s)
array
db
The database connector to use for exporting structure and/or data.
from
The input source.
since |
3.2.0 |
---|
Type(s)
mixed
asFormat
The type of input format (XML).
since |
3.2.0 |
---|
Type(s)
string
options
An array of options for the exporter.
since |
3.2.0 |
---|
Type(s)
object