web.web.db.SQLParam

Package web :: Package web :: Module db :: Class SQLParam |
[hide private]
[frames] | no frames]

# Class SQLParam

source code

Parameter in SQLQuery.

    >>> q = SQLQuery(["SELECT * FROM test WHERE name=", SQLParam("joe")])
    >>> q
    <sql: "SELECT * FROM test WHERE name='joe'">
    >>> q.query()
    'SELECT * FROM test WHERE name=%s'
    >>> q.values()
    ['joe']

Instance Methods | [hide private]
__init__(self, value) | source code
get_marker(self, paramstyle=`'``pyformat``'`) | source code
sqlquery(self) | source code
__add__(self, other) | source code
__radd__(self, other) | source code
__str__(self) | source code
__repr__(self) | source code