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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,67748e866d067110 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!e39g2000hsf.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: SOCI-Ada: The Database Access Library for Ada Date: Thu, 7 Aug 2008 08:43:03 -0700 (PDT) Organization: http://groups.google.com Message-ID: <21f1f8b4-8e25-4b3f-90fa-004595237c1a@e39g2000hsf.googlegroups.com> References: <9fa4c3e0-86bc-4a7d-98fb-6be76cb8aa68@d1g2000hsg.googlegroups.com> <6g0hikFdkv5oU1@mid.individual.net> NNTP-Posting-Host: 128.141.45.246 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1218123783 3273 127.0.0.1 (7 Aug 2008 15:43:03 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 7 Aug 2008 15:43:03 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e39g2000hsf.googlegroups.com; posting-host=128.141.45.246; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9) Gecko/2008061004 Firefox/3.0,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:1511 Date: 2008-08-07T08:43:03-07:00 List-Id: On 7 Sie, 17:10, "Alex R. Mosteo" wrote: > As for comments for improvement, after a quick read I would like to see one > example on how to use pooled connections. You can find it in the test program that is included as part of the package (the archive, not the Ada one :-) ). I have decided not to include the connection pool example in the "idioms" part, because connection pools are usually needed in bigger contexts and the simple example would be artificial - whereas other examples still make sense, even in such short forms. I will think about some reasonable example for connection pools. Again, one is in the test program - it is the last test. > Another thing is that in C++ there's mimicking of embedded SQL using the "<<" > operator. Can't this be to some extent emulated in Ada with some operator > overloading? I think that the design of the library, including its syntax, needs to reflect the general spirit of the community that is going to use it. For example, I find it quite easy to sell this: int count; sql << "select count(*) from persons", into(count); to C++ programmers - for one thing, it looks like streams and indeed streams can be involved to format parts of the query and in general the whole statement looks "cool". An important factor here is that there are lots of C++ libraries that use operator overloading extensively (including the standard library!) and that's why C++ programmers can accept this technique even on the border of abuse. Please see this page: http://soci.sourceforge.net/doc/rationale.html for the rationale of different syntax elements in C++. Contrary to the above, I think that Ada programmers would find such syntax "a bit" overboard. I have decided not to stress the audience with any operator overloading and provide the "classical" interface that is in line with the interfaces of other Ada libraries - in particular the standard library. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com