Function __global->get_sql_dump

Definitions

sources/database_relations.php

  • Get an SQL dump of a database.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$out_file resource No No required parameter N/A N/A File to stream into
$include_drops boolean No No False N/A N/A Whether to include 'DROP' statements
$include_data boolean No No True N/A N/A Whether to include table data, otherwise we just want the structure
$output_statuses boolean No No False N/A N/A Whether to output status as we go
$skip array No No [] N/A N/A Array of table names to skip
$only ?array No No Null N/A N/A Array of only table names to do (null: all)
$db ?object No No Null N/A N/A Database connector to use (null: site database)
$intended_db_type ?string No No Null N/A N/A Database driver to use (null: site database driver)

Preview

Code (PHP)

/**
 * Get an SQL dump of a database.
 *
 * @param  resource $out_file File to stream into
 * @param  boolean $include_drops Whether to include 'DROP' statements
 * @param  boolean $include_data Whether to include table data, otherwise we just want the structure
 * @param  boolean $output_statuses Whether to output status as we go
 * @param  array $skip Array of table names to skip
 * @param  ?array $only Array of only table names to do (null: all)
 * @param  ?object $db Database connector to use (null: site database)
 * @param  ?string $intended_db_type Database driver to use (null: site database driver)
 */

function get_sql_dump($out_file, bool $include_drops = false, bool $include_data = true, bool $output_statuses = false, array $skip = [], ?array $only = null, ?object $db = null, ?string $intended_db_type = null)