[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Quinn, Chris <chris.quinn@e...> |
| Subject: | RE: [Caml-list] Type-safe interface to Postgres's SQL |
A few years ago I implemented a type safe interface to db2 (odbc compliant). My approach was to extend the caml compiler with a Type.typeof : 'a -> typeinfo function which marshalled the internal type info into a string. This is then used at runtime to compare with the database's notion of what a query produces (the check is performed only once during the execution life of the program, thereby minimising cost) So any mismatch with the db schema is caught (as long as that bit of the code is actually run!) /C