Changeset 207:b5c3a8f6a59f in livinglogic.python.orasql

Show
Ignore:
Timestamp:
01/06/08 23:13:28 (12 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Update to new names of doc elements (round 2).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/ll/orasql/__init__.py

    r203 r207  
    2323 
    2424""" 
    25 <par><module>ll.orasql</module> contains utilities for working with 
    26 <link href="http://www.computronix.com/utilities.shtml#Oracle"><app>cx_Oracle</app></link>:</par> 
    27 <ulist> 
     25<p><mod>ll.orasql</mod> contains utilities for working with 
     26<a href="http://www.computronix.com/utilities.shtml#Oracle"><app>cx_Oracle</app></a>:</p> 
     27<ul> 
    2828<item>It allows calling procedures with keyword arguments (via the 
    2929<pyref class="Procedure"><class>Procedure</class></pyref> class).</item> 
     
    3232<item>The <pyref class="Connection"><class>Connection</class></pyref> class 
    3333provides methods for iterating through the database metadata.</item> 
    34 </ulist> 
     34</ul> 
    3535""" 
    3636 
     
    106106    A <class>Record</class> is a subclass of <class>dict</class> that is used 
    107107    for storing results of database queries. Both item and attribute access (i.e. 
    108     <method>__getitem__</method> and <method>__getattr__</method>) are available. 
     108    <meth>__getitem__</meth> and <meth>__getattr__</meth>) are available. 
    109109    Field names are case insensitive. 
    110110    """ 
     
    209209    def __init__(self, *args, **kwargs): 
    210210        """ 
    211         <par>Create a new connection. In addition to the parameters supported 
    212         by <function>cx_Oracle.connect</function> the following keyword arguments 
    213         are supported.</par> 
    214         <dlist> 
     211        <p>Create a new connection. In addition to the parameters supported 
     212        by <func>cx_Oracle.connect</func> the following keyword arguments 
     213        are supported.</p> 
     214        <dl> 
    215215        <term><arg>readlobs</arg></term><item>If <arg>readlobs</arg> is <lit>False</lit> 
    216216        all cursor fetch return <class>LOB</class> objects as usual. If 
     
    224224        <class>BLOB</class>s). Note that strings in the national character set 
    225225        (and <class>NCLOB</class>s) are not supported).</item> 
    226         </dlist> 
     226        </dl> 
    227227        """ 
    228228        if "readlobs" in kwargs or "unicode" in kwargs: 
     
    242242        Return a new cursor for this connection. For the meaning 
    243243        of <arg>readlobs</arg> and <arg>unicode</arg> see 
    244         <pyref method="__init__"><method>__init__</method></pyref>. 
     244        <pyref method="__init__"><meth>__init__</meth></pyref>. 
    245245        """ 
    246246        return Cursor(self, readlobs=readlobs, unicode=unicode) 
     
    259259    def iterschema(self, schema="user"): 
    260260        """ 
    261         <par>Generator that returns the number of different object types for this 
    262         database.</par> 
     261        <p>Generator that returns the number of different object types for this 
     262        database.</p> 
    263263         
    264         <par>For the meaning of <arg>schema</arg> see 
    265         <pyref method="iterobjects"><method>iterobjects</method></pyref>.</par> 
     264        <p>For the meaning of <arg>schema</arg> see 
     265        <pyref method="iterobjects"><meth>iterobjects</meth></pyref>.</p> 
    266266        """ 
    267267        cursor = self.cursor() 
     
    286286    def itertables(self, schema="user"): 
    287287        """ 
    288         <par>Generator that yields all table definitions in the current users schema 
    289         (or all users schemas).</par> 
    290         <par><arg>schema</arg> specifies from which tables should be 
    291         yielded:</par> 
    292         <dlist> 
     288        <p>Generator that yields all table definitions in the current users schema 
     289        (or all users schemas).</p> 
     290        <p><arg>schema</arg> specifies from which tables should be 
     291        yielded:</p> 
     292        <dl> 
    293293        <term><lit>"user"</lit></term><item>Only tables belonging to the current 
    294294        user (and those objects these depend on) will be yielded.</item> 
    295295        <term><lit>"all"</lit></term><item>All tables from all users will be 
    296296        yielded.</item> 
    297         </dlist> 
    298         <par>Tables that are materialized view will be skipped in both casess.</par> 
     297        </dl> 
     298        <p>Tables that are materialized view will be skipped in both casess.</p> 
    299299        """ 
    300300        if schema not in ("user", "all"): 
     
    312312    def iterfks(self, schema="user"): 
    313313        """ 
    314         <par>Generator that yields all foreign key constraints in the current users schema 
    315         (or all users schemas).</par> 
    316         <par><arg>schema</arg> specifies from which tables should be 
    317         yielded:</par> 
    318         <dlist> 
     314        <p>Generator that yields all foreign key constraints in the current users schema 
     315        (or all users schemas).</p> 
     316        <p><arg>schema</arg> specifies from which tables should be 
     317        yielded:</p> 
     318        <dl> 
    319319        <term><lit>"user"</lit></term><item>Only tables belonging to the current 
    320320        user (and those objects these depend on) will be yielded.</item> 
    321321        <term><lit>"all"</lit></term><item>All tables from all users will be 
    322322        yielded.</item> 
    323         </dlist> 
     323        </dl> 
    324324        """ 
    325325        if schema not in ("user", "all"): 
     
    337337    def iterobjects(self, mode="create", schema="user"): 
    338338        """ 
    339         <par>Generator that yields the sequences, tables, primary keys, 
     339        <p>Generator that yields the sequences, tables, primary keys, 
    340340        foreign keys, comments, unique constraints, indexes, views, functions, 
    341341        procedures, packages and types in the current users schema (or all users 
    342         schemas) in a specified order.</par> 
    343         <par><arg>mode</arg> specifies the order in which objects will be yielded:</par> 
    344         <dlist> 
     342        schemas) in a specified order.</p> 
     343        <p><arg>mode</arg> specifies the order in which objects will be yielded:</p> 
     344        <dl> 
    345345        <term><lit>"create"</lit></term><item>Create order, i.e. recreating the 
    346346        objects in this order will not lead to errors.</item> 
     
    348348        objects in this order will not lead to errors.</item> 
    349349        <term><lit>"flat"</lit></term><item>Unordered.</item> 
    350         </dlist> 
    351         <par><arg>schema</arg> specifies from which schema objects should be 
    352         yielded:</par> 
    353         <dlist> 
     350        </dl> 
     351        <p><arg>schema</arg> specifies from which schema objects should be 
     352        yielded:</p> 
     353        <dl> 
    354354        <term><lit>"user"</lit></term><item>Only objects belonging to the current 
    355355        user (and those objects these depend on) will be yielded.</item> 
    356356        <term><lit>"all"</lit></term><item>All objects from all users will be 
    357357        yielded.</item> 
    358         </dlist> 
     358        </dl> 
    359359        """ 
    360360        if mode not in ("create", "drop", "flat"): 
     
    491491    def iterprivileges(self, schema="user"): 
    492492        """ 
    493         <par>Generator that yields object privileges for the current users 
    494         (or all users) objects.</par> 
    495         <par><arg>schema</arg> specifies which privileges should be yielded:</par> 
    496         <dlist> 
     493        <p>Generator that yields object privileges for the current users 
     494        (or all users) objects.</p> 
     495        <p><arg>schema</arg> specifies which privileges should be yielded:</p> 
     496        <dl> 
    497497        <term><lit>"user"</lit></term><item>Only object privileges for objects 
    498498        belonging to the current user will be yielded.</item> 
    499499        <term><lit>"all"</lit></term><item>All object privileges will be yielded.</item> 
    500         </dlist> 
     500        </dl> 
    501501        """ 
    502502        return Privilege.iterobjects(self, schema) 
     
    513513class Cursor(Cursor): 
    514514    """ 
    515     A subclass of <module>cx_Oracle</module>s cursor class. Database results 
    516     returned from <method>fetchone</method>, <method>fetchmany</method>, 
    517     <method>fetchall</method> and <method>fetch</method> or by iterating the 
     515    A subclass of <mod>cx_Oracle</mod>s cursor class. Database results 
     516    returned from <meth>fetchone</meth>, <meth>fetchmany</meth>, 
     517    <meth>fetchall</meth> and <meth>fetch</meth> or by iterating the 
    518518    cursor will be returned as <pyref class="Record"><class>Record</class> objects. 
    519519    """ 
     
    677677class Object(object): 
    678678    """ 
    679     <par>The base class for all Python classes modelling schema objects in the 
    680     database.</par> 
    681  
    682     <par>Subclasses are: 
     679    <p>The base class for all Python classes modelling schema objects in the 
     680    database.</p> 
     681 
     682    <p>Subclasses are: 
    683683    <pyref class="Sequence"><class>Sequence</class></pyref>, 
    684684    <pyref class="Table"><class>Table</class></pyref>, 
     
    698698    <pyref class="JavaSource"><class>JavaSource</class></pyref> and 
    699699    <pyref class="Column"><class>Column</class></pyref>. 
    700     </par> 
     700    </p> 
    701701    """ 
    702702    name2type = {} # maps the Oracle type name to the Python class 
     
    771771    def iterreferences(self, connection=None): 
    772772        """ 
    773         <par>Objects directly used by <self/>.</par> 
    774  
    775         <par>If <arg>connection</arg> is not <lit>None</lit> it will be used as 
     773        <p>Objects directly used by <self/>.</p> 
     774 
     775        <p>If <arg>connection</arg> is not <lit>None</lit> it will be used as 
    776776        the database connection from which to fetch data. If <arg>connection</arg> is <lit>None</lit> 
    777777        the connection from which <self/> has been extracted will be used. If 
    778         there is not such connection, you'll get an exception.</par> 
     778        there is not such connection, you'll get an exception.</p> 
    779779        """ 
    780780        (connection, cursor) = self.getcursor(connection) 
     
    790790    def iterreferencesall(self, connection=None, done=None): 
    791791        """ 
    792         <par>All objects used by <self/> (recursively).</par> 
    793  
    794         <par>For the meaning of <arg>connection</arg> see 
    795         <pyref method="iterreferences"><method>iterreferences</method></pyref>.</par> 
    796  
    797         <par><arg>done</arg> is used internally and shouldn't be passed.</par> 
     792        <p>All objects used by <self/> (recursively).</p> 
     793 
     794        <p>For the meaning of <arg>connection</arg> see 
     795        <pyref method="iterreferences"><meth>iterreferences</meth></pyref>.</p> 
     796 
     797        <p><arg>done</arg> is used internally and shouldn't be passed.</p> 
    798798        """ 
    799799        if done is None: 
     
    808808    def iterreferencedby(self, connection=None): 
    809809        """ 
    810         <par>Objects using <self/>.</par> 
    811  
    812         <par>For the meaning of <arg>connection</arg> see 
    813         <pyref method="iterreferences"><method>iterreferences</method></pyref>.</par> 
     810        <p>Objects using <self/>.</p> 
     811 
     812        <p>For the meaning of <arg>connection</arg> see 
     813        <pyref method="iterreferences"><meth>iterreferences</meth></pyref>.</p> 
    814814        """ 
    815815        (connection, cursor) = self.getcursor(connection) 
     
    825825    def iterreferencedbyall(self, connection=None, done=None): 
    826826        """ 
    827         <par>All objects depending on <self/> (recursively).</par> 
    828  
    829         <par>For the meaning of <arg>connection</arg> see 
    830         <pyref method="iterreferences"><method>iterreferences</method></pyref>.</par> 
    831  
    832         <par><arg>done</arg> is used internally and shouldn't be passed.</par> 
     827        <p>All objects depending on <self/> (recursively).</p> 
     828 
     829        <p>For the meaning of <arg>connection</arg> see 
     830        <pyref method="iterreferences"><meth>iterreferences</meth></pyref>.</p> 
     831 
     832        <p><arg>done</arg> is used internally and shouldn't be passed.</p> 
    833833        """ 
    834834        if done is None: 
     
    861861    def iterobjects(cls, connection, schema="user"): 
    862862        """ 
    863         <par>Generator that yields all objects of this type in the database schema 
    864         of <arg>cursor</arg>.</par> 
     863        <p>Generator that yields all objects of this type in the database schema 
     864        of <arg>cursor</arg>.</p> 
    865865        """ 
    866866        cursor = connection.cursor() 
     
    10741074    def itercolumns(self, connection=None): 
    10751075        """ 
    1076         <par>Generator that yields all column objects of the <class>Table</class> <self/>.</par> 
     1076        <p>Generator that yields all column objects of the <class>Table</class> <self/>.</p> 
    10771077        """ 
    10781078        (connection, cursor) = self.getcursor(connection) 
     
    10841084    def iterrecords(self, connection=None): 
    10851085        """ 
    1086         <par>Generator that yields all records of the table <self/>.</par> 
     1086        <p>Generator that yields all records of the table <self/>.</p> 
    10871087        """ 
    10881088        (connection, cursor) = self.getcursor(connection) 
     
    18071807    def iterarguments(self, connection=None): 
    18081808        """ 
    1809         <par>Generator that yields all <pyref class="ArgumentInfo">arguments</pyref> of the function/procedure <self/>.</par> 
     1809        <p>Generator that yields all <pyref class="ArgumentInfo">arguments</pyref> of the function/procedure <self/>.</p> 
    18101810        """ 
    18111811        (connection, cursor) = self.getcursor(connection) 
     
    18321832        """ 
    18331833        Call the procedure with arguments <arg>args</arg> and keyword arguments 
    1834         <arg>kwargs</arg>. <arg>cursor</arg> must be a <module>cx_Oracle</module> 
    1835         or <module>ll.orasql</module> cursor. This will return a 
     1834        <arg>kwargs</arg>. <arg>cursor</arg> must be a <mod>cx_Oracle</mod> 
     1835        or <mod>ll.orasql</mod> cursor. This will return a 
    18361836        <pyref class="Record"><class>Record</class></pyref> object containing 
    18371837        the result of the call (i.e. this record will contain all in and out 
     
    18611861        """ 
    18621862        Call the function with arguments <arg>args</arg> and keyword arguments 
    1863         <arg>kwargs</arg>. <arg>cursor</arg> must be a <module>cx_Oracle</module> 
    1864         or <module>ll.orasql</module> cursor. This will return a tuple containing 
     1863        <arg>kwargs</arg>. <arg>cursor</arg> must be a <mod>cx_Oracle</mod> 
     1864        or <mod>ll.orasql</mod> cursor. This will return a tuple containing 
    18651865        the result and a <pyref class="Record"><class>Record</class></pyref> object 
    18661866        containing the modified parameters (i.e. this record will contain all in 
     
    19871987    def iterobjects(self, connection, schema="user"): 
    19881988        """ 
    1989         <par>Generator that yields object privileges for the current users 
    1990         (or all users) objects.</par> 
    1991         <par><arg>schema</arg> specifies which privileges should be yielded:</par> 
    1992         <dlist> 
     1989        <p>Generator that yields object privileges for the current users 
     1990        (or all users) objects.</p> 
     1991        <p><arg>schema</arg> specifies which privileges should be yielded:</p> 
     1992        <dl> 
    19931993        <term><lit>"user"</lit></term><item>Only object privileges for objects 
    19941994        belonging to the current user will be yielded.</item> 
    19951995        <term><lit>"all"</lit></term><item>All object privileges will be yielded.</item> 
    1996         </dlist> 
     1996        </dl> 
    19971997        """ 
    19981998        if schema not in ("user", "all"):