Changeset 4449:067f6f364210 in livinglogic.python.xist

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

Docstring for oragrant.

Files:
1 modified

Legend:

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

    r4422 r4449  
    1010 
    1111 
     12""" 
     13Purpose 
     14------- 
     15 
     16``oragrant`` prints all existing grants in an Oracle database schema. 
     17It can also be used to execute these grant statements directly. 
     18 
     19 
     20Options 
     21------- 
     22 
     23``oragrant`` supports the following options: 
     24 
     25    ``connectstring`` 
     26        An Oracle connectstring. 
     27 
     28    ``-v``, ``--verbose`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
     29        Produces output (on stderr) while to datebase is read or written. 
     30 
     31    ``-c``, ``--color`` : ``yes``, ``no`` or ``auto`` 
     32        Should the output (when the ``-v`` option is used) be colored. If ``auto`` 
     33        is specified (the default) then the output is colored if stderr is a 
     34        terminal. 
     35 
     36    ``-x``, ``--execute`` : connectstring 
     37        When the ``-x`` argument is given the SQL script isn't printed on stdout, 
     38        but executed in the database specfied as the ``-x`` argument. 
     39 
     40    ``-k``, ``--keepjunk`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
     41        If given, database objects that have ``$`` or ``SYS_EXPORT_SCHEMA_`` in 
     42        their name will be skipped (otherwise these objects will be included). 
     43 
     44    ``-i``, ``--ignore`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
     45        If given, errors occuring while the database is read or written will be 
     46        ignored. 
     47 
     48    ``-m``, ``--mapgrantee`` : Python expression: ``list`` or ``dict`` 
     49        A Python ``dict`` or ``list`` literal which will be evaluated. If the 
     50        grantee is not in this list (or dictionary) no grant statement will be 
     51        returned. If it's a dictionary and the grantee exists as a key, the 
     52        privilege will be granted to the user specified as the value instead of 
     53        the original one. The default is to grant all privileges to the original 
     54        grantee. 
     55 
     56    ``-e``, ``--encoding`` : encoding 
     57        The encoding of the output (if ``-x`` is not given; default is ``utf-8``). 
     58""" 
     59 
     60 
    1261import sys, os, argparse 
    1362 
    1463from ll import misc, astyle, orasql 
     64 
     65 
     66__docformat__ = "reStructuredText" 
    1567 
    1668