on master help sign in
complete Date examples
c4b7fc7AgentM
RelationExpr.hs+22−2
@@ -130,7 +130,13 @@ productsRel = case mkRelation attributes tupleSet of
130 ("WEIGHT", Attribute "WEIGHT" StringAtomType),
130 ("WEIGHT", Attribute "WEIGHT" StringAtomType),
131 ("CITY", Attribute "CITY" StringAtomType)]
131 ("CITY", Attribute "CITY" StringAtomType)]
132 tupleSet = HS.fromList $ mkRelationTuples attributes [
132 tupleSet = HS.fromList $ mkRelationTuples attributes [
133− M.fromList [("P#", StringAtom "P1"), ("PNAME", StringAtom "Nut"), ("COLOR", StringAtom "Red"), ("WEIGHT", IntAtom 12), ("CITY", StringAtom "London")]
133+ M.fromList [("P#", StringAtom "P1"), ("PNAME", StringAtom "Nut"), ("COLOR", StringAtom "Red"), ("WEIGHT", IntAtom 12), ("CITY", StringAtom "London")],
134+ M.fromList [("P#", StringAtom "P2"), ("PNAME", StringAtom "Bolt"), ("COLOR", StringAtom "Green"), ("WEIGHT", IntAtom 17), ("CITY", StringAtom "Paris")],
135+ M.fromList [("P#", StringAtom "P3"), ("PNAME", StringAtom "Screw"), ("COLOR", StringAtom "Blue"), ("WEIGHT", IntAtom 17), ("CITY", StringAtom "Oslo")],
136+ M.fromList [("P#", StringAtom "P4"), ("PNAME", StringAtom "Screw"), ("COLOR", StringAtom "Red"), ("WEIGHT", IntAtom 14), ("CITY", StringAtom "London")],
137+ M.fromList [("P#", StringAtom "P5"), ("PNAME", StringAtom "Cam"), ("COLOR", StringAtom "Blue"), ("WEIGHT", IntAtom 12), ("CITY", StringAtom "Paris")],
138+ M.fromList [("P#", StringAtom "P6"), ("PNAME", StringAtom "Cog"), ("COLOR", StringAtom "Red"), ("WEIGHT", IntAtom 19), ("CITY", StringAtom "London")]
139+
134 ]
140 ]
135
141
136supplierProductsRel = case mkRelation attributes tupleSet of
142supplierProductsRel = case mkRelation attributes tupleSet of
@@ -140,5 +146,19 @@ supplierProductsRel = case mkRelation attributes tupleSet of
140 ("P#", Attribute "P#" StringAtomType),
146 ("P#", Attribute "P#" StringAtomType),
141 ("QTY", Attribute "QTY" StringAtomType)]
147 ("QTY", Attribute "QTY" StringAtomType)]
142 tupleSet = HS.fromList $ mkRelationTuples attributes [
148 tupleSet = HS.fromList $ mkRelationTuples attributes [
143− M.fromList [("S#", StringAtom "S1"), ("P#", StringAtom "P1"), ("QTY", IntAtom 300)]
149+ M.fromList [("S#", StringAtom "S1"), ("P#", StringAtom "P1"), ("QTY", IntAtom 300)],
150+ M.fromList [("S#", StringAtom "S1"), ("P#", StringAtom "P2"), ("QTY", IntAtom 200)],
151+ M.fromList [("S#", StringAtom "S1"), ("P#", StringAtom "P3"), ("QTY", IntAtom 400)],
152+ M.fromList [("S#", StringAtom "S1"), ("P#", StringAtom "P4"), ("QTY", IntAtom 200)],
153+ M.fromList [("S#", StringAtom "S1"), ("P#", StringAtom "P5"), ("QTY", IntAtom 100)],
154+ M.fromList [("S#", StringAtom "S1"), ("P#", StringAtom "P6"), ("QTY", IntAtom 100)],
155+
156+ M.fromList [("S#", StringAtom "S2"), ("P#", StringAtom "P1"), ("QTY", IntAtom 300)],
157+ M.fromList [("S#", StringAtom "S2"), ("P#", StringAtom "P2"), ("QTY", IntAtom 400)],
158+
159+ M.fromList [("S#", StringAtom "S3"), ("P#", StringAtom "P2"), ("QTY", IntAtom 200)],
160+
161+ M.fromList [("S#", StringAtom "S4"), ("P#", StringAtom "P2"), ("QTY", IntAtom 200)],
162+ M.fromList [("S#", StringAtom "S4"), ("P#", StringAtom "P4"), ("QTY", IntAtom 300)],
163+ M.fromList [("S#", StringAtom "S4"), ("P#", StringAtom "P5"), ("QTY", IntAtom 400)]
144 ]
164 ]