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,2843c5eea3415584 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!meganewsservers.com!feeder2.on.meganewsservers.com!feed.cgocable.net!read2.cgocable.net.POSTED!53ab2750!not-for-mail From: "Warren W. Gay VE3WWG" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: APQ References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Thu, 16 Dec 2004 06:34:06 -0500 NNTP-Posting-Host: 24.150.168.167 X-Complaints-To: abuse@cogeco.ca X-Trace: read2.cgocable.net 1103196782 24.150.168.167 (Thu, 16 Dec 2004 06:33:02 EST) NNTP-Posting-Date: Thu, 16 Dec 2004 06:33:02 EST Organization: Cogeco Cable Xref: g2news1.google.com comp.lang.ada:6990 Date: 2004-12-16T06:34:06-05:00 List-Id: Brian May wrote: > Hello, > > Here are my suggested changes to APQ (not actually done or tested). I'll just respond briefly here, since I am on my way to work.. > 1. Decide on or write a "smart pointer" library. ie. a library that > manages pointers based on a reference count. Obviously the license > must be compatible with the license of APQ. > > 2. No change to Connection_Type or Root_Connection_Type. > > 3. Create new Database_Type. This type should not be > tagged. Applications will use this instead of the > Root_Connection_Type. It has the following data: > > * Smart pointer to Root_Connection_Type'Class. This is dynamically > allocated when the connection is created. > > It has the following methods: > > * Connect method takes a string, which is the connection URL. Note: > Two ways of implementing: Ok, this makes sense because you don't know the type of Connection_Type apriori. I generally favour Booch components myself, which includes a smart pointer. ... > 4. Modify Root_Query_Type class: > > New_Query is the only function that takes a *Database_Type* > parameter. > > The functions that use to require Root_Connection_Type now use the > smart pointer that was saved instead. > > Why not make the procedures abstract instead of having them raise > an Is_Abstract? This way the checks can be done at compile time. Answer: I wanted to put some code at the top level so that I wouldn't have to repeat it for every database. For some reason the compiler wouldn't let me do it (perhaps I was missing something). I would be happy to have this done, but I was unable to make it so in practice. Maybe someone else can figure it out. > Execute already returns exception if not connected. > > Add methods for obtaining and clearing status information. This > should be cached so if you execute two separate queries (in two > separate variables) on the same database, you will get two status > messages saved. You have to be real careful here, because database products like Sybase use callbacks and things can change. In fact, Sybase was a monster to tame with its oodles of states and callbacks. > I hope this helps explain what I said earlier... I believe this solves > a number of concerns with the existing system in one go. I'll try to respond more fully later on, but this seems to make sense. -- Warren W. Gay VE3WWG http://home.cogeco.ca/~ve3wwg