Class: MDB2_Schema
Source Location: /MDB2_Schema-0.3.0/MDB2/Schema.php
PEAR
|
--MDB2_Schema
The database manager is a class that provides a set of database management services like installing, altering and dumping the data structures of databases.
Author(s):
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Method Detail
alterDatabase [line 1456]
mixed alterDatabase(
array
$changes, [array
$current_definition = null])
|
|
Execute the necessary actions to implement the requested changes in a database structure.
Parameters:
alterDatabaseIndexes [line 1264]
mixed alterDatabaseIndexes(
string
$table_name, array
$changes)
|
|
Execute the necessary actions to implement the requested changes in the indexes inside a database structure.
Parameters:
alterDatabaseSequences [line 1399]
mixed alterDatabaseSequences(
array
$changes, array
$current_definition)
|
|
Execute the necessary actions to implement the requested changes in the sequences inside a database structure.
Parameters:
alterDatabaseTables [line 1326]
mixed alterDatabaseTables(
array
$changes, array
$current_definition)
|
|
Execute the necessary actions to implement the requested changes in the tables inside a database structure.
Parameters:
apiVersion [line 106]
Return the MDB2 API version
compareDefinitions [line 807]
mixed compareDefinitions(
array
$previous_definition, [array
$current_definition = null])
|
|
compare a previous definition with the currenlty parsed definition
Parameters:
compareSequenceDefinitions [line 1128]
mixed compareSequenceDefinitions(
array
$sequence_name, array
$previous_definition, mixed
$current_definition, mixed
&$defined_sequences)
|
|
compare a previous definition with the currenlty parsed definition
Parameters:
compareTableDefinitions [line 1031]
mixed compareTableDefinitions(
string
$table_name, array
$previous_definition, array
$current_definition, mixed
&$defined_tables)
|
|
compare a previous definition with the currenlty parsed definition
Parameters:
compareTableFieldsDefinitions [line 878]
mixed compareTableFieldsDefinitions(
string
$table_name, array
$previous_definition, array
$current_definition, mixed
&$defined_fields)
|
|
compare a previous definition with the currenlty parsed definition
Parameters:
compareTableIndexesDefinitions [line 943]
mixed compareTableIndexesDefinitions(
string
$table_name, array
$previous_definition, array
$current_definition, mixed
&$defined_indexes)
|
|
compare a previous definition with the currenlty parsed definition
Parameters:
connect [line 232]
mixed connect(
mixed
&$db, [mixed
$options = array()])
|
|
Create a new MDB2 connection object and connect to the specified database
Parameters:
createDatabase [line 690]
Create a database space within which may be created database objects like tables, indexes and sequences. The implementation of this function is highly DBMS specific and may require special permissions to run successfully. Consult the documentation or the DBMS drivers that you use to be aware of eventual configuration requirements.
createSequence [line 605]
mixed createSequence(
string
$sequence_name, array
$sequence, [boolean
$overwrite = false])
|
|
create a sequence
Parameters:
createTable [line 499]
mixed createTable(
string
$table_name, array
$table, [boolean
$overwrite = false])
|
|
create a table and inititialize the table if data is available
Parameters:
createTableIndexes [line 424]
mixed createTableIndexes(
string
$table_name, array
$indexes, [boolean
$overwrite = false])
|
|
create a indexes om a table
Parameters:
disconnect [line 268]
Log out and disconnect from the database.
dumpDatabase [line 1700]
mixed dumpDatabase(
array
$arguments, [integer
$dump = MDB2_SCHEMA_DUMP_ALL])
|
|
Dump a previously parsed database structure in the Metabase schema XML based format suitable for the Metabase parser. This function may optionally dump the database definition with initialization commands that specify the data that is currently present in the tables.
Parameters:
dumpDatabaseChanges [line 1529]
mixed dumpDatabaseChanges(
array
$changes)
|
|
Dump the changes between two database definitions.
Parameters:
errorMessage [line 1951]
string errorMessage(
int
$value)
|
|
Return a textual error message for a MDB2_Schema error code
Parameters:
factory [line 203]
mixed &factory(
mixed
&$db, [mixed
$options = array()])
|
|
Create a new MDB2 object for the specified database type type
Parameters:
getDefinitionFromDatabase [line 332]
mixed getDefinitionFromDatabase(
)
|
|
Attempt to reverse engineer a schema structure from an existing MDB2 This method can be used if no xml schema file exists yet. The resulting xml schema file may need some manual adjustments.
getOption [line 175]
mixed getOption(
string
$option)
|
|
returns the value of an option
Parameters:
getWarnings [line 135]
get all warnings in reverse order. This means that the last warning is the first element in the array
initializeTable [line 559]
mixed initializeTable(
string
$table_name, array
$table)
|
|
inititialize the table with data
Parameters:
isError [line 2019]
bool isError(
mixed
$data, [int
$code = null])
|
|
Tell whether a value is a MDB2_Schema error.
Parameters:
parseDatabaseDefinitionFile [line 292]
mixed parseDatabaseDefinitionFile(
string
$input_file, [array
$variables = array()], [bool
$fail_on_invalid_names = true], [mixed
$structure = false])
|
|
Parse a database definition file by creating a Metabase schema format parser object and passing the file contents as parser input data stream.
Parameters:
raiseError [line 1999]
object a &raiseError(
[mixed
$code = null], [int
$mode = null], [mixed
$options = null], [string
$userinfo = null])
|
|
This method is used to communicate an error and invoke error callbacks etc. Basically a wrapper for PEAR::raiseError without the message string.
Parameters:
resetWarnings [line 119]
setOption [line 151]
mixed setOption(
string
$option, mixed
$value)
|
|
set the option for the db class
Parameters:
updateDatabase [line 1871]
mixed updateDatabase(
string
$current_schema_file, [string
$previous_schema_file = false], [array
$variables = array()], [bool
$disable_query = false])
|
|
Compare the correspondent files of two versions of a database schema definition: the previously installed and the one that defines the schema that is meant to update the database. If the specified previous definition file does not exist, this function will create the database from the definition specified in the current schema file. If both files exist, the function assumes that the database was previously installed based on the previous schema file and will update it by just applying the changes. If this function succeeds, the contents of the current schema file are copied to replace the previous schema file contents. Any subsequent schema changes should only be done on the file specified by the $current_schema_file to let this function make a consistent evaluation of the exact changes that need to be applied.
Parameters:
verifyAlterDatabase [line 1194]
mixed verifyAlterDatabase(
array
$changes)
|
|
verify that the changes requested are supported
Parameters:
writeInitialization [line 1769]
mixed writeInitialization(
string
$data_file, [string
$structure_file = false], [array
$variables = array()])
|
|
write initialization and sequences
Parameters:
Documentation generated on Mon, 10 Oct 2005 07:02:03 -0400 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.
|
|