Product Documentation

FairCom DB V12 Updates

Previous Topic

Next Topic

Python

SSL support parameter added to connect function

A new optional parameter has been added to the "connect" function as follows:

connect(**kw_args)

Constructor for creating a connection to the database.

Returns a Connection Object.

It takes parameters as keyword parameters for more intuitive use as follows:

  • user - User name as string (optional default guest)
  • password - Password as string (optional default None)
  • host - Hostname (optional default localhost)
  • database - Database name (optional default ctreeSQL)
  • port - TCP/IP port number (optional default 6597)
  • ssl - None: No SSL, (optional default None)

    'BASIC': SSL without certificate checking,

    '<certificate file name>': SSL with certificate checking, certificate file as specified,

    '' (two single quotation marks): SSL with certificate checking, certificate in current working dir named ctsrvr.pem.

Python SQL enhancements

In FairCom DB Python, the following SQL enhancements have been implemented in the Cursor class:

  • iterator
  • lastrowid property

The following enhancements have been implemented in Connection class:

  • support for constructor "port" parameter passed as an integer value
  • support for set_isolation and get_isolation methods

Python support for Unicode server

The Python driver has been enhanced to detect the nature of the ctsqlapi library in use (Unicode vs non-Unicode) and consider this when calling into the library. The driver can now be used with a Unicode server as well as non-Unicode servers.

New SQLAlchemy support

FairCom is proud to announce support for SQLAlchemy in Python. SQLAlchemy makes it easy for you to use the FairCom Database Engine in your Python applications. This makes it trivial to switch to the FairCom Database Engine from another SQL database.

SQLAlchemy is an Object Relational Mapper for Python that makes it easy to map relational tables to Python objects. SQLAlchemy has earned a reputation for being the persistence mechanism of choice for use in Python environments.

This dialect has been tested with Python 2.7 and Python 3.5 & 3.6.

TOCIndex