⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pysqlrclient.py

📁 适合于Unix/Linux下的一个持久数据库连接池
💻 PY
📖 第 1 页 / 共 2 页
字号:
        return CSQLRelay.substitutions(self.cursor,variables,values,precisions,scales)    def inputBinds(self, variables, values, precisions=None, scales=None):        """        Define input bind variables.        Returns true if the variables were successfully bound or false if one        of the variables wasn't a string, integer or floating point number,        or if precision and scale weren't provided for a floating point number.        """        return CSQLRelay.inputBinds(self.cursor,variables,values,precisions,scales)            def validateBinds(self):        """        If you are binding to any variables that         might not actually be in your query, call         this to ensure that the database won't try         to bind them unless they really are in the         query.        """        return CSQLRelay.validateBinds(self.cursor)            def validBind(self,variable):        """	Returns true if "variable" was a valid	input bind variable of the query.        """        return CSQLRelay.validBind(self.cursor,variable)            def executeQuery(self):        """        Execute the query that was previously        prepared and bound.        """        return CSQLRelay.executeQuery(self.cursor)    def fetchFromBindCursor(self):        """        Fetch from a cursor that was returned as        an output bind variable.        """        return CSQLRelay.fetchFromBindCursor(self.cursor)    def getOutputBindString(self, variable):        """        Get the value stored in a previously        defined output bind variable.        """        return CSQLRelay.getOutputBindString(self.cursor, variable)    def getOutputBindBlob(self, variable):        """        Get the value stored in a previously        defined output bind variable.        """        return CSQLRelay.getOutputBindBlob(self.cursor, variable)    def getOutputBindClob(self, variable):        """        Get the value stored in a previously        defined output bind variable.        """        return CSQLRelay.getOutputBindClob(self.cursor, variable)    def getOutputBindInteger(self, variable):        """        Get the value stored in a previously        defined output bind variable as a long        integer.        """        return CSQLRelay.getOutputBindInteger(self.cursor, variable)    def getOutputBindDouble(self, variable):        """        Get the value stored in a previously        defined output bind variable as a double        precision floating point number.        """        return CSQLRelay.getOutputBindDouble(self.cursor, variable)    def getOutputBindLength(self, variable):        """        Retrieve the length of an output bind variable.        """        return CSQLRelay.getOutputBindLength(self.cursor, variable)    def getOutputBindCursor(self, variable):        """        Get the cursor associated with a previously        defined output bind variable.        """        bindcursorid=CSQLRelay.getOutputBindCursorId(self.cursor, variable)        if bindcursorid==-1:                return None        bindcursor=sqlrcursor(self.connection)        CSQLRelay.attachToBindCursor(bindcursor.cursor, bindcursorid)        return bindcursor    def openCachedResultSet(self, filename):        """        Open a result set after a sendCachedQeury        """        return CSQLRelay.openCachedResultSet(self.cursor, filename)    def colCount(self):        """        Returns the number of columns in the current result set.        """        return CSQLRelay.colCount(self.cursor)    def rowCount(self):        """        Returns the number of rows in the current result set.        """        return CSQLRelay.rowCount(self.cursor)    def totalRows(self):        """        Returns the total number of rows that will         be returned in the result set.  Not all         databases support this call.  Don't use it         for applications which are designed to be         portable across databases.  -1 is returned        by databases which don't support this option.        """        return CSQLRelay.totalRows(self.cursor)    def affectedRows(self):        """        Returns the number of rows that were         updated, inserted or deleted by the query.        Not all databases support this call.  Don't         use it for applications which are designed         to be portable across databases.  -1 is         returned by databases which don't support         this option.        """        return CSQLRelay.affectedRows(self.cursor)    def firstRowIndex(self):        """        Returns the index of the first buffered row.        This is useful when buffering only part of        the result set at a time.        """        return CSQLRelay.firstRowIndex(self.cursor)    def endOfResultSet(self):        """        Returns 0 if part of the result set is still        pending on the server and 1 if not.  This        method can only return 0 if         setResultSetBufferSize() has been called        with a parameter other than 0.        """        return CSQLRelay.endOfResultSet(self.cursor)    def errorMessage(self):        """        If the query failed, the error message will be returned        from this method.  Otherwise, it returns None.        """        return CSQLRelay.errorMessage(self.cursor)    def getNullsAsEmptyStrings(self):        """        Tells the cursor to return NULL fields and output        bind variables as empty strings.        This is the default.        """        return CSQLRelay.getNullsAsEmptyStrings(self.cursor)    def getNullsAsNone(self):        """        Tells the cursor to return NULL fields and output        bind variables as NULL's.        """        return CSQLRelay.getNullsAsNone(self.cursor)    def getField(self, row, col):        """        Returns the value of the specified row and        column.  col may be a column name or number.        """        return CSQLRelay.getField(self.cursor, row, col)    def getFieldAsInteger(self, row, col):        """        Returns the specified field as a long integer.        """        return CSQLRelay.getFieldAsInteger(self.cursor, row, col)    def getFieldAsDouble(self, row, col):        """        Returns the specified field as a double precision        floating point number.        """        return CSQLRelay.getFieldAsDouble(self.cursor, row, col)    def getFieldLength(self, row, col):        """        Returns the length of the specified row and        column.  col may be a column name or number.        """        return CSQLRelay.getFieldLength(self.cursor, row, col)    def getRow(self, row):        """        Returns a list of values in the given row.        """        return CSQLRelay.getRow(self.cursor, row)    def getRowDictionary(self, row):        """        Returns the requested row as values in a dictionary        with column names for keys.        """        return CSQLRelay.getRowDictionary(self.cursor, row)    def getRowRange(self, beg, end):        """        Returns a list of lists of the rows between beg and end.        Note: this function has no equivalent in other SQL Relay API's.        """        return CSQLRelay.getRowRange(self.cursor, beg, end)    def getRowLengths(self, row):        """        Returns a list of lengths in the given row.        """        return CSQLRelay.getRowLengths(self.cursor, row)    def getRowLengthsDictionary(self, row):        """        Returns the requested row lengths as values in a dictionary        with column names for keys.        """        return CSQLRelay.getRowLengthsDictionary(self.cursor, row)    def getRowLengthsRange(self, beg, end):        """        Returns a list of lists of the lengths of rows between beg and end.        Note: this function has no equivalent in other SQL Relay API's.        """        return CSQLRelay.getRowLengthsRange(self.cursor, beg, end)    def getColumnName(self, col):        """        Returns the name of column number col.        """        return CSQLRelay.getColumnName(self.cursor, col)    def getColumnNames(self):        """        Returns a list of column names in the current result set.        """        return CSQLRelay.getColumnNames(self.cursor)    def getColumnType(self, col):        """        Returns the type of the specified column.  col may        be a name or number.        """        return CSQLRelay.getColumnType(self.cursor, col)    def getColumnLength(self, col):        """        Returns the length of the specified column.  col may        be a name or number.        """        return CSQLRelay.getColumnLength(self.cursor, col)    def getColumnPrecision(self, col):        """        Returns the precision of the specified column.        Precision is the total number of digits in a number.        eg: 123.45 has a precision of 5.  For non-numeric        types, it's the number of characters in the string.        """        return CSQLRelay.getColumnPrecision(self.cursor, col)    def getColumnScale(self, col):        """        Returns the scale of the specified column.  Scale is        the total number of digits to the right of the decimal        point in a number.  eg: 123.45 has a scale of 2.        """        return CSQLRelay.getColumnScale(self.cursor, col)    def getColumnIsNullable(self, col):        """        Returns 1 if the specified column can contain nulls and        0 otherwise.        """        return CSQLRelay.getColumnIsNullable(self.cursor, col)    def getColumnIsPrimaryKey(self, col):        """        Returns 1 if the specified column is a primary key and        0 otherwise.        """        return CSQLRelay.getColumnIsPrimaryKey(self.cursor, col)    def getColumnIsUnique(self, col):        """        Returns 1 if the specified column is unique and        0 otherwise.        """        return CSQLRelay.getColumnIsUnique(self.cursor, col)    def getColumnIsPartOfKey(self, col):        """        Returns 1 if the specified column is part of a composite        key and 0 otherwise.        """        return CSQLRelay.getColumnIsPartOfKey(self.cursor, col)    def getColumnIsUnsigned(self, col):        """        Returns 1 if the specified column is an unsigned number        and 0 otherwise.        """        return CSQLRelay.getColumnIsUnsigned(self.cursor, col)    def getColumnIsZeroFilled(self, col):        """        Returns 1 if the specified column was created with the        zero-fill flag and 0 otherwise.        """        return CSQLRelay.getColumnIsZeroFilled(self.cursor, col)    def getColumnIsBinary(self, col):        """        Returns 1 if the specified column contains binary data        and 0 otherwise.        """        return CSQLRelay.getColumnIsBinary(self.cursor, col)    def getColumnIsAutoIncrement(self, col):        """        Returns 1 if the specified column auto-increments and        0 otherwise.        """        return CSQLRelay.getColumnIsAutoIncrement(self.cursor, col)    def getLongest(self, col):        """        Returns the length of the specified column.  col may        be a name or number.        """        return CSQLRelay.getLongest(self.cursor, col)    def suspendResultSet(self):        """        Tells the server to leave this result        set open when the cursor calls         suspendSession() so that another cursor can         connect to it using resumeResultSet() after         it calls resumeSession().        """        return CSQLRelay.suspendResultSet(self.cursor)    def getResultSetId(self):        """        Returns the internal ID of this result set.        This parameter may be passed to another         cursor for use in the resumeResultSet()         method.        Note: the value returned by this method is        only valid after a call to suspendResultSet().        """        return CSQLRelay.getResultSetId(self.cursor)    def resumeResultSet(self, id):        """        Resumes a result set previously left open         using suspendSession().        Returns 1 on success and 0 on failure.        """        return CSQLRelay.resumeResultSet(self.cursor, id)    def resumeCachedResultSet(self, id, filename):        """        Resumes a result set previously left open        using suspendSession() and continues caching        the result set to "filename".        Returns 1 on success and 0 on failure.        """        return CSQLRelay.resumeCachedResultSet(self.cursor, id, filename)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -