ProPeler
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
cpanel-ccs
/
txdav
/
base
/
datastore
/
Filename :
dbapiclient.pyc
back
Copy
� *��ac @ sV d Z d d l m Z d d l m Z d d l m Z d d l Z d d l Z d d l Z y) d d l Z d e j d <d d l Z Wn e k r� d Z n Xd e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d � Z d � Z d � Z d S( sF General utility client code for interfacing with DB-API 2.0 modules. i����( t mapOracleOutputType( t CachingFilePath( t InternalDataStoreErrorNs .AL32UTF8t NLS_LANGt DiagnosticCursorWrapperc B sS e Z d Z d � Z e d � � Z e d � � Z d d � Z d � Z d � Z RS( s\ Diagnostic wrapper around a DB-API 2.0 cursor for debugging connection status. c C s | | _ | | _ d S( N( t realCursort connectionWrapper( t selfR R ( ( s3 /opt/cpanel-ccs/txdav/base/datastore/dbapiclient.pyt __init__? s c C s | j j S( N( R t rowcount( R ( ( s3 /opt/cpanel-ccs/txdav/base/datastore/dbapiclient.pyR C s c C s | j j S( N( R t description( R ( ( s3 /opt/cpanel-ccs/txdav/base/datastore/dbapiclient.pyR G s c C s* d | f | j _ | j j | | � d S( Ns executing %r( R t stateR t execute( R t sqlt args( ( s3 /opt/cpanel-ccs/txdav/base/datastore/dbapiclient.pyR K s c C s | j j � d S( N( R t close( R ( ( s3 /opt/cpanel-ccs/txdav/base/datastore/dbapiclient.pyR T s c C s | j j � } | S( N( R t fetchall( R t results( ( s3 /opt/cpanel-ccs/txdav/base/datastore/dbapiclient.pyR W s ( ( t __name__t __module__t __doc__R t propertyR R R R R ( ( ( s3 /opt/cpanel-ccs/txdav/base/datastore/dbapiclient.pyR 9 s t OracleCursorWrapperc B sM e Z d Z d � Z d � Z d � Z d d � Z d d � Z d d � Z RS( sy Wrapper for cx_Oracle DB-API connections which implements fetchall() to read all CLOB objects into strings. c C sU g } xH | j D]= } g } x! | D] } | j t | � � q# W| j | � q W| S( N( R t appendR ( R t accumt rowt newRowt column( ( s3 /opt/cpanel-ccs/txdav/base/datastore/dbapiclient.pyR g s c G s | j j | � S( s� Create a cx_Oracle variable bound to this cursor. (Forwarded in addition to the standard methods so that implementors of L{IDerivedParameter} do not need to be specifically aware of this layer.) ( R t var( R R ( ( s3 /opt/cpanel-ccs/txdav/base/datastore/dbapiclient.pyR p s c C s� g } x� | D]� } t | t � r4 | j d � } n t | t � r� t | � d k r� | j t j t | � d � } | j d | � n= t | t j � r� | j t j � } | j d | � n | } | j | � q W| S( Ns utf-8i i i ( t isinstancet strt decodet unicodet lenR t cx_Oraclet NCLOBt setvaluet datetimet TIMESTAMPR ( R R t realArgst argt v( ( s3 /opt/cpanel-ccs/txdav/base/datastore/dbapiclient.pyt mapArgsy s !c C s( | j | � } t t | � j | | � S( N( R* t superR R ( R R R R'