postgresql-simple-0.6.5: Mid-Level PostgreSQL client library
Copyright (c) 2014-2015 Leonid Onokhov
(c) 2014-2015 Leon P Smith
License BSD3
Maintainer Leon P Smith <leon@melding-monads.com>
Safe Haskell None
Language Haskell2010

Database.PostgreSQL.Simple.Range

Description

Synopsis

Documentation

data PGRange a Source #

Generic range type

Constructors

PGRange !( RangeBound a) !( RangeBound a)

Instances

Instances details
Functor PGRange Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

Ord a => Eq ( PGRange a) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

Show a => Show ( PGRange a) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange Double ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange Float ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange Int ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange Int8 ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange Int16 ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange Int32 ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange Int64 ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange Integer ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange Word ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange Word8 ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange Word16 ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange Word32 ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange Word64 ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange Scientific ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange UTCTime ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange ZonedTime ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange LocalTime ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange TimeOfDay ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange NominalDiffTime ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange Day ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange Date ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange ZonedTimestamp ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange UTCTimestamp ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

ToField ( PGRange LocalTimestamp ) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

( FromField a, Typeable a) => FromField ( PGRange a) Source #
Instance details

Defined in Database.PostgreSQL.Simple.Range

isEmpty :: Ord a => PGRange a -> Bool Source #

Is a range empty? If this returns True , then the contains predicate will always return False . However, if this returns False , it is not necessarily true that there exists a point for which contains returns True . Consider PGRange ( Excludes 2) ( Excludes 3) :: PGRange Int , for example.

contains :: Ord a => PGRange a -> a -> Bool Source #

Does a range contain a given point? Note that in some cases, this may not correspond exactly with a server-side computation. Consider UTCTime for example, which has a resolution of a picosecond, whereas postgresql's timestamptz types have a resolution of a microsecond. Putting such Haskell values into the database will result in them being rounded, which can change the value of the containment predicate.