Hello community,
here is the log from the commit of package ghc-relational-query-HDBC for openSUSE:Factory checked in at 2017-08-31 20:58:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-relational-query-HDBC (Old)
and /work/SRC/openSUSE:Factory/.ghc-relational-query-HDBC.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-relational-query-HDBC"
Thu Aug 31 20:58:25 2017 rev:3 rq:513468 version:0.6.4.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-relational-query-HDBC/ghc-relational-query-HDBC.changes 2017-06-04 01:58:42.233737576 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-relational-query-HDBC.new/ghc-relational-query-HDBC.changes 2017-08-31 20:58:26.346761712 +0200
@@ -1,0 +2,5 @@
+Thu Jul 27 14:07:03 UTC 2017 - psimons(a)suse.com
+
+- Update to version 0.6.4.0.
+
+-------------------------------------------------------------------
Old:
----
relational-query-HDBC-0.6.0.3.tar.gz
New:
----
relational-query-HDBC-0.6.4.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-relational-query-HDBC.spec ++++++
--- /var/tmp/diff_new_pack.Z03Jq3/_old 2017-08-31 20:58:27.366618420 +0200
+++ /var/tmp/diff_new_pack.Z03Jq3/_new 2017-08-31 20:58:27.406612800 +0200
@@ -18,7 +18,7 @@
%global pkg_name relational-query-HDBC
Name: ghc-%{pkg_name}
-Version: 0.6.0.3
+Version: 0.6.4.0
Release: 0
Summary: HDBC instance of relational-query and typed query interface for HDBC
License: BSD-3-Clause
@@ -80,5 +80,6 @@
%files devel -f %{name}-devel.files
%defattr(-,root,root,-)
+%doc ChangeLog.md
%changelog
++++++ relational-query-HDBC-0.6.0.3.tar.gz -> relational-query-HDBC-0.6.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/relational-query-HDBC-0.6.0.3/ChangeLog.md new/relational-query-HDBC-0.6.4.0/ChangeLog.md
--- old/relational-query-HDBC-0.6.0.3/ChangeLog.md 1970-01-01 01:00:00.000000000 +0100
+++ new/relational-query-HDBC-0.6.4.0/ChangeLog.md 2017-07-24 15:01:07.000000000 +0200
@@ -0,0 +1,45 @@
+<!-- -*- Markdown -*- -->
+
+## 0.6.4.0
+
+- add new function name definitions to execute bounded statement.
+
+## 0.6.2.1
+
+- add tested-with 8.2.1.
+
+## 0.6.2.0
+
+- Apply generic instances.
+
+## 0.6.0.2
+
+- Add tested-with.
+
+## 0.6.0.1
+
+- Update compatibility for GHC 8.
+- Drop old tests of Oracle.
+
+## 0.6.0.0
+
+- Use updated template of persistable-record.
+- Drop persistableSqlValue.
+
+## 0.5.0.0
+
+- Use updated template of relational-query.
+- Drop old examples of Oracle.
+
+## 0.4.0.0
+
+- TH quotation of derive class names.
+
+## 0.3.0.0
+
+- Hide chunksInsertActions.
+- Add withPrepareDelete.
+
+## 0.2.0.0
+
+- Add logging interface for schema driver.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/relational-query-HDBC-0.6.0.3/relational-query-HDBC.cabal new/relational-query-HDBC-0.6.4.0/relational-query-HDBC.cabal
--- old/relational-query-HDBC-0.6.0.3/relational-query-HDBC.cabal 2017-05-04 11:45:17.000000000 +0200
+++ new/relational-query-HDBC-0.6.4.0/relational-query-HDBC.cabal 2017-07-24 15:01:07.000000000 +0200
@@ -1,5 +1,5 @@
name: relational-query-HDBC
-version: 0.6.0.3
+version: 0.6.4.0
synopsis: HDBC instance of relational-query and typed query interface for HDBC
description: This package contains the HDBC instance of relational-query and
the typed query interface for HDBC.
@@ -15,11 +15,13 @@
category: Database
build-type: Simple
cabal-version: >=1.10
-tested-with: GHC == 8.0.1, GHC == 8.0.2
+tested-with: GHC == 8.2.1
+ , GHC == 8.0.1, GHC == 8.0.2
, GHC == 7.10.1, GHC == 7.10.2, GHC == 7.10.3
, GHC == 7.8.1, GHC == 7.8.2, GHC == 7.8.3, GHC == 7.8.4
, GHC == 7.6.1, GHC == 7.6.2, GHC == 7.6.3
, GHC == 7.4.1, GHC == 7.4.2
+extra-source-files: ChangeLog.md
library
exposed-modules:
@@ -55,8 +57,8 @@
, th-data-compat
, names-th
- , persistable-record >= 0.4 && < 0.5
- , relational-query >= 0.8
+ , persistable-record >= 0.5
+ , relational-query >= 0.9
, relational-schemas
, HDBC >=2
, HDBC-session
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Query/TH.hs new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Query/TH.hs
--- old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Query/TH.hs 2017-05-04 11:45:17.000000000 +0200
+++ new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Query/TH.hs 2017-07-24 15:01:07.000000000 +0200
@@ -5,7 +5,7 @@
-- |
-- Module : Database.HDBC.Query.TH
--- Copyright : 2013 Kei Hibino
+-- Copyright : 2013-2017 Kei Hibino
-- License : BSD3
--
-- Maintainer : ex8k.hibino(a)gmail.com
@@ -15,6 +15,7 @@
-- This module contains templates to generate Haskell record types
-- and HDBC instances correspond to RDB table schema.
module Database.HDBC.Query.TH (
+ makeRelationalRecord,
makeRecordPersistableDefault,
defineTableDefault',
@@ -37,9 +38,11 @@
import Language.Haskell.TH.Name.CamelCase (varCamelcaseName)
import Language.Haskell.TH.Lib.Extra (reportWarning, reportError)
-import Database.Record.TH (makeRecordPersistableWithSqlTypeDefault)
-import qualified Database.Record.TH as Record
-import Database.Relational.Query (Relation, Config, verboseAsCompilerWarning, defaultConfig, relationalQuerySQL)
+import Database.Record (ToSql, FromSql)
+import Database.Record.TH (recordTemplate, reifyRecordType)
+import Database.Relational.Query
+ (Config, nameConfig, recordConfig, verboseAsCompilerWarning, defaultConfig,
+ Relation, relationalQuerySQL)
import Database.Relational.Query.SQL (QuerySuffix)
import qualified Database.Relational.Query.TH as Relational
@@ -50,18 +53,29 @@
(runLog, newLogChan, takeLogs, Driver, getFields, getPrimaryKey)
+defineInstancesForSqlValue :: TypeQ -- ^ Record type constructor.
+ -> Q [Dec] -- ^ Instance declarations.
+defineInstancesForSqlValue typeCon = do
+ [d| instance FromSql SqlValue $typeCon
+ instance ToSql SqlValue $typeCon
+ |]
+
-- | Generate all persistable templates against defined record like type constructor.
-makeRecordPersistableDefault :: Name -- ^ Type constructor name
- -> Q [Dec] -- ^ Result declaration
-makeRecordPersistableDefault recTypeName = do
+makeRelationalRecord :: Name -- ^ Type constructor name
+ -> Q [Dec] -- ^ Result declaration
+makeRelationalRecord recTypeName = do
rr <- Relational.makeRelationalRecordDefault recTypeName
- (pair, (_mayNs, cts)) <- Record.reifyRecordType recTypeName
- let width = length cts
- ps <- Record.makeRecordPersistableWithSqlType [t| SqlValue |]
- (Record.persistableFunctionNamesDefault recTypeName) pair width
+ ((typeCon, _), _) <- reifyRecordType recTypeName
+ ps <- defineInstancesForSqlValue typeCon
return $ rr ++ ps
--- | Generate all HDBC templates about table except for constraint keys using default naming rule.
+{-# DEPRECATED makeRecordPersistableDefault "Use makeRelationalRecord instead of this." #-}
+-- | Deprecated. use 'makeRelationalRecord'.
+makeRecordPersistableDefault :: Name -- ^ Type constructor name
+ -> Q [Dec] -- ^ Result declaration
+makeRecordPersistableDefault = makeRelationalRecord
+
+-- | Generate all HDBC templates about table except for constraint keys.
defineTableDefault' :: Config -- ^ Configuration to generate query with
-> String -- ^ Schema name
-> String -- ^ Table name
@@ -70,10 +84,10 @@
-> Q [Dec] -- ^ Result declaration
defineTableDefault' config schema table columns derives = do
modelD <- Relational.defineTableTypesAndRecord config schema table columns derives
- sqlvD <- makeRecordPersistableWithSqlTypeDefault [t| SqlValue |] schema table $ length columns
+ sqlvD <- defineInstancesForSqlValue . fst $ recordTemplate (recordConfig $ nameConfig config) schema table
return $ modelD ++ sqlvD
--- | Generate all HDBC templates about table using default naming rule.
+-- | Generate all HDBC templates about table.
defineTableDefault :: Config -- ^ Configuration to generate query with
-> String -- ^ Schema name
-> String -- ^ Table name
@@ -84,7 +98,7 @@
-> Q [Dec] -- ^ Result declaration
defineTableDefault config schema table columns derives primary notNull = do
modelD <- Relational.defineTable config schema table columns derives primary notNull
- sqlvD <- makeRecordPersistableWithSqlTypeDefault [t| SqlValue |] schema table $ length columns
+ sqlvD <- defineInstancesForSqlValue . fst $ recordTemplate (recordConfig $ nameConfig config) schema table
return $ modelD ++ sqlvD
-- | Generate all HDBC templates using system catalog informations with specified config.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Record/Delete.hs new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Record/Delete.hs
--- old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Record/Delete.hs 2017-05-04 11:45:17.000000000 +0200
+++ new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Record/Delete.hs 2017-07-24 15:01:07.000000000 +0200
@@ -10,7 +10,7 @@
-- Portability : unknown
--
-- This module provides typed 'Delete' running sequence
--- which intermediate structres are typed.
+-- which intermediate structures are typed.
module Database.HDBC.Record.Delete (
PreparedDelete, prepare, prepareDelete, withPrepareDelete,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Record/Insert.hs new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Record/Insert.hs
--- old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Record/Insert.hs 2017-05-04 11:45:17.000000000 +0200
+++ new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Record/Insert.hs 2017-07-24 15:01:07.000000000 +0200
@@ -10,7 +10,7 @@
-- Portability : unknown
--
-- This module provides typed 'Insert' running sequence
--- which intermediate structres are typed.
+-- which intermediate structures are typed.
module Database.HDBC.Record.Insert (
PreparedInsert, prepare, prepareInsert,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Record/InsertQuery.hs new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Record/InsertQuery.hs
--- old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Record/InsertQuery.hs 2017-05-04 11:45:17.000000000 +0200
+++ new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Record/InsertQuery.hs 2017-07-24 15:01:07.000000000 +0200
@@ -10,7 +10,7 @@
-- Portability : unknown
--
-- This module provides typed 'InsertQuery' running sequence
--- which intermediate structres are typed.
+-- which intermediate structures are typed.
module Database.HDBC.Record.InsertQuery (
PreparedInsertQuery, prepare, prepareInsertQuery, withPrepareInsertQuery,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Record/KeyUpdate.hs new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Record/KeyUpdate.hs
--- old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Record/KeyUpdate.hs 2017-05-04 11:45:17.000000000 +0200
+++ new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Record/KeyUpdate.hs 2017-07-24 15:01:07.000000000 +0200
@@ -2,7 +2,7 @@
-- |
-- Module : Database.HDBC.Record.KeyUpdate
--- Copyright : 2013 Kei Hibino
+-- Copyright : 2013-2017 Kei Hibino
-- License : BSD3
--
-- Maintainer : ex8k.hibino(a)gmail.com
@@ -10,7 +10,7 @@
-- Portability : unknown
--
-- This module provides typed 'KeyUpdate' running sequence
--- which intermediate structres are typed.
+-- which intermediate structures are typed.
module Database.HDBC.Record.KeyUpdate (
PreparedKeyUpdate,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Record/Query.hs new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Record/Query.hs
--- old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Record/Query.hs 2017-05-04 11:45:17.000000000 +0200
+++ new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Record/Query.hs 2017-07-24 15:01:07.000000000 +0200
@@ -10,7 +10,7 @@
-- Portability : unknown
--
-- This module provides typed 'Query' running sequence
--- which intermediate structres are typed.
+-- which intermediate structures are typed.
module Database.HDBC.Record.Query (
PreparedQuery, prepare, prepareQuery, withPrepareQuery,
@@ -33,7 +33,7 @@
import Database.HDBC.Record.Statement
(unsafePrepare, withUnsafePrepare, PreparedStatement,
bind, BoundStatement,
- execute, ExecutedStatement, executed)
+ executeBound, ExecutedStatement, executed)
-- | Typed prepared query type.
@@ -112,11 +112,11 @@
-- | Execute statement and lazily fetch all records.
runStatement :: FromSql SqlValue a => BoundStatement a -> IO [a]
-runStatement = (>>= fetchAll) . execute
+runStatement = (>>= fetchAll) . executeBound
-- | Strict version of 'runStatement'.
runStatement' :: FromSql SqlValue a => BoundStatement a -> IO [a]
-runStatement' = (>>= fetchAll') . execute
+runStatement' = (>>= fetchAll') . executeBound
-- | Bind parameters, execute statement and lazily fetch all records.
runPreparedQuery :: (ToSql SqlValue p, FromSql SqlValue a)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Record/Statement.hs new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Record/Statement.hs
--- old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Record/Statement.hs 2017-05-04 11:45:17.000000000 +0200
+++ new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Record/Statement.hs 2017-07-24 15:01:07.000000000 +0200
@@ -2,7 +2,7 @@
-- |
-- Module : Database.HDBC.Record.Statement
--- Copyright : 2013 Kei Hibino
+-- Copyright : 2013-2017 Kei Hibino
-- License : BSD3
--
-- Maintainer : ex8k.hibino(a)gmail.com
@@ -10,7 +10,7 @@
-- Portability : unknown
--
-- This module provides typed statement running sequence
--- which intermediate structres are typed.
+-- which intermediate structures are typed.
module Database.HDBC.Record.Statement (
PreparedStatement, untypePrepared, unsafePrepare, finish,
@@ -18,9 +18,13 @@
BoundStatement (..), bind', bind, bindTo,
- ExecutedStatement, executed, result, execute,
+ ExecutedStatement, executed, result,
- prepareNoFetch, executeNoFetch, runPreparedNoFetch, runNoFetch, mapNoFetch
+ executeBound, execute, executePrepared,
+
+ prepareNoFetch,
+ executeBoundNoFetch, executeNoFetch, runPreparedNoFetch,
+ runNoFetch, mapNoFetch,
) where
import Control.Exception (bracket)
@@ -106,7 +110,7 @@
-> BoundStatement a -- ^ Result parameter bound statement
bind' toSql q p = BoundStatement { bound = prepared q, params = runFromRecord toSql p }
--- | Typed operation to bind parameters. Infered 'RecordToSql' is used.
+-- | Typed operation to bind parameters. Inferred 'RecordToSql' is used.
bind :: ToSql SqlValue p => PreparedStatement p a -> p -> BoundStatement a
bind = bind' recordToSql
@@ -115,22 +119,38 @@
bindTo = flip bind
-- | Typed execute operation.
-execute :: BoundStatement a -> IO (ExecutedStatement a)
-execute bs = do
+executeBound :: BoundStatement a -> IO (ExecutedStatement a)
+executeBound bs = do
let stmt = bound bs
n <- HDBC.execute stmt (params bs)
return $ ExecutedStatement stmt n
+{-# WARNING execute "Use 'executeBound' instead of this. This name will be used for executePrepared function in future release." #-}
+-- | Use 'executeBound' instead of this.
+-- WARNING! This name will be used for executePrepared function in future release.
+execute :: BoundStatement a -> IO (ExecutedStatement a)
+execute = executeBound
+
+-- | Bind parameters, execute prepared statement and get executed statement.
+executePrepared :: ToSql SqlValue p => PreparedStatement p a -> p -> IO (ExecutedStatement a)
+executePrepared st = executeBound . bind st
+
-- | Typed execute operation. Only get result.
+executeBoundNoFetch :: BoundStatement () -> IO Integer
+executeBoundNoFetch = fmap result . executeBound
+
+{- WARNING executeNoFetch "Use 'executeBoundNoFetch' instead of this. This name will be used for runPreparedNoFetch function in future release." -}
+-- | Use 'executeBoundNoFetch' instead of this.
+-- WARNING! This name will be used for runPreparedNoFetch function in future release.
executeNoFetch :: BoundStatement () -> IO Integer
-executeNoFetch = fmap result . execute
+executeNoFetch = executeBoundNoFetch
--- | Bind parameters, execute statement and get execution result.
+-- | Bind parameters, execute prepared statement and get execution result.
runPreparedNoFetch :: ToSql SqlValue a
- => PreparedStatement a ()
- -> a
- -> IO Integer
-runPreparedNoFetch p = executeNoFetch . (p `bind`)
+ => PreparedStatement a ()
+ -> a
+ -> IO Integer
+runPreparedNoFetch p = executeBoundNoFetch . (p `bind`)
-- | Prepare and run sequence for polymorphic no-fetch statement.
runNoFetch :: (UntypeableNoFetch s, IConnection conn, ToSql SqlValue a)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Record/Update.hs new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Record/Update.hs
--- old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Record/Update.hs 2017-05-04 11:45:17.000000000 +0200
+++ new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Record/Update.hs 2017-07-24 15:01:07.000000000 +0200
@@ -10,7 +10,7 @@
-- Portability : unknown
--
-- This module provides typed 'Update' running sequence
--- which intermediate structres are typed.
+-- which intermediate structures are typed.
module Database.HDBC.Record.Update (
PreparedUpdate, prepare, prepareUpdate, withPrepareUpdate,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Schema/IBMDB2.hs new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Schema/IBMDB2.hs
--- old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Schema/IBMDB2.hs 2017-05-04 11:45:17.000000000 +0200
+++ new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Schema/IBMDB2.hs 2017-07-24 15:01:07.000000000 +0200
@@ -34,7 +34,7 @@
import Database.HDBC.Record.Query (runQuery')
import Database.HDBC.Record.Persistable ()
-import Database.Record.TH (makeRecordPersistableWithSqlTypeDefaultFromDefined)
+import Database.Record (FromSql, ToSql)
import Database.Relational.Schema.IBMDB2
(normalizeColumn, notNull, getType, columnsQuerySQL, primaryKeyQuerySQL)
@@ -46,9 +46,8 @@
Driver, getFieldsWithMap, getPrimaryKey, emptyDriver)
--- Specify type constructor and data constructor from same table name.
-$(makeRecordPersistableWithSqlTypeDefaultFromDefined
- [t| SqlValue |] ''Columns)
+instance FromSql SqlValue Columns
+instance ToSql SqlValue Columns
logPrefix :: String -> String
logPrefix = ("IBMDB2: " ++)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Schema/MySQL.hs new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Schema/MySQL.hs
--- old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Schema/MySQL.hs 2017-05-04 11:45:17.000000000 +0200
+++ new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Schema/MySQL.hs 2017-07-24 15:01:07.000000000 +0200
@@ -26,6 +26,7 @@
import Data.Map (fromList)
import Database.HDBC (IConnection, SqlValue)
+import Database.Record (FromSql, ToSql)
import Database.HDBC.Record.Query (runQuery')
import Database.HDBC.Record.Persistable ()
import Database.HDBC.Schema.Driver ( TypeMap
@@ -39,7 +40,6 @@
, getPrimaryKey
, emptyDriver
)
-import Database.Record.TH (makeRecordPersistableWithSqlTypeDefaultFromDefined)
import Database.Relational.Schema.MySQL ( normalizeColumn
, notNull
, getType
@@ -50,7 +50,9 @@
import Database.Relational.Schema.MySQLInfo.Columns (Columns)
import qualified Database.Relational.Schema.MySQLInfo.Columns as Columns
-$(makeRecordPersistableWithSqlTypeDefaultFromDefined [t| SqlValue |] ''Columns)
+
+instance FromSql SqlValue Columns
+instance ToSql SqlValue Columns
logPrefix :: String -> String
logPrefix = ("MySQL: " ++)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Schema/Oracle.hs new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Schema/Oracle.hs
--- old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Schema/Oracle.hs 2017-05-04 11:45:17.000000000 +0200
+++ new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Schema/Oracle.hs 2017-07-24 15:01:07.000000000 +0200
@@ -23,9 +23,10 @@
import Language.Haskell.TH (TypeQ)
import Database.HDBC (IConnection, SqlValue)
+import Database.Record (FromSql, ToSql)
+
import Database.HDBC.Record.Query (runQuery')
import Database.HDBC.Record.Persistable ()
-import Database.Record.TH (makeRecordPersistableWithSqlTypeDefaultFromDefined)
import Database.HDBC.Schema.Driver
( TypeMap, LogChan, putVerbose, failWith, maybeIO, hoistMaybe,
Driver, getFieldsWithMap, getPrimaryKey, emptyDriver
@@ -38,9 +39,9 @@
import Database.Relational.Schema.OracleDataDictionary.TabColumns (DbaTabColumns)
import qualified Database.Relational.Schema.OracleDataDictionary.TabColumns as Cols
-$(makeRecordPersistableWithSqlTypeDefaultFromDefined
- [t|SqlValue|]
- ''DbaTabColumns)
+
+instance FromSql SqlValue DbaTabColumns
+instance ToSql SqlValue DbaTabColumns
logPrefix :: String -> String
logPrefix = ("Oracle: " ++)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Schema/PostgreSQL.hs new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Schema/PostgreSQL.hs
--- old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Schema/PostgreSQL.hs 2017-05-04 11:45:17.000000000 +0200
+++ new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Schema/PostgreSQL.hs 2017-07-24 15:01:07.000000000 +0200
@@ -31,7 +31,7 @@
import Database.HDBC.Record.Query (runQuery')
import Database.HDBC.Record.Persistable ()
-import Database.Record.TH (makeRecordPersistableWithSqlTypeDefaultFromDefined)
+import Database.Record (FromSql, ToSql)
import Database.Relational.Schema.PostgreSQL
(normalizeColumn, notNull, getType, columnQuerySQL,
@@ -45,11 +45,11 @@
Driver, getFieldsWithMap, getPrimaryKey, emptyDriver)
-$(makeRecordPersistableWithSqlTypeDefaultFromDefined
- [t| SqlValue |] ''PgAttribute)
+instance FromSql SqlValue PgAttribute
+instance ToSql SqlValue PgAttribute
-$(makeRecordPersistableWithSqlTypeDefaultFromDefined
- [t| SqlValue |] ''PgType)
+instance FromSql SqlValue PgType
+instance ToSql SqlValue PgType
logPrefix :: String -> String
logPrefix = ("PostgreSQL: " ++)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Schema/SQLServer.hs new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Schema/SQLServer.hs
--- old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Schema/SQLServer.hs 2017-05-04 11:45:17.000000000 +0200
+++ new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Schema/SQLServer.hs 2017-07-24 15:01:07.000000000 +0200
@@ -29,7 +29,7 @@
import Database.HDBC.Schema.Driver
(TypeMap, LogChan, putVerbose, failWith, maybeIO,
Driver, hoistMaybe, getFieldsWithMap, getPrimaryKey, emptyDriver)
-import Database.Record.TH (makeRecordPersistableWithSqlTypeDefaultFromDefined)
+import Database.Record (FromSql, ToSql)
import Database.Relational.Schema.SQLServer (columnTypeQuerySQL, getType, normalizeColumn,
notNull, primaryKeyQuerySQL)
import Database.Relational.Schema.SQLServerSyscat.Columns (Columns)
@@ -37,11 +37,11 @@
import Language.Haskell.TH (TypeQ)
-$(makeRecordPersistableWithSqlTypeDefaultFromDefined
- [t| SqlValue |] ''Columns)
+instance FromSql SqlValue Columns
+instance ToSql SqlValue Columns
-$(makeRecordPersistableWithSqlTypeDefaultFromDefined
- [t| SqlValue |] ''Types)
+instance FromSql SqlValue Types
+instance ToSql SqlValue Types
logPrefix :: String -> String
logPrefix = ("SQLServer: " ++)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Schema/SQLite3.hs new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Schema/SQLite3.hs
--- old/relational-query-HDBC-0.6.0.3/src/Database/HDBC/Schema/SQLite3.hs 2017-05-04 11:45:17.000000000 +0200
+++ new/relational-query-HDBC-0.6.4.0/src/Database/HDBC/Schema/SQLite3.hs 2017-07-24 15:01:07.000000000 +0200
@@ -30,7 +30,7 @@
import Database.HDBC.Schema.Driver
(TypeMap, LogChan, putVerbose, failWith, maybeIO,
Driver, hoistMaybe, getFieldsWithMap, getPrimaryKey, emptyDriver)
-import Database.Record.TH (makeRecordPersistableWithSqlTypeDefaultFromDefined)
+import Database.Record (FromSql, ToSql)
import Database.Relational.Schema.SQLite3 (getType, indexInfoQuerySQL, indexListQuerySQL, normalizeColumn,
normalizeType, notNull, tableInfoQuerySQL)
import Database.Relational.Schema.SQLite3Syscat.IndexInfo (IndexInfo)
@@ -38,14 +38,15 @@
import Database.Relational.Schema.SQLite3Syscat.TableInfo (TableInfo)
import Language.Haskell.TH (TypeQ)
-$(makeRecordPersistableWithSqlTypeDefaultFromDefined
- [t| SqlValue |] ''TableInfo)
-$(makeRecordPersistableWithSqlTypeDefaultFromDefined
- [t| SqlValue |] ''IndexList)
+instance FromSql SqlValue TableInfo
+instance ToSql SqlValue TableInfo
-$(makeRecordPersistableWithSqlTypeDefaultFromDefined
- [t| SqlValue |] ''IndexInfo)
+instance FromSql SqlValue IndexList
+instance ToSql SqlValue IndexList
+
+instance FromSql SqlValue IndexInfo
+instance ToSql SqlValue IndexInfo
logPrefix :: String -> String
logPrefix = ("SQLite3: " ++)