Permalink
Commits on May 14, 2018
  1. added additional constants for SQL_CONVERT_X values

    Jordan Bolton authored and mkleehammer committed May 11, 2018
  2. Use correct size for SQL_ATTR_NOSCAN attribute

    v-chojas authored and mkleehammer committed Apr 16, 2018
  3. Allow tests to run on Python 2.6

    v-chojas authored and mkleehammer committed Apr 3, 2018
  4. test_drivers tweak for sqlservertests

    gordthompson authored and mkleehammer committed Feb 9, 2018
Commits on Apr 2, 2018
  1. Fix use of Unicode connection string in Python2

    v-chojas authored and mkleehammer committed Feb 26, 2018
Commits on Feb 20, 2018
  1. Revert "Initial implementation of parameter refactoring"

    mkleehammer committed Feb 20, 2018
    This reverts commit 69411d9.
  2. Revert "Remove commented-out code"

    mkleehammer committed Feb 20, 2018
    This reverts commit ee9396e.
  3. Revert "Params refactor fixes (#4)"

    mkleehammer committed Feb 20, 2018
    This reverts commit 5468203.
Commits on Jan 19, 2018
  1. Fix invalid cursor state upon executemany()

    v-chojas authored and mkleehammer committed Jan 10, 2018
Commits on Dec 20, 2017
  1. Fix VS2017 compilation

    v-chojas authored and mkleehammer committed Dec 11, 2017
  2. Exposing constatnts for outer joins

    v-makouz authored and mkleehammer committed Dec 20, 2017
  3. Add fast_executemany tests for PostgreSQL and MySQL

    mkleehammer committed Dec 20, 2017
  4. Params refactor fixes (#4)

    v-makouz authored and mkleehammer committed Dec 15, 2017
    * Fix for int insertion errors when using PostgreSQL
    
    * fix for BIGINT issue for python2
  5. Remove commented-out code

    v-chojas authored and mkleehammer committed Nov 30, 2017
Commits on Nov 7, 2017
  1. use odbc_config if it's present

    pkit authored and mkleehammer committed Nov 7, 2017
    some/most odbc implementations on *nix-like systems use `odbc_config`
    as a source of compile-time options about the odbc installation
    ithis change will try to use `odbc_config` at compile time to correctly set LDFLAGS and CFLAGS
Commits on Nov 3, 2017
  1. Use native endian for UTF-16

    dangowrt authored and mkleehammer committed Jul 17, 2017
    Use UTF-16 encoding corresponding to the machine's native endian
    as a default rather than setting 'utf-16le' even on big-endian
    machines.
    This change thus only affects big-endian platforms and results in
    identical object code being generated on little-endian platforms.
    As the default is also mentioned in the documentation, it should be
    changed there as well once this patch has been merged.
Commits on Oct 31, 2017
  1. Add constants for setting transaction isolation level (#286)

    v-chojas authored and mkleehammer committed Oct 31, 2017
  2. Add Cursor.cancel

    mkleehammer committed Oct 31, 2017
    Fixes #158
  3. Fix type check of connect encoding keyword in Python 2.7

    mkleehammer committed Oct 31, 2017
    Fixes #289
  4. Update classifiers (#291)

    hugovk authored and mkleehammer committed Oct 31, 2017
Commits on Oct 23, 2017
  1. Removed debug print left in 4.0.18.

    mkleehammer committed Oct 23, 2017
    Sorry everyone.
Commits on Oct 20, 2017
  1. Fix PyArg_ParseTupleAndKeywords calls that accept optional strings.

    Michael Kleehammer authored and mkleehammer committed Oct 20, 2017
    A lot of the keywords in Cursor methods are optional, but I incorrectly used 's' in the format
    string.  This meant you could call the function without passing them, but would fail if you
    passed None for them, which is not what I intended.
    
    It has not been noticed in normal usage because it is easier to call `f('t1')` than
    `f('t1', schema=None, catalog=None)`.  However, when you use a wrapper, like aioodbc does, it
    will fail:
    
        def wrapper(table, schema=None, catalog=None):
            call(cursor.columns, table, schema=schema, catalog=catalog)
    
        def call(func, *args, **kwargs):
            func(*args, **kwargs)
    
    At this point, kwargs is {schema:None, catalog:None} and now we're passing None explicitly.
    
    The solution, of course, is to use 'z' instead.
    
    Note that I have only corrected Cursor methods.  I only wrote a test for Cursor.columns in
    SQL Server Python 3 and PostgreSQL Python 3.  This bug is in pyodbc before any database calls
    are made so it is database-independent.
Commits on Sep 21, 2017
  1. Add error subclass mappings for more SQLSTATEs (#271)

    bobince authored and mkleehammer committed Sep 21, 2017
    Detect more operational error codes so we can raise more specific error classes for these known cases (seen coming from MSSQL — I can't vouch that these offer any improvement for other DBMSs).
Commits on Sep 5, 2017
  1. Add /usr/local/lib to library_dirs linker setting for OS X

    neilodonuts committed Sep 5, 2017
Commits on Aug 12, 2017
  1. Fixes for Unicode diagnostic messages for PostgreSQL & MySQL

    mkleehammer committed Aug 12, 2017
    Some drivers don't encode SQLSTATE and error messages with the same encoding.  So far it looks
    like everyone might use UTF16LE.  This code handles UTF8, UTF16LE, and UTF16BE with no
    configuration.  (It does not handle UTF32.)
    
    The previous change converted the error message from bytes to Unicode, but missed the handling
    of the 2nd error message.  When an attempt to concatenate was made, PyString_ConcatAndDel would
    fail causing the HY0000 error.
Commits on Aug 1, 2017
  1. Fix Python 2.7 RaiseErrorFromHandle

    mkleehammer committed Aug 1, 2017
    I had to manually rebase the previous commit and missed a case because I forgot to compile with
    Python 2.7.
  2. Retrieve Unicode diagnostic messages

    v-chojas authored and mkleehammer committed Jul 24, 2017
  3. Parameter array support. Initial version.

    v-chojas authored and mkleehammer committed Jul 10, 2017
    Speeds up executemany() by over 30x with SQL Server.
  4. Remove trailing space.

    v-chojas authored and mkleehammer committed Jul 18, 2017
  5. Initial setinputsizes() implementation.

    v-chojas authored and mkleehammer committed Jul 14, 2017
    Only supports the integer form for specifying column sizes, not type objects.
Commits on Jul 13, 2017
  1. Add cursor.fast_executemany (default False) to enable param arrays

    v-chojas committed Jul 13, 2017
Commits on Jul 10, 2017
  1. Parameter array support. Initial version.

    v-chojas committed Jul 10, 2017
    Speeds up executemany() by over 30x with SQL Server.
  2. SQLWCHAR should be UCS-2/UTF-16

    v-chojas committed Jul 10, 2017
    Drivers such as msodbcsql are built to assume 2-byte wide characters and unixODBC by default also does this. Otherwise very strange things happen upon Unicode conversion...