From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,bf02c238a92156a3 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Windows Ada database support. Date: Mon, 29 Nov 2004 09:53:00 +0100 Message-ID: <17w0jtt2xq2ya.1nj2623n37457.dlg@40tude.net> References: <5e3e03a7.0411240431.7e037a4e@posting.google.com> <2004112420030750073%david@bottoncom> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 9erT1ZjEpysnx3aCpelzHwTDLEzPleIZGFlo7j8axq4hCgigE= User-Agent: 40tude_Dialog/2.0.12.1 Xref: g2news1.google.com comp.lang.ada:6622 Date: 2004-11-29T09:53:00+01:00 List-Id: On Mon, 29 Nov 2004 01:28:03 +0000 (UTC), Georg Bauhaus wrote: > Dmitry A. Kazakov wrote: >: And more importantly why that crappy SQL over and over again? I would like >: to see a high level Ada.Database[.Relational?] package totally independent >: on what happens beneath. > > Because Ada is a high level systems programming language making > you expect to be in control of well defined details? Yes. > What about COMMIT? That's easy. There should be a transaction object, kind of "external" protected object. BTW, there is an interesting Ada problem associated with it. When I wrote ODBC bindings I faced this problem: declare -- Transaction in manual-commit mode Mutex : Write_Mutex (Connection'Access); begin ... -- Do some DB stuff Commit (Mutex); -- Nasty, but necessary end; Upon exception Write_Mutex.Finalize does roll-back. This in turn requires that nasty call to Commit at the end of the scope. Commit just sets a flag in Write_Mutex for Finalize. Because in Finalize there is no way to determine whether the scope was left due to a stack roll-back upon an exception. Probably it is worth an AI for Ada 2010. > At what time should Oracle CURSORs be given up? What about n-th level of CPU cache? Do you really care when you write an Ada application? It is all compiler vendor business. As an application developer, I want to hear nothing about cursors. > How much precision can you portably specify for floating point > values in your DB independent package? The required precision should specify the application. And BTW, for a great majority of applications that should rather be fixed point. So you can't have any default. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de