Make Database.MongoDB.Connection compatible on Windows by not using PortID's UnixSocket constructor unless compiling on Unix
This commit is contained in:
parent
a399e81925
commit
a32f0c3234
2 changed files with 4 additions and 1 deletions
|
@ -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.
|
||||
|
|
1
TODO
1
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 "."
|
||||
|
|
Loading…
Reference in a new issue