Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module adds support for some of PostgreSQL operators on IP addresses and networks. See http://www.postgresql.org/docs/9.4/static/functions-net.html for more detailed documentation
- (<:<.) :: EntityField record IPRange -> IPRange -> Filter record
- (>:>.) :: EntityField record IPRange -> IPRange -> Filter record
- (<:<=) :: EntityField record IPRange -> IPRange -> Filter record
- (>:>=) :: EntityField record IPRange -> IPRange -> Filter record
- (<.<.) :: EntityField record IP -> IPRange -> Filter record
- (>.>.) :: EntityField record IPRange -> IP -> Filter record
- data IP :: *
- data IPRange :: *
Documentation
(<:<.) :: EntityField record IPRange -> IPRange -> Filter record Source #
The record range is contained within the specified range. Corresponds to PgSQL operator <<.
(>:>.) :: EntityField record IPRange -> IPRange -> Filter record Source #
The record range contains the specified range. Corresponds to PgSQL operator >>.
(<:<=) :: EntityField record IPRange -> IPRange -> Filter record Source #
The record range is contained within or equals to the specified range. Corresponds to PgSQL operator <<=.
(>:>=) :: EntityField record IPRange -> IPRange -> Filter record Source #
The record range contains or equals to the specified range. Corresponds to PgSQL operator >>=.
(<.<.) :: EntityField record IP -> IPRange -> Filter record Source #
The record address is contained within the specified range. Corresponds to PgSQL operator <<.
(>.>.) :: EntityField record IPRange -> IP -> Filter record Source #
The record range contains the specified address. Corresponds to PgSQL operator >>.
A unified IP data for IPv4
and IPv6
.
To create this, use the data constructors. Or use read
"192.0.2.1"
:: IP
, for example. Also, "192.0.2.1"
can be used as literal with OverloadedStrings.
>>>
(read "192.0.2.1" :: IP) == IPv4 (read "192.0.2.1" :: IPv4)
True>>>
(read "2001:db8:00:00:00:00:00:01" :: IP) == IPv6 (read "2001:db8:00:00:00:00:00:01" :: IPv6)
True
Enum IP | |
Eq IP | Equality over IP addresses. Correctly compare IPv4 and IPv4-embedded-in-IPv6 addresses.
|
Data IP | |
Ord IP | |
Read IP | |
Show IP | |
IsString IP | |
Generic IP | |
type Rep IP | |
A unified data for AddrRange
IPv4
and AddrRange
IPv6
.
To create this, use read
"192.0.2.0/24"
:: IPRange
.
Also, "192.0.2.0/24"
can be used as literal with OverloadedStrings.
>>>
(read "192.0.2.1/24" :: IPRange) == IPv4Range (read "192.0.2.0/24" :: AddrRange IPv4)
True>>>
(read "2001:db8:00:00:00:00:00:01/48" :: IPRange) == IPv6Range (read "2001:db8:00:00:00:00:00:01/48" :: AddrRange IPv6)
True