Changeset 4446:a0ae47a2f21d in livinglogic.python.xist

Show
Ignore:
Timestamp:
04/05/11 15:57:02 (8 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Docstring for oradrop.

Files:
3 modified

Legend:

Unmodified
Added
Removed
  • setup.py

    r4437 r4446  
    288288    ], 
    289289    extras_require = { 
    290         "oracle":  ["cx_Oracle >= 5.0.1"], 
     290        "oracle":  ["cx_Oracle >= 5.0.1, < 5.1"], 
    291291    }, 
    292292    namespace_packages=["ll"], 
  • src/ll/orasql/scripts/oracreate.py

    r4445 r4446  
    1414------- 
    1515 
    16 ``oracreate`` prints the DDL of all objects in an Oracle database schema it a 
     16``oracreate`` prints the DDL of all objects in an Oracle database schema in a 
    1717way that can be used to recreate the schema (i.e. objects will be ordered so 
    1818that no errors happen for non-existant objects during script execution). 
  • src/ll/orasql/scripts/oradrop.py

    r4422 r4446  
    1010 
    1111 
     12""" 
     13Purpose 
     14------- 
     15 
     16``oradrop`` prints the drop statements for all objects in an Oracle database 
     17schema in the correct order (i.e. objects will be dropped so that no errors 
     18happen during script execution). ``oradrop`` can also be used to actually 
     19make the schema empty.. 
     20 
     21 
     22Options 
     23------- 
     24 
     25``oradrop`` supports the following options: 
     26 
     27    ``connectstring`` 
     28        An Oracle connectstring. 
     29 
     30    ``-v``, ``--verbose`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
     31        Produces output (on stderr) while to datebase is read or written. 
     32 
     33    ``-c``, ``--color`` : ``yes``, ``no`` or ``auto`` 
     34        Should the output (when the ``-v`` option is used) be colored. If ``auto`` 
     35        is specified (the default) then the output is colored if stderr is a 
     36        terminal. 
     37 
     38    ``-f``, ``--fks`` : ``keep``, ``disable``, ``drop`` 
     39        Specifies how foreign keys from other schemas pointing to this schema 
     40        should be treated: ``keep`` will now change the foreign keys in any way 
     41        (this *will* lead to errors); ``disable`` will disable the foreign keys 
     42        and ``drop`` will drop them completely. 
     43 
     44    ``-x``, ``--execute`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
     45        When the ``-x`` argument is given the SQL script isn't printed on stdout, 
     46        but is executed directly. Be careful with this: You *will* have an empty 
     47        schema after ``oradrop -x``. 
     48 
     49    ``-k``, ``--keepjunk`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
     50        If given, database objects that have ``$`` or ``SYS_EXPORT_SCHEMA_`` in 
     51        their name will be skipped (otherwise these objects will be included in 
     52        the output). 
     53 
     54    ``-i``, ``--ignore`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
     55        If given, errors occuring while it database is read or written will be 
     56        ignored. 
     57 
     58    ``-e``, ``--encoding`` : encoding 
     59        The encoding of the output (if ``-x`` is not given; default is ``utf-8``). 
     60""" 
     61 
     62 
    1263import sys, os, argparse 
    1364 
    1465from ll import misc, astyle, orasql 
     66 
     67 
     68__docformat__ = "reStructuredText" 
    1569 
    1670