Changeset 287 for trunk/module/pg.py


Ignore:
Timestamp:
May 7, 2006, 8:37:23 AM (13 years ago)
Author:
cito
Message:

Added escape/unescape functions for SQL strings and "bytea" conversion.

This has been already suggested with patches by Charlie Dyson and Kavous Bojnourdi a long time ago.

See: http://mailman.vex.net/pipermail/pygresql/2004-September/001336.html

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/module/pg.py

    r284 r287  
    66# Improved by Christoph Zwerschke
    77#
    8 # $Id: pg.py,v 1.45 2006-04-14 16:13:22 darcy Exp $
     8# $Id: pg.py,v 1.46 2006-05-07 12:37:23 cito Exp $
    99#
    1010
     
    120120                else:
    121121                        raise InternalError, 'Connection is not valid'
     122
     123        # For convenience, define some module functions as static methods also:
     124        escape_string, escape_bytea, unescape_bytea = map(staticmethod,
     125                (escape_string, escape_bytea, unescape_bytea))
    122126
    123127        def _do_debug(self, s):
Note: See TracChangeset for help on using the changeset viewer.