blob: eb6e96db8f09c77a694f17524eba7e78f3767410 [file] [log] [blame]
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
.. _`fileset section`:
.. _`Commons DBCP Javadoc`:
DdlToDatabaseTask reference
:Class: ``org.apache.ddlutils.task.DdlToDatabaseTask``
This is the container for sub tasks that operate in the direction file -> database, eg.
that create/drop a schema in the database, insert data into the database. They also
create DTDs for these data files, and dump the SQL for creating a schema in the database
to a file.
:Required: no
:Allowed: ``axion``, ``cloudscape``, ``db2``, ``derby``, ``firebird``, ``hsqldb``, ``interbase``,
``maxdb``, ``mckoi``, ``mssql``, ``mysql``, ``mysql5``, ``oracle``, ``oracle9``,
``oracle10``, ``postgresql``, ``sapdb``, ``sybase``
:Meaning: The database type. You should only need to specify this if DdlUtils is not able to derive the setting
from the name of the used jdbc driver or the jdbc connection url. If you need to specify this, please
post your jdbc driver and connection url combo to the user mailing list so that DdlUtils can be
enhanced to support this combo.
:Required: no
:Meaning: The single file that contains the database file. Use this instead of an embedded ``fileset`` if you
only have one schema file.
:Required: no
:Allowed: ``true``, ``false``
:Default: ``false``
:Meaning: Whether DdlUtils shall sort (alphabetically) the foreign keys of a table read from a live database or
leave them in the order that they are returned by the database. Note that the sort is case sensitive
only if delimited identifier mode is on (``useDelimitedSqlIdentifiers`` is set to ``true``).
:Required: no
:Allowed: ``true``, ``false``
:Default: ``false``
:Meaning: Whether DdlUtils shall use delimited (quoted) identifiers (table names, column names etc.) In most
databases, undelimited identifiers will be converted to uppercase by the database, and the case of the
identifier is ignored when performing any SQL command. Undelimited identifiers can contain only
alphanumerical characters and the underscore. Also, no reserved words can be used as such identifiers.
The limitations do not exist for delimited identifiers. However case of the identifier will be
important in every SQL command executed against the database.
:Required: no
:Allowed: ``true``, ``false``
:Default: ``true``
:Meaning: Whether DdlUtils shall use the embedded DTD for validating the schema XML (if it matches
````). This is useful for instance for environments where
no web access is possible.
:Required: no
:Allowed: ``true``, ``false``
:Default: ``false``
:Meaning: Whether DdlUtils shall validate the schema XML against the DTD.
Specifies the schema files to operate with. For details see the `fileset section`_ in the Ant manual.
Specifies the connection to the database. This is basically a ``org.apache.commons.dbcp.BasicDataSource``.
See the `Commons DBCP Javadoc`_ for the supported properties. Usually you only need to specify
:``url``: The jdbc connection url
:``driverClassName``: The fully qualified class name of the jdbc driver (which must be in the classpath that you used to define the DdlToDatabaseTask task)
:``username``: The username
:``password``: The password
.. toctree::
:maxdepth: 1