From 950eea3ba04e94cf3d5797f9b5d32b2621c89b55 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Tue, 13 Feb 2024 02:07:20 +0100 Subject: refactor library --- app/Query/Type.hs | 62 ------------------------------------------------------- 1 file changed, 62 deletions(-) delete mode 100644 app/Query/Type.hs (limited to 'app/Query/Type.hs') diff --git a/app/Query/Type.hs b/app/Query/Type.hs deleted file mode 100644 index d27106f..0000000 --- a/app/Query/Type.hs +++ /dev/null @@ -1,62 +0,0 @@ -module Query.Type - ( module Query.Field, - module Query.Record, - Collection, - Comparison (..), - EmbedClause (..), - EmbedClauses, - FieldSelector (..), - JoinClause (..), - JoinClauses, - JoinType (..), - Query (..), - WhereClause (..), - ) -where - -import Data.List.NonEmpty qualified as N -import Query.Field -import Query.Record - -data Query - = Select - FieldSelector - Collection - (JoinClauses FilePath) - (EmbedClauses FilePath) - (Maybe WhereClause) - -data FieldSelector - = All - | Only (N.NonEmpty Field) - deriving (Show) - -type Collection = FilePath - -type JoinClauses a = [JoinClause a] - -data JoinClause a - = JoinClause JoinType a (Maybe WhereClause) - deriving (Show) - -data JoinType - = JoinLeft - | JoinRight - | JoinFull - deriving (Show) - -type EmbedClauses a = [EmbedClause a] - -data EmbedClause a - = EmbedClause a (Maybe WhereClause) - deriving (Show) - -data WhereClause - = And [WhereClause] - | Or [WhereClause] - | Where Comparison - deriving (Show) - -data Comparison - = Eq Field Field - deriving (Show) -- cgit v1.2.3