packages feed

HDBC 2.2.5 → 2.2.6

raw patch · 4 files changed

+112/−2 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

HDBC.cabal view
@@ -1,11 +1,11 @@ Name: HDBC-Version: 2.2.5+Version: 2.2.6 License: LGPL Maintainer: John Goerzen <jgoerzen@complete.org> Author: John Goerzen Copyright: Copyright (c) 2005-2010 John Goerzen license-file: COPYRIGHT-extra-source-files: COPYING+extra-source-files: COPYING, Makefile, Memory.txt, README.txt homepage: http://software.complete.org/hdbc Category: Database synopsis: Haskell Database Connectivity
+ Makefile view
@@ -0,0 +1,47 @@+# Copyright (C) 2004 - 2009 John Goerzen <jgoerzen@complete.org>+#+#    This library is free software; you can redistribute it and/or+#    modify it under the terms of the GNU Lesser General Public+#    License as published by the Free Software Foundation; either+#    version 2.1 of the License, or (at your option) any later version.+#+#    This library is distributed in the hope that it will be useful,+#    but WITHOUT ANY WARRANTY; without even the implied warranty of+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU+#    Lesser General Public License for more details.+#+#    You should have received a copy of the GNU Lesser General Public+#    License along with this library; if not, write to the Free Software+#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA+all: setup+	@echo "Please use Cabal to build this package; not make."+	./setup configure+	./setup build++setup: Setup.lhs+	ghc --make -o setup Setup.lhs++install: setup+	./setup install++clean:+	./Setup.lhs clean++.PHONY: test+test: test-ghc test-hugs+	@echo ""+	@echo "All tests pass."++test-hugs: setup+	@echo " ****** Running hugs tests"+	./setup configure -f buildtests --hugs+	./setup build+	runhugs -98 +o -P$(PWD)/dist/scratch:$(PWD)/dist/scratch/programs/runtests: \+		dist/scratch/programs/runtests/Main.hs++test-ghc: setup+	@echo " ****** Building GHC tests"+	./setup configure -f buildtests+	./setup build+	@echo " ****** Running GHC tests"+	./dist/build/runtests/runtests
+ Memory.txt view
@@ -0,0 +1,24 @@+Notes on memory management+--------------------------++ForeignPtrs are used wherever possible to make sure we don't have+memory leaks.++However, there is one potential problem with them.  If a whole bunch+of database stuff goes out of scope all at once, then the Connection,+Statement, and everything else could become finalizable all at once.+And it is not guaranteed to be finalized in any particular order.++We don't want to have the Connection finalized before the Statements.+This could cause segfaults with some databases.++So we implement a simple reference counting system for the+Connection.  Each use -- whether in a Connection or a Statement --+counts as one, and the whole thing is freed when the use count drops+to 0 (the last object using it has been finalized).++That solves almost every problem.  We have one more: when somebody+calls disconnect on the parent, we really want to close all open+statements first.  So a system of weak refs is used to handle that.+This makes sure that we free things in the proper order for explicit+disconnects as well.
+ README.txt view
@@ -0,0 +1,39 @@+Welcome to HDBC, Haskell Database Connectivity.++HDBC is modeled loosely on Perl's DBI interface, though it has also+been influenced by Python's DB-API v2, JDBC in Java, and HSQL in+Haskell.++Please see doc/Database-HDBC.html for an introduction to HDBC and its+various features.++INSTALLATION+------------++You'll need either GHC 6.4.1 or above, or Hugs 2005xx or above.++The steps to install are:++1) ghc --make -o setup Setup.lhs++2) ./setup configure++3) ./setup build++4) ./setup install   (as root)++If you're on Windows, you can omit the leading "./".++Documentation is in doc/ -- lots of information, including pointers to+drivers, is in doc/Database-HDBC.html.++USAGE+-----++To use with hugs, you'll want to use hugs -98.++To use with GHC, you'll want to use -package HDBC in your programs.+Or, with Cabal, use Build-Depends: HDBC.++-- John Goerzen+   December 2005