Documentation

ExportDBMS_MySQL
in package
implements ExportDBMS

Exporter for MySQL databases.

Table of Contents

Interfaces

ExportDBMS

Methods

drop()  : string
Return a query to drop this table
hdr()  : string
Return the header for the export.
insert()  : string
Create an INSERT query
insertUpdate()  : string
Create an INSERT...UPDATE query
structure()  : string
Return a query to create the table
update()  : string
Create an UPDATE query
createKvpString()  : string
Creates a key-value-pair string for use in a sql query
delConstraintsCreate()  : string
Remove CONSTRAINT clauses from a CREATE TABLE sql query

Methods

drop()

Return a query to drop this table

public drop(mixed $table_def) : string
Parameters
$table_def : mixed

The table definition.

Return values
string —

The query to drop the table.

hdr()

Return the header for the export.

public hdr() : string
Tags
inheritdoc
Return values
string —

The header.

insert()

Create an INSERT query

public insert(mixed $table_def, mixed $row) : string
Parameters
$table_def : mixed

The table definition.

$row : mixed

The row data.

Return values
string —

The query to insert the row.

insertUpdate()

Create an INSERT...UPDATE query

public insertUpdate(mixed $table_def, mixed $pk_names, mixed $row) : string
Parameters
$table_def : mixed

The table definition.

$pk_names : mixed

The primary key column names.

$row : mixed

The row data.

Return values
string —

The query to insert the row.

structure()

Return a query to create the table

public structure(mixed $table_def) : string
Parameters
$table_def : mixed

The table definition.

Return values
string —

The query to create the table.

update()

Create an UPDATE query

public update(mixed $table_def, mixed $pk_names, mixed $row) : string
Parameters
$table_def : mixed

The table definition.

$pk_names : mixed

The primary key column names.

$row : mixed

The row data.

Return values
string —

The query to update the row.

createKvpString()

Creates a key-value-pair string for use in a sql query

private createKvpString(array<string|int, mixed> $row[, string $sep = ', ' ]) : string
Parameters
$row : array<string|int, mixed>

The row data.

$sep : string = ', '

The separator to use between key-value pairs.

Return values
string —

The key-value-pair string.

delConstraintsCreate()

Remove CONSTRAINT clauses from a CREATE TABLE sql query

private static delConstraintsCreate(string $create_sql) : string
Parameters
$create_sql : string

SQL query for CREATE TABLE which may contain CONSTRAINT clauses

Return values
string —

SQL query which does not contain CONSTRAINT clauses

On this page

Search results