mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-12-15 06:43:04 +03:00
Definition moved and integrated.
This commit is contained in:
parent
5eccd8122f
commit
95d9359ab2
@ -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 = ('(' :) . (++[')'])
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user