class documentation

class custom_op(object):

View In Hierarchy

Represent a 'custom' operator.

.custom_op is normally instantiated when the .Operators.op or .Operators.bool_op methods are used to create a custom operator callable. The class can also be used directly when programmatically constructing expressions. E.g. to represent the "factorial" operation:

from sqlalchemy.sql import UnaryExpression
from sqlalchemy.sql import operators
from sqlalchemy import Numeric

unary = UnaryExpression(table.c.somecolumn,
        modifier=operators.custom_op("!"),
        type_=Numeric)

See Also

.Operators.op

.Operators.bool_op

Method __call__ Undocumented
Method __eq__ Undocumented
Method __hash__ Undocumented
Method __init__ Undocumented
Class Variable __name__ Undocumented
Instance Variable eager​_grouping Undocumented
Instance Variable is​_comparison Undocumented
Instance Variable natural​_self​_precedent Undocumented
Instance Variable opstring Undocumented
Instance Variable precedence Undocumented
Instance Variable return​_type Undocumented
def __call__(self, left, right, **kw):

Undocumented

def __eq__(self, other):

Undocumented

def __hash__(self):

Undocumented

def __init__(self, opstring, precedence=0, is_comparison=False, return_type=None, natural_self_precedent=False, eager_grouping=False):

Undocumented

__name__: str =

Undocumented

eager_grouping =

Undocumented

is_comparison =

Undocumented

natural_self_precedent =

Undocumented

opstring =

Undocumented

precedence =

Undocumented

return_type =

Undocumented