Re: Ada DB bindings and APQ
From: Brian May (bam_at_snoopy.apana.org.au)
Date: 12/16/04
- Next message: Warren W. Gay VE3WWG: "Re: Ada DB bindings and APQ"
- Previous message: Jeffrey Carter: "Re: JGNAT"
- In reply to: Brian May: "Re: Ada DB bindings and APQ"
- Next in thread: Warren W. Gay VE3WWG: "Re: Ada DB bindings and APQ"
- Reply: Warren W. Gay VE3WWG: "Re: Ada DB bindings and APQ"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 16 Dec 2004 12:40:31 +1100
>>>>> "Brian" == Brian May <bam@snoopy.apana.org.au> writes:
Brian> The documentation has an alternative loop structure:
Brian> while not End_Of_Query(Q) loop Fetch(Q); ... end loop;
I realized, despite the documentation, End_Of_Query is not currently
supported on sequential connections, because it is not known if all
tuples have been fetched until you try to fetch the next one past the
end.
This limitation could be overcome if the previous call to the
"execute" or "fetch" called fetch in advance for the next row, and
stored the results in a temporary holding point. You don't miss out on
anything either, as all the rows will eventually have to be fetched
anyway.
This is better, IMHO, then requiring an exception be the terminating
condition for a loop.
An alternative would be to restructure the loop as:
while true loop
Fetch(Q);
exit if No_More_Data(Q);
...
end loop;
I don't particular like this approach though, although it would work.
-- Brian May <bam@snoopy.apana.org.au>
- Next message: Warren W. Gay VE3WWG: "Re: Ada DB bindings and APQ"
- Previous message: Jeffrey Carter: "Re: JGNAT"
- In reply to: Brian May: "Re: Ada DB bindings and APQ"
- Next in thread: Warren W. Gay VE3WWG: "Re: Ada DB bindings and APQ"
- Reply: Warren W. Gay VE3WWG: "Re: Ada DB bindings and APQ"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|