Skip to content

CI_DB_postgre_utility

Mathieu Nayrolles edited this page Jan 20, 2016 · 1 revision

CI_DB_postgre_utility

Postgre Utility Class

  • Class name: CI_DB_postgre_utility
  • Namespace:
  • Parent class: CI_DB_utility

Properties

$_list_databases

protected string $_list_databases = FALSE

List databases statement

  • Visibility: protected

$_optimize_table

protected string $_optimize_table = FALSE

OPTIMIZE TABLE statement

  • Visibility: protected

$db

protected object $db

Database object

  • Visibility: protected

$_repair_table

protected string $_repair_table = FALSE

REPAIR TABLE statement

  • Visibility: protected

Methods

_backup

mixed CI_DB_postgre_utility::_backup(array $params)

Export

  • Visibility: protected

Arguments

  • $params array - <p>Preferences</p>

__construct

void CI_DB_utility::__construct($db)

Class constructor

Arguments

  • $db mixed

list_databases

array CI_DB_utility::list_databases()

List databases

database_exists

boolean CI_DB_utility::database_exists(string $database_name)

Determine if a particular database exists

Arguments

  • $database_name string

optimize_table

mixed CI_DB_utility::optimize_table(string $table_name)

Optimize Table

Arguments

  • $table_name string

optimize_database

mixed CI_DB_utility::optimize_database()

Optimize Database

repair_table

mixed CI_DB_utility::repair_table(string $table_name)

Repair Table

Arguments

  • $table_name string

csv_from_result

string CI_DB_utility::csv_from_result(object $query, string $delim, string $newline, string $enclosure)

Generate CSV from a query result object

Arguments

  • $query object - <p>Query result object</p>
  • $delim string - <p>Delimiter (default: ,)</p>
  • $newline string - <p>Newline character (default: \n)</p>
  • $enclosure string - <p>Enclosure (default: ")</p>

xml_from_result

string CI_DB_utility::xml_from_result(object $query, array $params)

Generate XML data from a query result object

Arguments

  • $query object - <p>Query result object</p>
  • $params array - <p>Any preferences</p>

backup

string CI_DB_utility::backup(array $params)

Database Backup

Arguments

  • $params array
Clone this wiki locally