From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id F3FA1BBC4 for ; Tue, 31 Jan 2006 17:44:03 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k0VGi3e2008693 for ; Tue, 31 Jan 2006 17:44:03 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA24515 for ; Tue, 31 Jan 2006 17:44:03 +0100 (MET) Received: from spmler2.mail.eds.com (spmler2.mail.eds.com [194.128.225.188]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k0VGi2KI008686 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 31 Jan 2006 17:44:02 +0100 Received: from spmlir2.mail.eds.com (spmlir2.mail.eds.com [205.191.69.42]) by spmler2.mail.eds.com (8.13.4/8.12.10) with ESMTP id k0VGi2nA014988 for ; Tue, 31 Jan 2006 16:44:02 GMT Received: from spmlir2.mail.eds.com (localhost.localdomain [127.0.0.1]) by spmlir2.mail.eds.com (8.13.4/8.12.10) with ESMTP id k0VGh2BF023653 for ; Tue, 31 Jan 2006 16:43:02 GMT Received: from ukspm011.emea.corp.eds.com ([204.230.90.204]) by spmlir2.mail.eds.com (8.13.4/8.12.10) with ESMTP id k0VGh2o4023648 for ; Tue, 31 Jan 2006 16:43:02 GMT Received: from ukspm207.emea.corp.eds.com ([204.230.90.66]) by ukspm011.emea.corp.eds.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 31 Jan 2006 16:42:50 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Subject: RE: [Caml-list] Type-safe interface to Postgres's SQL Date: Tue, 31 Jan 2006 16:43:01 -0000 Message-ID: <4DB758040F42334883C0350EB806CA73A598AB@ukspm207.emea.corp.eds.com> Thread-Topic: [Caml-list] Type-safe interface to Postgres's SQL Thread-Index: AcYmbWBwznOc+TaWSN6tkaskPqnYUgAAZllQ From: "Quinn, Chris" To: X-OriginalArrivalTime: 31 Jan 2006 16:42:50.0928 (UTC) FILETIME=[5FF8BB00:01C62685] X-Miltered: at concorde with ID 43DF93D3.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 43DF93D2.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 type-safe:01 compiler:01 runtime:01 mismatch:01 eds:98 caml:02 implemented:02 string:02 notion:04 marshalled:04 long:05 chris:05 chris:05 quinn:05 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 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