Current Path : /usr/lib/python2.7/dist-packages/twisted/enterprise/ |
Current File : //usr/lib/python2.7/dist-packages/twisted/enterprise/row.pyc |
[XMc @ sT d Z d d l Z d d l m Z m Z m Z m Z d d d YZ d g Z d S( sq DEPRECATED. A (R)elational (O)bject (W)rapper. This is an extremely thin wrapper. Maintainer: Dave Peticolas iN( t DBErrort NOQUOTEt getKeyColumnt dbTypeMapt RowObjectc B sY e Z d Z d Z d Z d Z d Z d Z d Z d Z d Z d Z RS( s I represent a row in a table in a relational database. My class is "populated" by a Reflector object. After I am populated, instances of me are able to interact with a particular database table. You should use a class derived from this class for each database table. reflector.loadObjectsFrom() is used to create sets of instance of objects of this class from database tables. Once created, the "key column" attributes cannot be changed. Class Attributes that users must supply:: rowKeyColumns # list of key columns in form: [(columnName, typeName)] rowTableName # name of database table rowColumns # list of the columns in the table with the correct # case.this will be used to create member variables. rowFactoryMethod # method to create an instance of this class. # HACK: must be in a list!!! [factoryMethod] (optional) rowForeignKeys # keys to other tables (optional) i c C s t j d d t d d d S( s DEPRECATED. s6 twisted.enterprise.row is deprecated since Twisted 8.0t categoryt stackleveli N( t warningst warnt DeprecationWarning( t self( ( s: /usr/lib/python2.7/dist-packages/twisted/enterprise/row.pyt __init__4 s c C s_ d } x, | j D]! \ } } | | k r d } q q W| sN t d | n | | j | <d S( s Assign to a key attribute. This cannot be done through normal means to protect changing keys of db objects. i i s %s is not a key columns.N( t rowKeyColumnsR t __dict__( R t attrNamet valuet foundt keyColumnt type( ( s: /usr/lib/python2.7/dist-packages/twisted/enterprise/row.pyt assignKeyAttr; s c C sS x<