htsql-firebird / src / htsql / tweak / inet /

Full commit
# Copyright (c) 2006-2011, Prometheus Research, LLC
# See `LICENSE` for license information, `AUTHORS` for the list of authors.

from ...core.adapter import named, adapts
from ...core.domain import IntegerDomain
from import AddSig, SubtractSig
from import (BindCast, ComparableDomains, CorrelateFunction,
from .domain import INetDomain
from .signature import INetIncrementSig, INetDecrementSig, INetDifferenceSig

class BindINetCast(BindCast):

    codomain = INetDomain()

class ComparableINet(ComparableDomains):


class CorrelateINetIncrement(CorrelateFunction):

    correlates(AddSig, (INetDomain, IntegerDomain))
    signature = INetIncrementSig
    domains = [INetDomain(), IntegerDomain()]
    codomain = INetDomain()

class CorrelateINetDecrement(CorrelateFunction):

    correlates(SubtractSig, (INetDomain, IntegerDomain))
    signature = INetDecrementSig
    domains = [INetDomain(), IntegerDomain()]
    codomain = INetDomain()

class CorrelateINetDifference(CorrelateFunction):

    correlates(SubtractSig, (INetDomain, INetDomain))
    signature = INetDifferenceSig
    domains = [INetDomain(), INetDomain()]
    codomain = IntegerDomain()