Changeset 4454:460aa2f08d76 in livinglogic.python.xist

Show
Ignore:
Timestamp:
04/08/11 12:58:59 (8 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Docstring for oramerge.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/ll/orasql/scripts/oramerge.py

    r4422 r4454  
    1010 
    1111 
     12""" 
     13Purpose 
     14------- 
     15 
     16``oramerge`` can be used for merging the changes between two Oracle database 
     17schemas into a third one. Depending on the existance/non-existance of schema 
     18objects in the three schemas ``oramerge`` does the right thing. If a schema 
     19objects exists in all three schemas, the external tool ``merge3`` will be used 
     20for creating a merged version of the object (except for tables where the 
     21appropriate ``ALTER TABLE`` statements will be output if possible). 
     22 
     23 
     24Options 
     25------- 
     26 
     27``oramerge`` supports the following options: 
     28 
     29    ``connectstring1`` : Oracle connectstring 
     30        Old version of database schema 
     31 
     32    ``connectstring2`` : Oracle connectstring 
     33        New version of database schema 
     34 
     35    ``connectstring3`` : Oracle connectstring 
     36        Schema into which changes should be merged 
     37 
     38    ``-v``, ``--verbose`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
     39        Produces output (on stderr) while to database is read or written. 
     40 
     41    ``-c``, ``--color`` : ``yes``, ``no`` or ``auto`` 
     42        Should the output (when the ``-v`` option is used) be colored. If ``auto`` 
     43        is specified (the default) then the output is colored if stderr is a 
     44        terminal. 
     45 
     46    ``-k``, ``--keepjunk`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
     47        If true (the default), database objects that have ``$`` or 
     48        ``SYS_EXPORT_SCHEMA_`` in their name will be skipped (otherwise these 
     49        objects will be considered as merge candidates). 
     50 
     51    ``-e``, ``--encoding`` : encoding 
     52        The encoding of the output (default is ``utf-8``). 
     53 
     54 
     55Example 
     56------- 
     57 
     58Output a script that merges the changes between ``user@db`` and ``user2@db2`` 
     59into ``user3@db3``:: 
     60 
     61    $ oramerge user/pwd@db user2/pwd2@db2 user3/pwd3@db3 -v >db.sql 
     62""" 
     63 
     64 
    1265import sys, os, difflib, argparse, tempfile, subprocess 
    1366 
    1467from ll import misc, orasql, astyle 
     68 
     69 
     70__docformat__ = "reStructuredText" 
    1571 
    1672