Make Database.MongoDB.Connection compatible on Windows by not using PortID's UnixSocket constructor unless compiling on Unix

This commit is contained in:
Tony Hannan 2011-02-22 10:31:54 -05:00
parent a399e81925
commit a32f0c3234
2 changed files with 4 additions and 1 deletions

View file

@ -1,6 +1,6 @@
{- | A pool of TCP connections to a single server or a replica set of servers. -} {- | 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 ( module Database.MongoDB.Connection (
-- * Pipe -- * Pipe
@ -70,7 +70,9 @@ showHostPort :: Host -> String
showHostPort (Host hostname port) = hostname ++ ":" ++ (case port of showHostPort (Host hostname port) = hostname ++ ":" ++ (case port of
Service s -> s Service s -> s
PortNumber p -> show p PortNumber p -> show p
#if !defined(mingw32_HOST_OS) && !defined(cygwin32_HOST_OS) && !defined(_WIN32)
UnixSocket s -> s) UnixSocket s -> s)
#endif
readHostPortM :: (Monad m) => String -> m Host 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. -- ^ Read string \"hostname:port\" as @Host hosthame port@ or \"hostname\" as @host hostname@ (default port). Fail if string does not match either syntax.

1
TODO
View file

@ -10,6 +10,7 @@ Bson
MongoDB MongoDB
------- -------
+ Support the new query flag: https://jira.mongodb.org/browse/SERVER-2020
+ Support MapReduce 1.8 version + Support MapReduce 1.8 version
+ When one connection in a pool fails, close all other since they will likely fail too + 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 "." + on insert/update: reject keys that start with "$" or "."