dbbase.column_types.WriteOnlyColumn.operate¶
-
WriteOnlyColumn.
operate
(op, *other, **kwargs)¶ Operate on an argument.
This is the lowest level of operation, raises
NotImplementedError
by default.Overriding this on a subclass can allow common behavior to be applied to all operations. For example, overriding
ColumnOperators
to applyfunc.lower()
to the left and right side:class MyComparator(ColumnOperators): def operate(self, op, other): return op(func.lower(self), func.lower(other))
- Parameters
op – Operator callable.
*other – the ‘other’ side of the operation. Will be a single scalar for most operations.
**kwargs – modifiers. These may be passed by special operators such as
ColumnOperators.contains()
.