Class MysqlServer

Description

Implements interfaces:

Implements the interface for Server Driver, which:

Given connection credentials, it gives read-only access to seeing what databases, tables, and columns are available.

Example usage:

$server = new MysqlServer(); $server->loadDatabases(); print_r($server->getDatabases());

Example usage to get just one database:

$server = new MysqlServer(); $server->loadDatabase('db_name'); print_r($dba->getDatabase('db_name'));

  • author: Anthony Bush

Located in /schema_generator/database/drivers/mysql/MysqlServer.class.php (line 24)

Schema
   |
   --MysqlServer
Variable Summary
mixed $connected
mixed $dbLink
Method Summary
void __construct ( $dsn)
void __destruct ()
DriverDatabase loadDatabase (string $dbName)
void loadDatabases ()
Variables
mixed $connected = false (line 27)
  • access: protected
mixed $dbLink = null (line 26)
  • access: protected

Inherited Variables

Inherited from Schema

Schema::$databases
Methods
Constructor __construct (line 46)

Construct with a DSN, an array containing host, user, pass, and port (optional).

For example:

$dsn = array( 'host' => '127.0.0.1', 'user' => 'nobody', 'pass' => '', 'port' => 3306 );

$server = new MysqlServer($dsn);

  • author: Anthony Bush
  • access: public
void __construct ( $dsn)
  • $dsn
Destructor __destruct (line 78)
  • access: public
void __destruct ()
getAvailableDatabaseNames (line 119)

Get a list of available database names.

  • return: of strings
  • author: Anthony Bush
  • access: public
array getAvailableDatabaseNames ()

Implementation of:
DriverServer::getAvailableDatabaseNames()
Get a list of available database names.
loadDatabase (line 108)

Load a specific database schema into memory.

  • author: Anthony Bush
  • access: public
DriverDatabase loadDatabase (string $dbName)
  • string $dbName

Implementation of:
DriverServer::loadDatabase()
Load a specific database schema into memory.
loadDatabases (line 92)

Load all database schemas for the currently connected server into memory.

(will only load databases that the user/pass has privileges to see)

  • author: Anthony Bush
  • access: public
void loadDatabases ()

Implementation of:
DriverServer::loadDatabases()
Load all database schemas for the currently connected server into memory.

Inherited Methods

Inherited From Schema

Schema::addDatabase()
Schema::getDatabase()
Schema::getDatabases()
Schema::getNumberOfHasManyRelationships()
Schema::getNumberOfHasOneRelationships()
Schema::linkRelationships()
Schema::outputRelationshipCounts()

Documentation generated on Wed, 12 Nov 2008 21:56:19 -0600 by phpDocumentor 1.4.0