Class BindingConverter
object
--+
|
BindingConverter
- Known Subclasses:
-
MssqlConverter
,
MysqlConverter
,
PsycopgConverter
,
SqliteConverter
A value converter that uses bind variables.
>>> op=EQ(FIELD('x'), 45, converter=BindingConverter('format'))
>>> print op
(x = %s)
>>> c=BindingConverter('format')
>>> op=AND(EQ(FIELD('x'), 400), NE(FIELD('y'), ('^', FIELD('z'), 2)), converter=c)
>>> type(op.converter)==BindingConverter
True
>>> type(op[1].converter)==BindingConverter
True
>>> type(op[2].converter)==BindingConverter
True
>>> type(op[2][2].converter)==BindingConverter
True
>>> print op
((x = %s) AND (y != (z ^ %s)))
>>> c.values
[400, 2]
Method Summary |
|
__init__(self,
paramstyle)
|
|
__call__(self,
val)
|
|
convert(self,
val)
|
|
reset(self)
|
Inherited from object |
|
__delattr__ (...)
x.__delattr__('name') <==> del x.name |
|
__getattribute__ (...)
x.__getattribute__('name') <==> x.name |
|
__hash__ (x)
x.__hash__() <==> hash(x) |
|
__reduce__ (...)
helper for pickle |
|
__reduce_ex__ (...)
helper for pickle |
|
__repr__ (x)
x.__repr__() <==> repr(x) |
|
__setattr__ (...)
x.__setattr__('name', value) <==> x.name = value |
|
__str__ (x)
x.__str__() <==> str(x) |
Inherited from type |
|
__new__ (T,
S,
...)
T.__new__(S, ...) -> a new object with type S, a subtype of T |
values
-
- Get Method:
- fget(...)
|
converters
-
- Type:
-
dict
- Value:
|
supported_styles
-
- Type:
-
tuple
- Value:
('format', 'pyformat', 'qmark', 'named', 'numeric')
|
|