Increment.

[?]
Dec 11, 2014, 11:53 PM
LUM4VQJIHJKQWWD5NVWTVSNPKQTMGQQICTFOTM6W4BMME2G3G5RQC

Dependencies

  • [2] MWUPXTBF A few steps down a road to be abandoned.
  • [3] EMVTF2IW WIP moving back to snap.
  • [4] WO2MINIF Auctions now compile!
  • [5] 64C6AWH6 Rename Ananke -> Quixotic, project reboot.
  • [6] TZQJVHBA Add auction functions to ADB.
  • [7] 75N3UJ4J More progression toward lenses.
  • [8] MXLZBRQN Trickle.
  • [9] 64VI73NP Server now compiles using abstracted SQLite
  • [10] FRPWIKCN Added log event parsing to Quixotic.Database.SQLite
  • [11] NVOCQVAS Initial failing tests.
  • [12] 7DBNV3GV Initial, stack-based impl of time log event reduction.

Change contents

  • replacement in lib/Quixotic/Database/SQLite.hs at line 43
    [3.733][3.1370:1467](),[3.4455][3.1370:1467](),[3.1467][3.734:783](),[3.345][3.35:96](),[3.783][3.35:96](),[3.1511][3.35:96]()
    let baseResult = EitherT $ execStatement db "SELECT btcAddr, event, eventTime from workEvents"
    rows <- lift $ bimapEitherT pack id baseResult
    return . intervals . catMaybes $ fmap parseRow (join rows)
    [3.733]
    [3.1295]
    let selection = execStatement db "SELECT btcAddr, event, eventTime from workEvents"
    rows <- lift . EitherT $ fmap (over _Left pack) selection
    return . intervals . catMaybes $ fmap parseLogEntry (join rows)
  • replacement in lib/Quixotic/Database/SQLite.hs at line 47
    [3.1297][3.1297:1361]()
    newAuction' :: Auction -> ReaderT a (EitherT Text IO) AuctionId
    [3.1296]
    [2.160]
    newAuction' :: Auction -> ReaderT SQLiteHandle (EitherT Text IO) AuctionId
  • replacement in lib/Quixotic/Database/SQLite.hs at line 57
    [3.1451][3.1451:1476]()
    readAuction' = undefined
    [3.1451]
    [3.1476]
    readAuction' (AuctionId aid) = do
    db <- ask
    let selection = execParamStatement db
    "SELECT raiseAmount, endsAt FROM auctions WHERE ROWID = :aid"
    [("aid", Int aid)]
    rows <- lift . EitherT $ fmap (over _Left pack) selection
  • replacement in lib/Quixotic/Database/SQLite.hs at line 74
    [3.4556][3.97:155]()
    parseRow :: Row Value -> Maybe LogEntry
    parseRow row = do
    [3.4556]
    [3.155]
    parseLogEntry :: Row Value -> Maybe LogEntry
    parseLogEntry row = do
  • edit in lib/Quixotic/Database/SQLite.hs at line 81
    [3.313]
    [3.313]
    parseAuction :: Row Value -> Maybe Auction
    parseAuction row =
    Auction <$> (lookup "raiseAmount" row >>= valueBTC)
    <*> (lookup "endsAt" row >>= valueTime)
    valueBTC :: Value -> Maybe BTC
    valueBTC (Int i) _ = Just $ BTC i
    valueBTC _ = Nothing
  • replacement in lib/Quixotic/Database/SQLite.hs at line 107
    [3.4669][3.4669:4814](),[3.4814][2.388:505]()
    eventTable = Table "workEvents" [ Column "btcAddr" (SQLVarChar 256) []
    , Column "event" (SQLVarChar 64) []
    , Column "eventTime" (SQLDateTime DATETIME) []
    ] []
    [3.4669]
    [3.4898]
    eventTable = Table "workEvents"
    [ Column "btcAddr" (SQLVarChar 256) []
    , Column "event" (SQLVarChar 64) []
    , Column "eventTime" (SQLDateTime DATETIME) []
    ] []
  • replacement in lib/Quixotic/Database/SQLite.hs at line 114
    [2.531][2.531:735]()
    auctionTable = Table "auctions" [ Column "raiseAmouont" (SQLInt BIG False False) []
    , Column "endsAt" (SQLDateTime DATETIME) []
    ] []
    [2.531]
    [2.735]
    auctionTable = Table "auctions"
    [ Column "raiseAmouont" (SQLInt BIG False False) []
    , Column "endsAt" (SQLDateTime DATETIME) []
    ] []
  • replacement in lib/Quixotic.hs at line 14
    [3.2662][3.1933:1996]()
    newtype BTC = BTC { _btc :: Integer } deriving (Show, Eq, Ord)
    [3.2662]
    [3.1996]
    newtype BTC = BTC { _btc :: Int64 } deriving (Show, Eq, Ord)