TDatabase
in package
Database Task manager
Tags
Table of Contents
Methods
- addColumn() : mixed
- Add column
- clearData() : mixed
- Clear table data
- copyData() : mixed
- Copy data from table to table
- copyQuery() : mixed
- Copy data from query to table
- countData() : mixed
- Count data from table
- createTable() : mixed
- Create table
- dropColumn() : mixed
- Drop column
- dropTable() : mixed
- Drop table
- execute() : mixed
- Execute SQL
- exportToFile() : mixed
- Export data to CSV file
- getData() : mixed
- Get RAW Data
- getRowData() : mixed
- Get a row from the table
- importFromFile() : mixed
- Import data from CSV file
- insertData() : mixed
- Insert data
- updateData() : mixed
- Update data
- transform() : mixed
- Transform value according to mapping rules
Methods
addColumn()
Add column
public
static addColumn( $conn, $table, $column, $type, $options) : mixed
Parameters
clearData()
Clear table data
public
static clearData( $conn, $table[, $criteria = null ]) : mixed
Parameters
copyData()
Copy data from table to table
public
static copyData( $source_conn, $target_conn, $source_table, $target_table, $mapping[, $criteria = null ][, $bulk_inserts = 1 ][, $auto_commit = false ]) : mixed
Parameters
copyQuery()
Copy data from query to table
public
static copyQuery( $source_conn, $target_conn, $query, $target_table, $mapping[, $prepared_values = null ][, $bulk_inserts = 1 ][, $auto_commit = false ]) : mixed
Parameters
countData()
Count data from table
public
static countData( $conn, $table[, $criteria = null ]) : mixed
Parameters
createTable()
Create table
public
static createTable( $conn, $table, $columns) : mixed
Parameters
dropColumn()
Drop column
public
static dropColumn( $conn, $table, $column) : mixed
Parameters
dropTable()
Drop table
public
static dropTable( $conn, $table[, $ifexists = false ]) : mixed
Parameters
execute()
Execute SQL
public
static execute( $conn, $query) : mixed
Parameters
exportToFile()
Export data to CSV file
public
static exportToFile( $source_conn, $source_table, $filename, $mapping[, $criteria = null ][, $separator = ',' ]) : mixed
Parameters
getData()
Get RAW Data
public
static getData( $conn, $query[, $mapping = null ][, $prepared_values = null ][, Closure $action = null ]) : mixed
Parameters
getRowData()
Get a row from the table
public
static getRowData( $conn, $table[, $criteria = null ]) : mixed
Parameters
importFromFile()
Import data from CSV file
public
static importFromFile( $filename, $target_conn, $target_table, $mapping[, $separator = ',' ][, mixed $bulk_inserts = 1 ]) : mixed
Parameters
insertData()
Insert data
public
static insertData( $conn, $table, $values[, $avoid_criteria = null ]) : mixed
Parameters
updateData()
Update data
public
static updateData( $conn, $table, $values[, mixed $criteria = null ]) : mixed
Parameters
transform()
Transform value according to mapping rules
private
static transform( $row, $map) : mixed