diff options
Diffstat (limited to 'src/server/Model/Database.hs')
-rw-r--r-- | src/server/Model/Database.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/Model/Database.hs b/src/server/Model/Database.hs index 67cc8b3..a98e69a 100644 --- a/src/server/Model/Database.hs +++ b/src/server/Model/Database.hs @@ -69,3 +69,6 @@ runMigrations = runDb $ runMigration migrateAll textToKey :: (ToBackendKey SqlBackend a) => Text -> Key a textToKey text = toSqlKey (read (unpack text) :: Int64) + +keyToInt64 :: (ToBackendKey SqlBackend a) => Key a -> Int64 +keyToInt64 = fromSqlKey |