Include Postgres + Fay scaffolding
This commit is contained in:
parent
789cd18b6c
commit
a0dd09c2e1
@ -25,7 +25,12 @@ prompt f = do
|
|||||||
hFlush stdout
|
hFlush stdout
|
||||||
prompt f
|
prompt f
|
||||||
|
|
||||||
data Backend = Sqlite | Postgresql | Mysql | MongoDB | Simple
|
data Backend = Sqlite
|
||||||
|
| Postgresql
|
||||||
|
| PostgresqlFay
|
||||||
|
| Mysql
|
||||||
|
| MongoDB
|
||||||
|
| Simple
|
||||||
deriving (Eq, Read, Show, Enum, Bounded)
|
deriving (Eq, Read, Show, Enum, Bounded)
|
||||||
|
|
||||||
puts :: LT.Text -> IO ()
|
puts :: LT.Text -> IO ()
|
||||||
@ -37,6 +42,7 @@ backends = [minBound .. maxBound]
|
|||||||
showBackend :: Backend -> String
|
showBackend :: Backend -> String
|
||||||
showBackend Sqlite = "s"
|
showBackend Sqlite = "s"
|
||||||
showBackend Postgresql = "p"
|
showBackend Postgresql = "p"
|
||||||
|
showBackend PostgresqlFay = "pf"
|
||||||
showBackend Mysql = "mysql"
|
showBackend Mysql = "mysql"
|
||||||
showBackend MongoDB = "mongo"
|
showBackend MongoDB = "mongo"
|
||||||
showBackend Simple = "simple"
|
showBackend Simple = "simple"
|
||||||
@ -47,6 +53,7 @@ readBackend s = lookup s $ map (showBackend &&& id) backends
|
|||||||
backendBS :: Backend -> S.ByteString
|
backendBS :: Backend -> S.ByteString
|
||||||
backendBS Sqlite = $(embedFile "hsfiles/sqlite.hsfiles")
|
backendBS Sqlite = $(embedFile "hsfiles/sqlite.hsfiles")
|
||||||
backendBS Postgresql = $(embedFile "hsfiles/postgres.hsfiles")
|
backendBS Postgresql = $(embedFile "hsfiles/postgres.hsfiles")
|
||||||
|
backendBS PostgresqlFay = $(embedFile "hsfiles/postgres-fay.hsfiles")
|
||||||
backendBS Mysql = $(embedFile "hsfiles/mysql.hsfiles")
|
backendBS Mysql = $(embedFile "hsfiles/mysql.hsfiles")
|
||||||
backendBS MongoDB = $(embedFile "hsfiles/mongo.hsfiles")
|
backendBS MongoDB = $(embedFile "hsfiles/mongo.hsfiles")
|
||||||
backendBS Simple = $(embedFile "hsfiles/simple.hsfiles")
|
backendBS Simple = $(embedFile "hsfiles/simple.hsfiles")
|
||||||
|
|||||||
5945
yesod/hsfiles/postgres-fay.hsfiles
Normal file
5945
yesod/hsfiles/postgres-fay.hsfiles
Normal file
File diff suppressed because it is too large
Load Diff
@ -4,6 +4,7 @@ We recommend starting with SQLite: it has no dependencies.
|
|||||||
|
|
||||||
s = sqlite
|
s = sqlite
|
||||||
p = postgresql
|
p = postgresql
|
||||||
|
pf = postgresql + Fay (experimental)
|
||||||
mongo = mongodb
|
mongo = mongodb
|
||||||
mysql = MySQL
|
mysql = MySQL
|
||||||
simple = no database, no auth
|
simple = no database, no auth
|
||||||
|
|||||||
@ -22,6 +22,7 @@ extra-source-files:
|
|||||||
hsfiles/mongo.hsfiles
|
hsfiles/mongo.hsfiles
|
||||||
hsfiles/mysql.hsfiles
|
hsfiles/mysql.hsfiles
|
||||||
hsfiles/postgres.hsfiles
|
hsfiles/postgres.hsfiles
|
||||||
|
hsfiles/postgres-fay.hsfiles
|
||||||
hsfiles/simple.hsfiles
|
hsfiles/simple.hsfiles
|
||||||
hsfiles/sqlite.hsfiles
|
hsfiles/sqlite.hsfiles
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user