Skip to content

Commit

Permalink
Add some documentation to make it clear what's what.
Browse files Browse the repository at this point in the history
--HG--
rename : COPYING => LICENSE
  • Loading branch information
bos committed Apr 28, 2011
1 parent 1627d70 commit 9882268
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 512 deletions.
510 changes: 0 additions & 510 deletions COPYING

This file was deleted.

23 changes: 23 additions & 0 deletions Database/MySQL/Base.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
{-# LANGUAGE DeriveDataTypeable, ForeignFunctionInterface, RecordWildCards #-}

-- |
-- Module: Database.MySQL.Base
-- Copyright: (c) 2011 MailRank, Inc.
-- License: BSD3
-- Maintainer: Bryan O'Sullivan <[email protected]>
-- Stability: experimental
-- Portability: portable
--
-- A low-level client library for the MySQL database, implemented as
-- bindings to the C @mysqlclient@ API.

module Database.MySQL.Base
(
-- * Licensing
-- $license
-- * Resource management
-- $mgmt
-- * Types
Expand Down Expand Up @@ -83,6 +96,16 @@ import Foreign.Ptr (Ptr, castPtr, nullPtr)
import System.IO.Unsafe (unsafePerformIO)
import System.Mem.Weak (Weak, deRefWeak, mkWeakPtr)

-- $license
--
-- /Important licensing note/: This library is BSD-licensed under the
-- terms of the MySQL FOSS License Exception
-- <http://www.mysql.com/about/legal/licensing/foss-exception/>.
--
-- Since this library links against the GPL-licensed @mysqlclient@
-- library, a non-open-source application that uses it /may/ be
-- subject to the terms of the GPL.

-- $mgmt
--
-- Our rules for managing 'Connection' and 'Result' values are
Expand Down
9 changes: 9 additions & 0 deletions Database/MySQL/Base/C.hsc
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{-# LANGUAGE EmptyDataDecls, ForeignFunctionInterface #-}

-- |
-- Module: Database.MySQL.Base.C
-- Copyright: (c) 2011 MailRank, Inc.
-- License: BSD3
-- Maintainer: Bryan O'Sullivan <[email protected]>
-- Stability: experimental
-- Portability: portable
--
-- Direct bindings to the C @mysqlclient@ API.
module Database.MySQL.Base.C
(
-- * Connection management
Expand Down
11 changes: 11 additions & 0 deletions Database/MySQL/Base/Types.hsc
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
{-# LANGUAGE DeriveDataTypeable, EmptyDataDecls, ForeignFunctionInterface #-}

-- |
-- Module: Database.MySQL.Base.C
-- Copyright: (c) 2011 MailRank, Inc.
-- License: BSD3
-- Maintainer: Bryan O'Sullivan <[email protected]>
-- Stability: experimental
-- Portability: portable
--
-- Types for working with the direct bindings to the C @mysqlclient@
-- API.

module Database.MySQL.Base.Types
(
-- * Types
Expand Down
30 changes: 30 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Copyright (c) 2011, MailRank, Inc.

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

3. Neither the name of the author nor the names of his contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
9 changes: 9 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ This library deliberately avoids the question of providing a "good"
API. Its purpose is to serve as a base on which higher-level libraries
can be build.

# Licensing

This library is BSD-licensed under the terms of the
[MySQL FOSS License Exception](http://www.mysql.com/about/legal/licensing/foss-exception/).

Since this library links against the GPL-licensed `mysqlclient`
library, a non-open-source application that uses it *may* be subject
to the terms of the GPL.

# To do

* Add support for prepared statements. This API is huge and of dubious
Expand Down
12 changes: 10 additions & 2 deletions mysql.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@ synopsis: A low-level MySQL client library.
description:
A low-level client library for the MySQL database, implemented as
bindings to the C @mysqlclient@ API.
license: LGPL
license-file: COPYING
.
/Important licensing note/: This library is BSD-licensed under the
terms of the MySQL FOSS License Exception
<http://www.mysql.com/about/legal/licensing/foss-exception/>.
.
Since this library links against the GPL-licensed @mysqlclient@
library, a non-open-source application that uses it /may/ be
subject to the terms of the GPL.
license: BSD3
license-file: LICENSE
author: Bryan O'Sullivan <[email protected]>
maintainer: Bryan O'Sullivan <[email protected]>
copyright: 2011 MailRank, Inc.
Expand Down

0 comments on commit 9882268

Please sign in to comment.