diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..6875e5c4 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,20 @@ +# This .gitattributes file will cause all text files EXCEPT for +# git's .gitattributes and .gitignore files to be encoded as EBCDIC. +# Selected binary files will not be translated at all. +# The default for text files +* git-encoding=iso8859-1 zos-working-tree-encoding=ibm-1047 +# git's files (which MUST be ASCII) +.gitattributes git-encoding=iso8859-1 zos-working-tree-encoding=iso8859-1 +.gitignore git-encoding=iso8859-1 zos-working-tree-encoding=iso8859-1 +# Binary files, selected by file extension. + +# Other platforms don't use the BINARY term, But do recognize "binary" macro +*.jpg git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.jar git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.jpg git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.node git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.png git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.PNG git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.tar git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.tgz git-encoding=BINARY zos-working-tree-encoding=BINARY binary +*.zip git-encoding=BINARY zos-working-tree-encoding=BINARY binary diff --git a/.github/workflows/bld_wheels_and_upload.yml b/.github/workflows/bld_wheels_and_upload.yml index 36358393..5f8d592f 100644 --- a/.github/workflows/bld_wheels_and_upload.yml +++ b/.github/workflows/bld_wheels_and_upload.yml @@ -25,7 +25,7 @@ jobs: env: CIBW_BUILD: "*-win_amd64" CIBW_SKIP: "cp36-* pp*" - - uses: actions/upload-artifact@v4.3.1 + - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl @@ -50,11 +50,11 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest,ubuntu-latest] + os: [macos-13,ubuntu-latest] steps: - uses: actions/checkout@v3 - name: Build wheels - uses: pypa/cibuildwheel@v2.12.2 + uses: pypa/cibuildwheel@v2.16.5 env: CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_SKIP: "cp36-* *-musllinux_* pp* *-*linux_{aarch64,ppc64le}" diff --git a/CHANGES.md b/CHANGES.md index ace47dc1..183beb0c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,11 @@ +2024-03-13, Version 3.2.3 +========================= + + * Downgrade upload-artifact on 64 bit Windows (#919) (Bradley Reynolds) + + * Upgrade cibuildwheel on Linux & Mac OS job (#920) (Bradley Reynolds) + + 2024-03-02, Version 3.2.2 ========================= diff --git a/INSTALL.md b/INSTALL.md index 44561be0..55b593f1 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -21,25 +21,22 @@ DEALINGS IN THE SOFTWARE. ## Contents -1. [ibm_db Installation on Linux](#inslnx) -2. [ibm_db Installation on AIX on Power Systems](#insaix_p) -3. [ibm_db Installation on Linux on System z](#inslnx_z) -4. [ibm_db Installation on Windows](#inswin) -5. [ibm_db Installation on MacOS](#insmac) -6. [ibm_db Installation on z/OS](#inszos) -7. [ibm_db installation on MacOS M1/M2 Chip System](#m1chip) -8. [Troubleshooting Post Install Errors](#troubleshooting) +1. [ibm_db Installation on Linux, AIX, zLinux, Widnows and MaxOS(x64) with Intel Chip.](#inslnx) +2. [ibm_db Installation on z/OS](#inszos) +3. [ibm_db installation on MacOS M1/M2 Chip System](#m1chip) +4. [Troubleshooting Post Install Errors](#troubleshooting) - [SQL30081N Error](#sql30081n) - [Symbol not found error or malloc error](#symbolerror) -## 1. Python-ibm_db Installation on Linux. +## 1. Python-ibm_db Installation on Linux, AIX, zLinux, Windows and MaxOS(x64) with Intel Chip. ### Install python-ibm_db Below are the steps to install [*python-ibm_db*](https://github.com/ibmdb/python-ibm_db) from github or pip. -#### 1.1 Direct Installation. +#### 1.1 Direct Installation using pip. +To install ibm_db and ibm_db_dbi module. ``` pip install ibm_db ``` @@ -47,61 +44,82 @@ or ``` pip install git+https://git@github.com/ibmdb/python-ibm_db.git ``` +* `pip install ibm_db` installs python wheel images on Linux, Windows and MacOS(x64) for python v>=3.7 +* If wheel image is not available or for AIX and zLiux, native C++ code of ibm_db requires in-system compilation. For such case, + you should have a C++ compiler installed in the system. Make sure the commands `gcc --version` and `make --version` works + fine on Linux and MacOS system. +* For AIX and zLinux, you should have xLC Compiler intalled in the system. Also, `make` should be installed. +* For other pre-requisite and non-wheel installation, please check [here](https://github.com/ibmdb/python-ibmdb?tab=readme-ov-file#installation). -#### 1.2 Manual Installation by using git clone. +**Note:** +When we install ibm_db package on Linux, MacOS and Windows, `pip install ibm_db` command install +prebuilt Wheel package that includes clidriver too and ignores `IBM_DB_HOME` or `IBM_DB_INSTALLER_URL` +environment variables if set. Also, auto downloading of clidriver does not happen as clidriver is +already present inside wheel package. +To inforce auto downloading of clidriver or to make setting of environment variable `IBM_DB_HOME` +effective, install ibm_db from source distribution using below command: +``` +pip install ibm_db --no-binary :all: --no-cache-dir ``` -git clone https://github.com/ibmdb/python-ibm_db/ -cd python-ibmdb -python setup.py build -python setup.py install -```` - -## 2. Python-ibm_db Installation on AIX on Power Systems. - -### 2.1 Install python-ibm_db - -Follow the same steps mentioned in [Python-ibm_db Installation on Linux](#inslnx). - - -## 3. Python-ibm_db Installation on Linux on System z. - -### 3.1 Install python-ibm_db - -Follow the same steps mentioned in [Python-ibm_db Installation on Linux](#inslnx). - - -## 4. Python-ibm_db Installation on Windows. - -Below are the steps to install [*python-ibm_db*](https://github.com/ibmdb/python-ibm_db) from github or pip. -#### 4.1 Direct Installation. +If you have to use your own URL for clidriver.tar.gz/.zip please set environment variable ``` -pip install ibm_db +IBM_DB_INSTALLER_URL=full_path_of_clidriver.tar.gz/.zip ``` -or +When ibm_db get installed from wheel package, you can find clidriver under site_packages directory +of Python. You need to copy license file under `site_packages/clidriver/license` to be effective, if any. + +**Note:** For windows after installing ibm_db, recieves the below error when we try to import ibm_db : +```>python +Python 3.11.4 (tags/v3.11.4:d2340ef, Jun 7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)] on win32 +Type "help", "copyright", "credits" or "license" for more information. +>>> import ibm_db +Traceback (most recent call last): + File "", line 1, in +ImportError: DLL load failed while importing ibm_db: The specified module could not be found. +>>> +``` +We need to make sure to set dll path of dependent library of clidriver before importing the module as: + ``` -pip install git+https://github.com/ibmdb/python-ibmdb.git +import os +os.add_dll_directory('path to clidriver installation until bin') +import ibm_db + +e.g: +os.add_dll_directory('C:\\Program Files\\IBM\\CLIDRIVER\\bin') +import ibm_db ``` +Refer https://bugs.python.org/issue36085 for more details. -#### 4.2 Manual Installation by using git clone. + +#### 1.2 Manual Installation by using setup.py ``` git clone https://github.com/ibmdb/python-ibm_db/ cd python-ibmdb python setup.py build python setup.py install -```` +pip list +``` -## 5. Python-ibm_db Installation on MacOS. +- `python setup.py install` command, installs python egg under site_packages. -### 5.1 Install python-ibm_db +#### 1.3 Manual Installation using python wheel (Only Linux, Windows and MacOS(x64)) -Follow the same steps mentioned in [python-ibm_db Installation on Linux](#inslnx). +To install ibm_db as python wheel, use below commands(recommended): +``` +git clone https://github.com/ibmdb/python-ibm_db/ +cd python-ibmdb +python -m build => Note down the path of generated *.whl file to use below +pip install dist/ibm_db-3.2.3-cp311-cp311-win_amd64.whl +pip list => You can see ibm_db in the output +``` -## 6. ibm_db Installation on z/OS +## 2. ibm_db Installation on z/OS -### 6.1 Install Python for z/OS +### 2.1 Install Python for z/OS Below steps were followed for the same: @@ -114,7 +132,7 @@ Below steps were followed for the same: -- UI72589 (v12) ``` -### 6.2 Configure ODBC driver on z/OS +### 2.2 Configure ODBC driver on z/OS Please refer to the [ODBC Guide and References](https://www.ibm.com/support/knowledgecenter/SSEPEK/pdf/db2z_12_odbcbook.pdf) cookbook for how to configure your ODBC driver. Specifically, you need to ensure you have: 1. Binded the ODBC packages. A sample JCL is provided in the `SDSNSAMP` dataset in member `DSNTIJCL`. Customize the JCL with specifics to your system. @@ -240,7 +258,7 @@ export DB2_MACS=$IBM_DB_HOME.XXXX Reference Chapter 3 in the [ODBC Guide and References](https://www.ibm.com/support/knowledgecenter/SSEPEK/pdf/db2z_12_odbcbook.pdf) for more instructions. -### 6.3 Verify python installation +### 2.3 Verify python installation 1. Make sure when python is installed, you validate the same by typing "python3 -V" and it should return 3.8.3 or greater. - Unless you are a sysprog you'll likely not have authority to create the site-package so consider using a python virtual environment as following: ``` @@ -257,17 +275,17 @@ import ibm_db conn = ibm_db.connect('','','') ``` -### 6.4 Installing Python driver for Db2 i.e. ibm\_db & Running a validation Program +### 2.4 Installing Python driver for Db2 i.e. ibm\_db & Running a validation Program Now that the Python and ODBC is ready, for connecting to Db2 you need a Db2 Python driver which we are going to install. Follow the standard steps for the same i.e. pip3 install ibm_db -### 6.5 Install python-ibm_db +### 2.5 Install python-ibm_db Below are the steps to install [*python-ibm_db*](https://github.com/ibmdb/python-ibm_db) from github or pip. -#### 6.5.1 Direct Installation. +#### 2.5.1 Direct Installation. ``` pip install ibm_db ``` @@ -276,7 +294,7 @@ or pip install git+https://git@github.com/ibmdb/python-ibm_db.git ``` -#### 6.5.2 Manual Installation by using git clone. +#### 2.5.2 Manual Installation by using git clone. ``` git clone https://github.com/ibmdb/python-ibm_db/ @@ -307,9 +325,9 @@ else: print('ODBC Test end') ``` -## 7. ibm_db installation on MacOS M1/M2 Chip System (arm64 architecture) +## 3. ibm_db installation on MacOS M1/M2 Chip System (arm64 architecture) -### 7.1 Install GCC using Homebrew +### 3.1 Install GCC using Homebrew **Warning:** If you use the ARM version of homebrew (as recommended for M1/M2 chip systems) you will get the following error message: ``` @@ -345,7 +363,7 @@ Suppose path of gcc lib is `/usr/local/homebrew/lib/gcc/12`. Then update your .b export DYLD_LIBRARY_PATH=/usr/local/homebrew/lib/gcc/12:$DYLD_LIBRARY_PATH ``` -### 7.2 Steps to Install Intel Python after verifying setup +### 3.2 Steps to Install Intel Python after verifying setup Several things might be necessary to get `ibm_db` working on the Apple Silicon architecture: @@ -377,7 +395,7 @@ Several things might be necessary to get `ibm_db` working on the Apple Silicon a * Verify the output of `gcc -v` command. It should show `Target: x86_64-apple-darwin21` in output. * Install Intel Version of Python like: https://www.python.org/ftp/python/3.9.11/python-3.9.11-macosx10.9.pkg -### 7.3 Install ibm_db with x86_64 version of gcc12 and Python on M1/M2 Chip System +### 3.3 Install ibm_db with x86_64 version of gcc12 and Python on M1/M2 Chip System * Open a new terminal and run below commands: ``` @@ -388,13 +406,13 @@ pip3 install ibm_db ``` Now, run your test program to verify. -## 8. Troubleshooting Post Install Errors +## 4. Troubleshooting Post Install Errors - 8.1 SQL30081N Error + 4.1 SQL30081N Error * If connection fails with SQL30081N error: means `ibm_db` installation is correct and you need to provide correct connection string. - 8.2 Symbol not found error or malloc error + 4.2 Symbol not found error or malloc error * If `import ibm_db` fails with `Symbol not found: ___cxa_throw_bad_array_new_length` error or `malloc` error: You need to find the correct location of lib/gcc/12 directory and add it to DYLD_LIBRARY_PATH environment variable. @@ -414,3 +432,26 @@ i.e. change current path of `libstdc++.6.dylib` in `libdb2.dylib` library to the Now run your test program and verify. + +# M1 MAC Steps to Install IBM DB and Support Docker RUN +## Installation Steps: +### Install Podman / Docker: +- **Podman:** Follow the instructions provided on the [official Podman website](https://podman.io/getting-started/installation) to install Podman on your M1 Mac. +- **Docker:** Alternatively, you can install Docker using the native Apple Silicon version or the Rosetta-translated Intel version. Choose the method that best fits your requirements. +### Install Intel Version of Python: +1. Download and install the Intel version of Python 3.8 from the [official Python website](https://www.python.org/downloads/release/python-3810/). +2. After installation, ensure that you set the interpreter to Python 3.8 in your development environment. +## Configuration Steps: +### Configure Docker for M1: +- For M1 Macs, ensure compatibility by specifying the platform architecture during Docker build commands: +docker build -t . --platform=linux/amd64 +Alternatively, if you're using Podman: +podman build -t . --platform=linux/amd64 +### Build Docker Image (Intel): +- If you're using an Intel Mac or running Docker with Rosetta translation, use the following command to build your Docker image: +docker build -t . +## Additional Notes: +- These steps are tailored for M1 Macs to ensure seamless installation and configuration of IBM DB and Docker support. +- Verify that your Dockerfile and any dependencies are compatible with the specified platform architecture. +Follow these steps carefully to set up IBM DB and Docker support on your M1 Mac environment. If you encounter any issues or have further questions, feel free to seek assistance from the community or relevant support channels. +Happy coding! diff --git a/README.md b/README.md index 1247c821..fe8356ab 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,10 @@ Db2 V11.5.4 clidriver is built with GCC version 8.4.0 and hence you may need to * You may need to install **gcc, python, pip, python-devel, libxml2 and pam** if not already installed. Refer to [Installation](#docker) for more details. +### Manual Installation + +To install ibm_db from source code after clone from git, or to know the detialed installation steps for various platforms, please check [INSTALL document](https://github.com/ibmdb/python-ibmdb/blob/master/INSTALL.md#inslnx). + ## Installation @@ -271,24 +275,66 @@ True ## Example of SSL Connection String +* **Secure Database Connection using SSL/TSL** - ibm_db supports secure connection to Database Server over SSL same as ODBC/CLI driver. If you have SSL Certificate from server or an CA signed certificate, just use it in connection string as below: ``` Using SSLServerCertificate keyword -conn = ibm_db.connect("DATABASE=;HOSTNAME=;PORT=;SECURITY=SSL;SSLServerCertificate=;UID=;PWD=",'','') +connStr = "DATABASE=;HOSTNAME=;PORT=;UID=;PWD=;" + + "SECURITY=SSL;SSLServerCertificate=;" +conn = ibm_db.connect(connStr,'','') ``` +> Note the two extra keywords **Security** and **SSLServerCertificate** used in connection string. `SSLServerCertificate` should point to the SSL Certificate from server or an CA signed certificate. Also, `PORT` must be `SSL` port and not the TCPI/IP port. Make sure Db2 server is configured to accept connection on SSL port else `ibm_db` will throw SQL30081N error. + +> Value of `SSLServerCertificate` keyword must be full path of a certificate file generated for client authentication. + It normally has `*.arm` or `*.cert` or `*.pem` extension. `ibm_db` do not support `*.jks` format file as it is not a + certificate file but a Java KeyStore file, extract certificate from it using keytool and then use the *.cert file. + +> `ibm_db` uses IBM ODBC/CLI Driver for connectivity and it do not support a `*.jks` file as keystoredb as `keystore.jks` is meant for Java applications. + Note that `*.jks` file is a `Java Key Store` file and it is not an SSL Certificate file. You can extract SSL certificate from JKS file using below `keytool` command: + ``` + keytool -exportcert -alias your_certificate_alias -file client_cert.cert -keystore keystore.jks + ``` + Now, you can use the generated `client_cert.cert` as the value of `SSLServerCertificate` in connection string. + +> Do not use keyworkds like `sslConnection=true` in connection string as it is a JDBC connection keyword and ibm_db + ignores it. Corresponding ibm_db connection keyword for `sslConnection` is `Security` hence, use `Security=SSL;` in + connection string instead. + +> `ibm_db` supports only ODBC/CLI Driver keywords in connection string: https://www.ibm.com/docs/en/db2/11.5?topic=odbc-cliodbc-configuration-keywords + +* To connect to dashDB in IBM Cloud, use below connection string: + +``` +connStr = "DATABASE=database;HOSTNAME=hostname;PORT=port;PROTOCOL=TCPIP;UID=username;PWD=passwd;Security=SSL"; +``` +> We just need to add **Security=SSL** in connection string to have a secure connection against Db2 server in IBM Cloud. + +**Note:** You can also create a KeyStore DB using GSKit command line tool and use it in connection string along with other keywords as documented in [DB2 Infocenter](http://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.5.0/com.ibm.db2.luw.admin.sec.doc/doc/t0053518.html). + +* If you have created a KeyStore DB using GSKit using password or you have got *.kdb file with *.sth file: ``` Using SSLClientKeyStoreDB and SSLClientKeyStoreDBPassword keyword -conn = ibm_db.connect("DATABASE=;HOSTNAME=;PORT=;SECURITY=SSL;SSLClientKeyStoreDB=;SSLClientKeyStoreDBPassword=;UID=;PWD=",'','') +connStr = "DATABASE=;HOSTNAME=;PORT=;UID=;PWD=;" + + "SECURITY=SSL;SSLClientKeyStoreDB=;SSLClientKeyStoreDBPassword=;" +conn = ibm_db.connect(connStr,'','') ``` ``` Using SSLClientKeyStoreDB and SSLClientKeyStash keyword -conn = ibm_db.connect("DATABASE=;HOSTNAME=;PORT=;SECURITY=SSL;SSLClientKeyStoreDB=;SSLClientKeyStash=;UID=;PWD=",'','') +connStr = "DATABASE=;HOSTNAME=;PORT=;UID=;PWD=;" + + "SECURITY=SSL;SSLClientKeyStoreDB=;" + + "SSLClientKeyStash=;" +conn = ibm_db.connect(connStr,'','') ``` +> If you have downloaded `IBMCertTrustStore` from IBM site, ibm_db will not work with it; you need to + download `Secure Connection Certificates.zip` file that comes for IBM DB2 Command line tool(CLP). + `Secure Connection Certificates.zip` has *.kdb and *.sth files that should be used as the value of + `SSLClientKeystoreDB` and `SSLClientKeystash` in connection string. + * More examples can be found under ['ibm_db_tests'](https://github.com/ibmdb/python-ibmdb/tree/master/IBM_DB/ibm_db/ibm_db_tests) folder. * [API Documentation](https://github.com/ibmdb/python-ibmdb/wiki/APIs) has examples for each API. @@ -332,6 +378,26 @@ To suppress this error, Db2 server must be activated with db2connectactivate uti * [Activating the license certificate file for Db2 Connect Unlimited Edition](https://www.ibm.com/docs/en/db2/11.5?topic=li-activating-license-certificate-file-db2-connect-unlimited-edition). * [Unlimited licensing using db2connectactivate utility](https://www.ibm.com/docs/en/db2/11.1?topic=edition-db2connectactivate-server-license-activation-utility). +#### Troubleshooting SQL1598N Error: + +If you have copied db2con*.lic file under clidriver/license directory, but still getting SQL1598N Error; try below options: + +* `cd clidriver/bin` directory and run `./db2level` command. Make sure you have the db2connect license of same major and minor version as of clidriver. + +* Make sure the user running python program has read permission for license file. + +* Make sure the user running python program has read-write permission for `clidriver/license` and `clidriver/cfgcache` directories as license check utility need to create some cache files under `cfgcache` and `license` directories. + +* Validate your license file and connectivity using below db2cli command: +``` + db2cli validate -connstring "connection string as used in python program" -displaylic + + OR + + db2cli validate -database "dbname:hostname:port" -userid dbuser -passwd dbpasswd -connect -displaylic +``` + + If you intend to install the clidriver manually, Following are the details of the client driver versions that you can download from [CLIDRIVER](https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/) to be able to connect to databases on non-LUW servers. You would need the client side license file as per Version for corresponding installation.: #### CLIDriver and Client license versions for Specific Platform and Architecture @@ -573,3 +639,26 @@ If trusted context is not set up, there will be two failures related to trusted 1. The rowcount for select statements can not be generated. 2. Some warnings from the drivers are not caught by the wrapper. As such these might go unnoticed. + +# M1 MAC Steps to Install IBM DB and Support Docker RUN +## Installation Steps: +### Install Podman / Docker: +- **Podman:** Follow the instructions provided on the [official Podman website](https://podman.io/getting-started/installation) to install Podman on your M1 Mac. +- **Docker:** Alternatively, you can install Docker using the native Apple Silicon version or the Rosetta-translated Intel version. Choose the method that best fits your requirements. +### Install Intel Version of Python: +1. Download and install the Intel version of Python 3.8 from the [official Python website](https://www.python.org/downloads/release/python-3810/). +2. After installation, ensure that you set the interpreter to Python 3.8 in your development environment. +## Configuration Steps: +### Configure Docker for M1: +- For M1 Macs, ensure compatibility by specifying the platform architecture during Docker build commands: +docker build -t . --platform=linux/amd64 +Alternatively, if you're using Podman: +podman build -t . --platform=linux/amd64 +### Build Docker Image (Intel): +- If you're using an Intel Mac or running Docker with Rosetta translation, use the following command to build your Docker image: +docker build -t . +## Additional Notes: +- These steps are tailored for M1 Macs to ensure seamless installation and configuration of IBM DB and Docker support. +- Verify that your Dockerfile and any dependencies are compatible with the specified platform architecture. +Follow these steps carefully to set up IBM DB and Docker support on your M1 Mac environment. If you encounter any issues or have further questions, feel free to seek assistance from the community or relevant support channels. +Happy coding! diff --git a/ibm_db.c b/ibm_db.c index b4f5f3db..8c04c207 100644 --- a/ibm_db.c +++ b/ibm_db.c @@ -22,7 +22,7 @@ +--------------------------------------------------------------------------+ */ -#define MODULE_RELEASE "3.2.2" +#define MODULE_RELEASE "3.2.3" #include #include @@ -12494,5 +12494,10 @@ INIT_ibm_db(void) { PyModule_AddIntConstant(m, "SQL_ATTR_PING_DB", SQL_ATTR_PING_DB); #endif PyModule_AddIntConstant(m, "SQL_ATTR_TXN_ISOLATION", SQL_ATTR_TXN_ISOLATION); + PyModule_AddIntConstant(m, "SQL_TXN_READ_UNCOMMITTED", SQL_TXN_READ_UNCOMMITTED); + PyModule_AddIntConstant(m, "SQL_TXN_READ_COMMITTED", SQL_TXN_READ_COMMITTED); + PyModule_AddIntConstant(m, "SQL_TXN_REPEATABLE_READ", SQL_TXN_REPEATABLE_READ); + PyModule_AddIntConstant(m, "SQL_TXN_SERIALIZABLE", SQL_TXN_SERIALIZABLE); + PyModule_AddIntConstant(m, "SQL_TXN_NO_COMMIT", SQL_TXN_NOCOMMIT); return MOD_RETURN_VAL(m); } diff --git a/ibm_db_dbi.py b/ibm_db_dbi.py index 496cc65b..49774c53 100644 --- a/ibm_db_dbi.py +++ b/ibm_db_dbi.py @@ -66,6 +66,13 @@ WCHAR_NO = ibm_db.WCHAR_NO FIX_RETURN_TYPE = 1 +SQL_ATTR_TXN_ISOLATION = ibm_db.SQL_ATTR_TXN_ISOLATION +SQL_TXN_READ_UNCOMMITTED = ibm_db.SQL_TXN_READ_UNCOMMITTED +SQL_TXN_READ_COMMITTED = ibm_db.SQL_TXN_READ_COMMITTED +SQL_TXN_REPEATABLE_READ = ibm_db.SQL_TXN_REPEATABLE_READ +SQL_TXN_SERIALIZABLE = ibm_db.SQL_TXN_SERIALIZABLE +SQL_TXN_NO_COMMIT = ibm_db.SQL_TXN_NO_COMMIT + # Module globals apilevel = '2.0' threadsafety = 0 diff --git a/setup.py b/setup.py index e67a7163..16b3fe3a 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ from setuptools.command.install import install PACKAGE = 'ibm_db' -VERSION = '3.2.2' +VERSION = '3.2.3' LICENSE = 'Apache License 2.0' readme = os.path.join(os.path.dirname(__file__),'README.md')