groundhog-sqlite 0.10.0 → 0.11.0
raw patch · 3 files changed
+9/−7 lines, 3 filesdep ~groundhogPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: groundhog
API changes (from Hackage documentation)
Files
- Database/Groundhog/Sqlite.hs +4/−5
- changelog +3/−0
- groundhog-sqlite.cabal +2/−2
Database/Groundhog/Sqlite.hs view
@@ -37,7 +37,6 @@ import Data.IORef import qualified Data.HashMap.Strict as Map import Data.Maybe (fromMaybe)-import Data.Monoid hiding ((<>)) import Data.Pool import qualified Data.Text as T @@ -90,7 +89,7 @@ getList k = runDb' $ getList' k instance SchemaAnalyzer Sqlite where- schemaExists = fail "schemaExists: is not supported by Sqlite"+ schemaExists _ = fail "schemaExists: is not supported by Sqlite" getCurrentSchema = return Nothing listTables Nothing = runDb' $ queryRaw' "SELECT name FROM sqlite_master WHERE type='table'" [] >>= mapStream (return . fst . fromPurePersistValues) >>= streamToList listTables sch = fail $ "listTables: schemas are not supported by Sqlite: " ++ show sch@@ -103,7 +102,7 @@ Nothing -> return Nothing Just src -> return (fst $ fromPurePersistValues src) analyzeTrigger (sch, _) = fail $ "analyzeTrigger: schemas are not supported by Sqlite: " ++ show sch- analyzeFunction = error "analyzeFunction: is not supported by Sqlite"+ analyzeFunction _ = fail "analyzeFunction: is not supported by Sqlite" getMigrationPack = return migrationPack withSqlitePool :: (MonadBaseControl IO m, MonadIO m)@@ -343,10 +342,10 @@ maybe "" (" DEFAULT " ++) def] sqlReference :: Reference -> String-sqlReference Reference{..} = "FOREIGN KEY(" ++ our ++ ") REFERENCES " ++ escape (snd referencedTableName) ++ "(" ++ foreign ++ ")" ++ actions where+sqlReference Reference{..} = "FOREIGN KEY(" ++ ourKey ++ ") REFERENCES " ++ escape (snd referencedTableName) ++ "(" ++ foreignKey ++ ")" ++ actions where actions = maybe "" ((" ON DELETE " ++) . showReferenceAction) referenceOnDelete ++ maybe "" ((" ON UPDATE " ++) . showReferenceAction) referenceOnUpdate- (our, foreign) = f *** f $ unzip referencedColumns+ (ourKey, foreignKey) = f *** f $ unzip referencedColumns f = intercalate ", " . map escape sqlUnique :: UniqueDefInfo -> String
changelog view
@@ -1,3 +1,6 @@+0.11+* Support for GHC 8.8+ 0.10 * Pass type information along the UntypedExpr * Fix #57 (table indexes are ignored)
groundhog-sqlite.cabal view
@@ -1,5 +1,5 @@ name: groundhog-sqlite-version: 0.10.0+version: 0.11.0 license: BSD3 license-file: LICENSE author: Boris Lykah <lykahb@gmail.com>@@ -18,7 +18,7 @@ build-depends: base >= 4 && < 5 , bytestring >= 0.9 , transformers >= 0.2.1- , groundhog >= 0.10.0 && < 0.11+ , groundhog >= 0.11.0 && < 0.12 , monad-control >= 0.3 && < 1.1 , containers >= 0.2 , text >= 0.8