summaryrefslogtreecommitdiff
path: root/lib/extras.py
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Added json typecasterDaniele Varrazzo2012-09-191-55/+6
| | |
| * | Added Json adapterDaniele Varrazzo2012-09-191-0/+55
| |/
* | Merge branch 'composite-custom' into develDaniele Varrazzo2012-09-271-39/+29
|\ \
| * | Added schema attribute to CompositeCasterDaniele Varrazzo2012-09-221-2/+3
| | |
| * | Info about versions history moved from code to docsDaniele Varrazzo2012-09-221-6/+0
| | |
| * | Added documentation about CompositeCaster subclassingDaniele Varrazzo2012-09-221-26/+9
| | |
| * | Make CompositeCaster easier to subclassDaniele Varrazzo2012-09-221-7/+19
| | |
* | | Info about hstore versions history moved from code to docsDaniele Varrazzo2012-09-221-10/+0
|/ /
* | Use namedtuple._make in NamedTupleCursor and CompositeCasterDaniele Varrazzo2012-09-201-10/+9
|/ | | | | | Makes things more natural as _make has the same signature of the tuple (see _ctor in CompositeCaster) and is probably more efficient with less intermediate sequences to build.
* Fixed register_hstore and register_composite with non-dbapi objectsDaniele Varrazzo2012-08-141-12/+14
| | | | Closed ticket #114.
* Fixed superclass methods call.Daniele Varrazzo2012-05-081-4/+4
| | | | | | | Methods execute() and callproc() in DictCursor and RealDictCursor should call DictCursorBase methods, not _cursor's ones. Reported by Alexey Luchko on the ML.
* Fixed cursor() arguments propagation to other connection classesDaniele Varrazzo2012-04-111-27/+19
|
* Allow user to override connection factory cursorsCorry Haines2012-04-111-11/+10
| | | | | | | | | | | | Prior to this change, using a extras.connection_factory would not allow any other cursor to be used on that connection. It was set in stone. This change allows all cursor options to pass through and override the connection factory behaviors. This allows a connection_factory to be dropped into existing code with no disruption. This change also standardizes the extras.connection_factories to have the same behavior and all pass through *args and **kwargs.
* Update all links to PostgreSQL docs to the current version.Marti Raudsepp2012-02-281-1/+1
| | | | I also checked all links and anchors to make sure they're still valid.
* Added support for inet arrayDaniele Varrazzo2012-02-231-6/+25
|
* register_uuid takes more iterables types as oids argumentDaniele Varrazzo2012-02-231-2/+9
| | | | Also added docs for the function parameters.
* Fixed NamedTupleCursor rownumber during iteration.Daniele Varrazzo2012-02-231-7/+10
| | | | | | | The correction is similar to the other one for the other subclasses. Also added tests for rowcount and rownumber during different fetch styles. Just in case.
* Fixed rownumber for cursor subclasses during iterationsDaniele Varrazzo2012-02-231-14/+6
| | | | | | | Regression introduced to fix ticket #80. Don't use fetchmany to get the chunks of values. I did it that way because I was ending up into infinite recursion calling __iter__ from __iter__: the solution has been the "while 1: yield next()" idiom.
* Dropped custom array parsing for UUID[]Daniele Varrazzo2012-02-231-10/+1
| | | | Use the C generic array parsing exposed by new_array_type().
* Parens don't need escaping in regexp char classesDaniele Varrazzo2012-02-231-2/+2
|
* Fixed never raised exception in composite parsingDaniele Varrazzo2012-02-231-1/+1
|
* 'register_composite()' also works with tablesDaniele Varrazzo2011-12-151-1/+2
| | | | Skip dropped and hidden columns when inspecting the schema.
* Use 'autocommit' to check if to rollback after extra types registrationDaniele Varrazzo2011-12-151-2/+2
| | | | isolation_level currently requires an extra query, autocommit doesn't.
* Fixed error in schema mismatch in composite casterDaniele Varrazzo2011-12-151-2/+2
|
* Named DictCursor/RealDictCursor honour itersizeDaniele Varrazzo2011-12-111-8/+18
| | | | Closes ticket #80.
* Added support for arrays of composite typesDaniele Varrazzo2011-09-221-6/+31
|
* Added support for arrays of hstoresDaniele Varrazzo2011-09-221-5/+25
|
* Fixed interaction between RealDictCursor and named cursorsDaniele Varrazzo2011-09-121-0/+4
| | | | Closes ticket #67.
* Fixed NamedTupleCursor.executemany() (ticket #65)Daniele Varrazzo2011-08-091-1/+1
|
* lazy import for uuid moduleMarko Kreen2011-06-281-52/+43
| | | | | | | | | | | | | Attached patch moves uuid import from inside try-except to register_uuid function. Reason: uuid module import is *very* heavy. It goes into OS searching for various .dll/.so libraries, lauches 'ldconfig' and so on... With this patch, 200x python -c 'import psycopg2.extras' goes from 22s to 7s. (plain 'import psycopg2' is 6s) -- marko
* Don't fetch all the records iterating a NamedTuple cursor on a named cursorDaniele Varrazzo2011-04-261-1/+8
|
* Fixed interaction between NamedTuple and named cursorDaniele Varrazzo2011-04-261-2/+2
| | | | | Build the nametuple after fetching the first resutl, or else cursor.description will be empty.
* Dropped unused importDaniele Varrazzo2011-04-261-1/+0
|
* Fixed use of the new return value of HstoreAdapter.get_oids()Daniele Varrazzo2011-02-251-3/+1
|
* Don't limit the hstore search to the public schema onlyDaniele Varrazzo2011-02-251-7/+16
| | | | | | Looks like there is a case for installing hstore somewhere else (see ticket #45). And after all the typecaster can be registered on a list of OIDs, so let's grab them all.
* Added oid parameter to register_hstore()Daniele Varrazzo2011-02-211-18/+32
| | | | | | | The parameter is mostly useful with async connections that would need a different protocol to be queried. Issue reported by Jan "the Asynchronous".
* Documentation cleanupDaniele Varrazzo2011-02-191-15/+12
| | | | | Added several links to the Python documentation using the 'intersphinx' extension.
* Fixed mapping for composite types defined in a schemaDaniele Varrazzo2011-02-091-3/+10
|
* Fields order enforced in composite types adapterDaniele Varrazzo2011-02-091-1/+2
|
* Merge branch 'python2' into python3Daniele Varrazzo2011-01-031-4/+6
|\ | | | | | | | | | | | | | | Conflicts: NEWS-2.3 psycopg/connection_type.c tests/test_connection.py tests/types_basic.py
| * Fixed TYPE adaptation to basic tuplesDaniele Varrazzo2011-01-031-4/+6
| | | | | | | | Tuples and namedtuples have different constructors.
* | Merge branch 'python2' into python3Daniele Varrazzo2011-01-021-0/+142
|\ \ | |/ | | | | | | | | Conflicts: NEWS-2.3 setup.py
| * Added PostgreSQL composite types typecaster to Python tuples.Daniele Varrazzo2011-01-021-0/+142
| |
* | Inet adapter compatible with Python 3.Daniele Varrazzo2010-12-311-1/+1
| |
* | Hstore adapter compatible with Python 3.Daniele Varrazzo2010-12-311-25/+20
| |
* | Deal with slices passed to __*item__ in Python 3.Daniele Varrazzo2010-12-231-2/+2
| |
* | Some light cleanup for Py3 conversion.Daniele Varrazzo2010-12-211-12/+21
|/ | | | Either flagged as warning by python2.6 -3 or converted by 2to3.
* DictRow items can be updated. Patch by Alex Aster.Daniele Varrazzo2010-12-011-0/+5
|
* hstore registration doesn't fail if typarray column not available.Daniele Varrazzo2010-11-191-4/+6
|
* NamedTupleCursor doesn't change exception when fetching with no result.Daniele Varrazzo2010-11-111-1/+1
|