Skip to content
Browse files

Add module to typify connection attributes and update git ignore for …

…newly discovered file naming convention
  • Loading branch information...
1 parent 5daac67 commit d7a85f0daa21583727e03746dfe2ea7b82b0ea3d ExternalReality committed Sep 11, 2011
View
1 .gitignore
@@ -1,3 +1,4 @@
+\.#*
\#*#
*~
dist
View
10 SednaDB.cabal
@@ -24,21 +24,21 @@ Library
Default-Language: Haskell98
Build-Depends: base == 4.*,
bindings-DSL
- Exposed-Modules: Database.SednaDB.Internal.SpDefs
- Database.SednaDB.Internal.Sedna
+
+ Exposed-Modules: Database.SednaDB.Internal.Sedna
+ Database.SednaDB.Internal.SednaConnectionAttributes
Database.SednaDB.Internal.SednaResponseCodes
+ Database.SednaDB.Internal.SpDefs
Include-Dirs: /usr/local/sedna/driver/c
Includes: libsedna.h,
sp_defs.h
Extra-Lib-Dirs: /usr/local/sedna/driver/c
-
Extra-Libraries: sedna
Ghc-Options: -Wall
-
-
+
Default-Extensions: CPP,
ForeignFunctionInterface
View
1 src/Database/SednaDB/Internal/BindingWrappers.hs
@@ -10,6 +10,7 @@ import Foreign.C.String
import Foreign.Marshal.Alloc
import Database.SednaDB.Internal.Sedna
+import Database.SedanDB.Internal.SednaConnectionAttributes
import Database.SednaDB.Internal.SednaResponseCodes
type SednaConnection = Ptr C'SednaConnection
View
8 src/Database/SednaDB/Internal/Sedna.hsc
@@ -10,14 +10,6 @@ import Database.SednaDB.Internal.SpDefs
#num BULK_LOAD_PORTION
#integral_t enum SEattr
-#num SEDNA_ATTR_AUTOCOMMIT
-#num SEDNA_ATTR_SESSION_DIRECTORY
-#num SEDNA_ATTR_DEBUG
-#num SEDNA_ATTR_BOUNDARY_SPACE_PRESERVE_WHILE_LOAD
-#num SEDNA_ATTR_CONCURRENCY_TYPE
-#num SEDNA_ATTR_QUERY_EXEC_TIMEOUT
-#num SEDNA_ATTR_LOG_AMOUNT
-#num SEDNA_ATTR_MAX_RESULT_SIZE
#starttype struct conn_bulk_load
#field bulk_load_started , CChar
View
18 src/Database/SednaDB/Internal/SednaConnectionAttributes.hsc
@@ -0,0 +1,18 @@
+module Database.SednaDB.Internal.SednaConnectionAttributes where
+
+import Foreign.C.Types
+
+#include <libsedna.h>
+
+newtype SednaConnectionAttr = SednaConnectionAttr { sednaConnectionAttr :: CInt }
+
+#{enum SednaConnectionAttr, SednaConnectionAttr
+ , attrAutoCommit = SEDNA_ATTR_AUTOCOMMIT
+ , attrSessionDirectory = SEDNA_ATTR_SESSION_DIRECTORY
+ , attrDebug = SEDNA_ATTR_DEBUG
+ , attrBoundarySpacePreserveWhileLoad = SEDNA_ATTR_BOUNDARY_SPACE_PRESERVE_WHILE_LOAD
+ , attrConcurrencyType = SEDNA_ATTR_CONCURRENCY_TYPE
+ , attrQueryExecTimeOut = SEDNA_ATTR_QUERY_EXEC_TIMEOUT
+ , attrLogAmount = SEDNA_ATTR_LOG_AMOUNT
+ , attrMaxResultSize = SEDNA_ATTR_MAX_RESULT_SIZE
+ }

0 comments on commit d7a85f0

Please sign in to comment.
Something went wrong with that request. Please try again.