Ignore:
Timestamp:
Jan 30, 2016, 2:55:18 PM (4 years ago)
Author:
cito
Message:

Port type cache and typecasting from pgdb to pg

So far, the typecasting in the classic module was been only done by
the C extension module and was not extensible through typecasting
functions in Python. This has now been made extensible by adding
a cast hook to the C extension module which has been hooked up to
a new type cache object that holds information on the types and the
associated typecast functions. All of this works very similar to the
pgdb module now, except that the basic types are still handled by
the C extension module and the Python typecast functions are only
called via the hook for types which are not supported internally.

Also added tests and a chapter on the type cache in the documentation,
and cleaned up the error messages in the C extension module.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/contents/changelog.rst

    r796 r798  
    8585    types have been refactored and swapped out to separate classes.
    8686- Changes concerning both modules:
     87  - The modules now provide get_typecast() and set_typecast() methods
     88    allowing to control the typecasting on the global level.  The connection
     89    objects have got type caches with the same methods which give control
     90    over the typecasting on the level of the current connection.
     91    See the documentation on details about the type cache and the typecast
     92    mechanisms provided by PyGreSQL.
    8793  - PyGreSQL now supports the JSON and JSONB data types, converting such
    8894    columns automatically to and from Python objects. If you want to insert
Note: See TracChangeset for help on using the changeset viewer.