Loads and parses an XML file, creating an array of "ready-to-run" SQL statements
This class is used to load and parse the XML file, to create an array of SQL statements that can be used to build a database, and to build the database using the SQL array.
Located in /adodb-xmlschema.inc.php (line 1201)
Creates an adoSchema object
Creating an adoSchema object is the first step in processing an XML schema. The only parameter is an ADOdb database connection object, which must already have been created.
Enables/disables SQL continue on error.
Call this method to enable or disable continuation of SQL execution if an error occurs. If the mode is set to TRUE (continue), AXMLS will continue to apply SQL to the database, even if an error occurs. If the mode is set to FALSE (halt), AXMLS will halt execution of generated sql if an error occurs, though parsing of the schema will continue.
Converts an XML schema file to the specified DTD version.
Call this method to convert the specified XML schema file to a different AXMLS DTD version. For instance, to convert a schema created for an pre-1.0 version for AXMLS (DTD version 0.1) to a newer version of the DTD (e.g. 0.2). If no DTD version parameter is specified, the schema will be converted to the current DTD version. If the newFile parameter is provided, the converted schema will be written to the specified file.
Converts an XML schema string to the specified DTD version.
Call this method to convert a string containing an XML schema to a different AXMLS DTD version. For instance, to convert a schema created for an pre-1.0 version for AXMLS (DTD version 0.1) to a newer version of the DTD (e.g. 0.2). If no DTD version parameter is specified, the schema will be converted to the current DTD version. If the newFile parameter is provided, the converted schema will be written to the specified file.
Destroys an adoSchema object.
Call this method to clean up after an adoSchema object that is no longer in use.
Enables/disables inline SQL execution.
Call this method to enable or disable inline execution of the schema. If the mode is set to TRUE (inline execution), AXMLS applies the SQL to the database immediately as each schema entity is parsed. If the mode is set to FALSE (post execution), AXMLS parses the entire schema and you will need to call adoSchema::ExecuteSchema() to apply the schema to the database.
Applies the current XML schema to the database (post execution).
Call this method to apply the current schema (generally created by calling ParseSchema() or ParseSchemaString() ) to the database (creating the tables, indexes, and executing other SQL specified in the schema) after parsing.
Extracts an XML schema from an existing database.
Call this method to create an XML schema string from an existing database. If the data parameter is set to TRUE, AXMLS will include the data from the database in the schema.
Loads an XML schema from a file and converts it to SQL.
Call this method to load the specified schema (see the DTD for the proper format) from the filesystem and generate the SQL necessary to create the database described.
Loads an XML schema from a file and converts it to SQL.
Call this method to load the specified schema from a file (see the DTD for the proper format) and generate the SQL necessary to create the database described by the schema.
Converts an XML schema string to SQL.
Call this method to parse a string containing an XML schema (see the DTD for the proper format) and generate the SQL necessary to create the database described by the schema.
Returns the current SQL array.
Call this method to fetch the array of SQL queries resulting from ParseSchema() or ParseSchemaString().
Loads an XML schema from a file and converts it to uninstallation SQL.
Call this method to load the specified schema (see the DTD for the proper format) from the filesystem and generate the SQL necessary to remove the database described.
Converts an XML schema string to uninstallation SQL.
Call this method to parse a string containing an XML schema (see the DTD for the proper format) and generate the SQL necessary to uninstall the database described by the schema.
Saves the current SQL array to the local filesystem as a list of SQL queries.
Call this method to save the array of SQL queries (generally resulting from a parsed XML schema) to the filesystem.
Returns the AXMLS Schema Version of the requested XML schema file.
Call this method to obtain the AXMLS DTD version of the requested XML schema file.
Returns the AXMLS Schema Version of the provided XML schema string.
Call this method to obtain the AXMLS DTD version of the provided XML schema string.
Sets a prefix for database objects
Call this method to set a standard prefix that will be prepended to all database tables and indices when the schema is parsed. Calling setPrefix with no arguments clears the prefix.
Sets the method to be used for upgrading an existing database
Use this method to specify how existing database objects should be upgraded. The method option can be set to ALTER, REPLACE, BEST, or NONE. ALTER attempts to alter each database object directly, REPLACE attempts to rebuild each object from scratch, BEST attempts to determine the best upgrade method for each object, and NONE disables upgrading.
This method is not yet used by AXMLS, but exists for backward compatibility. The ALTER method is automatically assumed when the adoSchema object is instantiated; other upgrade methods are not currently supported.
Documentation generated on Tue, 27 Jul 2004 20:05:45 -0400 by phpDocumentor 1.3.0RC3