2

Currently I am using something like this:

dbCreateTable db "MyTable" [ ("Col1", (StringT, False)), ("Col2", (StringT, False)) ]

which works fine, but i'd like to make "Col1" the primary key. Do i need to go back to raw SQL?

edit: This still seems to hold: "The part of creating a database from Haskell itself is not very useful, for example you cannot express foreign- and primary keys, indexes and constraints. Even the most simple database will need one of these."

From http://www.mijnadres.net/published/HaskellDB.pdf

somesoaccount
  • 1,267
  • 15
  • 37

1 Answers1

1

As the edit notes, HaskellDB is not very good at creating tables at the moment. It's best to build a database first, and then extract the info.

sclv
  • 38,665
  • 7
  • 99
  • 204