summaryrefslogtreecommitdiff
path: root/python/skytools/psycopgwrapper.py
AgeCommit message (Collapse)Author
2012-05-10psycopgwrapper: allow name= argument to .cursor()Marko Kreen
2011-12-08skytools: seems psycopg2 isolation constants do changeMarko Kreen
Psycopg 2.4.2 moved them around. Stop hard-coding them, instead import from psycopg2.externsions Also have a symbol for repeatable read.
2011-06-29skytools.sockutil: separate module for low-level socket stuffMarko Kreen
Move set_tcp_keepalive() here, plus set_nonblocking() and set_cloexec().
2011-04-06Avoid direct symbol importsMarko Kreen
Always use import skytools def xx(): skytools.foo this allows maximum laziness when importing.
2011-02-01psycopgwrapper: export psycopg2.Error as DBErrorMarko Kreen
2010-11-10set_tcp_keepalive: check socket.fromfd(), its missing on win32Marko Kreen
2010-09-15skytools: Support psycopg 2.2Marko Kreen
There fileno() has moved from cursor to connection.
2010-07-21skytools: set_tcp_keepalive()Marko Kreen
Separate TCP keepalive code out from connect_database(), to be usable separately. (Eg. for HTTP connections.) Add also support for Darwin.
2009-12-03skytools.connect_database: avoid tuning keepalive on unix socketMarko Kreen
2009-11-24psycopgwrapper: Activate TCP keepalive on database connectionsMarko Kreen
Turn on keepalive by default, to avoid hanged scripts in case of network problems. Also tune the keepalive timeouts smaller, on Linux at least, so that the error happens after 5 min blackout. (4 min idle + 4x15sec keepalive pings)
2009-11-03psycopgwrapper: make server_version intMarko Kreen
2009-11-03psycopgwrapper: Fill .server_version on older psycopgMarko Kreen
This make the parameter always available.
2009-03-10psycopgwrapper: export connect_database()Marko Kreen
2009-02-13python/skytools updateMarko Kreen
- docstrings - some preliminary python 3.0 compat (var names, print()) - sync with 2.1-stable adminscript: - move exec_cmd function to dbscript dbstruct: - support sequnces. SERIAL columns are not automatically created, but the link beteween column and sequence is. psycopgwrapper: - drop support for psycopg1 - beginnings of quick DB-API / DictRow description. quoting: - new unquote_fqident() function, reverse of quote_fqident() - quote_statement() accepts both row and dict dbscript: - catch startup errors - use log.exception for exceptions, will result in nicer logs sqltools: - exists_sequence() _pyquoting: - fix typo in variable name
2008-04-11drop support for psycopg1Marko Kreen
2008-04-03simplify psycopgwrapper:Marko Kreen
- remove QuotedString, its unused now - drop the ugly __setitem__ implementation - drop __setattr__, __delattr_ row is supposed to be r/o
2008-03-11very experimental row.col access, add __slots__Marko Kreen
2008-01-21Restore iter-on-rows behaviour for rows from curs.fetch*.Marko Kreen
The attempt to make them iter-on-keys seems now misguided, as iter-on-values is already used in existing code, and iter-on-rows returns keys in random order.
2007-09-25import sysMarko Kreen
2007-09-17clearer error message for missing psycopgMarko Kreen
2007-08-30itervalues() for completenessMarko Kreen
2007-08-30add more dict() methodsMarko Kreen
2007-08-11forgot to import QuotedString from psycopg1Marko Kreen
2007-07-27allow .copy() operation on rowsMarko Kreen
2007-07-25skytools: docstring shuffle, hide/remove low-level/old stuffMarko Kreen
2007-07-23skytools: separate psycopg specific codeMarko Kreen