relational-query-0.11.4.1: Typeful, Modular, Relational, algebraic query engine

Copyright2017 Kei Hibino
LicenseBSD3
Maintainerex8k.hibino@gmail.com
Stabilityexperimental
Portabilityunknown
Safe HaskellSafe
LanguageHaskell2010

Database.Relational.ProjectableClass

Contents

Description

This module provides interfaces to preserve constraints of direct product projections.

Synopsis

Literal SQL terms

class ShowConstantTermsSQL a where Source #

ShowConstantTermsSQL a is implicit rule to derive function to convert from haskell record type a into constant SQL terms.

Generic programming (https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#generic-programming) with default signature is available for ShowConstantTermsSQL class, so you can make instance like below:

  {-# LANGUAGE DeriveGeneric #-}
  import GHC.Generics (Generic)
  --
  data Foo = Foo { ... } deriving Generic
  instance ShowConstantTermsSQL Foo

Minimal complete definition

Nothing

Methods

showConstantTermsSQL' :: a -> DList StringSQL Source #

showConstantTermsSQL' :: (Generic a, GShowConstantTermsSQL (Rep a)) => a -> DList StringSQL Source #

Instances
ShowConstantTermsSQL Bool Source #

Constant SQL terms of Bool.

Instance details

Defined in Database.Relational.Pure

ShowConstantTermsSQL Char Source #

Constant SQL terms of Char.

Instance details

Defined in Database.Relational.Pure

ShowConstantTermsSQL Double Source #

Constant SQL terms of Double. Caution for floating-point error rate.

Instance details

Defined in Database.Relational.Pure

ShowConstantTermsSQL Float Source #

Constant SQL terms of Float. Caution for floating-point error rate.

Instance details

Defined in Database.Relational.Pure

ShowConstantTermsSQL Int Source #

Constant SQL terms of Int. Use this carefully, because this is architecture dependent size of integer type.

Instance details

Defined in Database.Relational.Pure

ShowConstantTermsSQL Int8 Source #

Constant SQL terms of Int8.

Instance details

Defined in Database.Relational.Pure

ShowConstantTermsSQL Int16 Source #

Constant SQL terms of Int16.

Instance details

Defined in Database.Relational.Pure

ShowConstantTermsSQL Int32 Source #

Constant SQL terms of Int32.

Instance details

Defined in Database.Relational.Pure

ShowConstantTermsSQL Int64 Source #

Constant SQL terms of Int64.

Instance details

Defined in Database.Relational.Pure

ShowConstantTermsSQL () Source #

Constant SQL terms of '()'.

Instance details

Defined in Database.Relational.Pure

ShowConstantTermsSQL String Source #

Constant SQL terms of String.

Instance details

Defined in Database.Relational.Pure

ShowConstantTermsSQL ByteString Source #

Constant SQL terms of ByteString.

Instance details

Defined in Database.Relational.Pure

ShowConstantTermsSQL ByteString Source #

Constant SQL terms of ByteString.

Instance details

Defined in Database.Relational.Pure

ShowConstantTermsSQL Text Source #

Constant SQL terms of Text.

Instance details

Defined in Database.Relational.Pure

ShowConstantTermsSQL Text Source #

Constant SQL terms of Text.

Instance details

Defined in Database.Relational.Pure

ShowConstantTermsSQL ZonedTime Source #

Constant SQL terms of ZonedTime. This generates ***NOT STANDARD*** SQL of TIMESTAMPTZ literal.

Instance details

Defined in Database.Relational.Pure

ShowConstantTermsSQL LocalTime Source #

Constant SQL terms of LocalTime.

Instance details

Defined in Database.Relational.Pure

ShowConstantTermsSQL TimeOfDay Source #

Constant SQL terms of TimeOfDay.

Instance details

Defined in Database.Relational.Pure

ShowConstantTermsSQL UTCTime Source #

Constant SQL terms of UTCTime. This generates ***NOT STANDARD*** SQL of TIMESTAMPTZ literal with UTC timezone.

Instance details

Defined in Database.Relational.Pure

ShowConstantTermsSQL Day Source #

Constant SQL terms of Day.

Instance details

Defined in Database.Relational.Pure

(PersistableWidth a, ShowConstantTermsSQL a) => ShowConstantTermsSQL (Maybe a) Source #

Constant SQL terms of Maybe type. Width inference is required.

Instance details

Defined in Database.Relational.Pure

(ShowConstantTermsSQL a1, ShowConstantTermsSQL a2) => ShowConstantTermsSQL (a1, a2) Source # 
Instance details

Defined in Database.Relational.TupleInstances

(ShowConstantTermsSQL a1, ShowConstantTermsSQL a2, ShowConstantTermsSQL a3) => ShowConstantTermsSQL (a1, a2, a3) Source # 
Instance details

Defined in Database.Relational.TupleInstances

Methods

showConstantTermsSQL' :: (a1, a2, a3) -> DList StringSQL Source #

(ShowConstantTermsSQL a1, ShowConstantTermsSQL a2, ShowConstantTermsSQL a3, ShowConstantTermsSQL a4) => ShowConstantTermsSQL (a1, a2, a3, a4) Source # 
Instance details

Defined in Database.Relational.TupleInstances

Methods

showConstantTermsSQL' :: (a1, a2, a3, a4) -> DList StringSQL Source #

(ShowConstantTermsSQL a1, ShowConstantTermsSQL a2, ShowConstantTermsSQL a3, ShowConstantTermsSQL a4, ShowConstantTermsSQL a5) => ShowConstantTermsSQL (a1, a2, a3, a4, a5) Source # 
Instance details

Defined in Database.Relational.TupleInstances

Methods

showConstantTermsSQL' :: (a1, a2, a3, a4, a5) -> DList StringSQL Source #

(ShowConstantTermsSQL a1, ShowConstantTermsSQL a2, ShowConstantTermsSQL a3, ShowConstantTermsSQL a4, ShowConstantTermsSQL a5, ShowConstantTermsSQL a6) => ShowConstantTermsSQL (a1, a2, a3, a4, a5, a6) Source # 
Instance details

Defined in Database.Relational.TupleInstances

Methods

showConstantTermsSQL' :: (a1, a2, a3, a4, a5, a6) -> DList StringSQL Source #

(ShowConstantTermsSQL a1, ShowConstantTermsSQL a2, ShowConstantTermsSQL a3, ShowConstantTermsSQL a4, ShowConstantTermsSQL a5, ShowConstantTermsSQL a6, ShowConstantTermsSQL a7) => ShowConstantTermsSQL (a1, a2, a3, a4, a5, a6, a7) Source # 
Instance details

Defined in Database.Relational.TupleInstances

Methods

showConstantTermsSQL' :: (a1, a2, a3, a4, a5, a6, a7) -> DList StringSQL Source #

showConstantTermsSQL :: ShowConstantTermsSQL a => a -> [StringSQL] Source #

Convert from haskell record to SQL terms list.

type StringSQL = Keyword Source #

String wrap type for SQL strings.