[PYTHON] [Introduction to cx_Oracle] (8th) cx_Oracle 8.0 release

Cx_Oracle has been upgraded from 7.3 to 8.0 on June 26, 2020 (Japan time). Below is a brief description of the new features and changes in 8.0. There is only a major version upgrade, and it contains major (and I feel) changes. Below, the numbers correspond to the cx_Oracle Release Notes.

1. End of support for Python 2

The supported Python version is 3.5 or later. If you want to use it with Python2, you need to use 7.3.

2. ODPI-C version change

cx_Oracle is created using OSS's C language Oracle access driver called ODPI-C. Version 8.0 is built on ODPI-C 4.0.1.

3. Change of type management

It has been significantly reviewed as follows.

--The system of type constants has been organized as follows. -DB API Type: DB API / dev / peps / pep-0249 /) compliant type -Database Type: The type corresponding to the data type of Oracle Database. The name is different from 7.3 -Database Type Synonym: 7.3 Era type. Deprecated after 8.0 and will be discontinued in the future -Other Type: Types not included above --In 7.3, for some Oralce Database datatypes, the corresponding cx_Oracle datatype constant did not exist. The following is added as a response to the data type that was lacking in 8.0.

4. Add cx_Oracle.init_oracle_client ()

A function cx_Oracle.init_oracle_client () has been added to initialize the Oracle Client library.

5. Change the default encoding

In 7.3 it was None, but in 8.0 it became UTF-8. The character set specification of the NLS_LANG environment variable is ignored.

6. Add method to Soda Document class

Added save (), saveAndGet (), and truncate () methods to the SodaCollection object. Oracle Client 20 or later is required to take advantage of these features.

7. Add SodaOperation.fetchArraySize ()

Added SodaOperation.fetchArraySize () to set the number of SODA document fetches. Oracle Client 19.5 or later is required to take advantage of this feature.

8. Add Cursor.prefetchrows

Added Cursor.prefetchrows to prefetch result sets.

9. Avoiding round trips associated with the first run of Connection.version

We are adding a new mode to avoid the round trip that accompanies the first run of Connection.version to get the database version number. Oracle Client 20 or later is required to take advantage of this feature.

10. Supports PFILE

Added support for starting a database using PFILE. Until 7.3, only SPFILE was supported.

11. Fixed buffer overflow in Cursor.getbatcherrors ()

Fixed an issue where Cursor.getbatcherrors () would cause a buffer overflow if the offset exceeded 65536.

12. Change the behavior of Cursor.lastrowid

Changed so that no error occurs when Cursor.lastrowid is executed after executing an INSERT ALL statement.

13. Accepting Alex Henrie's pull request

It mainly incorporates 6 pull requests for code improvements (such as verbose coding improvements).

14. Behavior of Python object bound to boolean variable

Python objects bound to boolean variables are now converted to True / False depending on whether they are considered True or False in a Python if statement. Previously, only True was converted to True, and the others were converted to False.

15. Improvements other than the main body code

Improve documentation, samples and tests.

Recommended Posts

[Introduction to cx_Oracle] (8th) cx_Oracle 8.0 release
[Introduction to cx_Oracle] (12th) DB Exception Handling
[Introduction to cx_Oracle] (17th) Date type handling
[Introduction to cx_Oracle] (16th) Handling of LOB types
[Introduction to cx_Oracle] (5th) Handling of Japanese data
[Introduction to cx_Oracle] Overview of cx_Oracle
Series: Introduction to cx_Oracle Contents
[Introduction to cx_Oracle] (10th) Update DML and DDL / DCL statements
Introduction to MQTT (Introduction)
Introduction to Scrapy (1)
Introduction to Scrapy (3)
Introduction to Supervisor
Introduction to Scrapy (2)
[Linux] Introduction to Linux
Introduction to discord.py
[Introduction to cx_Oracle] (Part 3) Basics of Table Reference
[Introduction to cx_Oracle] (Part 7) Handling of bind variables
Introduction to Lightning pytorch
Introduction to Web Scraping
Introduction to EV3 / MicroPython
Introduction to Python language
Introduction to TensorFlow-Image Recognition
Introduction to OpenCV (python)-(2)
Introduction to PyQt4 Part 1
[Introduction to cx_Oracle] (15th) Creating a result set in a format other than tuples
Introduction to Dependency Injection
Introduction to Private Chainer
Introduction to machine learning
[Introduction to cx_Oracle] (Part 11) Basics of PL / SQL Execution
[Introduction to cx_Oracle] (Part 13) Connection using connection pool (client side)
AOJ Introduction to Programming Topic # 1, Topic # 2, Topic # 3, Topic # 4
Introduction to electronic paper modules
A quick introduction to pytest-mock
Introduction to dictionary lookup algorithm
[Introduction to cx_Oracle] (Part 6) DB and Python data type mapping
Introduction to Monte Carlo Method
[Learning memorandum] Introduction to vim
Introduction to PyTorch (1) Automatic differentiation
opencv-python Introduction to image processing
Introduction to Python Django (2) Win
Introduction to Cython Writing [Notes]
An introduction to private TensorFlow
Kubernetes Scheduler Introduction to Homebrew
An introduction to machine learning
A super introduction to Linux
AOJ Introduction to Programming Topic # 7, Topic # 8
[Introduction to pytorch-lightning] First Lit ♬
[Introduction to cx_Oracle] (Part 4) Fetch and scroll of result set
Introduction to Anomaly Detection 1 Basics
Introduction to RDB with sqlalchemy Ⅰ
[Introduction to Systre] Fibonacci Retracement ♬
Introduction to Nonlinear Optimization (I)
Introduction to serial communication [Python]
AOJ Introduction to Programming Topic # 5, Topic # 6
Introduction to Deep Learning ~ Learning Rules ~
[Introduction to Python] <list> [edit: 2020/02/22]
Introduction to Python (Python version APG4b)
An introduction to Python Programming
Introduction to discord.py (3) Using voice
An introduction to Bayesian optimization
Deep Reinforcement Learning 1 Introduction to Reinforcement Learning