diff --git a/COPYING b/COPYING
new file mode 100644
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,510 @@
+
+                  GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+	51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations
+below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it
+becomes a de-facto standard.  To achieve this, non-free programs must
+be allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+                  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control
+compilation and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at least
+    three years, to give the same user the materials specified in
+    Subsection 6a, above, for a charge no more than the cost of
+    performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply, and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License
+may add an explicit geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                            NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms
+of the ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.
+It is safest to attach them to the start of each source file to most
+effectively convey the exclusion of warranty; and each file should
+have at least the "copyright" line and a pointer to where the full
+notice is found.
+
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or
+your school, if any, to sign a "copyright disclaimer" for the library,
+if necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James
+  Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/COPYRIGHT b/COPYRIGHT
new file mode 100644
--- /dev/null
+++ b/COPYRIGHT
@@ -0,0 +1,18 @@
+Copyright (C) 2005 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
+
+Please see COPYING for the license.
+
diff --git a/Database/HDBC.hs b/Database/HDBC.hs
new file mode 100644
--- /dev/null
+++ b/Database/HDBC.hs
@@ -0,0 +1,268 @@
+{-
+Copyright (C) 2005-2006 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
+
+-}
+
+{- |
+   Module     : Database.HDBC
+   Copyright  : Copyright (C) 2005-2006 John Goerzen
+   License    : GNU LGPL, version 2.1 or above
+
+   Maintainer : John Goerzen <jgoerzen@complete.org>
+   Stability  : provisional
+   Portability: portable
+
+Welcome to HDBC, the Haskell Database Connectivity library.
+
+Written by John Goerzen, jgoerzen\@complete.org
+-}
+
+module Database.HDBC 
+    (-- * Introduction
+     -- $introduction
+
+     -- ** Features
+     -- $features
+
+     -- ** Available Drivers
+     -- $drivers
+
+     -- * Typing of transfer data
+     SqlType(..), nToSql, iToSql,
+     SqlValue(..),
+
+     -- * Database Connections
+     Connection, disconnect, clone,
+     -- ** Preparing Queries
+     run, sRun, prepare, quickQuery,
+
+     -- ** Transaction Handling
+     -- $transactions
+     commit, rollback, withTransaction,
+
+     -- ** Connection Inquiries
+     hdbcDriverName, hdbcClientVer, proxiedClientName,
+     proxiedClientVer, dbServerVer, dbTransactionSupport,
+     getTables, describeTable,
+
+     -- * Statements
+     Statement,
+     -- ** Execution
+     execute, sExecute, executeMany, sExecuteMany,
+     -- ** Fetching Results
+     fetchRow, fetchRowAL, fetchRowMap,
+     sFetchRow, fetchAllRows, fetchAllRowsAL, fetchAllRowsMap,
+     sFetchAllRows, getColumnNames,
+     -- ** Statement Inquires
+     describeResult,
+     -- ** Miscellaneous
+     finish, originalQuery,
+
+     -- * Exceptions
+     SqlError(..),
+     catchSql, handleSql, sqlExceptions, handleSqlError,
+
+     -- * Column Types
+     -- | These are defined in "Database.HDBC.ColTypes" but are
+     -- available to programs importing "Database.HDBC" by default as well.
+     -- See "Database.HDBC.ColTypes" for documentation.
+     module Database.HDBC.ColTypes
+
+     -- * Threading
+     -- $threading
+
+     -- * Copyright and License
+     -- $legal
+    )
+
+where
+import Database.HDBC.Utils(catchSql, handleSql, sqlExceptions,
+                           handleSqlError, withTransaction,
+                           sFetchAllRows, fetchAllRows,
+                           sRun, sExecute, sExecuteMany, sFetchRow,
+                           quickQuery, fetchRowMap, fetchAllRowsMap,
+                           fetchRowAL, fetchAllRowsAL)
+import Database.HDBC.Types
+import Database.HDBC.ColTypes
+
+{- $introduction
+
+Welcome to HDBC, Haskell Database Connectivity.
+
+HDBC provides an abstraction layer between Haskell programs and SQL
+relational databases.  This lets you write database code once, in
+Haskell, and have it work with any number of backend SQL databases
+(MySQL, Oracle, PostgreSQL, ODBC-compliant databases, etc.)
+
+HDBC is modeled loosely on Perl's DBI interface
+<http://search.cpan.org/~timb/DBI/DBI.pm>, though it has also
+been influenced by Python's DB-API v2, JDBC in Java, and HSQL in
+Haskell.
+
+HDBC is a from-scratch effort.  It is not a reimplementation of HSQL,
+though its purpose is the same.
+-}
+
+{- $features
+
+Features of HDBC include:
+
+ * Ability to use replacable parameters to let one query be
+   executed multiple times (eliminates the need for an escape
+   function)
+
+ * Ability to access returned rows by column number
+
+ * Ability to read data from the SQL server on-demand rather than
+   reading the entire result set up front
+
+ * HUnit testsuite for each backend driver
+
+ * Well-defined standard API and easy backend driver implementation
+
+ * Lazy reading of the entire result set (think hGetContents, but
+   for the results of SELECT) (see 'sFetchAllRows')
+
+ * Support for translation between Haskell and SQL types
+
+ * Support for querying database server properties
+
+ * Add-on package (hdbc-missingh) to integrate with MissingH,
+   providing a database backend for AnyDBM.
+
+ * Support for querying metadata such as column names.
+
+ * Support for querying additional metadata (column types, etc.)
+-}
+
+{- $drivers
+
+Here is a list of known drivers as of March 28, 2006:
+
+[@Sqlite v3@] Available from <http://quux.org/devel/hdbc>.  Or, to
+participate in development, use 
+@darcs get --partial <http://darcs.complete.org/hdbc-sqlite3>@
+
+[@PostgreSQL@] Available from <http://quux.org/devel/hdbc>.  Or, to
+participate in development, use
+@darcs get --partial <http://darcs.complete.org/hdbc-postgresql>@
+
+[@ODBC@] Available from <http://quux.org/devel/hdbc>.  Or, to
+partitipace in development, use
+@darcs get --partial <http://darcs.complete.org/hdbc-odbc>@
+
+[@MySQL@] MySQL users are encouraged to use the ODBC driver, which works
+and has been tested against MySQL on both Linux\/Unix and Windows platforms.
+
+In addition, there is one integration package: /hdbc-missingh/.  This
+integrates with the MissingH library <http://quux.org/devel/missingh>.
+Among other things, it lets any HDBC database act as a backend for the
+AnyDBM interface.  Available from <http://quux.org/devel/hdbc>.  Or,
+to participate in development, use
+@darcs get --partial <http://darcs.complete.org/hdbc-missingh>@
+
+The latest version of HDBC itself is available from
+<http://quux.org/devel/hdbc>.  Or, to participate in development, use
+@darcs get --partial <http://darcs.complete.org/hdbc>@.
+-}
+
+{- $transactions
+
+This section concerns itself with writing (updating) a database.
+
+In HDBC, as with many RDBMS implementations, every write to the
+database occurs within a transaction.  No changes are visible (outside
+the current transaction) until a commit operation occurs, in which
+case all changes since the transaction started are atomically
+committed.  Also, there is a rollback operation that can undo all
+changes since the transaction started.
+
+HDBC does everything within a transaction.  A transaction is implicitly entered
+when a connection to a database is established, and a transaction is
+implicitly entered after each call to 'commit' or 'rollback' as well.
+
+The practical effect of this is that you must call 'commit' after making
+changes to a database in order for those changes to become visible.  You don't
+have to call 'commit' after /every/ change, just after a batch of them.
+
+(Exceptions exist for databases that don't offer a high level of transaction
+isolation; but you should always play it safe and commit anyway.)
+
+Database developers will also be experienced with the atomicity benefits
+of transactions, an explanation of which is outside the scope of this manual.
+
+Errors occuring at the database level can leave a transaction in an
+indeterminate state, depending on the database.  Some databases will
+refuse all queries until the next 'commit' or 'rollback'.  The safe thing
+to do is to issue a 'commit' or 'rollback' after trapping any 'SqlError'.
+Alternatively, you could use 'withTransaction', which will automatically
+handle this detail for you.
+-}
+
+{- $threading
+
+FIXME: this is draft information
+
+Thread support in a generalized interface such as HDBC can be complicated
+because support for threading varies across database interfaces.
+
+However, applications using HDBC should be able to rely upon at least a few
+basic guarantees:
+
+ * The HDBC modules may freely be imported and used across all threads.
+
+ * HDBC modules may also freely share database connections and statements;
+   the database or HDBC driver will be responsible for locking if necessary.
+
+I use \"share\" in the same sense as Python's DB-API: multiple threads may use
+the resource without wrapping it in any lock.
+
+However, there are some caveats to the above:
+
+ * Not all databases support more than one active statement for a single
+   connection.  Therefore, for maximum portability, you should use
+   a different connection to the database for each simultaneous query you
+   wish to use.
+   FIXME: describe when a statement is active.
+
+ * Not all databases may support the level of multithreading described above.
+   For those that don't, safe access will be restriced in the HDBC driver
+   by using locks.  Therefore, you can write portable code, but you 
+   only get real multithreading when databases really support it.
+   Details of thread support should be documented in the HDBC
+   driver for each specific database.
+-}
+
+{- $legal
+Copyright (C) 2005-2006 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
+
+Please see COPYING in the source distribution for the full license.
+-}
diff --git a/Database/HDBC/ColTypes.hs b/Database/HDBC/ColTypes.hs
new file mode 100644
--- /dev/null
+++ b/Database/HDBC/ColTypes.hs
@@ -0,0 +1,136 @@
+{-
+Copyright (C) 2006 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
+-}
+
+{- |
+   Module     : Database.HDBC.ColTypes
+   Copyright  : Copyright (C) 2006 John Goerzen
+   License    : GNU LGPL, version 2.1 or above
+
+   Maintainer : John Goerzen <jgoerzen@complete.org>
+   Stability  : provisional
+   Portability: portable
+
+Definitions of, and utilities for, specifying what type of data is represented
+by a column.
+
+Written by John Goerzen, jgoerzen\@complete.org
+-}
+
+module Database.HDBC.ColTypes (SqlColDesc(..),
+                               SqlTypeId(..),
+                               SqlInterval(..)
+                              )
+
+where
+import Data.Dynamic
+
+{- | The description of a column.
+
+Fields are Nothing if the database backend cannot supply the
+requested information.
+
+The colSize field works like this:
+
+For character types, the maximum width of the column.  For numeric
+types, the total number of digits allowed.  See the ODBC manual for more.
+
+The colOctetLength field is defined for character and binary types, and
+gives the number of bytes the column requires, regardless of encoding.
+-}
+data SqlColDesc = 
+   SqlColDesc {
+               colType :: SqlTypeId   -- ^ Type of data stored here
+              ,colSize :: Maybe Int   -- ^ The size of a column
+              ,colOctetLength :: Maybe Int -- ^ The maximum size in octets
+              ,colDecDigits :: Maybe Int -- ^ Digits to the right of the period
+              ,colNullable :: Maybe Bool -- ^ Whether NULL is acceptable
+              }
+   deriving (Eq, Read, Show)
+
+sqlColDescTc :: TyCon
+sqlColDescTc = mkTyCon "Database.HDBC.SqlColDesc"
+
+instance Typeable SqlColDesc where
+    typeOf _ = mkTyConApp sqlColDescTc []
+
+{- | The type identifier for a given column. 
+
+This represents the type of data stored in the column in the underlying
+SQL engine.  It does not form the entire column type; see 'SqlColDesc' for
+that.
+
+These types correspond mainly to those defined by ODBC. -}
+data SqlTypeId =
+    SqlCharT                    -- ^ Fixed-width character strings
+    | SqlVarCharT               -- ^ Variable-width character strings
+    | SqlLongVarCharT           -- ^ Variable-width character strings, max length implementation dependant
+    | SqlWCharT                 -- ^ Fixed-width Unicode strings
+    | SqlWVarCharT              -- ^ Variable-width Unicode strings
+    | SqlWLongVarCharT          -- ^ Variable-width Unicode strings, max length implementation dependant
+    | SqlDecimalT               -- ^ Signed exact values
+    | SqlNumericT               -- ^ Signed exact integer values
+    | SqlSmallIntT              -- ^ 16-bit integer values
+    | SqlIntegerT               -- ^ 32-bit integer values
+    | SqlRealT
+    | SqlFloatT                 -- ^ Signed inexact floating-point values
+    | SqlDoubleT                -- ^ Signed inexact double-precision values
+    | SqlBitT                   -- ^ A single bit
+    | SqlTinyIntT               -- ^ 8-bit integer values
+    | SqlBigIntT                -- ^ 64-bit integer values
+    | SqlBinaryT                -- ^ Fixed-length binary data
+    | SqlVarBinaryT             -- ^ Variable-length binary data
+    | SqlLongVarBinaryT         -- ^ Variable-length binary data, max length implementation dependant
+    | SqlDateT                  -- ^ A date
+    | SqlTimeT                  -- ^ A time
+    | SqlTimestampT             -- ^ Combined date and time
+    | SqlUTCDateTimeT           -- ^ UTC date\/time
+    | SqlUTCTimeT               -- ^ UTC time
+    | SqlIntervalT SqlInterval  -- ^ A time or date difference
+    | SqlGUIDT                  -- ^ Global unique identifier
+    | SqlUnknownT String        -- ^ A type not represented here; implementation-specific information in the String
+
+  deriving (Eq, Show, Read)
+
+sqlTypeIdTc :: TyCon
+sqlTypeIdTc = mkTyCon "Database.HDBC.SqlTypeId"
+
+instance Typeable SqlTypeId where
+    typeOf _ = mkTyConApp sqlTypeIdTc []
+
+{- | The different types of intervals in SQL. -}
+data SqlInterval =
+      SqlIntervalMonthT         -- ^ Difference in months
+    | SqlIntervalYearT          -- ^ Difference in years
+    | SqlIntervalYearToMonthT   -- ^ Difference in years+months
+    | SqlIntervalDayT           -- ^ Difference in days
+    | SqlIntervalHourT          -- ^ Difference in hours
+    | SqlIntervalMinuteT        -- ^ Difference in minutes
+    | SqlIntervalSecondT        -- ^ Difference in seconds
+    | SqlIntervalDayToHourT     -- ^ Difference in days+hours
+    | SqlIntervalDayToMinuteT   -- ^ Difference in days+minutes
+    | SqlIntervalDayToSecondT   -- ^ Difference in days+seconds
+    | SqlIntervalHourToMinuteT  -- ^ Difference in hours+minutes
+    | SqlIntervalHourToSecondT  -- ^ Difference in hours+seconds
+    | SqlIntervalMinuteToSecondT -- ^ Difference in minutes+seconds
+      deriving (Eq, Show, Read)
+
+sqlIntervalTc :: TyCon
+sqlIntervalTc = mkTyCon "Database.HDBC.SqlInterval"
+
+instance Typeable SqlInterval where
+    typeOf _ = mkTyConApp sqlIntervalTc []
diff --git a/Database/HDBC/DriverUtils.hs b/Database/HDBC/DriverUtils.hs
new file mode 100644
--- /dev/null
+++ b/Database/HDBC/DriverUtils.hs
@@ -0,0 +1,92 @@
+{-
+Copyright (C) 2006 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
+-}
+
+{- |
+   Module     : Database.HDBC.DriverUtils
+   Copyright  : Copyright (C) 2006 John Goerzen
+   License    : GNU LGPL, version 2.1 or above
+
+   Maintainer : John Goerzen <jgoerzen@complete.org>
+   Stability  : provisional
+   Portability: portable
+
+Utilities for database backend drivers.
+
+Please note: this module is intended for authors of database driver libraries
+only.  Authors of applications using HDBC should use 'Database.HDBC'
+exclusively.
+
+Written by John Goerzen, jgoerzen\@complete.org
+-}
+
+module Database.HDBC.DriverUtils (
+                                  ChildList,
+                                  closeAllChildren,
+                                  addChild
+                                 )
+
+where
+import Control.Concurrent.MVar
+import System.Mem.Weak
+import Database.HDBC.Types
+import Control.Monad
+
+type ChildList = MVar [Weak Statement]
+
+{- | Close all children.  Intended to be called by the 'disconnect' function
+in 'Connection'. 
+
+There may be a potential race condition wherein a call to newSth at the same
+time as a call to this function may result in the new child not being closed.
+-}
+closeAllChildren :: ChildList -> IO ()
+closeAllChildren mcl = 
+    do children <- readMVar mcl
+       mapM_ closefunc children
+    where closefunc child =
+              do c <- deRefWeak child
+                 case c of
+                   Nothing -> return ()
+                   Just x -> finish x
+
+{- | Adds a new child to the existing list.  Also takes care of registering
+a finalizer for it, to remove it from the list when possible. -}
+addChild :: ChildList -> Statement -> IO ()
+addChild mcl stmt =
+    do weakptr <- mkWeakPtr stmt (Just (childFinalizer mcl))
+       modifyMVar_ mcl (\l -> return (weakptr : l))
+
+{- | The general finalizer for a child.
+
+It is simply a filter that removes any finalized weak pointers from the parent.
+
+If the MVar is locked at the start, does nothing to avoid deadlock.  Future
+runs would probably catch it anyway. -}
+childFinalizer :: ChildList -> IO ()
+childFinalizer mcl = 
+    do c <- tryTakeMVar mcl
+       case c of
+         Nothing -> return ()
+         Just cl ->
+             do newlist <- filterM filterfunc cl
+                putMVar mcl newlist
+    where filterfunc c =
+              do dc <- deRefWeak c
+                 case dc of
+                   Nothing -> return False
+                   Just _ -> return True
diff --git a/Database/HDBC/Types.hs b/Database/HDBC/Types.hs
new file mode 100644
--- /dev/null
+++ b/Database/HDBC/Types.hs
@@ -0,0 +1,624 @@
+{-
+Copyright (C) 2005 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
+-}
+
+{- |
+   Module     : Database.HDBC.Types
+   Copyright  : Copyright (C) 2005 John Goerzen
+   License    : GNU LGPL, version 2.1 or above
+
+   Maintainer : John Goerzen <jgoerzen@complete.org>
+   Stability  : provisional
+   Portability: portable
+
+Types for HDBC.
+
+Please note: this module is intended for authors of database driver libraries
+only.  Authors of applications using HDBC should use 'Database.HDBC'
+exclusively.
+
+Written by John Goerzen, jgoerzen\@complete.org
+-}
+
+module Database.HDBC.Types
+    (Connection(..),
+     Statement(..),
+     SqlError(..),
+     SqlType(..), nToSql, iToSql,
+     SqlValue(..)
+
+    )
+
+where
+import Data.Dynamic
+import Data.Char(ord,toUpper)
+import Data.Word
+import Data.Int
+import System.Time
+import Database.HDBC.ColTypes
+
+{- | Main database handle object.
+
+A 'Connection' object is created by specific functions in the module for an
+individual database.  That is, the connect function -- which creates
+this object -- is not standardized through the HDBC interface.
+
+A connection is closed by a call to 'disconnect'.
+
+A call to 'commit' is required to make sure that your changes get committed
+to the database.  In other words, HDBC has /no support for autocommit/, which
+we consider an outdated notion.
+-}
+data Connection = 
+    Connection {
+                {- | Disconnect from the remote database.
+
+You do not need to explicitly close a Connection object, but you may do so if
+you so desire.  If you don't, the object will disconnect from the database
+in a sane way when it is garbage-collected.  However, a disconnection may
+raise an error, so you are encouraged to explicitly call 'disconnect'.  Also,
+garbage collection may not run when the program terminates, and some databases
+really like an explicit disconnect.
+
+So, bottom line is, you're best off calling 'disconnect' directly, but the
+world won't end if you forget.
+
+This function discards any data not committed already.  Database driver
+implementators should explicitly call 'rollback' if their databases don't
+do this automatically on disconnect.
+
+Bad Things (TM) could happen if you call this while you have 'Statement's 
+active.  In more precise language, the results in such situations are undefined
+and vary by database.  So don't do it.
+
+-}
+                disconnect :: IO (),
+                {- | Commit any pending data to the database.
+
+                   Required to make any changes take effect. -}
+                commit :: IO (),
+                {- | Roll back to the state the database was in prior to the
+                   last 'commit' or 'rollback'. -}
+                rollback :: IO (),
+                {- | Execute a single SQL query.  Returns the number
+                   of rows modified (see 'execute' for details).
+                   The second parameter is a list
+                   of replacement values, if any. -}
+                run :: String -> [SqlValue] -> IO Integer,
+                {- | Prepares a statement for execution. 
+
+                   Question marks in the statement will be replaced by
+                   positional parameters in a later call to 'execute'.
+
+                   Please note that, depending on the database
+                   and the driver, errors in your SQL may be raised
+                   either here or by 'execute'.  Make sure you
+                   handle exceptions both places if necessary. -}
+                prepare :: String -> IO Statement,
+                {- | Create a new 'Connection' object, pointed at the same
+                   server as this object is.  This will generally establish
+                   a separate physical connection.
+
+                   When you wish to establish multiple connections to a single
+                   server, the correct way to do so is to establish the
+                   first connection with the driver-specific connection
+                   function, and then clone it for each additional connection.
+                   
+                   This can be important when a database doesn't provide
+                   much thread support itself, and the HDBC driver module
+                   must serialize access to a particular database.
+
+                   This can also be a handy utility function whenever you
+                   need a separate connection to whatever database you are
+                   connected to already. -}
+                clone :: IO Connection,
+
+
+                {- | The name of the HDBC driver module for this connection.
+                   Ideally would be the same as the database name portion
+                   of the Cabal package name.  For instance, \"sqlite3\"
+                   or \"odbc\".  This is the layer that is bound most
+                   tightly to HDBC. -}
+                hdbcDriverName :: String,
+                {- | The version of the C (or whatever) client library
+                   that the HDBC driver module is bound to.  The meaning
+                   of this is driver-specific.  For an ODBC or similar
+                   proxying driver, this should be the version of the
+                   ODBC library, not the eventual DB client driver. -}
+                hdbcClientVer :: String,
+                {- | In the case of a system such as ODBC, the name of
+                   the database client\/server in use, if available.
+                   For others,
+                   identical to 'hdbcDriverName'. -}
+                proxiedClientName :: String,
+                {- | In the case of a system such as ODBC, the version of
+                   the database client in use, if available.  For others,
+                   identical to 'hdbcClientVer'. This is the next layer
+                   out past the HDBC driver. -}
+                proxiedClientVer :: String,
+                {- | The version of the database server, if available. -}
+                dbServerVer :: String,
+                {- | Whether or not the current database supports transactions.
+                   If False, then 'commit' and 'rollback' should be expected
+                   to raise errors.
+
+                   MySQL is the only commonly-used database that is known
+                   to not support transactions entirely.  Please see
+                   the MySQL notes in the ODBC driver for more information. -}
+                dbTransactionSupport :: Bool,
+
+                {- | The names of all tables accessible by the current
+                   connection, excluding special meta-tables (system tables).
+                   
+                   You should expect this to be returned in the same manner
+                   as a result from 'Database.HDBC.fetchAllRows'.
+
+                   All results should be converted to lowercase for you
+                   before you see them.
+                     -}
+                getTables :: IO [String],
+
+                {- | Obtain information about the columns in a specific
+                   table.  The String in the result
+                   set is the column name.
+
+                   You should expect this to be returned in the same manner
+                   as a result from 'Database.HDBC.fetchAllRows'.
+
+                   All results should be converted to lowercase for you
+                   before you see them.
+                   -}
+                describeTable :: String -> IO [(String, SqlColDesc)]
+                   
+               }
+
+data Statement = Statement
+    {
+     {- | Execute the prepared statement, passing in the given positional
+        parameters (that should take the place of the question marks
+        in the call to 'prepare').
+
+        For non-SELECT queries, the return value is the number of
+        rows modified, if known.  If no rows were modified, you get 0.
+        If the value is unknown, you get -1.  All current HDBC drivers
+        support this function and should never return -1.
+
+        For SELECT queries, you will always get 0.
+
+        This function should automatically call finish() to finish the previous
+        execution, if necessary.
+        -}
+     execute :: [SqlValue] -> IO Integer,
+
+     {- | Execute the query with many rows. 
+        The return value is the return value from the final row 
+        as if you had called 'execute' on it.
+
+        Due to optimizations that are possible due to different
+        databases and driver designs, this can often be significantly
+        faster than using 'execute' multiple times since queries
+        need to be compiled only once.
+
+        This is most useful for non-SELECT statements. -}
+     executeMany :: [[SqlValue]] -> IO (),
+                 
+     {- | Abort a query in progress -- usually not needed. -}
+     finish :: IO (),
+
+     {- | Fetches one row from the DB.  Returns 'Nothing' if there
+        are no more rows.  Will automatically call 'finish' when
+        the last row is read. -}
+     fetchRow :: IO (Maybe [SqlValue]),
+
+     {- | Returns a list of the column names in the result.
+        For maximum portability, you should not assume that
+        information is available until after an 'execute' function
+        has been run.
+        
+        Information is returned here directly as returned
+        by the underlying database layer.  Note that different
+        databases have different rules about capitalization
+        of return values and about representation of names
+        of columns that are not simple columns.  For this reason,
+        it is suggested that you treat this information for
+        display purposes only.  Failing that, you should convert
+        to lower (or upper) case, and use @AS@ clauses for
+        anything other than simple columns.
+
+        A simple getColumnNames implementation could simply
+        apply @map fst@ to the return value of 'describeResult'.
+        -}
+     getColumnNames :: IO [String],
+
+
+     {- | The original query that this 'Statement' was prepared
+          with. -}
+     originalQuery :: String,
+     {- | Obtain information about the columns in the result set.
+          Must be run only after 'execute'.  The String in the result
+          set is the column name.
+
+          You should expect this to be returned in the same manner
+          as a result from 'Database.HDBC.fetchAllRows'.
+
+          All results should be converted to lowercase for you
+          before you see them.
+
+          Please see caveats under 'getColumnNames' for information
+          on the column name field here.
+ -}
+     describeResult :: IO [(String, SqlColDesc)]
+    }
+
+{- | The main HDBC exception object.  As much information as possible
+is passed from the database through to the application through this object.
+
+Errors generated in the Haskell layer will have seNativeError set to -1.
+-}
+data SqlError = SqlError {seState :: String,
+                          seNativeError :: Int,
+                          seErrorMsg :: String}
+                deriving (Eq, Show, Read)
+
+sqlErrorTc :: TyCon
+sqlErrorTc = mkTyCon "Database.HDBC.SqlError"
+
+instance Typeable SqlError where
+    typeOf _ = mkTyConApp sqlErrorTc []
+
+{- | Conversions to and from 'SqlValue's and standard Haskell types.
+
+Conversions are powerful; for instance, you can call 'fromSql' on a SqlInt32
+and get a String or a Double out of it.  This class attempts to Do
+The Right Thing whenever possible, and will raise an error when asked to
+do something incorrect.  In particular, when converting to any type
+except a Maybe, 'SqlNull' as the input will cause an error to be raised.
+
+Here are some notes about conversion:
+
+ * Fractions of a second are not preserved on time values
+
+See also 'nToSql', 'iToSql'.
+-}
+
+class (Show a) => SqlType a where
+    toSql :: a -> SqlValue
+    fromSql :: SqlValue -> a
+
+{- | Converts any Integral type to a 'SqlValue' by using toInteger. -}
+nToSql :: Integral a => a -> SqlValue
+nToSql n = SqlInteger (toInteger n)
+
+{- | Convenience function for using numeric literals in your program. -}
+iToSql :: Int -> SqlValue
+iToSql = toSql
+
+{- | The main type for expressing Haskell values to SQL databases.
+
+This type is used to marshall Haskell data to and from database APIs.
+HDBC driver interfaces will do their best to use the most accurate and
+efficient way to send a particular value to the database server.
+
+Values read back from the server are put in the most appropriate 'SqlValue'
+type.  'fromSql' can then be used to convert them into whatever type
+is needed locally in Haskell.
+
+Most people will use 'toSql' and 'fromSql' instead of manipulating
+'SqlValue's directly.
+
+The default representation of time values is an integer number of seconds.
+Databases such as PostgreSQL with builtin timestamp types can will see
+automatic conversion between these Haskell types to local types.  Other
+databases can just use an int or a string. 
+
+This behavior also exists for other types.  For instance, many databases don't
+have a Rational type, so they'll just use Haskell's show function and
+store a Rational as a string.
+
+Two SqlValues are considered to be equal if one of these hold (first one that
+is true holds; if none are true, they are not equal):
+ * Both are NULL
+ * Both represent the same type and the encapsulated values are equal
+ * The values of each, when converted to a string, are equal. -}
+data SqlValue = SqlString String 
+              | SqlWord32 Word32
+              | SqlWord64 Word64
+              | SqlInt32 Int32
+              | SqlInt64 Int64
+              | SqlInteger Integer
+              | SqlChar Char
+              | SqlBool Bool
+              | SqlDouble Double
+              | SqlRational Rational
+              | SqlEpochTime Integer -- ^ Representation of ClockTime or CalendarTime
+              | SqlTimeDiff Integer -- ^ Representation of TimeDiff
+              | SqlNull         -- ^ NULL in SQL or Nothing in Haskell
+     deriving (Show)
+
+instance Eq SqlValue where
+    SqlString a == SqlString b = a == b
+    SqlWord32 a == SqlWord32 b = a == b
+    SqlWord64 a == SqlWord64 b = a == b
+    SqlInt32 a == SqlInt32 b = a == b
+    SqlInt64 a == SqlInt64 b = a == b
+    SqlInteger a == SqlInteger b = a == b
+    SqlChar a == SqlChar b = a == b
+    SqlBool a == SqlBool b = a == b
+    SqlDouble a == SqlDouble b = a == b
+    SqlRational a == SqlRational b = a == b
+    SqlEpochTime a == SqlEpochTime b = a == b
+    SqlTimeDiff a == SqlTimeDiff b = a == b
+    SqlNull == SqlNull = True
+    a == b = ((fromSql a)::String) == ((fromSql b)::String)
+
+instance SqlType String where
+    toSql = SqlString
+    fromSql (SqlString x) = x
+    fromSql (SqlInt32 x) = show x
+    fromSql (SqlInt64 x) = show x
+    fromSql (SqlWord32 x) = show x
+    fromSql (SqlWord64 x) = show x
+    fromSql (SqlInteger x) = show x
+    fromSql (SqlChar x) = [x]
+    fromSql (SqlBool x) = show x
+    fromSql (SqlDouble x) = show x
+    fromSql (SqlRational x) = show x
+    fromSql (SqlEpochTime x) = show x
+    fromSql (SqlTimeDiff x) = show x
+    fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to String"
+
+instance SqlType Int where
+    toSql x = SqlInt32 (fromIntegral x)
+    fromSql (SqlString x) = read' x
+    fromSql (SqlInt32 x) = fromIntegral x
+    fromSql (SqlInt64 x) = fromIntegral x
+    fromSql (SqlWord32 x) = fromIntegral x
+    fromSql (SqlWord64 x) = fromIntegral x
+    fromSql (SqlInteger x) = fromIntegral x
+    fromSql (SqlChar x) = ord x
+    fromSql (SqlBool x) = if x then 1 else 0
+    fromSql (SqlDouble x) = truncate $ x
+    fromSql (SqlRational x) = truncate $ x
+    fromSql (SqlEpochTime x) = fromIntegral x
+    fromSql (SqlTimeDiff x) = fromIntegral x
+    fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Int"
+
+instance SqlType Int32 where
+    toSql = SqlInt32
+    fromSql (SqlString x) = read' x
+    fromSql (SqlInt32 x) = x
+    fromSql (SqlInt64 x) = fromIntegral x
+    fromSql (SqlWord32 x) = fromIntegral x
+    fromSql (SqlWord64 x) = fromIntegral x
+    fromSql (SqlInteger x) = fromIntegral x
+    fromSql (SqlChar x) = fromIntegral $ ord x
+    fromSql (SqlBool x) = if x then 1 else 0
+    fromSql (SqlDouble x) = truncate $ x
+    fromSql (SqlRational x) = truncate $ x
+    fromSql (SqlEpochTime x) = fromIntegral x
+    fromSql (SqlTimeDiff x) = fromIntegral x
+    fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Int32"
+
+instance SqlType Int64 where
+    toSql = SqlInt64
+    fromSql (SqlString x) = read' x
+    fromSql (SqlInt32 x) = fromIntegral x
+    fromSql (SqlInt64 x) = x
+    fromSql (SqlWord32 x) = fromIntegral x
+    fromSql (SqlWord64 x) = fromIntegral x
+    fromSql (SqlInteger x) = fromIntegral x
+    fromSql (SqlChar x) = fromIntegral $ ord x
+    fromSql (SqlBool x) = if x then 1 else 0
+    fromSql (SqlDouble x) = truncate $ x
+    fromSql (SqlRational x) = truncate $ x
+    fromSql (SqlEpochTime x) = fromIntegral x
+    fromSql (SqlTimeDiff x) = fromIntegral x
+    fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Int64"
+
+instance SqlType Word32 where
+    toSql = SqlWord32
+    fromSql (SqlString x) = read' x
+    fromSql (SqlInt32 x) = fromIntegral x
+    fromSql (SqlInt64 x) = fromIntegral x
+    fromSql (SqlWord32 x) = x
+    fromSql (SqlWord64 x) = fromIntegral x
+    fromSql (SqlInteger x) = fromIntegral x
+    fromSql (SqlChar x) = fromIntegral $ ord x
+    fromSql (SqlBool x) = if x then 1 else 0
+    fromSql (SqlDouble x) = truncate $ x
+    fromSql (SqlRational x) = truncate $ x
+    fromSql (SqlEpochTime x) = fromIntegral x
+    fromSql (SqlTimeDiff x) = fromIntegral x
+    fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Word32"
+
+instance SqlType Word64 where
+    toSql = SqlWord64
+    fromSql (SqlString x) = read' x
+    fromSql (SqlInt32 x) = fromIntegral x
+    fromSql (SqlInt64 x) = fromIntegral x
+    fromSql (SqlWord32 x) = fromIntegral x
+    fromSql (SqlWord64 x) = x
+    fromSql (SqlInteger x) = fromIntegral x
+    fromSql (SqlChar x) = fromIntegral (ord x)
+    fromSql (SqlBool x) = if x then 1 else 0
+    fromSql (SqlDouble x) = truncate $ x
+    fromSql (SqlRational x) = truncate $ x
+    fromSql (SqlEpochTime x) = fromIntegral x
+    fromSql (SqlTimeDiff x) = fromIntegral x
+    fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Int64"
+
+instance SqlType Integer where
+    toSql = SqlInteger
+    fromSql (SqlString x) = read' x
+    fromSql (SqlInt32 x) = fromIntegral x
+    fromSql (SqlInt64 x) = fromIntegral x
+    fromSql (SqlWord32 x) = fromIntegral x
+    fromSql (SqlWord64 x) = fromIntegral x
+    fromSql (SqlInteger x) = x
+    fromSql (SqlChar x) = fromIntegral (ord x)
+    fromSql (SqlBool x) = if x then 1 else 0
+    fromSql (SqlDouble x) = truncate $ x
+    fromSql (SqlRational x) = truncate $ x
+    fromSql (SqlEpochTime x) = x
+    fromSql (SqlTimeDiff x) = x
+    fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Integer"
+
+instance SqlType Bool where
+    toSql = SqlBool
+    fromSql (SqlString x) = 
+        case map toUpper x of
+                           "TRUE" -> True
+                           "T" -> True
+                           "FALSE" -> False
+                           "F" -> False
+                           _ -> error $ "fromSql: cannot convert SqlString " 
+                                        ++ show x ++ " to Bool"
+    fromSql (SqlInt32 x) = numToBool x
+    fromSql (SqlInt64 x) = numToBool x
+    fromSql (SqlWord32 x) = numToBool x
+    fromSql (SqlWord64 x) = numToBool x
+    fromSql (SqlInteger x) = numToBool x
+    fromSql (SqlChar x) = numToBool (ord x)
+    fromSql (SqlBool x) = x
+    fromSql (SqlDouble x) = numToBool x
+    fromSql (SqlRational x) = numToBool x
+    fromSql (SqlEpochTime x) = numToBool x
+    fromSql (SqlTimeDiff x) = numToBool x
+    fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Bool"
+
+numToBool :: Num a => a -> Bool
+numToBool x = x /= 0
+
+instance SqlType Char where
+    toSql = SqlChar
+    fromSql (SqlString [x]) = x
+    fromSql (SqlString _) = error "fromSql: cannot convert SqlString to Char"
+    fromSql (SqlInt32 _) = error "fromSql: cannot convert SqlInt32 to Char"
+    fromSql (SqlInt64 _) = error "fromSql: cannot convert SqlInt64 to Char"
+    fromSql (SqlWord32 _) = error "fromSql: cannot convert SqlWord32 to Char"
+    fromSql (SqlWord64 _) = error "fromSql: cannot convert SqlWord64 to Char"
+    fromSql (SqlInteger _) = error "fromSql: cannot convert SqlInt to Char"
+    fromSql (SqlChar x) = x
+    fromSql (SqlBool x) = if x then '1' else '0'
+    fromSql (SqlDouble _) = error "fromSql: cannot convert SqlDouble to Char"
+    fromSql (SqlRational _) = error "fromSql: cannot convert SqlRational to Char"
+    fromSql (SqlEpochTime _) = error "fromSql: cannot convert SqlEpochTime to Char"
+    fromSql (SqlTimeDiff _) = error "fromSql: cannot convert SqlTimeDiff to Char"
+    fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Char"
+
+instance SqlType Double where
+    toSql = SqlDouble
+    fromSql (SqlString x) = read' x
+    fromSql (SqlInt32 x) = fromIntegral x
+    fromSql (SqlInt64 x) = fromIntegral x
+    fromSql (SqlWord32 x) = fromIntegral x
+    fromSql (SqlWord64 x) = fromIntegral x
+    fromSql (SqlInteger x) = fromIntegral x
+    fromSql (SqlChar x) = fromIntegral . ord $ x
+    fromSql (SqlBool x) = if x then 1.0 else 0.0
+    fromSql (SqlDouble x) = x
+    fromSql (SqlRational x) = fromRational x
+    fromSql (SqlEpochTime x) = fromIntegral x
+    fromSql (SqlTimeDiff x) = fromIntegral x
+    fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Double"
+
+instance SqlType Rational where
+    toSql = SqlRational
+    fromSql (SqlString x) = read' x
+    fromSql (SqlInt32 x) = fromIntegral x
+    fromSql (SqlInt64 x) = fromIntegral x
+    fromSql (SqlWord32 x) = fromIntegral x
+    fromSql (SqlWord64 x) = fromIntegral x
+    fromSql (SqlInteger x) = fromIntegral x
+    fromSql (SqlChar x) = fromIntegral . ord $ x
+    fromSql (SqlBool x) = fromIntegral $ ((fromSql (SqlBool x))::Int)
+    fromSql (SqlDouble x) = toRational x
+    fromSql (SqlRational x) = x
+    fromSql (SqlEpochTime x) = fromIntegral x
+    fromSql (SqlTimeDiff x) = fromIntegral x
+    fromSql (SqlNull) = error "fromSql: cannot convert SqlNull to Double"
+
+instance SqlType ClockTime where
+    toSql (TOD x _) = SqlEpochTime x
+    fromSql (SqlString x) = TOD (read' x) 0
+    fromSql (SqlInt32 x) = TOD (fromIntegral x) 0
+    fromSql (SqlInt64 x) = TOD (fromIntegral x) 0
+    fromSql (SqlWord32 x) = TOD (fromIntegral x) 0
+    fromSql (SqlWord64 x) = TOD (fromIntegral x) 0
+    fromSql (SqlInteger x) = TOD x 0
+    fromSql (SqlChar _) = error "fromSql: cannot convert SqlChar to ClockTime"
+    fromSql (SqlBool _) = error "fromSql: cannot convert SqlBool to ClockTime"
+    fromSql (SqlDouble x) = TOD (truncate x) 0
+    fromSql (SqlRational x) = TOD (truncate x) 0
+    fromSql (SqlEpochTime x) = TOD x 0
+    fromSql (SqlTimeDiff _) = error "fromSql: cannot convert SqlTimeDiff to ClockTime"
+    fromSql SqlNull = error "fromSql: cannot convert SqlNull to ClockTime"
+
+instance SqlType TimeDiff where
+    toSql x = SqlTimeDiff (timeDiffToSecs x)
+    fromSql (SqlString x) = secs2td (read' x)
+    fromSql (SqlInt32 x) = secs2td (fromIntegral x)
+    fromSql (SqlInt64 x) = secs2td (fromIntegral x)
+    fromSql (SqlWord32 x) = secs2td (fromIntegral x)
+    fromSql (SqlWord64 x) = secs2td (fromIntegral x)
+    fromSql (SqlInteger x) = secs2td x
+    fromSql (SqlChar _) = error "fromSql: cannot convert SqlChar to TimeDiff"
+    fromSql (SqlBool _) = error "fromSql: cannot convert SqlBool to TimeDiff"
+    fromSql (SqlDouble x) = secs2td (truncate x)
+    fromSql (SqlRational x) = secs2td (truncate x)
+    fromSql (SqlEpochTime _) = error "fromSql: cannot convert SqlEpochTime to TimeDiff"
+    fromSql (SqlTimeDiff x) = secs2td x
+    fromSql SqlNull = error "fromSql: cannot convert SqlNull to TimeDiff"
+
+instance SqlType CalendarTime where
+    toSql x = toSql (toClockTime x)
+    fromSql = toUTCTime . fromSql
+
+instance (SqlType a) => SqlType (Maybe a) where
+    toSql Nothing = SqlNull
+    toSql (Just a) = toSql a
+    fromSql SqlNull = Nothing
+    fromSql x = Just (fromSql x)
+
+secs2td :: Integer -> TimeDiff
+secs2td x = diffClockTimes (TOD x 0) (TOD 0 0)
+
+
+-- | Read a value from a string, and give an informative message
+--   if it fails.
+read' :: (Typeable a,Read a) => String -> a
+read' s = ret
+  where ret = case reads s of
+                  [(x,"")] -> x
+                  _ -> error $ "fromSql: Cannot read " ++ show s 
+                               ++ " as " ++ t ++ "."
+        t = show (typeOf ret)
+
+--------------
+-- The following function copied from MissingH.Time.hs
+
+{- | Converts the given timeDiff to the number of seconds it represents.
+
+Uses the same algorithm as normalizeTimeDiff in GHC. -}
+timeDiffToSecs :: TimeDiff -> Integer
+timeDiffToSecs td =
+    (fromIntegral $ tdSec td) +
+    60 * ((fromIntegral $ tdMin td) +
+          60 * ((fromIntegral $ tdHour td) +
+                24 * ((fromIntegral $ tdDay td) +
+                      30 * ((fromIntegral $ tdMonth td) +
+                            365 * (fromIntegral $ tdYear td)))))
diff --git a/Database/HDBC/Utils.hs b/Database/HDBC/Utils.hs
new file mode 100644
--- /dev/null
+++ b/Database/HDBC/Utils.hs
@@ -0,0 +1,209 @@
+-- #hide
+{-
+Copyright (C) 2005 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
+-}
+
+{- |
+   Module     : Database.HDBC.Utils
+   Copyright  : Copyright (C) 2005 John Goerzen
+   License    : GNU LGPL, version 2.1 or above
+
+   Maintainer : John Goerzen <jgoerzen@complete.org>
+   Stability  : provisional
+   Portability: portable
+
+Internal module -- not exported directly.
+
+Everything in here is expoerted by "Database.HDBC".  Please use -- and read --
+"Database.HDBC" directly.
+
+Written by John Goerzen, jgoerzen\@complete.org
+-}
+
+module Database.HDBC.Utils where
+import Database.HDBC.Types
+import qualified Data.Map as Map
+import Control.Exception
+import Data.Char
+import Data.Dynamic
+import System.IO.Unsafe
+
+{- | Execute the given IO action.
+
+If it raises a 'SqlError', then execute the supplied handler and return its
+return value.  Otherwise, proceed as normal. -}
+catchSql :: IO a -> (SqlError -> IO a) -> IO a
+catchSql = catchDyn
+
+{- | Like 'catchSql', with the order of arguments reversed. -}
+handleSql :: (SqlError -> IO a) -> IO a -> IO a
+handleSql h f = catchDyn f h
+
+{- | Given an Exception, return Just SqlError if it was an SqlError, or Nothing
+otherwise. Useful with functions like catchJust. -}
+sqlExceptions :: Exception -> Maybe SqlError
+sqlExceptions e = dynExceptions e >>= fromDynamic
+
+{- | Catches 'SqlError's, and re-raises them as IO errors with fail.
+Useful if you don't care to catch SQL errors, but want to see a sane
+error message if one happens.  One would often use this as a high-level
+wrapper around SQL calls. -}
+handleSqlError :: IO a -> IO a
+handleSqlError action =
+    catchSql action handler
+    where handler e = fail ("SQL error: " ++ show e)
+
+{- | Like 'run', but take a list of Maybe Strings instead of 'SqlValue's. -}
+sRun :: Connection -> String -> [Maybe String] -> IO Integer
+sRun conn qry lst =
+    run conn qry (map toSql lst)
+
+{- | Like 'execute', but take a list of Maybe Strings instead of
+   'SqlValue's. -}
+sExecute :: Statement -> [Maybe String] -> IO Integer
+sExecute sth lst = execute sth (map toSql lst)
+
+{- | Like 'executeMany', but take a list of Maybe Strings instead of
+   'SqlValue's. -}
+sExecuteMany :: Statement -> [[Maybe String]] -> IO ()
+sExecuteMany sth lst = 
+    executeMany sth (map (map toSql) lst)
+
+{- | Like 'fetchRow', but return a list of Maybe Strings instead of
+   'SqlValue's. -}
+sFetchRow :: Statement -> IO (Maybe [Maybe String])
+sFetchRow sth =
+    do res <- fetchRow sth
+       case res of
+         Nothing -> return Nothing
+         Just x -> return $ Just $ map fromSql x
+
+{- | Execute some code.  If any uncaught exception occurs, run
+'rollback' and re-raise it.  Otherwise, run 'commit' and return.
+
+This function, therefore, encapsulates the logical property that a transaction
+is all about: all or nothing.
+
+The 'Connection' object passed in is passed directly to the specified
+function as a convenience.
+
+This function traps /all/ uncaught exceptions, not just SqlErrors.  Therefore,
+you will get a rollback for any exception that you don't handle.  That's
+probably what you want anyway.
+
+Since all operations in HDBC are done in a transaction, this function doesn't
+issue an explicit \"begin\" to the server.  You should ideally have
+called 'Database.HDBC.commit' or 'Database.HDBC.rollback' before
+calling this function.  If you haven't, this function will commit or rollback
+more than just the changes made in the included action.
+
+If there was an error while running 'rollback', this error will not be
+reported since the original exception will be propogated back.  (You'd probably
+like to know about the root cause for all of this anyway.)  Feedback
+on this behavior is solicited.
+-}
+withTransaction :: Connection -> (Connection -> IO a) -> IO a
+withTransaction conn func =
+    do r <- try (func conn)
+       case r of
+         Right x -> do commit conn
+                       return x
+         Left e -> 
+             do try (rollback conn) -- Discard any exception here
+                throw e
+
+{- | Lazily fetch all rows from an executed 'Statement'.
+
+You can think of this as hGetContents applied to a database result set.
+
+The result of this is a lazy list, and each new row will be read, lazily, from
+the database as the list is processed.
+
+When you have exhausted the list, the 'Statement' will be 'finish'ed.
+
+Please note that the careless use of this function can lead to some unpleasant
+behavior.  In particular, if you have not consumed the entire list, then
+attempt to 'finish' or re-execute the statement, and then attempt to consume
+more elements from the list, the result will almost certainly not be what
+you want.
+
+But then, similar caveats apply with hGetContents.
+
+Bottom line: this is a very convenient abstraction; use it wisely.
+-}
+fetchAllRows :: Statement -> IO [[SqlValue]]
+fetchAllRows sth = unsafeInterleaveIO $
+    do row <- fetchRow sth
+       case row of
+         Nothing -> return []
+         Just x -> do remainder <- fetchAllRows sth
+                      return (x : remainder)
+
+{- | Like 'fetchAllRows', but return Maybe Strings instead of 'SqlValue's. -}
+sFetchAllRows :: Statement -> IO [[Maybe String]]
+sFetchAllRows sth =
+    do res <- fetchAllRows sth
+       return $ map (map fromSql) res
+
+{- | Like 'fetchRow', but instead of returning a list, return an association
+list from column name to value.
+
+The keys of the column names are lowercase versions of the data returned
+by 'getColumnNames'.  Please heed the warnings there.  Additionally,
+results are undefined if multiple columns are returned with identical names.
+-}
+fetchRowAL :: Statement -> IO (Maybe [(String, SqlValue)])
+fetchRowAL sth =
+    do row <- fetchRow sth
+       case row of
+        Nothing -> return Nothing
+        Just r -> do names_raw <- getColumnNames sth
+                     let names = map (map toLower) names_raw
+                     return $ Just $ zip names r
+
+{- | Similar to 'fetchRowAL', but return a Map instead of an association list.
+-}
+fetchRowMap :: Statement -> IO (Maybe (Map.Map String SqlValue))
+fetchRowMap sth = 
+    do r <- fetchRowAL sth
+       case r of
+              Nothing -> return Nothing
+              Just x -> return $ Just $ Map.fromList x
+
+{- | Like 'fetchAllRows', but instead of returning a list for each
+row, return an association list for each row, from column name to value.
+
+See 'fetchRowAL' for more details. -}
+fetchAllRowsAL :: Statement -> IO [[(String, SqlValue)]]
+fetchAllRowsAL sth =
+    do names_raw <- getColumnNames sth
+       let names = map (map toLower) names_raw
+       rows <- fetchAllRows sth
+       return $ map (zip names) rows
+
+{- | Like 'fetchAllRowsAL', but return a list of Maps instead of a list of
+association lists. -}
+fetchAllRowsMap :: Statement -> IO [Map.Map String SqlValue]
+fetchAllRowsMap sth = fetchAllRowsAL sth >>= (return . map Map.fromList)
+
+{- | A quick way to do a query.  Similar to preparing, executing, and
+then calling 'fetchAllRows' on a statement. -}
+quickQuery :: Connection -> String -> [SqlValue] -> IO [[SqlValue]]
+quickQuery conn qrystr args =
+    do sth <- prepare conn qrystr
+       execute sth args
+       fetchAllRows sth
diff --git a/HDBC.cabal b/HDBC.cabal
new file mode 100644
--- /dev/null
+++ b/HDBC.cabal
@@ -0,0 +1,15 @@
+Name: HDBC
+Version: 1.0.1
+License: LGPL
+Maintainer: John Goerzen <jgoerzen@complete.org>
+Stability: Alpha
+Copyright: Copyright (c) 2005-2006 John Goerzen
+Exposed-Modules: Database.HDBC, Database.HDBC.Types, Database.HDBC.DriverUtils,
+  Database.HDBC.ColTypes
+Other-Modules: Database.HDBC.Utils
+--Extensions: ExistentialQuantification, AllowOverlappingInstances,
+--    AllowUndecidableInstances
+Extensions: ExistentialQuantification
+Build-Depends: base, mtl
+GHC-Options: -O2 -Wall
+
diff --git a/Makefile b/Makefile
new file mode 100644
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,11 @@
+all:
+	@echo "Please use Cabal to build this package; not make."
+
+.PHONY: doc
+doc:
+	-rm -r doc
+	mkdir doc
+	haddock -h -t 'Haskell Database Connectivity (HDBC)' \
+		-D doc/hdbc.interface \
+		-o doc `find Database -name "*.hs"`
+
diff --git a/Memory.txt b/Memory.txt
new file mode 100644
--- /dev/null
+++ b/Memory.txt
@@ -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.
diff --git a/README.txt b/README.txt
new file mode 100644
--- /dev/null
+++ b/README.txt
@@ -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
diff --git a/Setup.lhs b/Setup.lhs
new file mode 100644
--- /dev/null
+++ b/Setup.lhs
@@ -0,0 +1,6 @@
+#!/usr/bin/env runhugs
+
+> import Distribution.Simple
+
+> main = defaultMain
+
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,15 @@
+hdbc for Debian
+---------------
+
+To use HDBC in your programs, you'll need a driver package as well.
+
+apt-cache search hdbc will give you a convenient list of the HDBC drivers
+available in Debian.
+
+To use HDBC in GHC, you'll need to use -package HDBC on your command line,
+or, with Cabal, list a Build-Depends on HDBC.
+
+You can find documentation for the HDBC API under 
+/usr/share/doc/libhdbc-ghc6-dev or /usr/share/doc/libhdbc-hugs.
+
+ -- John Goerzen <jgoerzen@complete.org>, Tue Dec 27 10:40:56 2005
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,39 @@
+hdbc (1.0.1) unstable; urgency=low
+
+  * Now accept T and F for True and False from the underlying database
+    layer -- compatibility with PostgreSQL
+
+ -- John Goerzen <jgoerzen@complete.org>  Sat, 22 Jul 2006 07:11:08 -0500
+
+hdbc (1.0.0) unstable; urgency=low
+
+  * Blessing this version as 1.0.0.  Whee!
+
+ -- John Goerzen <jgoerzen@complete.org>  Thu, 29 Jun 2006 18:23:03 -0500
+
+hdbc (0.99.3) unstable; urgency=low
+
+  * [bringert] Better error messages when fromSql encounters
+    data it doesn't understand
+  * Rebuilt for GHC 6.4.2
+
+ -- John Goerzen <jgoerzen@complete.org>  Wed, 28 Jun 2006 15:00:09 -0500
+
+hdbc (0.99.2) unstable; urgency=low
+
+  * New call dbTransactionSupport
+
+ -- John Goerzen <jgoerzen@complete.org>  Tue, 28 Mar 2006 04:57:00 -0600
+
+hdbc (0.99.1) unstable; urgency=low
+
+  * Release 0.99.1.  New features include generalized memory
+    management support and column metadata.
+
+ -- John Goerzen <jgoerzen@complete.org>  Mon, 27 Mar 2006 18:54:24 -0600
+
+hdbc (0.99.0) unstable; urgency=low
+
+  * Initial Release.  Closes: #344913.
+
+ -- John Goerzen <jgoerzen@complete.org>  Tue, 27 Dec 2005 10:22:53 -0600
diff --git a/debian/compat b/debian/compat
new file mode 100644
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1,1 @@
+4
diff --git a/debian/control b/debian/control
new file mode 100644
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,41 @@
+Source: hdbc
+Priority: optional
+Maintainer: John Goerzen <jgoerzen@complete.org>
+Build-Depends: debhelper (>= 4.0.0), ghc6 (>= 6.4.2), ghc6 (<< 6.4.2-999), haskell-devscripts (>= 0.5.6), cpphs, haddock
+Build-Depends-Indep: debhelper (>= 4.0.0), haddock, hugs (>= 98.200503.08), haskell-devscripts (>= 0.5.6), ghc6 (>= 6.4.2)
+Standards-Version: 3.6.2
+Section: libs
+
+Package: libghc6-hdbc-dev
+Section: libdevel
+Architecture: any
+Depends: ${haskell:Depends}
+Suggests: libghc6-hdbc-postgresql-dev | libghc6-hdbc-sqlite3-dev, libghc6-hdbc-missingh-dev
+Description: Haskell Database Connectivity, GHC6 package
+ HDBC provides an abstraction layer between Haskell programs and SQL
+ relational databases. This lets you write database code once, in
+ Haskell, and have it work with any number of backend SQL databases
+ (MySQL, Oracle, PostgreSQL, ODBC-compliant databases, etc.)
+ .
+ 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.
+ .
+ To use HDBC, you'll need both this package, and a driver package such
+ as libghc6-hdbc-postgresql-dev.
+
+Package: libhugs-hdbc
+Section: libs
+Architecture: all
+Depends: ${haskell:Depends}
+Description: Haskell Database Connectivity, Hugs package
+ HDBC provides an abstraction layer between Haskell programs and SQL
+ relational databases. This lets you write database code once, in
+ Haskell, and have it work with any number of backend SQL databases
+ (MySQL, Oracle, PostgreSQL, ODBC-compliant databases, etc.)
+ .
+ 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.
+ .
+ To use HDBC, you'll need both this package, and a driver package such
+ as libhugs-hdbc-postgresql.
+
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,27 @@
+This is hdbc, written and maintained by John Goerzen <jgoerzen@complete.org>
+on Tue, 27 Dec 2005 10:22:53 -0600.
+
+The original source can always be found at:
+	ftp://ftp.debian.org/dists/unstable/main/source/
+
+The Darcs repository for this program can be accessed with:
+   darcs get --partial http://darcs.complete.org/hdbc
+
+Copyright (C) 2005-2006 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
+
+On Debian systems, the complete text of the GNU Lesser General
+Public License can be found in `/usr/share/common-licenses/LGPL'.
diff --git a/debian/hdbc.doc-base.EX b/debian/hdbc.doc-base.EX
new file mode 100644
--- /dev/null
+++ b/debian/hdbc.doc-base.EX
@@ -0,0 +1,22 @@
+Document: hdbc
+Title: Debian hdbc Manual
+Author: <insert document author here>
+Abstract: This manual describes what hdbc is
+ and how it can be used to
+ manage online manuals on Debian systems.
+Section: unknown
+
+Format: debiandoc-sgml
+Files: /usr/share/doc/hdbc/hdbc.sgml.gz
+
+Format: postscript
+Files: /usr/share/doc/hdbc/hdbc.ps.gz
+
+Format: text
+Files: /usr/share/doc/hdbc/hdbc.text.gz
+
+Format: HTML
+Index: /usr/share/doc/hdbc/html/index.html
+Files: /usr/share/doc/hdbc/html/*.html
+
+  
diff --git a/debian/rules b/debian/rules
new file mode 100644
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,147 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+# shared library versions, option 1
+version=2.0.5
+major=2
+# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
+#version=`ls src/.libs/lib*.so.* | \
+# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
+#major=`ls src/.libs/lib*.so.* | \
+# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	# Add here commands to configure the package.
+
+	touch configure-stamp
+
+
+build: build-stamp
+build-stamp: configure-stamp 
+	dh_testdir
+
+	# Add here commands to compile the package.
+	#$(MAKE)
+
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+
+	# Add here commands to clean up after the build process.
+	#-$(MAKE) clean
+	-./setup clean
+	-rm -rf setup Setup.hi Setup.ho Setup.o .*config* dist
+
+	dh_clean 
+
+install-a: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k 
+	dh_installdirs
+
+	# Add here commands to install the package into debian/tmp
+	#$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+	dh_haskell -a
+
+install-i: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k 
+	dh_installdirs
+
+	# Add here commands to install the package into debian/tmp
+	#$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+	dh_haskell -i
+
+
+
+
+# Build architecture-independent files here.
+binary-indep: build install-i
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs -i
+	dh_installdocs -i README.txt doc/*
+	dh_installexamples -i
+#	dh_install
+#	dh_installmenu
+#	dh_installdebconf	
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_installinit
+#	dh_installcron
+#	dh_installinfo
+	dh_installman -i
+	dh_link -i
+	dh_strip -i
+	dh_compress -i
+	dh_fixperms -i
+#	dh_perl
+#	dh_python
+#	dh_makeshlibs
+	dh_installdeb -i
+	dh_shlibdeps -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+
+# Build architecture-dependent files here.
+binary-arch: build install-a
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs -a
+	dh_installdocs -a README.txt doc/*
+	dh_installexamples -a
+#	dh_install
+#	dh_installmenu
+#	dh_installdebconf	
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_installinit
+#	dh_installcron
+#	dh_installinfo
+	dh_installman -a
+	dh_link -a
+	dh_strip -a
+	dh_compress -a
+	dh_fixperms -a
+#	dh_perl
+#	dh_python
+#	dh_makeshlibs
+	dh_installdeb -a
+	dh_shlibdeps -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/doc/Database-HDBC-ColTypes.html b/doc/Database-HDBC-ColTypes.html
new file mode 100644
--- /dev/null
+++ b/doc/Database-HDBC-ColTypes.html
@@ -0,0 +1,1232 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Database.HDBC.ColTypes</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+>Haskell Database Connectivity (HDBC)</TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Database.HDBC.ColTypes</FONT
+></TD
+><TD ALIGN="right"
+><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="infohead"
+>Portability</TD
+><TD CLASS="infoval"
+>portable</TD
+></TR
+><TR
+><TD CLASS="infohead"
+>Stability</TD
+><TD CLASS="infoval"
+>provisional</TD
+></TR
+><TR
+><TD CLASS="infohead"
+>Maintainer</TD
+><TD CLASS="infoval"
+>John Goerzen &lt;jgoerzen@complete.org&gt;</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Description</TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Definitions of, and utilities for, specifying what type of data is represented
+by a column.
+</P
+><P
+>Written by John Goerzen, jgoerzen@complete.org
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3ASqlColDesc"
+>SqlColDesc</A
+>  = <A HREF="#v%3ASqlColDesc"
+>SqlColDesc</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AcolType"
+>colType</A
+> :: <A HREF="Database-HDBC-ColTypes.html#t%3ASqlTypeId"
+>SqlTypeId</A
+></TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AcolSize"
+>colSize</A
+> :: (Maybe Int)</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AcolOctetLength"
+>colOctetLength</A
+> :: (Maybe Int)</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AcolDecDigits"
+>colDecDigits</A
+> :: (Maybe Int)</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AcolNullable"
+>colNullable</A
+> :: (Maybe Bool)</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3ASqlTypeId"
+>SqlTypeId</A
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>= <A HREF="#v%3ASqlCharT"
+>SqlCharT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlVarCharT"
+>SqlVarCharT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlLongVarCharT"
+>SqlLongVarCharT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlWCharT"
+>SqlWCharT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlWVarCharT"
+>SqlWVarCharT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlWLongVarCharT"
+>SqlWLongVarCharT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlDecimalT"
+>SqlDecimalT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlNumericT"
+>SqlNumericT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlSmallIntT"
+>SqlSmallIntT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlIntegerT"
+>SqlIntegerT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlRealT"
+>SqlRealT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlFloatT"
+>SqlFloatT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlDoubleT"
+>SqlDoubleT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlBitT"
+>SqlBitT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlTinyIntT"
+>SqlTinyIntT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlBigIntT"
+>SqlBigIntT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlBinaryT"
+>SqlBinaryT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlVarBinaryT"
+>SqlVarBinaryT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlLongVarBinaryT"
+>SqlLongVarBinaryT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlDateT"
+>SqlDateT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlTimeT"
+>SqlTimeT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlTimestampT"
+>SqlTimestampT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlUTCDateTimeT"
+>SqlUTCDateTimeT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlUTCTimeT"
+>SqlUTCTimeT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlIntervalT"
+>SqlIntervalT</A
+> <A HREF="Database-HDBC-ColTypes.html#t%3ASqlInterval"
+>SqlInterval</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlGUIDT"
+>SqlGUIDT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlUnknownT"
+>SqlUnknownT</A
+> String</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3ASqlInterval"
+>SqlInterval</A
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>= <A HREF="#v%3ASqlIntervalMonthT"
+>SqlIntervalMonthT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlIntervalYearT"
+>SqlIntervalYearT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlIntervalYearToMonthT"
+>SqlIntervalYearToMonthT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlIntervalDayT"
+>SqlIntervalDayT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlIntervalHourT"
+>SqlIntervalHourT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlIntervalMinuteT"
+>SqlIntervalMinuteT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlIntervalSecondT"
+>SqlIntervalSecondT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlIntervalDayToHourT"
+>SqlIntervalDayToHourT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlIntervalDayToMinuteT"
+>SqlIntervalDayToMinuteT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlIntervalDayToSecondT"
+>SqlIntervalDayToSecondT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlIntervalHourToMinuteT"
+>SqlIntervalHourToMinuteT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlIntervalHourToSecondT"
+>SqlIntervalHourToSecondT</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlIntervalMinuteToSecondT"
+>SqlIntervalMinuteToSecondT</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3ASqlColDesc"
+></A
+><B
+>SqlColDesc</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+><P
+>The description of a column.
+</P
+><P
+>Fields are Nothing if the database backend cannot supply the
+requested information.
+</P
+><P
+>The colSize field works like this:
+</P
+><P
+>For character types, the maximum width of the column.  For numeric
+types, the total number of digits allowed.  See the ODBC manual for more.
+</P
+><P
+>The colOctetLength field is defined for character and binary types, and
+gives the number of bytes the column requires, regardless of encoding.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlColDesc"
+></A
+><B
+>SqlColDesc</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AcolType"
+></A
+><B
+>colType</B
+> :: <A HREF="Database-HDBC-ColTypes.html#t%3ASqlTypeId"
+>SqlTypeId</A
+></TD
+><TD CLASS="rdoc"
+>Type of data stored here
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AcolSize"
+></A
+><B
+>colSize</B
+> :: (Maybe Int)</TD
+><TD CLASS="rdoc"
+>The size of a column
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AcolOctetLength"
+></A
+><B
+>colOctetLength</B
+> :: (Maybe Int)</TD
+><TD CLASS="rdoc"
+>The maximum size in octets
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AcolDecDigits"
+></A
+><B
+>colDecDigits</B
+> :: (Maybe Int)</TD
+><TD CLASS="rdoc"
+>Digits to the right of the period
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AcolNullable"
+></A
+><B
+>colNullable</B
+> :: (Maybe Bool)</TD
+><TD CLASS="rdoc"
+>Whether NULL is acceptable
+</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:SqlColDesc')" ALT="show/hide"
+> Instances</TD
+></TR
+><TR
+><TD CLASS="body"
+><DIV ID="i:SqlColDesc" STYLE="display:block;"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>Eq <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"
+>SqlColDesc</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>Read <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"
+>SqlColDesc</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>Show <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"
+>SqlColDesc</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>Typeable <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"
+>SqlColDesc</A
+></TD
+></TR
+></TABLE
+></DIV
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3ASqlTypeId"
+></A
+><B
+>SqlTypeId</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+><P
+>The type identifier for a given column. 
+</P
+><P
+>This represents the type of data stored in the column in the underlying
+SQL engine.  It does not form the entire column type; see <TT
+><A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"
+>SqlColDesc</A
+></TT
+> for
+that.
+</P
+><P
+>These types correspond mainly to those defined by ODBC. 
+</P
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlCharT"
+></A
+><B
+>SqlCharT</B
+></TD
+><TD CLASS="rdoc"
+>Fixed-width character strings
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlVarCharT"
+></A
+><B
+>SqlVarCharT</B
+></TD
+><TD CLASS="rdoc"
+>Variable-width character strings
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlLongVarCharT"
+></A
+><B
+>SqlLongVarCharT</B
+></TD
+><TD CLASS="rdoc"
+>Variable-width character strings, max length implementation dependant
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlWCharT"
+></A
+><B
+>SqlWCharT</B
+></TD
+><TD CLASS="rdoc"
+>Fixed-width Unicode strings
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlWVarCharT"
+></A
+><B
+>SqlWVarCharT</B
+></TD
+><TD CLASS="rdoc"
+>Variable-width Unicode strings
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlWLongVarCharT"
+></A
+><B
+>SqlWLongVarCharT</B
+></TD
+><TD CLASS="rdoc"
+>Variable-width Unicode strings, max length implementation dependant
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlDecimalT"
+></A
+><B
+>SqlDecimalT</B
+></TD
+><TD CLASS="rdoc"
+>Signed exact values
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlNumericT"
+></A
+><B
+>SqlNumericT</B
+></TD
+><TD CLASS="rdoc"
+>Signed exact integer values
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlSmallIntT"
+></A
+><B
+>SqlSmallIntT</B
+></TD
+><TD CLASS="rdoc"
+>16-bit integer values
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlIntegerT"
+></A
+><B
+>SqlIntegerT</B
+></TD
+><TD CLASS="rdoc"
+>32-bit integer values
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlRealT"
+></A
+><B
+>SqlRealT</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlFloatT"
+></A
+><B
+>SqlFloatT</B
+></TD
+><TD CLASS="rdoc"
+>Signed inexact floating-point values
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlDoubleT"
+></A
+><B
+>SqlDoubleT</B
+></TD
+><TD CLASS="rdoc"
+>Signed inexact double-precision values
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlBitT"
+></A
+><B
+>SqlBitT</B
+></TD
+><TD CLASS="rdoc"
+>A single bit
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlTinyIntT"
+></A
+><B
+>SqlTinyIntT</B
+></TD
+><TD CLASS="rdoc"
+>8-bit integer values
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlBigIntT"
+></A
+><B
+>SqlBigIntT</B
+></TD
+><TD CLASS="rdoc"
+>64-bit integer values
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlBinaryT"
+></A
+><B
+>SqlBinaryT</B
+></TD
+><TD CLASS="rdoc"
+>Fixed-length binary data
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlVarBinaryT"
+></A
+><B
+>SqlVarBinaryT</B
+></TD
+><TD CLASS="rdoc"
+>Variable-length binary data
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlLongVarBinaryT"
+></A
+><B
+>SqlLongVarBinaryT</B
+></TD
+><TD CLASS="rdoc"
+>Variable-length binary data, max length implementation dependant
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlDateT"
+></A
+><B
+>SqlDateT</B
+></TD
+><TD CLASS="rdoc"
+>A date
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlTimeT"
+></A
+><B
+>SqlTimeT</B
+></TD
+><TD CLASS="rdoc"
+>A time
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlTimestampT"
+></A
+><B
+>SqlTimestampT</B
+></TD
+><TD CLASS="rdoc"
+>Combined date and time
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlUTCDateTimeT"
+></A
+><B
+>SqlUTCDateTimeT</B
+></TD
+><TD CLASS="rdoc"
+>UTC date/time
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlUTCTimeT"
+></A
+><B
+>SqlUTCTimeT</B
+></TD
+><TD CLASS="rdoc"
+>UTC time
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlIntervalT"
+></A
+><B
+>SqlIntervalT</B
+> <A HREF="Database-HDBC-ColTypes.html#t%3ASqlInterval"
+>SqlInterval</A
+></TD
+><TD CLASS="rdoc"
+>A time or date difference
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlGUIDT"
+></A
+><B
+>SqlGUIDT</B
+></TD
+><TD CLASS="rdoc"
+>Global unique identifier
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlUnknownT"
+></A
+><B
+>SqlUnknownT</B
+> String</TD
+><TD CLASS="rdoc"
+>A type not represented here; implementation-specific information in the String
+</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:SqlTypeId')" ALT="show/hide"
+> Instances</TD
+></TR
+><TR
+><TD CLASS="body"
+><DIV ID="i:SqlTypeId" STYLE="display:block;"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>Eq <A HREF="Database-HDBC-ColTypes.html#t%3ASqlTypeId"
+>SqlTypeId</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>Read <A HREF="Database-HDBC-ColTypes.html#t%3ASqlTypeId"
+>SqlTypeId</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>Show <A HREF="Database-HDBC-ColTypes.html#t%3ASqlTypeId"
+>SqlTypeId</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>Typeable <A HREF="Database-HDBC-ColTypes.html#t%3ASqlTypeId"
+>SqlTypeId</A
+></TD
+></TR
+></TABLE
+></DIV
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3ASqlInterval"
+></A
+><B
+>SqlInterval</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+>The different types of intervals in SQL. 
+</TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlIntervalMonthT"
+></A
+><B
+>SqlIntervalMonthT</B
+></TD
+><TD CLASS="rdoc"
+>Difference in months
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlIntervalYearT"
+></A
+><B
+>SqlIntervalYearT</B
+></TD
+><TD CLASS="rdoc"
+>Difference in years
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlIntervalYearToMonthT"
+></A
+><B
+>SqlIntervalYearToMonthT</B
+></TD
+><TD CLASS="rdoc"
+>Difference in years+months
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlIntervalDayT"
+></A
+><B
+>SqlIntervalDayT</B
+></TD
+><TD CLASS="rdoc"
+>Difference in days
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlIntervalHourT"
+></A
+><B
+>SqlIntervalHourT</B
+></TD
+><TD CLASS="rdoc"
+>Difference in hours
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlIntervalMinuteT"
+></A
+><B
+>SqlIntervalMinuteT</B
+></TD
+><TD CLASS="rdoc"
+>Difference in minutes
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlIntervalSecondT"
+></A
+><B
+>SqlIntervalSecondT</B
+></TD
+><TD CLASS="rdoc"
+>Difference in seconds
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlIntervalDayToHourT"
+></A
+><B
+>SqlIntervalDayToHourT</B
+></TD
+><TD CLASS="rdoc"
+>Difference in days+hours
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlIntervalDayToMinuteT"
+></A
+><B
+>SqlIntervalDayToMinuteT</B
+></TD
+><TD CLASS="rdoc"
+>Difference in days+minutes
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlIntervalDayToSecondT"
+></A
+><B
+>SqlIntervalDayToSecondT</B
+></TD
+><TD CLASS="rdoc"
+>Difference in days+seconds
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlIntervalHourToMinuteT"
+></A
+><B
+>SqlIntervalHourToMinuteT</B
+></TD
+><TD CLASS="rdoc"
+>Difference in hours+minutes
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlIntervalHourToSecondT"
+></A
+><B
+>SqlIntervalHourToSecondT</B
+></TD
+><TD CLASS="rdoc"
+>Difference in hours+seconds
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlIntervalMinuteToSecondT"
+></A
+><B
+>SqlIntervalMinuteToSecondT</B
+></TD
+><TD CLASS="rdoc"
+>Difference in minutes+seconds
+</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:SqlInterval')" ALT="show/hide"
+> Instances</TD
+></TR
+><TR
+><TD CLASS="body"
+><DIV ID="i:SqlInterval" STYLE="display:block;"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>Eq <A HREF="Database-HDBC-ColTypes.html#t%3ASqlInterval"
+>SqlInterval</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>Read <A HREF="Database-HDBC-ColTypes.html#t%3ASqlInterval"
+>SqlInterval</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>Show <A HREF="Database-HDBC-ColTypes.html#t%3ASqlInterval"
+>SqlInterval</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>Typeable <A HREF="Database-HDBC-ColTypes.html#t%3ASqlInterval"
+>SqlInterval</A
+></TD
+></TR
+></TABLE
+></DIV
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 0.7</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/doc/Database-HDBC-DriverUtils.html b/doc/Database-HDBC-DriverUtils.html
new file mode 100644
--- /dev/null
+++ b/doc/Database-HDBC-DriverUtils.html
@@ -0,0 +1,253 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Database.HDBC.DriverUtils</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+>Haskell Database Connectivity (HDBC)</TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Database.HDBC.DriverUtils</FONT
+></TD
+><TD ALIGN="right"
+><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="infohead"
+>Portability</TD
+><TD CLASS="infoval"
+>portable</TD
+></TR
+><TR
+><TD CLASS="infohead"
+>Stability</TD
+><TD CLASS="infoval"
+>provisional</TD
+></TR
+><TR
+><TD CLASS="infohead"
+>Maintainer</TD
+><TD CLASS="infoval"
+>John Goerzen &lt;jgoerzen@complete.org&gt;</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Description</TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Utilities for database backend drivers.
+</P
+><P
+>Please note: this module is intended for authors of database driver libraries
+only.  Authors of applications using HDBC should use <TT
+><A HREF="Database.html#t%3AHDBC"
+>HDBC</A
+></TT
+>
+exclusively.
+</P
+><P
+>Written by John Goerzen, jgoerzen@complete.org
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>type</SPAN
+> <A HREF="#t%3AChildList"
+>ChildList</A
+> = MVar [Weak <A HREF="Database-HDBC-Types.html#t%3AStatement"
+>Statement</A
+>]</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AcloseAllChildren"
+>closeAllChildren</A
+> :: <A HREF="Database-HDBC-DriverUtils.html#t%3AChildList"
+>ChildList</A
+> -&gt; IO ()</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AaddChild"
+>addChild</A
+> :: <A HREF="Database-HDBC-DriverUtils.html#t%3AChildList"
+>ChildList</A
+> -&gt; <A HREF="Database-HDBC-Types.html#t%3AStatement"
+>Statement</A
+> -&gt; IO ()</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>type</SPAN
+> <A NAME="t%3AChildList"
+></A
+><B
+>ChildList</B
+> = MVar [Weak <A HREF="Database-HDBC-Types.html#t%3AStatement"
+>Statement</A
+>]</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AcloseAllChildren"
+></A
+><B
+>closeAllChildren</B
+> :: <A HREF="Database-HDBC-DriverUtils.html#t%3AChildList"
+>ChildList</A
+> -&gt; IO ()</TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Close all children.  Intended to be called by the <TT
+><A HREF="Database-HDBC-Types.html#v%3Adisconnect"
+>disconnect</A
+></TT
+> function
+in <TT
+><A HREF="Database-HDBC-Types.html#t%3AConnection"
+>Connection</A
+></TT
+>. 
+</P
+><P
+>There may be a potential race condition wherein a call to newSth at the same
+time as a call to this function may result in the new child not being closed.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AaddChild"
+></A
+><B
+>addChild</B
+> :: <A HREF="Database-HDBC-DriverUtils.html#t%3AChildList"
+>ChildList</A
+> -&gt; <A HREF="Database-HDBC-Types.html#t%3AStatement"
+>Statement</A
+> -&gt; IO ()</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Adds a new child to the existing list.  Also takes care of registering
+a finalizer for it, to remove it from the list when possible. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 0.7</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/doc/Database-HDBC-Types.html b/doc/Database-HDBC-Types.html
new file mode 100644
--- /dev/null
+++ b/doc/Database-HDBC-Types.html
@@ -0,0 +1,1799 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Database.HDBC.Types</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+>Haskell Database Connectivity (HDBC)</TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Database.HDBC.Types</FONT
+></TD
+><TD ALIGN="right"
+><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="infohead"
+>Portability</TD
+><TD CLASS="infoval"
+>portable</TD
+></TR
+><TR
+><TD CLASS="infohead"
+>Stability</TD
+><TD CLASS="infoval"
+>provisional</TD
+></TR
+><TR
+><TD CLASS="infohead"
+>Maintainer</TD
+><TD CLASS="infoval"
+>John Goerzen &lt;jgoerzen@complete.org&gt;</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Description</TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Types for HDBC.
+</P
+><P
+>Please note: this module is intended for authors of database driver libraries
+only.  Authors of applications using HDBC should use <TT
+><A HREF="Database.html#t%3AHDBC"
+>HDBC</A
+></TT
+>
+exclusively.
+</P
+><P
+>Written by John Goerzen, jgoerzen@complete.org
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AConnection"
+>Connection</A
+>  = <A HREF="#v%3AConnection"
+>Connection</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Adisconnect"
+>disconnect</A
+> :: (IO ())</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Acommit"
+>commit</A
+> :: (IO ())</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Arollback"
+>rollback</A
+> :: (IO ())</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Arun"
+>run</A
+> :: (String -&gt; [<A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>SqlValue</A
+>] -&gt; IO Integer)</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Aprepare"
+>prepare</A
+> :: (String -&gt; IO <A HREF="Database-HDBC-Types.html#t%3AStatement"
+>Statement</A
+>)</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Aclone"
+>clone</A
+> :: (IO <A HREF="Database-HDBC-Types.html#t%3AConnection"
+>Connection</A
+>)</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AhdbcDriverName"
+>hdbcDriverName</A
+> :: String</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AhdbcClientVer"
+>hdbcClientVer</A
+> :: String</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AproxiedClientName"
+>proxiedClientName</A
+> :: String</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AproxiedClientVer"
+>proxiedClientVer</A
+> :: String</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AdbServerVer"
+>dbServerVer</A
+> :: String</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AdbTransactionSupport"
+>dbTransactionSupport</A
+> :: Bool</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AgetTables"
+>getTables</A
+> :: (IO [String])</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AdescribeTable"
+>describeTable</A
+> :: (String -&gt; IO [(String, <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"
+>SqlColDesc</A
+>)])</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AStatement"
+>Statement</A
+>  = <A HREF="#v%3AStatement"
+>Statement</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Aexecute"
+>execute</A
+> :: ([<A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>SqlValue</A
+>] -&gt; IO Integer)</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AexecuteMany"
+>executeMany</A
+> :: ([[<A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>SqlValue</A
+>]] -&gt; IO ())</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3Afinish"
+>finish</A
+> :: (IO ())</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AfetchRow"
+>fetchRow</A
+> :: (IO (Maybe [<A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>SqlValue</A
+>]))</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AgetColumnNames"
+>getColumnNames</A
+> :: (IO [String])</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AoriginalQuery"
+>originalQuery</A
+> :: String</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AdescribeResult"
+>describeResult</A
+> :: (IO [(String, <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"
+>SqlColDesc</A
+>)])</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3ASqlError"
+>SqlError</A
+>  = <A HREF="#v%3ASqlError"
+>SqlError</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AseState"
+>seState</A
+> :: String</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AseNativeError"
+>seNativeError</A
+> :: Int</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AseErrorMsg"
+>seErrorMsg</A
+> :: String</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> Show a =&gt; <A HREF="#t%3ASqlType"
+>SqlType</A
+> a  <SPAN CLASS="keyword"
+>where</SPAN
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AtoSql"
+>toSql</A
+> :: a -&gt; <A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>SqlValue</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AfromSql"
+>fromSql</A
+> :: <A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>SqlValue</A
+> -&gt; a</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AnToSql"
+>nToSql</A
+> :: Integral a =&gt; a -&gt; <A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>SqlValue</A
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AiToSql"
+>iToSql</A
+> :: Int -&gt; <A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>SqlValue</A
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3ASqlValue"
+>SqlValue</A
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>= <A HREF="#v%3ASqlString"
+>SqlString</A
+> String</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlWord32"
+>SqlWord32</A
+> Word32</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlWord64"
+>SqlWord64</A
+> Word64</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlInt32"
+>SqlInt32</A
+> Int32</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlInt64"
+>SqlInt64</A
+> Int64</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlInteger"
+>SqlInteger</A
+> Integer</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlChar"
+>SqlChar</A
+> Char</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlBool"
+>SqlBool</A
+> Bool</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlDouble"
+>SqlDouble</A
+> Double</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlRational"
+>SqlRational</A
+> Rational</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlEpochTime"
+>SqlEpochTime</A
+> Integer</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlTimeDiff"
+>SqlTimeDiff</A
+> Integer</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlNull"
+>SqlNull</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Documentation</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AConnection"
+></A
+><B
+>Connection</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+><P
+>Main database handle object.
+</P
+><P
+>A <TT
+><A HREF="Database-HDBC-Types.html#t%3AConnection"
+>Connection</A
+></TT
+> object is created by specific functions in the module for an
+individual database.  That is, the connect function -- which creates
+this object -- is not standardized through the HDBC interface.
+</P
+><P
+>A connection is closed by a call to <TT
+><A HREF="Database-HDBC-Types.html#v%3Adisconnect"
+>disconnect</A
+></TT
+>.
+</P
+><P
+>A call to <TT
+><A HREF="Database-HDBC-Types.html#v%3Acommit"
+>commit</A
+></TT
+> is required to make sure that your changes get committed
+to the database.  In other words, HDBC has <EM
+>no support for autocommit</EM
+>, which
+we consider an outdated notion.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AConnection"
+></A
+><B
+>Connection</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Adisconnect"
+></A
+><B
+>disconnect</B
+> :: (IO ())</TD
+><TD CLASS="rdoc"
+><P
+>Disconnect from the remote database.
+</P
+><P
+>You do not need to explicitly close a Connection object, but you may do so if
+you so desire.  If you don't, the object will disconnect from the database
+in a sane way when it is garbage-collected.  However, a disconnection may
+raise an error, so you are encouraged to explicitly call <TT
+><A HREF="Database-HDBC-Types.html#v%3Adisconnect"
+>disconnect</A
+></TT
+>.  Also,
+garbage collection may not run when the program terminates, and some databases
+really like an explicit disconnect.
+</P
+><P
+>So, bottom line is, you're best off calling <TT
+><A HREF="Database-HDBC-Types.html#v%3Adisconnect"
+>disconnect</A
+></TT
+> directly, but the
+world won't end if you forget.
+</P
+><P
+>This function discards any data not committed already.  Database driver
+implementators should explicitly call <TT
+><A HREF="Database-HDBC-Types.html#v%3Arollback"
+>rollback</A
+></TT
+> if their databases don't
+do this automatically on disconnect.
+</P
+><P
+>Bad Things (TM) could happen if you call this while you have <TT
+><A HREF="Database-HDBC-Types.html#t%3AStatement"
+>Statement</A
+></TT
+>s 
+active.  In more precise language, the results in such situations are undefined
+and vary by database.  So don't do it.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Acommit"
+></A
+><B
+>commit</B
+> :: (IO ())</TD
+><TD CLASS="rdoc"
+><P
+>Commit any pending data to the database.
+</P
+><P
+>Required to make any changes take effect. 
+</P
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Arollback"
+></A
+><B
+>rollback</B
+> :: (IO ())</TD
+><TD CLASS="rdoc"
+>Roll back to the state the database was in prior to the
+                   last <TT
+><A HREF="Database-HDBC-Types.html#v%3Acommit"
+>commit</A
+></TT
+> or <TT
+><A HREF="Database-HDBC-Types.html#v%3Arollback"
+>rollback</A
+></TT
+>. 
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Arun"
+></A
+><B
+>run</B
+> :: (String -&gt; [<A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>SqlValue</A
+>] -&gt; IO Integer)</TD
+><TD CLASS="rdoc"
+>Execute a single SQL query.  Returns the number
+                   of rows modified (see <TT
+><A HREF="Database-HDBC-Types.html#v%3Aexecute"
+>execute</A
+></TT
+> for details).
+                   The second parameter is a list
+                   of replacement values, if any. 
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Aprepare"
+></A
+><B
+>prepare</B
+> :: (String -&gt; IO <A HREF="Database-HDBC-Types.html#t%3AStatement"
+>Statement</A
+>)</TD
+><TD CLASS="rdoc"
+><P
+>Prepares a statement for execution. 
+</P
+><P
+>Question marks in the statement will be replaced by
+                   positional parameters in a later call to <TT
+><A HREF="Database-HDBC-Types.html#v%3Aexecute"
+>execute</A
+></TT
+>.
+</P
+><P
+>Please note that, depending on the database
+                   and the driver, errors in your SQL may be raised
+                   either here or by <TT
+><A HREF="Database-HDBC-Types.html#v%3Aexecute"
+>execute</A
+></TT
+>.  Make sure you
+                   handle exceptions both places if necessary. 
+</P
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Aclone"
+></A
+><B
+>clone</B
+> :: (IO <A HREF="Database-HDBC-Types.html#t%3AConnection"
+>Connection</A
+>)</TD
+><TD CLASS="rdoc"
+><P
+>Create a new <TT
+><A HREF="Database-HDBC-Types.html#t%3AConnection"
+>Connection</A
+></TT
+> object, pointed at the same
+                   server as this object is.  This will generally establish
+                   a separate physical connection.
+</P
+><P
+>When you wish to establish multiple connections to a single
+                   server, the correct way to do so is to establish the
+                   first connection with the driver-specific connection
+                   function, and then clone it for each additional connection.
+</P
+><P
+>This can be important when a database doesn't provide
+                   much thread support itself, and the HDBC driver module
+                   must serialize access to a particular database.
+</P
+><P
+>This can also be a handy utility function whenever you
+                   need a separate connection to whatever database you are
+                   connected to already. 
+</P
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AhdbcDriverName"
+></A
+><B
+>hdbcDriverName</B
+> :: String</TD
+><TD CLASS="rdoc"
+>The name of the HDBC driver module for this connection.
+                   Ideally would be the same as the database name portion
+                   of the Cabal package name.  For instance, &quot;sqlite3&quot;
+                   or &quot;odbc&quot;.  This is the layer that is bound most
+                   tightly to HDBC. 
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AhdbcClientVer"
+></A
+><B
+>hdbcClientVer</B
+> :: String</TD
+><TD CLASS="rdoc"
+>The version of the C (or whatever) client library
+                   that the HDBC driver module is bound to.  The meaning
+                   of this is driver-specific.  For an ODBC or similar
+                   proxying driver, this should be the version of the
+                   ODBC library, not the eventual DB client driver. 
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AproxiedClientName"
+></A
+><B
+>proxiedClientName</B
+> :: String</TD
+><TD CLASS="rdoc"
+>In the case of a system such as ODBC, the name of
+                   the database client/server in use, if available.
+                   For others,
+                   identical to <TT
+><A HREF="Database-HDBC-Types.html#v%3AhdbcDriverName"
+>hdbcDriverName</A
+></TT
+>. 
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AproxiedClientVer"
+></A
+><B
+>proxiedClientVer</B
+> :: String</TD
+><TD CLASS="rdoc"
+>In the case of a system such as ODBC, the version of
+                   the database client in use, if available.  For others,
+                   identical to <TT
+><A HREF="Database-HDBC-Types.html#v%3AhdbcClientVer"
+>hdbcClientVer</A
+></TT
+>. This is the next layer
+                   out past the HDBC driver. 
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AdbServerVer"
+></A
+><B
+>dbServerVer</B
+> :: String</TD
+><TD CLASS="rdoc"
+>The version of the database server, if available. 
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AdbTransactionSupport"
+></A
+><B
+>dbTransactionSupport</B
+> :: Bool</TD
+><TD CLASS="rdoc"
+><P
+>Whether or not the current database supports transactions.
+                   If False, then <TT
+><A HREF="Database-HDBC-Types.html#v%3Acommit"
+>commit</A
+></TT
+> and <TT
+><A HREF="Database-HDBC-Types.html#v%3Arollback"
+>rollback</A
+></TT
+> should be expected
+                   to raise errors.
+</P
+><P
+>MySQL is the only commonly-used database that is known
+                   to not support transactions entirely.  Please see
+                   the MySQL notes in the ODBC driver for more information. 
+</P
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AgetTables"
+></A
+><B
+>getTables</B
+> :: (IO [String])</TD
+><TD CLASS="rdoc"
+><P
+>The names of all tables accessible by the current
+                   connection, excluding special meta-tables (system tables).
+</P
+><P
+>You should expect this to be returned in the same manner
+                   as a result from <TT
+><A HREF="Database-HDBC.html#v%3AfetchAllRows"
+>fetchAllRows</A
+></TT
+>.
+</P
+><P
+>All results should be converted to lowercase for you
+                   before you see them.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AdescribeTable"
+></A
+><B
+>describeTable</B
+> :: (String -&gt; IO [(String, <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"
+>SqlColDesc</A
+>)])</TD
+><TD CLASS="rdoc"
+><P
+>Obtain information about the columns in a specific
+                   table.  The String in the result
+                   set is the column name.
+</P
+><P
+>You should expect this to be returned in the same manner
+                   as a result from <TT
+><A HREF="Database-HDBC.html#v%3AfetchAllRows"
+>fetchAllRows</A
+></TT
+>.
+</P
+><P
+>All results should be converted to lowercase for you
+                   before you see them.
+</P
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AStatement"
+></A
+><B
+>Statement</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AStatement"
+></A
+><B
+>Statement</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Aexecute"
+></A
+><B
+>execute</B
+> :: ([<A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>SqlValue</A
+>] -&gt; IO Integer)</TD
+><TD CLASS="rdoc"
+><P
+>Execute the prepared statement, passing in the given positional
+        parameters (that should take the place of the question marks
+        in the call to <TT
+><A HREF="Database-HDBC-Types.html#v%3Aprepare"
+>prepare</A
+></TT
+>).
+</P
+><P
+>For non-SELECT queries, the return value is the number of
+        rows modified, if known.  If no rows were modified, you get 0.
+        If the value is unknown, you get -1.  All current HDBC drivers
+        support this function and should never return -1.
+</P
+><P
+>For SELECT queries, you will always get 0.
+</P
+><P
+>This function should automatically call finish() to finish the previous
+        execution, if necessary.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AexecuteMany"
+></A
+><B
+>executeMany</B
+> :: ([[<A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>SqlValue</A
+>]] -&gt; IO ())</TD
+><TD CLASS="rdoc"
+><P
+>Execute the query with many rows. 
+        The return value is the return value from the final row 
+        as if you had called <TT
+><A HREF="Database-HDBC-Types.html#v%3Aexecute"
+>execute</A
+></TT
+> on it.
+</P
+><P
+>Due to optimizations that are possible due to different
+        databases and driver designs, this can often be significantly
+        faster than using <TT
+><A HREF="Database-HDBC-Types.html#v%3Aexecute"
+>execute</A
+></TT
+> multiple times since queries
+        need to be compiled only once.
+</P
+><P
+>This is most useful for non-SELECT statements. 
+</P
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3Afinish"
+></A
+><B
+>finish</B
+> :: (IO ())</TD
+><TD CLASS="rdoc"
+>Abort a query in progress -- usually not needed. 
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AfetchRow"
+></A
+><B
+>fetchRow</B
+> :: (IO (Maybe [<A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>SqlValue</A
+>]))</TD
+><TD CLASS="rdoc"
+>Fetches one row from the DB.  Returns Nothing if there
+        are no more rows.  Will automatically call <TT
+><A HREF="Database-HDBC-Types.html#v%3Afinish"
+>finish</A
+></TT
+> when
+        the last row is read. 
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AgetColumnNames"
+></A
+><B
+>getColumnNames</B
+> :: (IO [String])</TD
+><TD CLASS="rdoc"
+><P
+>Returns a list of the column names in the result.
+        For maximum portability, you should not assume that
+        information is available until after an <TT
+><A HREF="Database-HDBC-Types.html#v%3Aexecute"
+>execute</A
+></TT
+> function
+        has been run.
+</P
+><P
+>Information is returned here directly as returned
+        by the underlying database layer.  Note that different
+        databases have different rules about capitalization
+        of return values and about representation of names
+        of columns that are not simple columns.  For this reason,
+        it is suggested that you treat this information for
+        display purposes only.  Failing that, you should convert
+        to lower (or upper) case, and use <TT
+>AS</TT
+> clauses for
+        anything other than simple columns.
+</P
+><P
+>A simple getColumnNames implementation could simply
+        apply <TT
+>map fst</TT
+> to the return value of <TT
+><A HREF="Database-HDBC-Types.html#v%3AdescribeResult"
+>describeResult</A
+></TT
+>.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AoriginalQuery"
+></A
+><B
+>originalQuery</B
+> :: String</TD
+><TD CLASS="rdoc"
+>The original query that this <TT
+><A HREF="Database-HDBC-Types.html#t%3AStatement"
+>Statement</A
+></TT
+> was prepared
+          with. 
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AdescribeResult"
+></A
+><B
+>describeResult</B
+> :: (IO [(String, <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"
+>SqlColDesc</A
+>)])</TD
+><TD CLASS="rdoc"
+><P
+>Obtain information about the columns in the result set.
+          Must be run only after <TT
+><A HREF="Database-HDBC-Types.html#v%3Aexecute"
+>execute</A
+></TT
+>.  The String in the result
+          set is the column name.
+</P
+><P
+>You should expect this to be returned in the same manner
+          as a result from <TT
+><A HREF="Database-HDBC.html#v%3AfetchAllRows"
+>fetchAllRows</A
+></TT
+>.
+</P
+><P
+>All results should be converted to lowercase for you
+          before you see them.
+</P
+><P
+>Please see caveats under <TT
+><A HREF="Database-HDBC-Types.html#v%3AgetColumnNames"
+>getColumnNames</A
+></TT
+> for information
+          on the column name field here.
+</P
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3ASqlError"
+></A
+><B
+>SqlError</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+><P
+>The main HDBC exception object.  As much information as possible
+is passed from the database through to the application through this object.
+</P
+><P
+>Errors generated in the Haskell layer will have seNativeError set to -1.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlError"
+></A
+><B
+>SqlError</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AseState"
+></A
+><B
+>seState</B
+> :: String</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AseNativeError"
+></A
+><B
+>seNativeError</B
+> :: Int</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AseErrorMsg"
+></A
+><B
+>seErrorMsg</B
+> :: String</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:SqlError')" ALT="show/hide"
+> Instances</TD
+></TR
+><TR
+><TD CLASS="body"
+><DIV ID="i:SqlError" STYLE="display:block;"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>Eq <A HREF="Database-HDBC-Types.html#t%3ASqlError"
+>SqlError</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>Read <A HREF="Database-HDBC-Types.html#t%3ASqlError"
+>SqlError</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>Show <A HREF="Database-HDBC-Types.html#t%3ASqlError"
+>SqlError</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>Typeable <A HREF="Database-HDBC-Types.html#t%3ASqlError"
+>SqlError</A
+></TD
+></TR
+></TABLE
+></DIV
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> Show a =&gt; <A NAME="t%3ASqlType"
+></A
+><B
+>SqlType</B
+> a  <SPAN CLASS="keyword"
+>where</SPAN
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+><P
+>Conversions to and from <TT
+><A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>SqlValue</A
+></TT
+>s and standard Haskell types.
+</P
+><P
+>Conversions are powerful; for instance, you can call <TT
+><A HREF="Database-HDBC-Types.html#v%3AfromSql"
+>fromSql</A
+></TT
+> on a SqlInt32
+and get a String or a Double out of it.  This class attempts to Do
+The Right Thing whenever possible, and will raise an error when asked to
+do something incorrect.  In particular, when converting to any type
+except a Maybe, <TT
+><A HREF="Database-HDBC-Types.html#v%3ASqlNull"
+>SqlNull</A
+></TT
+> as the input will cause an error to be raised.
+</P
+><P
+>Here are some notes about conversion:
+</P
+><UL
+><LI
+> Fractions of a second are not preserved on time values
+</LI
+></UL
+><P
+>See also <TT
+><A HREF="Database-HDBC-Types.html#v%3AnToSql"
+>nToSql</A
+></TT
+>, <TT
+><A HREF="Database-HDBC-Types.html#v%3AiToSql"
+>iToSql</A
+></TT
+>.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+>Methods</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AtoSql"
+></A
+><B
+>toSql</B
+> :: a -&gt; <A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>SqlValue</A
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AfromSql"
+></A
+><B
+>fromSql</B
+> :: <A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>SqlValue</A
+> -&gt; a</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:SqlType')" ALT="show/hide"
+> Instances</TD
+></TR
+><TR
+><TD CLASS="body"
+><DIV ID="i:SqlType" STYLE="display:block;"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC-Types.html#t%3ASqlType"
+>SqlType</A
+> Bool</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC-Types.html#t%3ASqlType"
+>SqlType</A
+> CalendarTime</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC-Types.html#t%3ASqlType"
+>SqlType</A
+> Char</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC-Types.html#t%3ASqlType"
+>SqlType</A
+> ClockTime</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC-Types.html#t%3ASqlType"
+>SqlType</A
+> Double</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC-Types.html#t%3ASqlType"
+>SqlType</A
+> Int</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC-Types.html#t%3ASqlType"
+>SqlType</A
+> Int32</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC-Types.html#t%3ASqlType"
+>SqlType</A
+> Int64</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC-Types.html#t%3ASqlType"
+>SqlType</A
+> Integer</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC-Types.html#t%3ASqlType"
+>SqlType</A
+> Rational</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC-Types.html#t%3ASqlType"
+>SqlType</A
+> String</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC-Types.html#t%3ASqlType"
+>SqlType</A
+> TimeDiff</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC-Types.html#t%3ASqlType"
+>SqlType</A
+> Word32</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC-Types.html#t%3ASqlType"
+>SqlType</A
+> Word64</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC-Types.html#t%3ASqlType"
+>SqlType</A
+> a =&gt; <A HREF="Database-HDBC-Types.html#t%3ASqlType"
+>SqlType</A
+> (Maybe a)</TD
+></TR
+></TABLE
+></DIV
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AnToSql"
+></A
+><B
+>nToSql</B
+> :: Integral a =&gt; a -&gt; <A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>SqlValue</A
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+>Converts any Integral type to a <TT
+><A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>SqlValue</A
+></TT
+> by using toInteger. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AiToSql"
+></A
+><B
+>iToSql</B
+> :: Int -&gt; <A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>SqlValue</A
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+>Convenience function for using numeric literals in your program. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3ASqlValue"
+></A
+><B
+>SqlValue</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+><P
+>The main type for expressing Haskell values to SQL databases.
+</P
+><P
+>This type is used to marshall Haskell data to and from database APIs.
+HDBC driver interfaces will do their best to use the most accurate and
+efficient way to send a particular value to the database server.
+</P
+><P
+>Values read back from the server are put in the most appropriate <TT
+><A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>SqlValue</A
+></TT
+>
+type.  <TT
+><A HREF="Database-HDBC-Types.html#v%3AfromSql"
+>fromSql</A
+></TT
+> can then be used to convert them into whatever type
+is needed locally in Haskell.
+</P
+><P
+>Most people will use <TT
+><A HREF="Database-HDBC-Types.html#v%3AtoSql"
+>toSql</A
+></TT
+> and <TT
+><A HREF="Database-HDBC-Types.html#v%3AfromSql"
+>fromSql</A
+></TT
+> instead of manipulating
+<TT
+><A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>SqlValue</A
+></TT
+>s directly.
+</P
+><P
+>The default representation of time values is an integer number of seconds.
+Databases such as PostgreSQL with builtin timestamp types can will see
+automatic conversion between these Haskell types to local types.  Other
+databases can just use an int or a string. 
+</P
+><P
+>This behavior also exists for other types.  For instance, many databases don't
+have a Rational type, so they'll just use Haskell's show function and
+store a Rational as a string.
+</P
+><P
+>Two SqlValues are considered to be equal if one of these hold (first one that
+is true holds; if none are true, they are not equal):
+ * Both are NULL
+ * Both represent the same type and the encapsulated values are equal
+ * The values of each, when converted to a string, are equal. 
+</P
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlString"
+></A
+><B
+>SqlString</B
+> String</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlWord32"
+></A
+><B
+>SqlWord32</B
+> Word32</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlWord64"
+></A
+><B
+>SqlWord64</B
+> Word64</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlInt32"
+></A
+><B
+>SqlInt32</B
+> Int32</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlInt64"
+></A
+><B
+>SqlInt64</B
+> Int64</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlInteger"
+></A
+><B
+>SqlInteger</B
+> Integer</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlChar"
+></A
+><B
+>SqlChar</B
+> Char</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlBool"
+></A
+><B
+>SqlBool</B
+> Bool</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlDouble"
+></A
+><B
+>SqlDouble</B
+> Double</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlRational"
+></A
+><B
+>SqlRational</B
+> Rational</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlEpochTime"
+></A
+><B
+>SqlEpochTime</B
+> Integer</TD
+><TD CLASS="rdoc"
+>Representation of ClockTime or CalendarTime
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlTimeDiff"
+></A
+><B
+>SqlTimeDiff</B
+> Integer</TD
+><TD CLASS="rdoc"
+>Representation of TimeDiff
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlNull"
+></A
+><B
+>SqlNull</B
+></TD
+><TD CLASS="rdoc"
+>NULL in SQL or Nothing in Haskell
+</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:SqlValue')" ALT="show/hide"
+> Instances</TD
+></TR
+><TR
+><TD CLASS="body"
+><DIV ID="i:SqlValue" STYLE="display:block;"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>Eq <A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>SqlValue</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>Show <A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>SqlValue</A
+></TD
+></TR
+></TABLE
+></DIV
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 0.7</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/doc/Database-HDBC.html b/doc/Database-HDBC.html
new file mode 100644
--- /dev/null
+++ b/doc/Database-HDBC.html
@@ -0,0 +1,3433 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Database.HDBC</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+>Haskell Database Connectivity (HDBC)</TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="modulebar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><FONT SIZE="6"
+>Database.HDBC</FONT
+></TD
+><TD ALIGN="right"
+><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="infohead"
+>Portability</TD
+><TD CLASS="infoval"
+>portable</TD
+></TR
+><TR
+><TD CLASS="infohead"
+>Stability</TD
+><TD CLASS="infoval"
+>provisional</TD
+></TR
+><TR
+><TD CLASS="infohead"
+>Maintainer</TD
+><TD CLASS="infoval"
+>John Goerzen &lt;jgoerzen@complete.org&gt;</TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="section4"
+><B
+>Contents</B
+></TD
+></TR
+><TR
+><TD
+><DL
+><DT
+><A HREF="#1"
+>Introduction
+</A
+></DT
+><DD
+><DL
+><DT
+><A HREF="#2"
+>Features
+</A
+></DT
+><DT
+><A HREF="#3"
+>Available Drivers
+</A
+></DT
+></DL
+></DD
+><DT
+><A HREF="#4"
+>Typing of transfer data
+</A
+></DT
+><DT
+><A HREF="#5"
+>Database Connections
+</A
+></DT
+><DD
+><DL
+><DT
+><A HREF="#6"
+>Preparing Queries
+</A
+></DT
+><DT
+><A HREF="#7"
+>Transaction Handling
+</A
+></DT
+><DT
+><A HREF="#8"
+>Connection Inquiries
+</A
+></DT
+></DL
+></DD
+><DT
+><A HREF="#9"
+>Statements
+</A
+></DT
+><DD
+><DL
+><DT
+><A HREF="#10"
+>Execution
+</A
+></DT
+><DT
+><A HREF="#11"
+>Fetching Results
+</A
+></DT
+><DT
+><A HREF="#12"
+>Statement Inquires
+</A
+></DT
+><DT
+><A HREF="#13"
+>Miscellaneous
+</A
+></DT
+></DL
+></DD
+><DT
+><A HREF="#14"
+>Exceptions
+</A
+></DT
+><DT
+><A HREF="#15"
+>Column Types
+</A
+></DT
+><DT
+><A HREF="#16"
+>Threading
+</A
+></DT
+><DT
+><A HREF="#17"
+>Copyright and License
+</A
+></DT
+></DL
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Description</TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Welcome to HDBC, the Haskell Database Connectivity library.
+</P
+><P
+>Written by John Goerzen, jgoerzen@complete.org
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Synopsis</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> Show a =&gt; <A HREF="#t%3ASqlType"
+>SqlType</A
+> a  <SPAN CLASS="keyword"
+>where</SPAN
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AtoSql"
+>toSql</A
+> :: a -&gt; <A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AfromSql"
+>fromSql</A
+> :: <A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+> -&gt; a</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AnToSql"
+>nToSql</A
+> :: Integral a =&gt; a -&gt; <A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AiToSql"
+>iToSql</A
+> :: Int -&gt; <A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3ASqlValue"
+>SqlValue</A
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>= <A HREF="#v%3ASqlString"
+>SqlString</A
+> String</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlWord32"
+>SqlWord32</A
+> Word32</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlWord64"
+>SqlWord64</A
+> Word64</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlInt32"
+>SqlInt32</A
+> Int32</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlInt64"
+>SqlInt64</A
+> Int64</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlInteger"
+>SqlInteger</A
+> Integer</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlChar"
+>SqlChar</A
+> Char</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlBool"
+>SqlBool</A
+> Bool</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlDouble"
+>SqlDouble</A
+> Double</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlRational"
+>SqlRational</A
+> Rational</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlEpochTime"
+>SqlEpochTime</A
+> Integer</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlTimeDiff"
+>SqlTimeDiff</A
+> Integer</TD
+></TR
+><TR
+><TD CLASS="decl"
+>| <A HREF="#v%3ASqlNull"
+>SqlNull</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AConnection"
+>Connection</A
+> </TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Adisconnect"
+>disconnect</A
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; IO ()</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Aclone"
+>clone</A
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; IO <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Arun"
+>run</A
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; String -&gt; [<A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+>] -&gt; IO Integer</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AsRun"
+>sRun</A
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; String -&gt; [Maybe String] -&gt; IO Integer</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Aprepare"
+>prepare</A
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; String -&gt; IO <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AquickQuery"
+>quickQuery</A
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; String -&gt; [<A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+>] -&gt; IO [[<A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+>]]</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Acommit"
+>commit</A
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; IO ()</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Arollback"
+>rollback</A
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; IO ()</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AwithTransaction"
+>withTransaction</A
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; (<A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; IO a) -&gt; IO a</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AhdbcDriverName"
+>hdbcDriverName</A
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; String</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AhdbcClientVer"
+>hdbcClientVer</A
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; String</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AproxiedClientName"
+>proxiedClientName</A
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; String</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AproxiedClientVer"
+>proxiedClientVer</A
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; String</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AdbServerVer"
+>dbServerVer</A
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; String</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AdbTransactionSupport"
+>dbTransactionSupport</A
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; Bool</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AgetTables"
+>getTables</A
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; IO [String]</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AdescribeTable"
+>describeTable</A
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; String -&gt; IO [(String, <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"
+>SqlColDesc</A
+>)]</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3AStatement"
+>Statement</A
+> </TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Aexecute"
+>execute</A
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; [<A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+>] -&gt; IO Integer</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AsExecute"
+>sExecute</A
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; [Maybe String] -&gt; IO Integer</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AexecuteMany"
+>executeMany</A
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; [[<A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+>]] -&gt; IO ()</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AsExecuteMany"
+>sExecuteMany</A
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; [[Maybe String]] -&gt; IO ()</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AfetchRow"
+>fetchRow</A
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; IO (Maybe [<A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+>])</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AfetchRowAL"
+>fetchRowAL</A
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; IO (Maybe [(String, <A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+>)])</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AfetchRowMap"
+>fetchRowMap</A
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; IO (Maybe (Map String <A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+>))</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AsFetchRow"
+>sFetchRow</A
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; IO (Maybe [Maybe String])</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AfetchAllRows"
+>fetchAllRows</A
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; IO [[<A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+>]]</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AfetchAllRowsAL"
+>fetchAllRowsAL</A
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; IO [[(String, <A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+>)]]</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AfetchAllRowsMap"
+>fetchAllRowsMap</A
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; IO [Map String <A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+>]</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AsFetchAllRows"
+>sFetchAllRows</A
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; IO [[Maybe String]]</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AgetColumnNames"
+>getColumnNames</A
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; IO [String]</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AdescribeResult"
+>describeResult</A
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; IO [(String, <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"
+>SqlColDesc</A
+>)]</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3Afinish"
+>finish</A
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; IO ()</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AoriginalQuery"
+>originalQuery</A
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; String</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A HREF="#t%3ASqlError"
+>SqlError</A
+>  = <A HREF="#v%3ASqlError"
+>SqlError</A
+> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AseState"
+>seState</A
+> :: String</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AseNativeError"
+>seNativeError</A
+> :: Int</TD
+></TR
+><TR
+><TD CLASS="recfield"
+><A HREF="#v%3AseErrorMsg"
+>seErrorMsg</A
+> :: String</TD
+></TR
+></TABLE
+>}</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AcatchSql"
+>catchSql</A
+> :: IO a -&gt; (<A HREF="Database-HDBC.html#t%3ASqlError"
+>SqlError</A
+> -&gt; IO a) -&gt; IO a</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AhandleSql"
+>handleSql</A
+> :: (<A HREF="Database-HDBC.html#t%3ASqlError"
+>SqlError</A
+> -&gt; IO a) -&gt; IO a -&gt; IO a</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AsqlExceptions"
+>sqlExceptions</A
+> :: Exception -&gt; Maybe <A HREF="Database-HDBC.html#t%3ASqlError"
+>SqlError</A
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="#v%3AhandleSqlError"
+>handleSqlError</A
+> :: IO a -&gt; IO a</TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>module <A HREF="Database-HDBC-ColTypes.html"
+>Database.HDBC.ColTypes</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="1"
+>Introduction
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Welcome to HDBC, Haskell Database Connectivity.
+</P
+><P
+>HDBC provides an abstraction layer between Haskell programs and SQL
+relational databases.  This lets you write database code once, in
+Haskell, and have it work with any number of backend SQL databases
+(MySQL, Oracle, PostgreSQL, ODBC-compliant databases, etc.)
+</P
+><P
+>HDBC is modeled loosely on Perl's DBI interface
+<A HREF="http://search.cpan.org/~timb/DBI/DBI.pm"
+>http://search.cpan.org/~timb/DBI/DBI.pm</A
+>, though it has also
+been influenced by Python's DB-API v2, JDBC in Java, and HSQL in
+Haskell.
+</P
+><P
+>HDBC is a from-scratch effort.  It is not a reimplementation of HSQL,
+though its purpose is the same.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section2"
+><A NAME="2"
+>Features
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Features of HDBC include:
+</P
+><UL
+><LI
+> Ability to use replacable parameters to let one query be
+   executed multiple times (eliminates the need for an escape
+   function)
+</LI
+><LI
+> Ability to access returned rows by column number
+</LI
+><LI
+> Ability to read data from the SQL server on-demand rather than
+   reading the entire result set up front
+</LI
+><LI
+> HUnit testsuite for each backend driver
+</LI
+><LI
+> Well-defined standard API and easy backend driver implementation
+</LI
+><LI
+> Lazy reading of the entire result set (think hGetContents, but
+   for the results of SELECT) (see <TT
+><A HREF="Database-HDBC.html#v%3AsFetchAllRows"
+>sFetchAllRows</A
+></TT
+>)
+</LI
+><LI
+> Support for translation between Haskell and SQL types
+</LI
+><LI
+> Support for querying database server properties
+</LI
+><LI
+> Add-on package (hdbc-missingh) to integrate with MissingH,
+   providing a database backend for AnyDBM.
+</LI
+><LI
+> Support for querying metadata such as column names.
+</LI
+><LI
+> Support for querying additional metadata (column types, etc.)
+</LI
+></UL
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section2"
+><A NAME="3"
+>Available Drivers
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Here is a list of known drivers as of March 28, 2006:
+</P
+><DL
+><DT
+><TT
+>Sqlite v3</TT
+></DT
+><DD
+> Available from <A HREF="http://quux.org/devel/hdbc"
+>http://quux.org/devel/hdbc</A
+>.  Or, to
+participate in development, use 
+<TT
+>darcs get --partial <A HREF="http://darcs.complete.org/hdbc-sqlite3"
+>http://darcs.complete.org/hdbc-sqlite3</A
+></TT
+>
+</DD
+><DT
+><TT
+>PostgreSQL</TT
+></DT
+><DD
+> Available from <A HREF="http://quux.org/devel/hdbc"
+>http://quux.org/devel/hdbc</A
+>.  Or, to
+participate in development, use
+<TT
+>darcs get --partial <A HREF="http://darcs.complete.org/hdbc-postgresql"
+>http://darcs.complete.org/hdbc-postgresql</A
+></TT
+>
+</DD
+><DT
+><TT
+>ODBC</TT
+></DT
+><DD
+> Available from <A HREF="http://quux.org/devel/hdbc"
+>http://quux.org/devel/hdbc</A
+>.  Or, to
+partitipace in development, use
+<TT
+>darcs get --partial <A HREF="http://darcs.complete.org/hdbc-odbc"
+>http://darcs.complete.org/hdbc-odbc</A
+></TT
+>
+</DD
+><DT
+><TT
+>MySQL</TT
+></DT
+><DD
+> MySQL users are encouraged to use the ODBC driver, which works
+and has been tested against MySQL on both Linux/Unix and Windows platforms.
+</DD
+></DL
+><P
+>In addition, there is one integration package: <EM
+>hdbc-missingh</EM
+>.  This
+integrates with the MissingH library <A HREF="http://quux.org/devel/missingh"
+>http://quux.org/devel/missingh</A
+>.
+Among other things, it lets any HDBC database act as a backend for the
+AnyDBM interface.  Available from <A HREF="http://quux.org/devel/hdbc"
+>http://quux.org/devel/hdbc</A
+>.  Or,
+to participate in development, use
+<TT
+>darcs get --partial <A HREF="http://darcs.complete.org/hdbc-missingh"
+>http://darcs.complete.org/hdbc-missingh</A
+></TT
+>
+</P
+><P
+>The latest version of HDBC itself is available from
+<A HREF="http://quux.org/devel/hdbc"
+>http://quux.org/devel/hdbc</A
+>.  Or, to participate in development, use
+<TT
+>darcs get --partial <A HREF="http://darcs.complete.org/hdbc"
+>http://darcs.complete.org/hdbc</A
+></TT
+>.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="4"
+>Typing of transfer data
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>class</SPAN
+> Show a =&gt; <A NAME="t%3ASqlType"
+></A
+><B
+>SqlType</B
+> a  <SPAN CLASS="keyword"
+>where</SPAN
+></TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+><P
+>Conversions to and from <TT
+><A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+></TT
+>s and standard Haskell types.
+</P
+><P
+>Conversions are powerful; for instance, you can call <TT
+><A HREF="Database-HDBC.html#v%3AfromSql"
+>fromSql</A
+></TT
+> on a SqlInt32
+and get a String or a Double out of it.  This class attempts to Do
+The Right Thing whenever possible, and will raise an error when asked to
+do something incorrect.  In particular, when converting to any type
+except a Maybe, <TT
+><A HREF="Database-HDBC.html#v%3ASqlNull"
+>SqlNull</A
+></TT
+> as the input will cause an error to be raised.
+</P
+><P
+>Here are some notes about conversion:
+</P
+><UL
+><LI
+> Fractions of a second are not preserved on time values
+</LI
+></UL
+><P
+>See also <TT
+><A HREF="Database-HDBC.html#v%3AnToSql"
+>nToSql</A
+></TT
+>, <TT
+><A HREF="Database-HDBC.html#v%3AiToSql"
+>iToSql</A
+></TT
+>.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+>Methods</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AtoSql"
+></A
+><B
+>toSql</B
+> :: a -&gt; <A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AfromSql"
+></A
+><B
+>fromSql</B
+> :: <A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+> -&gt; a</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s8"
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:SqlType')" ALT="show/hide"
+> Instances</TD
+></TR
+><TR
+><TD CLASS="body"
+><DIV ID="i:SqlType" STYLE="display:block;"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC.html#t%3ASqlType"
+>SqlType</A
+> Bool</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC.html#t%3ASqlType"
+>SqlType</A
+> CalendarTime</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC.html#t%3ASqlType"
+>SqlType</A
+> Char</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC.html#t%3ASqlType"
+>SqlType</A
+> ClockTime</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC.html#t%3ASqlType"
+>SqlType</A
+> Double</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC.html#t%3ASqlType"
+>SqlType</A
+> Int</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC.html#t%3ASqlType"
+>SqlType</A
+> Int32</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC.html#t%3ASqlType"
+>SqlType</A
+> Int64</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC.html#t%3ASqlType"
+>SqlType</A
+> Integer</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC.html#t%3ASqlType"
+>SqlType</A
+> Rational</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC.html#t%3ASqlType"
+>SqlType</A
+> String</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC.html#t%3ASqlType"
+>SqlType</A
+> TimeDiff</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC.html#t%3ASqlType"
+>SqlType</A
+> Word32</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC.html#t%3ASqlType"
+>SqlType</A
+> Word64</TD
+></TR
+><TR
+><TD CLASS="decl"
+><A HREF="Database-HDBC.html#t%3ASqlType"
+>SqlType</A
+> a =&gt; <A HREF="Database-HDBC.html#t%3ASqlType"
+>SqlType</A
+> (Maybe a)</TD
+></TR
+></TABLE
+></DIV
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AnToSql"
+></A
+><B
+>nToSql</B
+> :: Integral a =&gt; a -&gt; <A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+>Converts any Integral type to a <TT
+><A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+></TT
+> by using toInteger. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AiToSql"
+></A
+><B
+>iToSql</B
+> :: Int -&gt; <A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+>Convenience function for using numeric literals in your program. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3ASqlValue"
+></A
+><B
+>SqlValue</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+><P
+>The main type for expressing Haskell values to SQL databases.
+</P
+><P
+>This type is used to marshall Haskell data to and from database APIs.
+HDBC driver interfaces will do their best to use the most accurate and
+efficient way to send a particular value to the database server.
+</P
+><P
+>Values read back from the server are put in the most appropriate <TT
+><A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+></TT
+>
+type.  <TT
+><A HREF="Database-HDBC.html#v%3AfromSql"
+>fromSql</A
+></TT
+> can then be used to convert them into whatever type
+is needed locally in Haskell.
+</P
+><P
+>Most people will use <TT
+><A HREF="Database-HDBC.html#v%3AtoSql"
+>toSql</A
+></TT
+> and <TT
+><A HREF="Database-HDBC.html#v%3AfromSql"
+>fromSql</A
+></TT
+> instead of manipulating
+<TT
+><A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+></TT
+>s directly.
+</P
+><P
+>The default representation of time values is an integer number of seconds.
+Databases such as PostgreSQL with builtin timestamp types can will see
+automatic conversion between these Haskell types to local types.  Other
+databases can just use an int or a string. 
+</P
+><P
+>This behavior also exists for other types.  For instance, many databases don't
+have a Rational type, so they'll just use Haskell's show function and
+store a Rational as a string.
+</P
+><P
+>Two SqlValues are considered to be equal if one of these hold (first one that
+is true holds; if none are true, they are not equal):
+ * Both are NULL
+ * Both represent the same type and the encapsulated values are equal
+ * The values of each, when converted to a string, are equal. 
+</P
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlString"
+></A
+><B
+>SqlString</B
+> String</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlWord32"
+></A
+><B
+>SqlWord32</B
+> Word32</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlWord64"
+></A
+><B
+>SqlWord64</B
+> Word64</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlInt32"
+></A
+><B
+>SqlInt32</B
+> Int32</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlInt64"
+></A
+><B
+>SqlInt64</B
+> Int64</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlInteger"
+></A
+><B
+>SqlInteger</B
+> Integer</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlChar"
+></A
+><B
+>SqlChar</B
+> Char</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlBool"
+></A
+><B
+>SqlBool</B
+> Bool</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlDouble"
+></A
+><B
+>SqlDouble</B
+> Double</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlRational"
+></A
+><B
+>SqlRational</B
+> Rational</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlEpochTime"
+></A
+><B
+>SqlEpochTime</B
+> Integer</TD
+><TD CLASS="rdoc"
+>Representation of ClockTime or CalendarTime
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlTimeDiff"
+></A
+><B
+>SqlTimeDiff</B
+> Integer</TD
+><TD CLASS="rdoc"
+>Representation of TimeDiff
+</TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlNull"
+></A
+><B
+>SqlNull</B
+></TD
+><TD CLASS="rdoc"
+>NULL in SQL or Nothing in Haskell
+</TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:SqlValue')" ALT="show/hide"
+> Instances</TD
+></TR
+><TR
+><TD CLASS="body"
+><DIV ID="i:SqlValue" STYLE="display:block;"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>Eq <A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>Show <A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+></TD
+></TR
+></TABLE
+></DIV
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="5"
+>Database Connections
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AConnection"
+></A
+><B
+>Connection</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+><P
+>Main database handle object.
+</P
+><P
+>A <TT
+><A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+></TT
+> object is created by specific functions in the module for an
+individual database.  That is, the connect function -- which creates
+this object -- is not standardized through the HDBC interface.
+</P
+><P
+>A connection is closed by a call to <TT
+><A HREF="Database-HDBC.html#v%3Adisconnect"
+>disconnect</A
+></TT
+>.
+</P
+><P
+>A call to <TT
+><A HREF="Database-HDBC.html#v%3Acommit"
+>commit</A
+></TT
+> is required to make sure that your changes get committed
+to the database.  In other words, HDBC has <EM
+>no support for autocommit</EM
+>, which
+we consider an outdated notion.
+</P
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Adisconnect"
+></A
+><B
+>disconnect</B
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; IO ()</TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Disconnect from the remote database.
+</P
+><P
+>You do not need to explicitly close a Connection object, but you may do so if
+you so desire.  If you don't, the object will disconnect from the database
+in a sane way when it is garbage-collected.  However, a disconnection may
+raise an error, so you are encouraged to explicitly call <TT
+><A HREF="Database-HDBC.html#v%3Adisconnect"
+>disconnect</A
+></TT
+>.  Also,
+garbage collection may not run when the program terminates, and some databases
+really like an explicit disconnect.
+</P
+><P
+>So, bottom line is, you're best off calling <TT
+><A HREF="Database-HDBC.html#v%3Adisconnect"
+>disconnect</A
+></TT
+> directly, but the
+world won't end if you forget.
+</P
+><P
+>This function discards any data not committed already.  Database driver
+implementators should explicitly call <TT
+><A HREF="Database-HDBC.html#v%3Arollback"
+>rollback</A
+></TT
+> if their databases don't
+do this automatically on disconnect.
+</P
+><P
+>Bad Things (TM) could happen if you call this while you have <TT
+><A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+></TT
+>s 
+active.  In more precise language, the results in such situations are undefined
+and vary by database.  So don't do it.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Aclone"
+></A
+><B
+>clone</B
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; IO <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Create a new <TT
+><A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+></TT
+> object, pointed at the same
+                   server as this object is.  This will generally establish
+                   a separate physical connection.
+</P
+><P
+>When you wish to establish multiple connections to a single
+                   server, the correct way to do so is to establish the
+                   first connection with the driver-specific connection
+                   function, and then clone it for each additional connection.
+</P
+><P
+>This can be important when a database doesn't provide
+                   much thread support itself, and the HDBC driver module
+                   must serialize access to a particular database.
+</P
+><P
+>This can also be a handy utility function whenever you
+                   need a separate connection to whatever database you are
+                   connected to already. 
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section2"
+><A NAME="6"
+>Preparing Queries
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Arun"
+></A
+><B
+>run</B
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; String -&gt; [<A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+>] -&gt; IO Integer</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Execute a single SQL query.  Returns the number
+                   of rows modified (see <TT
+><A HREF="Database-HDBC.html#v%3Aexecute"
+>execute</A
+></TT
+> for details).
+                   The second parameter is a list
+                   of replacement values, if any. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AsRun"
+></A
+><B
+>sRun</B
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; String -&gt; [Maybe String] -&gt; IO Integer</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Like <TT
+><A HREF="Database-HDBC.html#v%3Arun"
+>run</A
+></TT
+>, but take a list of Maybe Strings instead of <TT
+><A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+></TT
+>s. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Aprepare"
+></A
+><B
+>prepare</B
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; String -&gt; IO <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Prepares a statement for execution. 
+</P
+><P
+>Question marks in the statement will be replaced by
+                   positional parameters in a later call to <TT
+><A HREF="Database-HDBC.html#v%3Aexecute"
+>execute</A
+></TT
+>.
+</P
+><P
+>Please note that, depending on the database
+                   and the driver, errors in your SQL may be raised
+                   either here or by <TT
+><A HREF="Database-HDBC.html#v%3Aexecute"
+>execute</A
+></TT
+>.  Make sure you
+                   handle exceptions both places if necessary. 
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AquickQuery"
+></A
+><B
+>quickQuery</B
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; String -&gt; [<A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+>] -&gt; IO [[<A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+>]]</TD
+></TR
+><TR
+><TD CLASS="doc"
+>A quick way to do a query.  Similar to preparing, executing, and
+then calling <TT
+><A HREF="Database-HDBC.html#v%3AfetchAllRows"
+>fetchAllRows</A
+></TT
+> on a statement. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section2"
+><A NAME="7"
+>Transaction Handling
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>This section concerns itself with writing (updating) a database.
+</P
+><P
+>In HDBC, as with many RDBMS implementations, every write to the
+database occurs within a transaction.  No changes are visible (outside
+the current transaction) until a commit operation occurs, in which
+case all changes since the transaction started are atomically
+committed.  Also, there is a rollback operation that can undo all
+changes since the transaction started.
+</P
+><P
+>HDBC does everything within a transaction.  A transaction is implicitly entered
+when a connection to a database is established, and a transaction is
+implicitly entered after each call to <TT
+><A HREF="Database-HDBC.html#v%3Acommit"
+>commit</A
+></TT
+> or <TT
+><A HREF="Database-HDBC.html#v%3Arollback"
+>rollback</A
+></TT
+> as well.
+</P
+><P
+>The practical effect of this is that you must call <TT
+><A HREF="Database-HDBC.html#v%3Acommit"
+>commit</A
+></TT
+> after making
+changes to a database in order for those changes to become visible.  You don't
+have to call <TT
+><A HREF="Database-HDBC.html#v%3Acommit"
+>commit</A
+></TT
+> after <EM
+>every</EM
+> change, just after a batch of them.
+</P
+><P
+>(Exceptions exist for databases that don't offer a high level of transaction
+isolation; but you should always play it safe and commit anyway.)
+</P
+><P
+>Database developers will also be experienced with the atomicity benefits
+of transactions, an explanation of which is outside the scope of this manual.
+</P
+><P
+>Errors occuring at the database level can leave a transaction in an
+indeterminate state, depending on the database.  Some databases will
+refuse all queries until the next <TT
+><A HREF="Database-HDBC.html#v%3Acommit"
+>commit</A
+></TT
+> or <TT
+><A HREF="Database-HDBC.html#v%3Arollback"
+>rollback</A
+></TT
+>.  The safe thing
+to do is to issue a <TT
+><A HREF="Database-HDBC.html#v%3Acommit"
+>commit</A
+></TT
+> or <TT
+><A HREF="Database-HDBC.html#v%3Arollback"
+>rollback</A
+></TT
+> after trapping any <TT
+><A HREF="Database-HDBC.html#t%3ASqlError"
+>SqlError</A
+></TT
+>.
+Alternatively, you could use <TT
+><A HREF="Database-HDBC.html#v%3AwithTransaction"
+>withTransaction</A
+></TT
+>, which will automatically
+handle this detail for you.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Acommit"
+></A
+><B
+>commit</B
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; IO ()</TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Commit any pending data to the database.
+</P
+><P
+>Required to make any changes take effect. 
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Arollback"
+></A
+><B
+>rollback</B
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; IO ()</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Roll back to the state the database was in prior to the
+                   last <TT
+><A HREF="Database-HDBC.html#v%3Acommit"
+>commit</A
+></TT
+> or <TT
+><A HREF="Database-HDBC.html#v%3Arollback"
+>rollback</A
+></TT
+>. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AwithTransaction"
+></A
+><B
+>withTransaction</B
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; (<A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; IO a) -&gt; IO a</TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Execute some code.  If any uncaught exception occurs, run
+<TT
+><A HREF="Database-HDBC.html#v%3Arollback"
+>rollback</A
+></TT
+> and re-raise it.  Otherwise, run <TT
+><A HREF="Database-HDBC.html#v%3Acommit"
+>commit</A
+></TT
+> and return.
+</P
+><P
+>This function, therefore, encapsulates the logical property that a transaction
+is all about: all or nothing.
+</P
+><P
+>The <TT
+><A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+></TT
+> object passed in is passed directly to the specified
+function as a convenience.
+</P
+><P
+>This function traps <EM
+>all</EM
+> uncaught exceptions, not just SqlErrors.  Therefore,
+you will get a rollback for any exception that you don't handle.  That's
+probably what you want anyway.
+</P
+><P
+>Since all operations in HDBC are done in a transaction, this function doesn't
+issue an explicit &quot;begin&quot; to the server.  You should ideally have
+called <TT
+><A HREF="Database-HDBC.html#v%3Acommit"
+>commit</A
+></TT
+> or <TT
+><A HREF="Database-HDBC.html#v%3Arollback"
+>rollback</A
+></TT
+> before
+calling this function.  If you haven't, this function will commit or rollback
+more than just the changes made in the included action.
+</P
+><P
+>If there was an error while running <TT
+><A HREF="Database-HDBC.html#v%3Arollback"
+>rollback</A
+></TT
+>, this error will not be
+reported since the original exception will be propogated back.  (You'd probably
+like to know about the root cause for all of this anyway.)  Feedback
+on this behavior is solicited.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section2"
+><A NAME="8"
+>Connection Inquiries
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AhdbcDriverName"
+></A
+><B
+>hdbcDriverName</B
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; String</TD
+></TR
+><TR
+><TD CLASS="doc"
+>The name of the HDBC driver module for this connection.
+                   Ideally would be the same as the database name portion
+                   of the Cabal package name.  For instance, &quot;sqlite3&quot;
+                   or &quot;odbc&quot;.  This is the layer that is bound most
+                   tightly to HDBC. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AhdbcClientVer"
+></A
+><B
+>hdbcClientVer</B
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; String</TD
+></TR
+><TR
+><TD CLASS="doc"
+>The version of the C (or whatever) client library
+                   that the HDBC driver module is bound to.  The meaning
+                   of this is driver-specific.  For an ODBC or similar
+                   proxying driver, this should be the version of the
+                   ODBC library, not the eventual DB client driver. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AproxiedClientName"
+></A
+><B
+>proxiedClientName</B
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; String</TD
+></TR
+><TR
+><TD CLASS="doc"
+>In the case of a system such as ODBC, the name of
+                   the database client/server in use, if available.
+                   For others,
+                   identical to <TT
+><A HREF="Database-HDBC.html#v%3AhdbcDriverName"
+>hdbcDriverName</A
+></TT
+>. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AproxiedClientVer"
+></A
+><B
+>proxiedClientVer</B
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; String</TD
+></TR
+><TR
+><TD CLASS="doc"
+>In the case of a system such as ODBC, the version of
+                   the database client in use, if available.  For others,
+                   identical to <TT
+><A HREF="Database-HDBC.html#v%3AhdbcClientVer"
+>hdbcClientVer</A
+></TT
+>. This is the next layer
+                   out past the HDBC driver. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AdbServerVer"
+></A
+><B
+>dbServerVer</B
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; String</TD
+></TR
+><TR
+><TD CLASS="doc"
+>The version of the database server, if available. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AdbTransactionSupport"
+></A
+><B
+>dbTransactionSupport</B
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; Bool</TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Whether or not the current database supports transactions.
+                   If False, then <TT
+><A HREF="Database-HDBC.html#v%3Acommit"
+>commit</A
+></TT
+> and <TT
+><A HREF="Database-HDBC.html#v%3Arollback"
+>rollback</A
+></TT
+> should be expected
+                   to raise errors.
+</P
+><P
+>MySQL is the only commonly-used database that is known
+                   to not support transactions entirely.  Please see
+                   the MySQL notes in the ODBC driver for more information. 
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AgetTables"
+></A
+><B
+>getTables</B
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; IO [String]</TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>The names of all tables accessible by the current
+                   connection, excluding special meta-tables (system tables).
+</P
+><P
+>You should expect this to be returned in the same manner
+                   as a result from <TT
+><A HREF="Database-HDBC.html#v%3AfetchAllRows"
+>fetchAllRows</A
+></TT
+>.
+</P
+><P
+>All results should be converted to lowercase for you
+                   before you see them.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AdescribeTable"
+></A
+><B
+>describeTable</B
+> :: <A HREF="Database-HDBC.html#t%3AConnection"
+>Connection</A
+> -&gt; String -&gt; IO [(String, <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"
+>SqlColDesc</A
+>)]</TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Obtain information about the columns in a specific
+                   table.  The String in the result
+                   set is the column name.
+</P
+><P
+>You should expect this to be returned in the same manner
+                   as a result from <TT
+><A HREF="Database-HDBC.html#v%3AfetchAllRows"
+>fetchAllRows</A
+></TT
+>.
+</P
+><P
+>All results should be converted to lowercase for you
+                   before you see them.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="9"
+>Statements
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3AStatement"
+></A
+><B
+>Statement</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section2"
+><A NAME="10"
+>Execution
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Aexecute"
+></A
+><B
+>execute</B
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; [<A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+>] -&gt; IO Integer</TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Execute the prepared statement, passing in the given positional
+        parameters (that should take the place of the question marks
+        in the call to <TT
+><A HREF="Database-HDBC.html#v%3Aprepare"
+>prepare</A
+></TT
+>).
+</P
+><P
+>For non-SELECT queries, the return value is the number of
+        rows modified, if known.  If no rows were modified, you get 0.
+        If the value is unknown, you get -1.  All current HDBC drivers
+        support this function and should never return -1.
+</P
+><P
+>For SELECT queries, you will always get 0.
+</P
+><P
+>This function should automatically call finish() to finish the previous
+        execution, if necessary.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AsExecute"
+></A
+><B
+>sExecute</B
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; [Maybe String] -&gt; IO Integer</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Like <TT
+><A HREF="Database-HDBC.html#v%3Aexecute"
+>execute</A
+></TT
+>, but take a list of Maybe Strings instead of
+   <TT
+><A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+></TT
+>s. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AexecuteMany"
+></A
+><B
+>executeMany</B
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; [[<A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+>]] -&gt; IO ()</TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Execute the query with many rows. 
+        The return value is the return value from the final row 
+        as if you had called <TT
+><A HREF="Database-HDBC.html#v%3Aexecute"
+>execute</A
+></TT
+> on it.
+</P
+><P
+>Due to optimizations that are possible due to different
+        databases and driver designs, this can often be significantly
+        faster than using <TT
+><A HREF="Database-HDBC.html#v%3Aexecute"
+>execute</A
+></TT
+> multiple times since queries
+        need to be compiled only once.
+</P
+><P
+>This is most useful for non-SELECT statements. 
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AsExecuteMany"
+></A
+><B
+>sExecuteMany</B
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; [[Maybe String]] -&gt; IO ()</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Like <TT
+><A HREF="Database-HDBC.html#v%3AexecuteMany"
+>executeMany</A
+></TT
+>, but take a list of Maybe Strings instead of
+   <TT
+><A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+></TT
+>s. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section2"
+><A NAME="11"
+>Fetching Results
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AfetchRow"
+></A
+><B
+>fetchRow</B
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; IO (Maybe [<A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+>])</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Fetches one row from the DB.  Returns Nothing if there
+        are no more rows.  Will automatically call <TT
+><A HREF="Database-HDBC.html#v%3Afinish"
+>finish</A
+></TT
+> when
+        the last row is read. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AfetchRowAL"
+></A
+><B
+>fetchRowAL</B
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; IO (Maybe [(String, <A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+>)])</TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Like <TT
+><A HREF="Database-HDBC.html#v%3AfetchRow"
+>fetchRow</A
+></TT
+>, but instead of returning a list, return an association
+list from column name to value.
+</P
+><P
+>The keys of the column names are lowercase versions of the data returned
+by <TT
+><A HREF="Database-HDBC.html#v%3AgetColumnNames"
+>getColumnNames</A
+></TT
+>.  Please heed the warnings there.  Additionally,
+results are undefined if multiple columns are returned with identical names.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AfetchRowMap"
+></A
+><B
+>fetchRowMap</B
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; IO (Maybe (Map String <A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+>))</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Similar to <TT
+><A HREF="Database-HDBC.html#v%3AfetchRowAL"
+>fetchRowAL</A
+></TT
+>, but return a Map instead of an association list.
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AsFetchRow"
+></A
+><B
+>sFetchRow</B
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; IO (Maybe [Maybe String])</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Like <TT
+><A HREF="Database-HDBC.html#v%3AfetchRow"
+>fetchRow</A
+></TT
+>, but return a list of Maybe Strings instead of
+   <TT
+><A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+></TT
+>s. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AfetchAllRows"
+></A
+><B
+>fetchAllRows</B
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; IO [[<A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+>]]</TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Lazily fetch all rows from an executed <TT
+><A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+></TT
+>.
+</P
+><P
+>You can think of this as hGetContents applied to a database result set.
+</P
+><P
+>The result of this is a lazy list, and each new row will be read, lazily, from
+the database as the list is processed.
+</P
+><P
+>When you have exhausted the list, the <TT
+><A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+></TT
+> will be <TT
+><A HREF="Database-HDBC.html#v%3Afinish"
+>finish</A
+></TT
+>ed.
+</P
+><P
+>Please note that the careless use of this function can lead to some unpleasant
+behavior.  In particular, if you have not consumed the entire list, then
+attempt to <TT
+><A HREF="Database-HDBC.html#v%3Afinish"
+>finish</A
+></TT
+> or re-execute the statement, and then attempt to consume
+more elements from the list, the result will almost certainly not be what
+you want.
+</P
+><P
+>But then, similar caveats apply with hGetContents.
+</P
+><P
+>Bottom line: this is a very convenient abstraction; use it wisely.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AfetchAllRowsAL"
+></A
+><B
+>fetchAllRowsAL</B
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; IO [[(String, <A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+>)]]</TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Like <TT
+><A HREF="Database-HDBC.html#v%3AfetchAllRows"
+>fetchAllRows</A
+></TT
+>, but instead of returning a list for each
+row, return an association list for each row, from column name to value.
+</P
+><P
+>See <TT
+><A HREF="Database-HDBC.html#v%3AfetchRowAL"
+>fetchRowAL</A
+></TT
+> for more details. 
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AfetchAllRowsMap"
+></A
+><B
+>fetchAllRowsMap</B
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; IO [Map String <A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+>]</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Like <TT
+><A HREF="Database-HDBC.html#v%3AfetchAllRowsAL"
+>fetchAllRowsAL</A
+></TT
+>, but return a list of Maps instead of a list of
+association lists. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AsFetchAllRows"
+></A
+><B
+>sFetchAllRows</B
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; IO [[Maybe String]]</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Like <TT
+><A HREF="Database-HDBC.html#v%3AfetchAllRows"
+>fetchAllRows</A
+></TT
+>, but return Maybe Strings instead of <TT
+><A HREF="Database-HDBC.html#t%3ASqlValue"
+>SqlValue</A
+></TT
+>s. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AgetColumnNames"
+></A
+><B
+>getColumnNames</B
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; IO [String]</TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Returns a list of the column names in the result.
+        For maximum portability, you should not assume that
+        information is available until after an <TT
+><A HREF="Database-HDBC.html#v%3Aexecute"
+>execute</A
+></TT
+> function
+        has been run.
+</P
+><P
+>Information is returned here directly as returned
+        by the underlying database layer.  Note that different
+        databases have different rules about capitalization
+        of return values and about representation of names
+        of columns that are not simple columns.  For this reason,
+        it is suggested that you treat this information for
+        display purposes only.  Failing that, you should convert
+        to lower (or upper) case, and use <TT
+>AS</TT
+> clauses for
+        anything other than simple columns.
+</P
+><P
+>A simple getColumnNames implementation could simply
+        apply <TT
+>map fst</TT
+> to the return value of <TT
+><A HREF="Database-HDBC.html#v%3AdescribeResult"
+>describeResult</A
+></TT
+>.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section2"
+><A NAME="12"
+>Statement Inquires
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AdescribeResult"
+></A
+><B
+>describeResult</B
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; IO [(String, <A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"
+>SqlColDesc</A
+>)]</TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Obtain information about the columns in the result set.
+          Must be run only after <TT
+><A HREF="Database-HDBC.html#v%3Aexecute"
+>execute</A
+></TT
+>.  The String in the result
+          set is the column name.
+</P
+><P
+>You should expect this to be returned in the same manner
+          as a result from <TT
+><A HREF="Database-HDBC.html#v%3AfetchAllRows"
+>fetchAllRows</A
+></TT
+>.
+</P
+><P
+>All results should be converted to lowercase for you
+          before you see them.
+</P
+><P
+>Please see caveats under <TT
+><A HREF="Database-HDBC.html#v%3AgetColumnNames"
+>getColumnNames</A
+></TT
+> for information
+          on the column name field here.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section2"
+><A NAME="13"
+>Miscellaneous
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3Afinish"
+></A
+><B
+>finish</B
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; IO ()</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Abort a query in progress -- usually not needed. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AoriginalQuery"
+></A
+><B
+>originalQuery</B
+> :: <A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+> -&gt; String</TD
+></TR
+><TR
+><TD CLASS="doc"
+>The original query that this <TT
+><A HREF="Database-HDBC.html#t%3AStatement"
+>Statement</A
+></TT
+> was prepared
+          with. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="14"
+>Exceptions
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><SPAN CLASS="keyword"
+>data</SPAN
+> <A NAME="t%3ASqlError"
+></A
+><B
+>SqlError</B
+> </TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="ndoc"
+><P
+>The main HDBC exception object.  As much information as possible
+is passed from the database through to the application through this object.
+</P
+><P
+>Errors generated in the Haskell layer will have seNativeError set to -1.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+>Constructors</TD
+></TR
+><TR
+><TD CLASS="body"
+><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3ASqlError"
+></A
+><B
+>SqlError</B
+></TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="body" COLSPAN="2"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AseState"
+></A
+><B
+>seState</B
+> :: String</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AseNativeError"
+></A
+><B
+>seNativeError</B
+> :: Int</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+><TR
+><TD CLASS="arg"
+><A NAME="v%3AseErrorMsg"
+></A
+><B
+>seErrorMsg</B
+> :: String</TD
+><TD CLASS="rdoc"
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section4"
+><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:SqlError')" ALT="show/hide"
+> Instances</TD
+></TR
+><TR
+><TD CLASS="body"
+><DIV ID="i:SqlError" STYLE="display:block;"
+><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
+><TR
+><TD CLASS="decl"
+>Eq <A HREF="Database-HDBC.html#t%3ASqlError"
+>SqlError</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>Read <A HREF="Database-HDBC.html#t%3ASqlError"
+>SqlError</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>Show <A HREF="Database-HDBC.html#t%3ASqlError"
+>SqlError</A
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>Typeable <A HREF="Database-HDBC.html#t%3ASqlError"
+>SqlError</A
+></TD
+></TR
+></TABLE
+></DIV
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AcatchSql"
+></A
+><B
+>catchSql</B
+> :: IO a -&gt; (<A HREF="Database-HDBC.html#t%3ASqlError"
+>SqlError</A
+> -&gt; IO a) -&gt; IO a</TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Execute the given IO action.
+</P
+><P
+>If it raises a <TT
+><A HREF="Database-HDBC.html#t%3ASqlError"
+>SqlError</A
+></TT
+>, then execute the supplied handler and return its
+return value.  Otherwise, proceed as normal. 
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AhandleSql"
+></A
+><B
+>handleSql</B
+> :: (<A HREF="Database-HDBC.html#t%3ASqlError"
+>SqlError</A
+> -&gt; IO a) -&gt; IO a -&gt; IO a</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Like <TT
+><A HREF="Database-HDBC.html#v%3AcatchSql"
+>catchSql</A
+></TT
+>, with the order of arguments reversed. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AsqlExceptions"
+></A
+><B
+>sqlExceptions</B
+> :: Exception -&gt; Maybe <A HREF="Database-HDBC.html#t%3ASqlError"
+>SqlError</A
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+>Given an Exception, return Just SqlError if it was an SqlError, or Nothing
+otherwise. Useful with functions like catchJust. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+><A NAME="v%3AhandleSqlError"
+></A
+><B
+>handleSqlError</B
+> :: IO a -&gt; IO a</TD
+></TR
+><TR
+><TD CLASS="doc"
+>Catches <TT
+><A HREF="Database-HDBC.html#t%3ASqlError"
+>SqlError</A
+></TT
+>s, and re-raises them as IO errors with fail.
+Useful if you don't care to catch SQL errors, but want to see a sane
+error message if one happens.  One would often use this as a high-level
+wrapper around SQL calls. 
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="15"
+>Column Types
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+>These are defined in <A HREF="Database-HDBC-ColTypes.html"
+>Database.HDBC.ColTypes</A
+> but are
+ available to programs importing <A HREF="Database-HDBC.html"
+>Database.HDBC</A
+> by default as well.
+ See <A HREF="Database-HDBC-ColTypes.html"
+>Database.HDBC.ColTypes</A
+> for documentation.
+</TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="decl"
+>module <A HREF="Database-HDBC-ColTypes.html"
+>Database.HDBC.ColTypes</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="16"
+>Threading
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>FIXME: this is draft information
+</P
+><P
+>Thread support in a generalized interface such as HDBC can be complicated
+because support for threading varies across database interfaces.
+</P
+><P
+>However, applications using HDBC should be able to rely upon at least a few
+basic guarantees:
+</P
+><UL
+><LI
+> The HDBC modules may freely be imported and used across all threads.
+</LI
+><LI
+> HDBC modules may also freely share database connections and statements;
+   the database or HDBC driver will be responsible for locking if necessary.
+</LI
+></UL
+><P
+>I use &quot;share&quot; in the same sense as Python's DB-API: multiple threads may use
+the resource without wrapping it in any lock.
+</P
+><P
+>However, there are some caveats to the above:
+</P
+><UL
+><LI
+> Not all databases support more than one active statement for a single
+   connection.  Therefore, for maximum portability, you should use
+   a different connection to the database for each simultaneous query you
+   wish to use.
+   FIXME: describe when a statement is active.
+</LI
+><LI
+> Not all databases may support the level of multithreading described above.
+   For those that don't, safe access will be restriced in the HDBC driver
+   by using locks.  Therefore, you can write portable code, but you 
+   only get real multithreading when databases really support it.
+   Details of thread support should be documented in the HDBC
+   driver for each specific database.
+</LI
+></UL
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+><A NAME="17"
+>Copyright and License
+</A
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="doc"
+><P
+>Copyright (C) 2005-2006 John Goerzen <A HREF="jgoerzen@complete.org"
+>jgoerzen@complete.org</A
+>
+</P
+><P
+>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.
+</P
+><P
+>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.
+</P
+><P
+>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
+</P
+><P
+>Please see COPYING in the source distribution for the full license.
+</P
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 0.7</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/doc/doc-index-A.html b/doc/doc-index-A.html
new file mode 100644
--- /dev/null
+++ b/doc/doc-index-A.html
@@ -0,0 +1,126 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Haskell Database Connectivity (HDBC) (Index)</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+>Haskell Database Connectivity (HDBC)</TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD
+><A HREF="doc-index-A.html"
+>A</A
+></TD
+><TD
+><A HREF="doc-index-C.html"
+>C</A
+></TD
+><TD
+><A HREF="doc-index-D.html"
+>D</A
+></TD
+><TD
+><A HREF="doc-index-E.html"
+>E</A
+></TD
+><TD
+><A HREF="doc-index-F.html"
+>F</A
+></TD
+><TD
+><A HREF="doc-index-G.html"
+>G</A
+></TD
+><TD
+><A HREF="doc-index-H.html"
+>H</A
+></TD
+><TD
+><A HREF="doc-index-I.html"
+>I</A
+></TD
+><TD
+><A HREF="doc-index-N.html"
+>N</A
+></TD
+><TD
+><A HREF="doc-index-O.html"
+>O</A
+></TD
+><TD
+><A HREF="doc-index-P.html"
+>P</A
+></TD
+><TD
+><A HREF="doc-index-Q.html"
+>Q</A
+></TD
+><TD
+><A HREF="doc-index-R.html"
+>R</A
+></TD
+><TD
+><A HREF="doc-index-S.html"
+>S</A
+></TD
+><TD
+><A HREF="doc-index-T.html"
+>T</A
+></TD
+><TD
+><A HREF="doc-index-W.html"
+>W</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Index (A)</TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD CLASS="indexentry"
+>addChild</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-DriverUtils.html#v%3AaddChild"
+>Database.HDBC.DriverUtils</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/doc/doc-index-C.html b/doc/doc-index-C.html
new file mode 100644
--- /dev/null
+++ b/doc/doc-index-C.html
@@ -0,0 +1,224 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Haskell Database Connectivity (HDBC) (Index)</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+>Haskell Database Connectivity (HDBC)</TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD
+><A HREF="doc-index-A.html"
+>A</A
+></TD
+><TD
+><A HREF="doc-index-C.html"
+>C</A
+></TD
+><TD
+><A HREF="doc-index-D.html"
+>D</A
+></TD
+><TD
+><A HREF="doc-index-E.html"
+>E</A
+></TD
+><TD
+><A HREF="doc-index-F.html"
+>F</A
+></TD
+><TD
+><A HREF="doc-index-G.html"
+>G</A
+></TD
+><TD
+><A HREF="doc-index-H.html"
+>H</A
+></TD
+><TD
+><A HREF="doc-index-I.html"
+>I</A
+></TD
+><TD
+><A HREF="doc-index-N.html"
+>N</A
+></TD
+><TD
+><A HREF="doc-index-O.html"
+>O</A
+></TD
+><TD
+><A HREF="doc-index-P.html"
+>P</A
+></TD
+><TD
+><A HREF="doc-index-Q.html"
+>Q</A
+></TD
+><TD
+><A HREF="doc-index-R.html"
+>R</A
+></TD
+><TD
+><A HREF="doc-index-S.html"
+>S</A
+></TD
+><TD
+><A HREF="doc-index-T.html"
+>T</A
+></TD
+><TD
+><A HREF="doc-index-W.html"
+>W</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Index (C)</TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD CLASS="indexentry"
+>ChildList</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-DriverUtils.html#t%3AChildList"
+>Database.HDBC.DriverUtils</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry" COLSPAN="2"
+>Connection</TD
+></TR
+><TR
+><TD CLASS="indexannot"
+>1 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#t%3AConnection"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#t%3AConnection"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexannot"
+>2 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3AConnection"
+>Database.HDBC.Types</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>catchSql</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC.html#v%3AcatchSql"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>clone</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3Aclone"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3Aclone"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>closeAllChildren</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-DriverUtils.html#v%3AcloseAllChildren"
+>Database.HDBC.DriverUtils</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>colDecDigits</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3AcolDecDigits"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>colNullable</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3AcolNullable"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>colOctetLength</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3AcolOctetLength"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>colSize</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3AcolSize"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>colType</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3AcolType"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>commit</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3Acommit"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3Acommit"
+>Database.HDBC</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/doc/doc-index-D.html b/doc/doc-index-D.html
new file mode 100644
--- /dev/null
+++ b/doc/doc-index-D.html
@@ -0,0 +1,168 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Haskell Database Connectivity (HDBC) (Index)</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+>Haskell Database Connectivity (HDBC)</TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD
+><A HREF="doc-index-A.html"
+>A</A
+></TD
+><TD
+><A HREF="doc-index-C.html"
+>C</A
+></TD
+><TD
+><A HREF="doc-index-D.html"
+>D</A
+></TD
+><TD
+><A HREF="doc-index-E.html"
+>E</A
+></TD
+><TD
+><A HREF="doc-index-F.html"
+>F</A
+></TD
+><TD
+><A HREF="doc-index-G.html"
+>G</A
+></TD
+><TD
+><A HREF="doc-index-H.html"
+>H</A
+></TD
+><TD
+><A HREF="doc-index-I.html"
+>I</A
+></TD
+><TD
+><A HREF="doc-index-N.html"
+>N</A
+></TD
+><TD
+><A HREF="doc-index-O.html"
+>O</A
+></TD
+><TD
+><A HREF="doc-index-P.html"
+>P</A
+></TD
+><TD
+><A HREF="doc-index-Q.html"
+>Q</A
+></TD
+><TD
+><A HREF="doc-index-R.html"
+>R</A
+></TD
+><TD
+><A HREF="doc-index-S.html"
+>S</A
+></TD
+><TD
+><A HREF="doc-index-T.html"
+>T</A
+></TD
+><TD
+><A HREF="doc-index-W.html"
+>W</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Index (D)</TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD CLASS="indexentry"
+>dbServerVer</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3AdbServerVer"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3AdbServerVer"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>dbTransactionSupport</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3AdbTransactionSupport"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3AdbTransactionSupport"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>describeResult</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3AdescribeResult"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3AdescribeResult"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>describeTable</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3AdescribeTable"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3AdescribeTable"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>disconnect</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3Adisconnect"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3Adisconnect"
+>Database.HDBC</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/doc/doc-index-E.html b/doc/doc-index-E.html
new file mode 100644
--- /dev/null
+++ b/doc/doc-index-E.html
@@ -0,0 +1,138 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Haskell Database Connectivity (HDBC) (Index)</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+>Haskell Database Connectivity (HDBC)</TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD
+><A HREF="doc-index-A.html"
+>A</A
+></TD
+><TD
+><A HREF="doc-index-C.html"
+>C</A
+></TD
+><TD
+><A HREF="doc-index-D.html"
+>D</A
+></TD
+><TD
+><A HREF="doc-index-E.html"
+>E</A
+></TD
+><TD
+><A HREF="doc-index-F.html"
+>F</A
+></TD
+><TD
+><A HREF="doc-index-G.html"
+>G</A
+></TD
+><TD
+><A HREF="doc-index-H.html"
+>H</A
+></TD
+><TD
+><A HREF="doc-index-I.html"
+>I</A
+></TD
+><TD
+><A HREF="doc-index-N.html"
+>N</A
+></TD
+><TD
+><A HREF="doc-index-O.html"
+>O</A
+></TD
+><TD
+><A HREF="doc-index-P.html"
+>P</A
+></TD
+><TD
+><A HREF="doc-index-Q.html"
+>Q</A
+></TD
+><TD
+><A HREF="doc-index-R.html"
+>R</A
+></TD
+><TD
+><A HREF="doc-index-S.html"
+>S</A
+></TD
+><TD
+><A HREF="doc-index-T.html"
+>T</A
+></TD
+><TD
+><A HREF="doc-index-W.html"
+>W</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Index (E)</TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD CLASS="indexentry"
+>execute</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3Aexecute"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3Aexecute"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>executeMany</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3AexecuteMany"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3AexecuteMany"
+>Database.HDBC</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/doc/doc-index-F.html b/doc/doc-index-F.html
new file mode 100644
--- /dev/null
+++ b/doc/doc-index-F.html
@@ -0,0 +1,188 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Haskell Database Connectivity (HDBC) (Index)</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+>Haskell Database Connectivity (HDBC)</TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD
+><A HREF="doc-index-A.html"
+>A</A
+></TD
+><TD
+><A HREF="doc-index-C.html"
+>C</A
+></TD
+><TD
+><A HREF="doc-index-D.html"
+>D</A
+></TD
+><TD
+><A HREF="doc-index-E.html"
+>E</A
+></TD
+><TD
+><A HREF="doc-index-F.html"
+>F</A
+></TD
+><TD
+><A HREF="doc-index-G.html"
+>G</A
+></TD
+><TD
+><A HREF="doc-index-H.html"
+>H</A
+></TD
+><TD
+><A HREF="doc-index-I.html"
+>I</A
+></TD
+><TD
+><A HREF="doc-index-N.html"
+>N</A
+></TD
+><TD
+><A HREF="doc-index-O.html"
+>O</A
+></TD
+><TD
+><A HREF="doc-index-P.html"
+>P</A
+></TD
+><TD
+><A HREF="doc-index-Q.html"
+>Q</A
+></TD
+><TD
+><A HREF="doc-index-R.html"
+>R</A
+></TD
+><TD
+><A HREF="doc-index-S.html"
+>S</A
+></TD
+><TD
+><A HREF="doc-index-T.html"
+>T</A
+></TD
+><TD
+><A HREF="doc-index-W.html"
+>W</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Index (F)</TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD CLASS="indexentry"
+>fetchAllRows</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC.html#v%3AfetchAllRows"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>fetchAllRowsAL</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC.html#v%3AfetchAllRowsAL"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>fetchAllRowsMap</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC.html#v%3AfetchAllRowsMap"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>fetchRow</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3AfetchRow"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3AfetchRow"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>fetchRowAL</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC.html#v%3AfetchRowAL"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>fetchRowMap</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC.html#v%3AfetchRowMap"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>finish</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3Afinish"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3Afinish"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>fromSql</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3AfromSql"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3AfromSql"
+>Database.HDBC</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/doc/doc-index-G.html b/doc/doc-index-G.html
new file mode 100644
--- /dev/null
+++ b/doc/doc-index-G.html
@@ -0,0 +1,138 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Haskell Database Connectivity (HDBC) (Index)</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+>Haskell Database Connectivity (HDBC)</TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD
+><A HREF="doc-index-A.html"
+>A</A
+></TD
+><TD
+><A HREF="doc-index-C.html"
+>C</A
+></TD
+><TD
+><A HREF="doc-index-D.html"
+>D</A
+></TD
+><TD
+><A HREF="doc-index-E.html"
+>E</A
+></TD
+><TD
+><A HREF="doc-index-F.html"
+>F</A
+></TD
+><TD
+><A HREF="doc-index-G.html"
+>G</A
+></TD
+><TD
+><A HREF="doc-index-H.html"
+>H</A
+></TD
+><TD
+><A HREF="doc-index-I.html"
+>I</A
+></TD
+><TD
+><A HREF="doc-index-N.html"
+>N</A
+></TD
+><TD
+><A HREF="doc-index-O.html"
+>O</A
+></TD
+><TD
+><A HREF="doc-index-P.html"
+>P</A
+></TD
+><TD
+><A HREF="doc-index-Q.html"
+>Q</A
+></TD
+><TD
+><A HREF="doc-index-R.html"
+>R</A
+></TD
+><TD
+><A HREF="doc-index-S.html"
+>S</A
+></TD
+><TD
+><A HREF="doc-index-T.html"
+>T</A
+></TD
+><TD
+><A HREF="doc-index-W.html"
+>W</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Index (G)</TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD CLASS="indexentry"
+>getColumnNames</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3AgetColumnNames"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3AgetColumnNames"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>getTables</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3AgetTables"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3AgetTables"
+>Database.HDBC</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/doc/doc-index-H.html b/doc/doc-index-H.html
new file mode 100644
--- /dev/null
+++ b/doc/doc-index-H.html
@@ -0,0 +1,154 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Haskell Database Connectivity (HDBC) (Index)</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+>Haskell Database Connectivity (HDBC)</TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD
+><A HREF="doc-index-A.html"
+>A</A
+></TD
+><TD
+><A HREF="doc-index-C.html"
+>C</A
+></TD
+><TD
+><A HREF="doc-index-D.html"
+>D</A
+></TD
+><TD
+><A HREF="doc-index-E.html"
+>E</A
+></TD
+><TD
+><A HREF="doc-index-F.html"
+>F</A
+></TD
+><TD
+><A HREF="doc-index-G.html"
+>G</A
+></TD
+><TD
+><A HREF="doc-index-H.html"
+>H</A
+></TD
+><TD
+><A HREF="doc-index-I.html"
+>I</A
+></TD
+><TD
+><A HREF="doc-index-N.html"
+>N</A
+></TD
+><TD
+><A HREF="doc-index-O.html"
+>O</A
+></TD
+><TD
+><A HREF="doc-index-P.html"
+>P</A
+></TD
+><TD
+><A HREF="doc-index-Q.html"
+>Q</A
+></TD
+><TD
+><A HREF="doc-index-R.html"
+>R</A
+></TD
+><TD
+><A HREF="doc-index-S.html"
+>S</A
+></TD
+><TD
+><A HREF="doc-index-T.html"
+>T</A
+></TD
+><TD
+><A HREF="doc-index-W.html"
+>W</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Index (H)</TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD CLASS="indexentry"
+>handleSql</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC.html#v%3AhandleSql"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>handleSqlError</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC.html#v%3AhandleSqlError"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>hdbcClientVer</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3AhdbcClientVer"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3AhdbcClientVer"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>hdbcDriverName</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3AhdbcDriverName"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3AhdbcDriverName"
+>Database.HDBC</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/doc/doc-index-I.html b/doc/doc-index-I.html
new file mode 100644
--- /dev/null
+++ b/doc/doc-index-I.html
@@ -0,0 +1,128 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Haskell Database Connectivity (HDBC) (Index)</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+>Haskell Database Connectivity (HDBC)</TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD
+><A HREF="doc-index-A.html"
+>A</A
+></TD
+><TD
+><A HREF="doc-index-C.html"
+>C</A
+></TD
+><TD
+><A HREF="doc-index-D.html"
+>D</A
+></TD
+><TD
+><A HREF="doc-index-E.html"
+>E</A
+></TD
+><TD
+><A HREF="doc-index-F.html"
+>F</A
+></TD
+><TD
+><A HREF="doc-index-G.html"
+>G</A
+></TD
+><TD
+><A HREF="doc-index-H.html"
+>H</A
+></TD
+><TD
+><A HREF="doc-index-I.html"
+>I</A
+></TD
+><TD
+><A HREF="doc-index-N.html"
+>N</A
+></TD
+><TD
+><A HREF="doc-index-O.html"
+>O</A
+></TD
+><TD
+><A HREF="doc-index-P.html"
+>P</A
+></TD
+><TD
+><A HREF="doc-index-Q.html"
+>Q</A
+></TD
+><TD
+><A HREF="doc-index-R.html"
+>R</A
+></TD
+><TD
+><A HREF="doc-index-S.html"
+>S</A
+></TD
+><TD
+><A HREF="doc-index-T.html"
+>T</A
+></TD
+><TD
+><A HREF="doc-index-W.html"
+>W</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Index (I)</TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD CLASS="indexentry"
+>iToSql</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3AiToSql"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3AiToSql"
+>Database.HDBC</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/doc/doc-index-N.html b/doc/doc-index-N.html
new file mode 100644
--- /dev/null
+++ b/doc/doc-index-N.html
@@ -0,0 +1,128 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Haskell Database Connectivity (HDBC) (Index)</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+>Haskell Database Connectivity (HDBC)</TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD
+><A HREF="doc-index-A.html"
+>A</A
+></TD
+><TD
+><A HREF="doc-index-C.html"
+>C</A
+></TD
+><TD
+><A HREF="doc-index-D.html"
+>D</A
+></TD
+><TD
+><A HREF="doc-index-E.html"
+>E</A
+></TD
+><TD
+><A HREF="doc-index-F.html"
+>F</A
+></TD
+><TD
+><A HREF="doc-index-G.html"
+>G</A
+></TD
+><TD
+><A HREF="doc-index-H.html"
+>H</A
+></TD
+><TD
+><A HREF="doc-index-I.html"
+>I</A
+></TD
+><TD
+><A HREF="doc-index-N.html"
+>N</A
+></TD
+><TD
+><A HREF="doc-index-O.html"
+>O</A
+></TD
+><TD
+><A HREF="doc-index-P.html"
+>P</A
+></TD
+><TD
+><A HREF="doc-index-Q.html"
+>Q</A
+></TD
+><TD
+><A HREF="doc-index-R.html"
+>R</A
+></TD
+><TD
+><A HREF="doc-index-S.html"
+>S</A
+></TD
+><TD
+><A HREF="doc-index-T.html"
+>T</A
+></TD
+><TD
+><A HREF="doc-index-W.html"
+>W</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Index (N)</TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD CLASS="indexentry"
+>nToSql</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3AnToSql"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3AnToSql"
+>Database.HDBC</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/doc/doc-index-O.html b/doc/doc-index-O.html
new file mode 100644
--- /dev/null
+++ b/doc/doc-index-O.html
@@ -0,0 +1,128 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Haskell Database Connectivity (HDBC) (Index)</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+>Haskell Database Connectivity (HDBC)</TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD
+><A HREF="doc-index-A.html"
+>A</A
+></TD
+><TD
+><A HREF="doc-index-C.html"
+>C</A
+></TD
+><TD
+><A HREF="doc-index-D.html"
+>D</A
+></TD
+><TD
+><A HREF="doc-index-E.html"
+>E</A
+></TD
+><TD
+><A HREF="doc-index-F.html"
+>F</A
+></TD
+><TD
+><A HREF="doc-index-G.html"
+>G</A
+></TD
+><TD
+><A HREF="doc-index-H.html"
+>H</A
+></TD
+><TD
+><A HREF="doc-index-I.html"
+>I</A
+></TD
+><TD
+><A HREF="doc-index-N.html"
+>N</A
+></TD
+><TD
+><A HREF="doc-index-O.html"
+>O</A
+></TD
+><TD
+><A HREF="doc-index-P.html"
+>P</A
+></TD
+><TD
+><A HREF="doc-index-Q.html"
+>Q</A
+></TD
+><TD
+><A HREF="doc-index-R.html"
+>R</A
+></TD
+><TD
+><A HREF="doc-index-S.html"
+>S</A
+></TD
+><TD
+><A HREF="doc-index-T.html"
+>T</A
+></TD
+><TD
+><A HREF="doc-index-W.html"
+>W</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Index (O)</TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD CLASS="indexentry"
+>originalQuery</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3AoriginalQuery"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3AoriginalQuery"
+>Database.HDBC</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/doc/doc-index-P.html b/doc/doc-index-P.html
new file mode 100644
--- /dev/null
+++ b/doc/doc-index-P.html
@@ -0,0 +1,148 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Haskell Database Connectivity (HDBC) (Index)</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+>Haskell Database Connectivity (HDBC)</TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD
+><A HREF="doc-index-A.html"
+>A</A
+></TD
+><TD
+><A HREF="doc-index-C.html"
+>C</A
+></TD
+><TD
+><A HREF="doc-index-D.html"
+>D</A
+></TD
+><TD
+><A HREF="doc-index-E.html"
+>E</A
+></TD
+><TD
+><A HREF="doc-index-F.html"
+>F</A
+></TD
+><TD
+><A HREF="doc-index-G.html"
+>G</A
+></TD
+><TD
+><A HREF="doc-index-H.html"
+>H</A
+></TD
+><TD
+><A HREF="doc-index-I.html"
+>I</A
+></TD
+><TD
+><A HREF="doc-index-N.html"
+>N</A
+></TD
+><TD
+><A HREF="doc-index-O.html"
+>O</A
+></TD
+><TD
+><A HREF="doc-index-P.html"
+>P</A
+></TD
+><TD
+><A HREF="doc-index-Q.html"
+>Q</A
+></TD
+><TD
+><A HREF="doc-index-R.html"
+>R</A
+></TD
+><TD
+><A HREF="doc-index-S.html"
+>S</A
+></TD
+><TD
+><A HREF="doc-index-T.html"
+>T</A
+></TD
+><TD
+><A HREF="doc-index-W.html"
+>W</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Index (P)</TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD CLASS="indexentry"
+>prepare</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3Aprepare"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3Aprepare"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>proxiedClientName</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3AproxiedClientName"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3AproxiedClientName"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>proxiedClientVer</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3AproxiedClientVer"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3AproxiedClientVer"
+>Database.HDBC</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/doc/doc-index-Q.html b/doc/doc-index-Q.html
new file mode 100644
--- /dev/null
+++ b/doc/doc-index-Q.html
@@ -0,0 +1,126 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Haskell Database Connectivity (HDBC) (Index)</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+>Haskell Database Connectivity (HDBC)</TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD
+><A HREF="doc-index-A.html"
+>A</A
+></TD
+><TD
+><A HREF="doc-index-C.html"
+>C</A
+></TD
+><TD
+><A HREF="doc-index-D.html"
+>D</A
+></TD
+><TD
+><A HREF="doc-index-E.html"
+>E</A
+></TD
+><TD
+><A HREF="doc-index-F.html"
+>F</A
+></TD
+><TD
+><A HREF="doc-index-G.html"
+>G</A
+></TD
+><TD
+><A HREF="doc-index-H.html"
+>H</A
+></TD
+><TD
+><A HREF="doc-index-I.html"
+>I</A
+></TD
+><TD
+><A HREF="doc-index-N.html"
+>N</A
+></TD
+><TD
+><A HREF="doc-index-O.html"
+>O</A
+></TD
+><TD
+><A HREF="doc-index-P.html"
+>P</A
+></TD
+><TD
+><A HREF="doc-index-Q.html"
+>Q</A
+></TD
+><TD
+><A HREF="doc-index-R.html"
+>R</A
+></TD
+><TD
+><A HREF="doc-index-S.html"
+>S</A
+></TD
+><TD
+><A HREF="doc-index-T.html"
+>T</A
+></TD
+><TD
+><A HREF="doc-index-W.html"
+>W</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Index (Q)</TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD CLASS="indexentry"
+>quickQuery</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC.html#v%3AquickQuery"
+>Database.HDBC</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/doc/doc-index-R.html b/doc/doc-index-R.html
new file mode 100644
--- /dev/null
+++ b/doc/doc-index-R.html
@@ -0,0 +1,138 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Haskell Database Connectivity (HDBC) (Index)</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+>Haskell Database Connectivity (HDBC)</TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD
+><A HREF="doc-index-A.html"
+>A</A
+></TD
+><TD
+><A HREF="doc-index-C.html"
+>C</A
+></TD
+><TD
+><A HREF="doc-index-D.html"
+>D</A
+></TD
+><TD
+><A HREF="doc-index-E.html"
+>E</A
+></TD
+><TD
+><A HREF="doc-index-F.html"
+>F</A
+></TD
+><TD
+><A HREF="doc-index-G.html"
+>G</A
+></TD
+><TD
+><A HREF="doc-index-H.html"
+>H</A
+></TD
+><TD
+><A HREF="doc-index-I.html"
+>I</A
+></TD
+><TD
+><A HREF="doc-index-N.html"
+>N</A
+></TD
+><TD
+><A HREF="doc-index-O.html"
+>O</A
+></TD
+><TD
+><A HREF="doc-index-P.html"
+>P</A
+></TD
+><TD
+><A HREF="doc-index-Q.html"
+>Q</A
+></TD
+><TD
+><A HREF="doc-index-R.html"
+>R</A
+></TD
+><TD
+><A HREF="doc-index-S.html"
+>S</A
+></TD
+><TD
+><A HREF="doc-index-T.html"
+>T</A
+></TD
+><TD
+><A HREF="doc-index-W.html"
+>W</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Index (R)</TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD CLASS="indexentry"
+>rollback</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3Arollback"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3Arollback"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>run</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3Arun"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3Arun"
+>Database.HDBC</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/doc/doc-index-S.html b/doc/doc-index-S.html
new file mode 100644
--- /dev/null
+++ b/doc/doc-index-S.html
@@ -0,0 +1,748 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Haskell Database Connectivity (HDBC) (Index)</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+>Haskell Database Connectivity (HDBC)</TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD
+><A HREF="doc-index-A.html"
+>A</A
+></TD
+><TD
+><A HREF="doc-index-C.html"
+>C</A
+></TD
+><TD
+><A HREF="doc-index-D.html"
+>D</A
+></TD
+><TD
+><A HREF="doc-index-E.html"
+>E</A
+></TD
+><TD
+><A HREF="doc-index-F.html"
+>F</A
+></TD
+><TD
+><A HREF="doc-index-G.html"
+>G</A
+></TD
+><TD
+><A HREF="doc-index-H.html"
+>H</A
+></TD
+><TD
+><A HREF="doc-index-I.html"
+>I</A
+></TD
+><TD
+><A HREF="doc-index-N.html"
+>N</A
+></TD
+><TD
+><A HREF="doc-index-O.html"
+>O</A
+></TD
+><TD
+><A HREF="doc-index-P.html"
+>P</A
+></TD
+><TD
+><A HREF="doc-index-Q.html"
+>Q</A
+></TD
+><TD
+><A HREF="doc-index-R.html"
+>R</A
+></TD
+><TD
+><A HREF="doc-index-S.html"
+>S</A
+></TD
+><TD
+><A HREF="doc-index-T.html"
+>T</A
+></TD
+><TD
+><A HREF="doc-index-W.html"
+>W</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Index (S)</TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD CLASS="indexentry"
+>SqlBigIntT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlBigIntT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlBinaryT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlBinaryT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlBitT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlBitT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlBool</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3ASqlBool"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3ASqlBool"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlChar</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3ASqlChar"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3ASqlChar"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlCharT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlCharT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry" COLSPAN="2"
+>SqlColDesc</TD
+></TR
+><TR
+><TD CLASS="indexannot"
+>1 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#t%3ASqlColDesc"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexannot"
+>2 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlColDesc"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlDateT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlDateT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlDecimalT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlDecimalT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlDouble</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3ASqlDouble"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3ASqlDouble"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlDoubleT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlDoubleT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlEpochTime</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3ASqlEpochTime"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3ASqlEpochTime"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry" COLSPAN="2"
+>SqlError</TD
+></TR
+><TR
+><TD CLASS="indexannot"
+>1 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#t%3ASqlError"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#t%3ASqlError"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexannot"
+>2 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3ASqlError"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3ASqlError"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlFloatT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlFloatT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlGUIDT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlGUIDT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlInt32</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3ASqlInt32"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3ASqlInt32"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlInt64</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3ASqlInt64"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3ASqlInt64"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlInteger</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3ASqlInteger"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3ASqlInteger"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlIntegerT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntegerT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlInterval</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#t%3ASqlInterval"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlIntervalDayT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalDayT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlIntervalDayToHourT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalDayToHourT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlIntervalDayToMinuteT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalDayToMinuteT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlIntervalDayToSecondT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalDayToSecondT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlIntervalHourT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalHourT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlIntervalHourToMinuteT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalHourToMinuteT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlIntervalHourToSecondT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalHourToSecondT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlIntervalMinuteT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalMinuteT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlIntervalMinuteToSecondT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalMinuteToSecondT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlIntervalMonthT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalMonthT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlIntervalSecondT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalSecondT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlIntervalT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlIntervalYearT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalYearT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlIntervalYearToMonthT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlIntervalYearToMonthT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlLongVarBinaryT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlLongVarBinaryT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlLongVarCharT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlLongVarCharT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlNull</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3ASqlNull"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3ASqlNull"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlNumericT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlNumericT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlRational</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3ASqlRational"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3ASqlRational"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlRealT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlRealT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlSmallIntT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlSmallIntT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlString</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3ASqlString"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3ASqlString"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlTimeDiff</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3ASqlTimeDiff"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3ASqlTimeDiff"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlTimeT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlTimeT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlTimestampT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlTimestampT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlTinyIntT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlTinyIntT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlType</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#t%3ASqlType"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#t%3ASqlType"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlTypeId</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#t%3ASqlTypeId"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlUTCDateTimeT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlUTCDateTimeT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlUTCTimeT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlUTCTimeT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlUnknownT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlUnknownT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlValue</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#t%3ASqlValue"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#t%3ASqlValue"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlVarBinaryT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlVarBinaryT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlVarCharT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlVarCharT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlWCharT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlWCharT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlWLongVarCharT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlWLongVarCharT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlWVarCharT</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-ColTypes.html#v%3ASqlWVarCharT"
+>Database.HDBC.ColTypes</A
+>, Database.HDBC</TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlWord32</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3ASqlWord32"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3ASqlWord32"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>SqlWord64</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3ASqlWord64"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3ASqlWord64"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry" COLSPAN="2"
+>Statement</TD
+></TR
+><TR
+><TD CLASS="indexannot"
+>1 (Type/Class)</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#t%3AStatement"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#t%3AStatement"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexannot"
+>2 (Data Constructor)</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3AStatement"
+>Database.HDBC.Types</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>sExecute</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC.html#v%3AsExecute"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>sExecuteMany</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC.html#v%3AsExecuteMany"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>sFetchAllRows</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC.html#v%3AsFetchAllRows"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>sFetchRow</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC.html#v%3AsFetchRow"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>sRun</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC.html#v%3AsRun"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>seErrorMsg</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3AseErrorMsg"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3AseErrorMsg"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>seNativeError</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3AseNativeError"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3AseNativeError"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>seState</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3AseState"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3AseState"
+>Database.HDBC</A
+></TD
+></TR
+><TR
+><TD CLASS="indexentry"
+>sqlExceptions</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC.html#v%3AsqlExceptions"
+>Database.HDBC</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/doc/doc-index-T.html b/doc/doc-index-T.html
new file mode 100644
--- /dev/null
+++ b/doc/doc-index-T.html
@@ -0,0 +1,128 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Haskell Database Connectivity (HDBC) (Index)</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+>Haskell Database Connectivity (HDBC)</TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD
+><A HREF="doc-index-A.html"
+>A</A
+></TD
+><TD
+><A HREF="doc-index-C.html"
+>C</A
+></TD
+><TD
+><A HREF="doc-index-D.html"
+>D</A
+></TD
+><TD
+><A HREF="doc-index-E.html"
+>E</A
+></TD
+><TD
+><A HREF="doc-index-F.html"
+>F</A
+></TD
+><TD
+><A HREF="doc-index-G.html"
+>G</A
+></TD
+><TD
+><A HREF="doc-index-H.html"
+>H</A
+></TD
+><TD
+><A HREF="doc-index-I.html"
+>I</A
+></TD
+><TD
+><A HREF="doc-index-N.html"
+>N</A
+></TD
+><TD
+><A HREF="doc-index-O.html"
+>O</A
+></TD
+><TD
+><A HREF="doc-index-P.html"
+>P</A
+></TD
+><TD
+><A HREF="doc-index-Q.html"
+>Q</A
+></TD
+><TD
+><A HREF="doc-index-R.html"
+>R</A
+></TD
+><TD
+><A HREF="doc-index-S.html"
+>S</A
+></TD
+><TD
+><A HREF="doc-index-T.html"
+>T</A
+></TD
+><TD
+><A HREF="doc-index-W.html"
+>W</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Index (T)</TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD CLASS="indexentry"
+>toSql</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC-Types.html#v%3AtoSql"
+>Database.HDBC.Types</A
+>, <A HREF="Database-HDBC.html#v%3AtoSql"
+>Database.HDBC</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/doc/doc-index-W.html b/doc/doc-index-W.html
new file mode 100644
--- /dev/null
+++ b/doc/doc-index-W.html
@@ -0,0 +1,126 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Haskell Database Connectivity (HDBC) (Index)</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+>Haskell Database Connectivity (HDBC)</TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD
+><A HREF="doc-index-A.html"
+>A</A
+></TD
+><TD
+><A HREF="doc-index-C.html"
+>C</A
+></TD
+><TD
+><A HREF="doc-index-D.html"
+>D</A
+></TD
+><TD
+><A HREF="doc-index-E.html"
+>E</A
+></TD
+><TD
+><A HREF="doc-index-F.html"
+>F</A
+></TD
+><TD
+><A HREF="doc-index-G.html"
+>G</A
+></TD
+><TD
+><A HREF="doc-index-H.html"
+>H</A
+></TD
+><TD
+><A HREF="doc-index-I.html"
+>I</A
+></TD
+><TD
+><A HREF="doc-index-N.html"
+>N</A
+></TD
+><TD
+><A HREF="doc-index-O.html"
+>O</A
+></TD
+><TD
+><A HREF="doc-index-P.html"
+>P</A
+></TD
+><TD
+><A HREF="doc-index-Q.html"
+>Q</A
+></TD
+><TD
+><A HREF="doc-index-R.html"
+>R</A
+></TD
+><TD
+><A HREF="doc-index-S.html"
+>S</A
+></TD
+><TD
+><A HREF="doc-index-T.html"
+>T</A
+></TD
+><TD
+><A HREF="doc-index-W.html"
+>W</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Index (W)</TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD CLASS="indexentry"
+>withTransaction</TD
+><TD CLASS="indexlinks"
+><A HREF="Database-HDBC.html#v%3AwithTransaction"
+>Database.HDBC</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/doc/doc-index.html b/doc/doc-index.html
new file mode 100644
--- /dev/null
+++ b/doc/doc-index.html
@@ -0,0 +1,112 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Haskell Database Connectivity (HDBC) (Index)</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+>Haskell Database Connectivity (HDBC)</TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Index</TD
+></TR
+><TR
+><TD
+><TABLE CELLPADDING="0" CELLSPACING="5"
+><TR
+><TD
+><A HREF="doc-index-A.html"
+>A</A
+></TD
+><TD
+><A HREF="doc-index-C.html"
+>C</A
+></TD
+><TD
+><A HREF="doc-index-D.html"
+>D</A
+></TD
+><TD
+><A HREF="doc-index-E.html"
+>E</A
+></TD
+><TD
+><A HREF="doc-index-F.html"
+>F</A
+></TD
+><TD
+><A HREF="doc-index-G.html"
+>G</A
+></TD
+><TD
+><A HREF="doc-index-H.html"
+>H</A
+></TD
+><TD
+><A HREF="doc-index-I.html"
+>I</A
+></TD
+><TD
+><A HREF="doc-index-N.html"
+>N</A
+></TD
+><TD
+><A HREF="doc-index-O.html"
+>O</A
+></TD
+><TD
+><A HREF="doc-index-P.html"
+>P</A
+></TD
+><TD
+><A HREF="doc-index-Q.html"
+>Q</A
+></TD
+><TD
+><A HREF="doc-index-R.html"
+>R</A
+></TD
+><TD
+><A HREF="doc-index-S.html"
+>S</A
+></TD
+><TD
+><A HREF="doc-index-T.html"
+>T</A
+></TD
+><TD
+><A HREF="doc-index-W.html"
+>W</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/doc/haddock.css b/doc/haddock.css
new file mode 100644
--- /dev/null
+++ b/doc/haddock.css
@@ -0,0 +1,235 @@
+/* -------- Global things --------- */
+
+BODY { 
+  background-color: #ffffff;
+  color: #000000;
+  font-family: sans-serif;
+  } 
+
+A:link    { color: #0000e0; text-decoration: none }
+A:visited { color: #0000a0; text-decoration: none }
+A:hover   { background-color: #e0e0ff; text-decoration: none }
+
+TABLE.vanilla {
+  width: 100%;
+  border-width: 0px;
+  /* I can't seem to specify cellspacing or cellpadding properly using CSS... */
+}
+
+TABLE.vanilla2 {
+  border-width: 0px;
+}
+
+/* <TT> font is a little too small in MSIE */
+TT  { font-size: 100%; }
+PRE { font-size: 100%; }
+
+LI P { margin: 0pt } 
+
+TD {
+  border-width: 0px;
+}
+
+TABLE.narrow {
+  border-width: 0px;
+}
+
+TD.s8  {  height: 8px;  }
+TD.s15 {  height: 15px; }
+
+SPAN.keyword { text-decoration: underline; }
+
+/* Resize the buttom image to match the text size */
+IMG.coll { width : 0.75em; height: 0.75em; margin-bottom: 0; margin-right: 0.5em }
+
+/* --------- Contents page ---------- */
+
+DIV.node {
+  padding-left: 3em;
+}
+
+DIV.cnode {
+  padding-left: 1.75em;
+}
+
+SPAN.pkg {
+  position: absolute;
+  left: 50em;
+}
+
+/* --------- Documentation elements ---------- */
+
+TD.children {
+  padding-left: 25px;
+  }
+
+TD.synopsis {
+  padding: 2px;
+  background-color: #f0f0f0;
+  font-family: monospace
+ }
+
+TD.decl { 
+  padding: 2px;
+  background-color: #f0f0f0; 
+  font-family: monospace;
+  vertical-align: top;
+  }
+
+/* 
+  arg is just like decl, except that wrapping is not allowed.  It is
+  used for function and constructor arguments which have a text box
+  to the right, where if wrapping is allowed the text box squashes up
+  the declaration by wrapping it.
+*/
+TD.arg { 
+  padding: 2px;
+  background-color: #f0f0f0; 
+  font-family: monospace;
+  vertical-align: top;
+  white-space: nowrap;
+  }
+
+TD.recfield { padding-left: 20px }
+
+TD.doc  { 
+  padding-top: 2px;
+  padding-left: 10px;
+  }
+
+TD.ndoc  { 
+  padding: 2px;
+  }
+
+TD.rdoc  { 
+  padding: 2px;
+  padding-left: 10px;
+  width: 100%;
+  }
+
+TD.body  { 
+  padding-left: 10px
+  }
+
+TD.pkg {
+  width: 100%;
+  padding-left: 10px
+}
+
+TD.indexentry {
+  vertical-align: top;
+  padding-right: 10px
+  }
+
+TD.indexannot {
+  vertical-align: top;
+  padding-left: 20px;
+  white-space: nowrap
+  }
+
+TD.indexlinks {
+  width: 100%
+  }
+
+/* ------- Section Headings ------- */
+
+TD.section1 {
+  padding-top: 15px;
+  font-weight: bold;
+  font-size: 150%
+  }
+
+TD.section2 {
+  padding-top: 10px;
+  font-weight: bold;
+  font-size: 130%
+  }
+
+TD.section3 {
+  padding-top: 5px;
+  font-weight: bold;
+  font-size: 110%
+  }
+
+TD.section4 {
+  font-weight: bold;
+  font-size: 100%
+  }
+
+/* -------------- The title bar at the top of the page */
+
+TD.infohead {
+  color: #ffffff;
+  font-weight: bold;
+  padding-right: 10px;
+  text-align: left;
+}
+
+TD.infoval {
+  color: #ffffff;
+  padding-right: 10px;
+  text-align: left;
+}
+
+TD.topbar {
+  background-color: #000099;
+  padding: 5px;
+}
+
+TD.title {
+  color: #ffffff;
+  padding-left: 10px;
+  width: 100%
+  }
+
+TD.topbut {
+  padding-left: 5px;
+  padding-right: 5px;
+  border-left-width: 1px;
+  border-left-color: #ffffff;
+  border-left-style: solid;
+  white-space: nowrap;
+  }
+
+TD.topbut A:link {
+  color: #ffffff
+  }
+
+TD.topbut A:visited {
+  color: #ffff00
+  }
+
+TD.topbut A:hover {
+  background-color: #6060ff;
+  }
+
+TD.topbut:hover {
+  background-color: #6060ff
+  }
+
+TD.modulebar { 
+  background-color: #0077dd;
+  padding: 5px;
+  border-top-width: 1px;
+  border-top-color: #ffffff;
+  border-top-style: solid;
+  }
+
+/* --------- The page footer --------- */
+
+TD.botbar {
+  background-color: #000099;
+  color: #ffffff;
+  padding: 5px
+  }
+TD.botbar A:link {
+  color: #ffffff;
+  text-decoration: underline
+  }
+TD.botbar A:visited {
+  color: #ffff00
+  }
+TD.botbar A:hover {
+  background-color: #6060ff
+  }
+
diff --git a/doc/haddock.js b/doc/haddock.js
new file mode 100644
--- /dev/null
+++ b/doc/haddock.js
@@ -0,0 +1,15 @@
+// Haddock JavaScript utilities
+function toggle(button,id)
+{
+   var n = document.getElementById(id).style;
+   if (n.display == "none")
+   {
+	button.src = "minus.gif";
+	n.display = "block";
+   }
+   else
+   {
+	button.src = "plus.gif";
+	n.display = "none";
+   }
+}
diff --git a/doc/haskell_icon.gif b/doc/haskell_icon.gif
new file mode 100644
Binary files /dev/null and b/doc/haskell_icon.gif differ
diff --git a/doc/hdbc.interface b/doc/hdbc.interface
new file mode 100644
Binary files /dev/null and b/doc/hdbc.interface differ
diff --git a/doc/index.html b/doc/index.html
new file mode 100644
--- /dev/null
+++ b/doc/index.html
@@ -0,0 +1,120 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--Rendered using the Haskell Html Library v0.2-->
+<HTML
+><HEAD
+><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
+><TITLE
+>Haskell Database Connectivity (HDBC)</TITLE
+><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
+><SCRIPT SRC="haddock.js" TYPE="text/javascript"
+></SCRIPT
+></HEAD
+><BODY
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD CLASS="topbar"
+><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD
+><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
+></TD
+><TD CLASS="title"
+>Haskell Database Connectivity (HDBC)</TD
+><TD CLASS="topbut"
+><A HREF="index.html"
+>Contents</A
+></TD
+><TD CLASS="topbut"
+><A HREF="doc-index.html"
+>Index</A
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="section1"
+>Modules</TD
+></TR
+><TR
+><TD
+><TABLE CLASS="vanilla2" CELLSPACING="0" CELLPADDING="0"
+><TR
+><TD STYLE="width: 50em"
+><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'n:0')" ALT="show/hide"
+>Database</TD
+><TD
+></TD
+><TD
+></TD
+></TR
+><TR
+><TD STYLE="padding: 0; padding-left: 2em" COLSPAN="3"
+><TABLE CLASS="vanilla2" CELLSPACING="0" CELLPADDING="0" ID="n:0" STYLE="display:block;"
+><TR
+><TD STYLE="width: 48em"
+><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'n:1')" ALT="show/hide"
+><A HREF="Database-HDBC.html"
+>Database.HDBC</A
+></TD
+><TD
+></TD
+><TD
+></TD
+></TR
+><TR
+><TD STYLE="padding: 0; padding-left: 2em" COLSPAN="3"
+><TABLE CLASS="vanilla2" CELLSPACING="0" CELLPADDING="0" ID="n:1" STYLE="display:block;"
+><TR
+><TD STYLE="padding-left: 1.25em;width: 46em"
+><A HREF="Database-HDBC-ColTypes.html"
+>Database.HDBC.ColTypes</A
+></TD
+><TD
+></TD
+><TD
+></TD
+></TR
+><TR
+><TD STYLE="padding-left: 1.25em;width: 46em"
+><A HREF="Database-HDBC-DriverUtils.html"
+>Database.HDBC.DriverUtils</A
+></TD
+><TD
+></TD
+><TD
+></TD
+></TR
+><TR
+><TD STYLE="padding-left: 1.25em;width: 46em"
+><A HREF="Database-HDBC-Types.html"
+>Database.HDBC.Types</A
+></TD
+><TD
+></TD
+><TD
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+></TABLE
+></TD
+></TR
+><TR
+><TD CLASS="s15"
+></TD
+></TR
+><TR
+><TD CLASS="botbar"
+>Produced by <A HREF="http://www.haskell.org/haddock/"
+>Haddock</A
+> version 0.7</TD
+></TR
+></TABLE
+></BODY
+></HTML
+>
diff --git a/doc/minus.gif b/doc/minus.gif
new file mode 100644
Binary files /dev/null and b/doc/minus.gif differ
diff --git a/doc/plus.gif b/doc/plus.gif
new file mode 100644
Binary files /dev/null and b/doc/plus.gif differ
