本文整理汇总了Python中cx_Oracle.FIXED_NCHAR属性的典型用法代码示例。如果您正苦于以下问题:Python cx_Oracle.FIXED_NCHAR属性的具体用法?Python cx_Oracle.FIXED_NCHAR怎么用?Python cx_Oracle.FIXED_NCHAR使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类cx_Oracle
的用法示例。
在下文中一共展示了cx_Oracle.FIXED_NCHAR属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import cx_Oracle [as 别名]
# 或者: from cx_Oracle import FIXED_NCHAR [as 别名]
def __init__(self,
auto_convert_lobs=True,
threaded=True,
coerce_to_unicode=False,
coerce_to_decimal=True,
arraysize=50,
**kwargs):
self._pop_deprecated_kwargs(kwargs)
OracleDialect.__init__(self, **kwargs)
self.threaded = threaded
self.arraysize = arraysize
self.auto_convert_lobs = auto_convert_lobs
self.coerce_to_unicode = coerce_to_unicode
self.coerce_to_decimal = coerce_to_decimal
cx_Oracle = self.dbapi
if cx_Oracle is None:
self._include_setinputsizes = {}
self.cx_oracle_ver = (0, 0, 0)
else:
self.cx_oracle_ver = self._parse_cx_oracle_ver(cx_Oracle.version)
if self.cx_oracle_ver < (5, 2) and self.cx_oracle_ver > (0, 0, 0):
raise exc.InvalidRequestError(
"cx_Oracle version 5.2 and above are supported")
self._has_native_int = hasattr(cx_Oracle, "NATIVE_INT")
self._include_setinputsizes = {
cx_Oracle.NCLOB, cx_Oracle.CLOB, cx_Oracle.LOB,
cx_Oracle.NCHAR, cx_Oracle.FIXED_NCHAR,
cx_Oracle.BLOB, cx_Oracle.FIXED_CHAR, cx_Oracle.TIMESTAMP,
_OracleInteger, _OracleBINARY_FLOAT, _OracleBINARY_DOUBLE
}
self._paramval = lambda value: value.getvalue()
# https://github.com/oracle/python-cx_Oracle/issues/176#issuecomment-386821291
# https://github.com/oracle/python-cx_Oracle/issues/224
self._values_are_lists = self.cx_oracle_ver >= (6, 3)
if self._values_are_lists:
cx_Oracle.__future__.dml_ret_array_val = True
def _returningval(value):
try:
return value.values[0][0]
except IndexError:
return None
self._returningval = _returningval
else:
self._returningval = self._paramval
self._is_cx_oracle_6 = self.cx_oracle_ver >= (6, )