Closed jekirl closed 9 years ago
Fixes #31 by providing makeTabularFor
makeTabularFor
Example usage:
data Foo = Foo { _fooId :: Int, _fooBar :: String, _fooBaz :: Double } deriving (Eq,Ord,Show,Read,Data,Typeable) fooBazFunc :: Foo -> Maybe Double fooBazFunc = Just . _fooBaz makeTabularFor ("FooId", '_fooId) [(''Candidate, ("FooBazIndexName", 'fooBazFunc)), (''Supplemental, ("FooBar", '_fooBar))] test = [Foo 1 "One" 1.0, Foo 2 "Two" 2.0, Foo 3 "Three" 3.0, Foo 4 "Four" 4.0, Foo 5 "Five" 5.0]^.table test ^. with FooBazIndexName (<=) (Just 3)
fromList [Foo {_fooId = 1, _fooBar = "One", _fooBaz = 1.0},Foo {_fooId = 2, _fooBar = "Two", _fooBaz = 2.0},Foo {_fooId = 3, _fooBar = "Three", _fooBaz = 3.0}]
Fixes #31 by providing
makeTabularFor
Example usage: