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 NAA20324; Fri, 13 Jun 2003 13:05:10 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA20424 for ; Fri, 13 Jun 2003 13:05:09 +0200 (MET DST) Received: from aomori.annexia.org (annexia.force9.co.uk [212.56.101.183]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h5DB58T20282 for ; Fri, 13 Jun 2003 13:05:08 +0200 (MET DST) Received: from rich by aomori.annexia.org with local (Exim 3.36 #1 (Debian)) id 19QmMk-0005kx-00; Fri, 13 Jun 2003 12:05:06 +0100 Date: Fri, 13 Jun 2003 12:05:06 +0100 To: Christophe TROESTLER Cc: caml-list@inria.fr Subject: Re: [Caml-list] Dbi: proposal #1 Message-ID: <20030613110506.GB22081@redhat.com> References: <20030610.221041.13383166.debian00@tiscali.be> <20030611161339.GA6982@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030611161339.GA6982@redhat.com> User-Agent: Mutt/1.5.4i From: Richard Jones X-Spam: no; 0.00; caml-list:01 dbi:99 implemented:01 pseudocode:01 salary:01 dbh:99 seq:01 freshmeat:01 autoconf:01 automake:01 compiles:01 rpms:01 ltd:98 int:01 london:97 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk When I implemented a DBI interface for pthrlib, I added a "serial" method. This is an extension to the basic Perl DBI, but very useful. Example (in pseudocode): Table: create table employees (empid serial, name text, salary int); let query = dbh#prepare "insert into employees (name) values ('John Smith')";; query#execute;; let empid = query#serial ("employees_empid_seq");; (* returns, eg., 1 *) The argument to serial is the sequence name, required for PostgreSQL, but can be ignored on other databases. Rich. -- Richard Jones, Red Hat Inc. (London) and Merjis Ltd. http://www.merjis.com/ http://www.annexia.org/ Freshmeat projects: http://freshmeat.net/users/rwmj MAKE+ is a sane replacement for GNU autoconf/automake. One script compiles, RPMs, pkgs etc. Linux, BSD, Solaris. http://www.annexia.org/freeware/makeplus/ ------------------- 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