diff --git a/Database/MongoDB/Connection.hs b/Database/MongoDB/Connection.hs index 2f5f07c..2b6c45e 100644 --- a/Database/MongoDB/Connection.hs +++ b/Database/MongoDB/Connection.hs @@ -1,6 +1,6 @@ {- | A pool of TCP connections to a single server or a replica set of servers. -} -{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, RecordWildCards, NamedFieldPuns, MultiParamTypeClasses, FlexibleContexts, TypeFamilies, DoRec, RankNTypes, FlexibleInstances #-} +{-# LANGUAGE CPP, OverloadedStrings, ScopedTypeVariables, RecordWildCards, NamedFieldPuns, MultiParamTypeClasses, FlexibleContexts, TypeFamilies, DoRec, RankNTypes, FlexibleInstances #-} module Database.MongoDB.Connection ( -- * Pipe @@ -70,7 +70,9 @@ showHostPort :: Host -> String showHostPort (Host hostname port) = hostname ++ ":" ++ (case port of Service s -> s PortNumber p -> show p +#if !defined(mingw32_HOST_OS) && !defined(cygwin32_HOST_OS) && !defined(_WIN32) UnixSocket s -> s) +#endif readHostPortM :: (Monad m) => String -> m Host -- ^ Read string \"hostname:port\" as @Host hosthame port@ or \"hostname\" as @host hostname@ (default port). Fail if string does not match either syntax. diff --git a/TODO b/TODO index fdb67e1..b67460b 100644 --- a/TODO +++ b/TODO @@ -10,6 +10,7 @@ Bson MongoDB ------- ++ Support the new query flag: https://jira.mongodb.org/browse/SERVER-2020 + Support MapReduce 1.8 version + When one connection in a pool fails, close all other since they will likely fail too + on insert/update: reject keys that start with "$" or "."