Fix handling of event_t columns.
[?]
Apr 17, 2015, 11:59 PM
FD7SV5I6VCW27HZ3T3K4MMGB2OYGJTPKFFA263TNTAMRJGQJWVNACDependencies
- [2]
JV3UEPNCFix Aeson constructors. - [3]
A6HKMINBAttempting to improve JSON handling. - [4]
NVOCQVASInitial failing tests. - [5]
GKGVYBZGAdded JSON serialization to TimeLog - [6]
Y35QCWYWMinor improvement in WorkIndex type to eliminate duplicated information. - [7]
IZEVQF62Work in progress replacing sqlite with postgres. - [8]
TLQ72DSJLenses, sqlite-simple - [9]
OBFPJS2GProject successfully builds and tests under nix. - [10]
PBD7LZYQPostgres & auth are beginning to function. - [11]
2KZPOGRBOnce you get Haskell to compile, the tests pass! - [12]
BROSTG5KBeginning of modularization of server. - [13]
RSEB2NFGReplacing Snap with Scotty. - [14]
TNR3TEHKSwitch to Postgres + snaplet arch compiles. - [15]
EZQG2APBUpdate task list. - [16]
LD4GLVSFMore database stuff. - [17]
NMWWP4ZNTrying out Hspec - [18]
64C6AWH6Rename Ananke -> Quixotic, project reboot. - [19]
Z7KS5XHHVery WIP. Wow. - [20]
EMVTF2IWWIP moving back to snap.
Change contents
- replacement in lib/Quixotic/Database/PostgreSQL.hs at line 25
eventTypeParser f v = fromField f v >>= nameEventeventTypeParser f v = dotn <- typename fcase tn of"event_t" -> maybe (returnError UnexpectedNull f "") (nameEvent . decodeUtf8) v_ -> returnError Incompatible f "column was not of type event_t" - replacement in lib/Quixotic/Database/PostgreSQL.hs at line 52
workEventParser = WorkEvent <$> fieldWith eventTypeParser <*> field <*> fieldworkEventParser = WorkEvent <$> fieldWith eventTypeParser <*> field <*> field - replacement in lib/Quixotic/Database/PostgreSQL.hs at line 163
"SELECT btc_addr, event_type, event_time from work_events WHERE project_id = ?""SELECT btc_addr, event_type, event_time, event_metadata from work_events WHERE project_id = ?" - edit in lib/Quixotic/TimeLog.hs at line 2
{-# LANGUAGE DeriveDataTypeable #-} - replacement in lib/Quixotic/TimeLog.hs at line 38
data EventType = StartWork | StopWork deriving (Show, Eq)data EventType = StartWork | StopWork deriving (Show, Eq, Typeable) - replacement in lib/Quixotic/TimeLog.hs at line 54
, _eventMeta :: A.Value, _eventMeta :: Maybe A.Value - replacement in server/Quixotic/Snaplet/WorkLog.hs at line 28
let em = maybe A.Null id $ A.decode requestBodyworkEvent = WorkEvent evType timestamp emlet workEvent = WorkEvent evType timestamp $ A.decode requestBody - replacement in sql/quixotic-pg.sql at line 29
event_meta json not nullevent_metadata json not null - edit in test/Quixotic/TimeLogSpec.hs at line 6
import qualified Data.Aeson as A - replacement in test/Quixotic/TimeLogSpec.hs at line 33
[ LogEntry addr (WorkEvent StartWork start' A.Null), LogEntry addr (WorkEvent StopWork end' A.Null) ][ LogEntry addr (WorkEvent StartWork start' Nothing), LogEntry addr (WorkEvent StopWork end' Nothing) ]