From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id IAA31163; Fri, 30 Jan 2004 08:43:36 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 IAA31605 for ; Fri, 30 Jan 2004 08:43:35 +0100 (MET) Received: from speakeasy.org (dialup-67.75.211.160.Dial1.Seattle.Level3.net [67.75.211.160]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id i0U7hWP02051 for ; Fri, 30 Jan 2004 08:43:33 +0100 (MET) Received: (from shawnw@localhost) by speakeasy.org (8.10.1/8.10.1) id i0U7brM19927 for caml-list@inria.fr; Thu, 29 Jan 2004 23:37:53 -0800 Date: Thu, 29 Jan 2004 23:37:53 -0800 From: Shawn Wagner To: Inria Ocaml Mailing List Subject: Re: [Caml-list] PostgreSQL-OCaml 1.0.1 Message-ID: <20040130073753.GM599@speakeasy.org> Mail-Followup-To: Inria Ocaml Mailing List References: <20040128232131.GA22126@fichte.ai.univie.ac.at> <20040129200653.GA14321@redhat.com> <4019F0B1.6050204@gradient.cis.upenn.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4019F0B1.6050204@gradient.cis.upenn.edu> User-Agent: Mutt/1.4.1i X-Loop: caml-list@inria.fr X-Spam: no; 0.00; shawnw:01 caml-list:01 1.0.1:01 2004:99 dbi:99 dbi:99 structs:01 postgres:01 zipcode:99 postgres:01 shawnw:01 bindings:01 ocaml:01 ocaml:01 speakeasy:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Fri, Jan 30, 2004 at 12:50:41AM -0500, Josh Burdick wrote: > If there's going to be a "new improved version", I think maybe it > should work with multiple databases. ODBC, JDBC, and DBI all attempt > this. There could be a signature (perhaps called "DBI" to appeal to > Perl people , and structs Postgres, MySQL, Oracle, etc., which implement > this. I think there are a couple of projects to do this. I maintain the MySQL bindings for ocaml, and I'm willing to support any such database-independant interface to SQL in it. > Different databases have varying levels of standards-conformance, of > course, and there's all sorts of variation between databases, so I > wouldn't expect one to be able to take one OCaml program written with > this interface, and blithely switch databases, especially for > complicated stuff. But you should be able to write simple "select * > from customers"-type queries, against any database, without totally > re-working your OCaml code. I've had vague ideas of adding functions that build the query strings for you, so you can do things like let querystring = Sql.select ~table:"addresses" ~columns:["street";"city";"state";"zipcode"] ~where:"name='so and so'" and then feed that to whatever database library you like: MySQL, Postgres, Oracle, whatever. If I actually used SQL these days, I'd probably have done it already. Anyone interested in this sort of thing? -- Shawn Wagner shawnw@speakeasy.org ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners