Skip to content

Commit

Permalink
Migrate test suite to hspec
Browse files Browse the repository at this point in the history
  • Loading branch information
lykahb committed Jan 2, 2022
1 parent 4c996eb commit 7004a61
Show file tree
Hide file tree
Showing 20 changed files with 1,276 additions and 1,382 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ dist/

.idea
.cabal-sandbox/
*.iml
cabal.sandbox.config
.stack-work/
19 changes: 10 additions & 9 deletions groundhog-mysql/Database/Groundhog/MySQL.hs
Original file line number Diff line number Diff line change
Expand Up @@ -422,15 +422,16 @@ analyzeTable' name = do
Nothing -> pure Nothing

getColumn :: ((String, String, String, String, Maybe String), (Maybe Int, Maybe Int, Maybe Int)) -> Column
getColumn ((column_name, is_nullable, data_type, column_type, def), modifiers) = Column
{ colName = column_name
, colNull = is_nullable == "YES"
, colType = readSqlType data_type column_type modifiers
, colDefault = case def of
Nothing -> Nothing
Just "NULL" -> Nothing
Just d -> Just d
}
getColumn ((column_name, is_nullable, data_type, column_type, def), modifiers) =
Column
{ colName = column_name,
colNull = is_nullable == "YES",
colType = readSqlType data_type column_type modifiers,
colDefault = case def of
Nothing -> Nothing
Just "NULL" -> Nothing
Just d -> Just d
}

analyzeTableReferences :: QualifiedName -> Action MySQL [(Maybe String, Reference)]
analyzeTableReferences name = do
Expand Down
Loading

0 comments on commit 7004a61

Please sign in to comment.