Definition moved and integrated.

This commit is contained in:
Kei Hibino 2013-08-30 00:51:15 +09:00
parent 5eccd8122f
commit 95d9359ab2
3 changed files with 10 additions and 9 deletions

View File

@ -10,7 +10,9 @@
-- This module provides SQL string concatination functions
-- which result is ShowS differential lists.
module Database.Relational.Query.Internal.String (
showUnwordsSQL, showWordSQL, showUnwords
showUnwordsSQL, showWordSQL, showUnwords,
paren
) where
import Language.SQL.Keyword (unwordsSQL)
@ -30,3 +32,7 @@ showUnwords = rec where
rec [] = id
rec [s] = s
rec (s:ss@(_:_)) = s . showChar ' ' . rec ss
-- | Parened String.
paren :: String -> String
paren = ('(' :) . (++[')'])

View File

@ -61,6 +61,7 @@ import qualified Language.SQL.Keyword.ConcatString as SQLs
import Database.Record (PersistableWidth, PersistableRecordWidth, derivedWidth)
import Database.Relational.Query.Internal.String (paren)
import Database.Relational.Query.Table (columnSQL, stringFromColumnSQL)
import Database.Relational.Query.Expr (Expr, ShowConstantSQL (showConstantSQL))
import qualified Database.Relational.Query.Expr as Expr
@ -72,10 +73,6 @@ import Database.Relational.Query.Projection (Projection, columns, unsafeFromColu
import qualified Database.Relational.Query.Projection as Projection
-- | Parened String.
paren :: String -> String
paren = ('(' :) . (++[')'])
-- | String of SQL terms.
sqlTermsString :: [String] -> String
sqlTermsString = d where

View File

@ -41,6 +41,8 @@ import Prelude hiding (pi)
import Data.Int (Int32)
import qualified Language.SQL.Keyword as SQL
import Database.Relational.Query.Internal.String (paren)
import Database.Relational.Query.Context (Flat, Aggregated)
import Database.Relational.Query.Expr (Expr, fromJust)
import Database.Relational.Query.Projection (Projection)
@ -57,10 +59,6 @@ class Projectable p0 p1 where
-- Project from projection type 'p0' into weaken projection types 'p1'.
project :: p0 c a -> p1 c a
-- | Parened String.
paren :: String -> String
paren = ('(' :) . (++[')'])
-- | Uni-operator type for SQL String
type SqlUniOp = String -> String