[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: modular database backends
From: |
Milan Zamazal |
Subject: |
Re: modular database backends |
Date: |
17 Jun 2001 14:02:14 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.103 |
>>>>> "PN" == Peter Novodvorsky <address@hidden> writes:
PN> Milan Zamazal wrote:
>> - Maybe it's not *necessary* to force backends to implement full
>> query handling. We probably can agree on that writing new
>> backends should be as simple as possible. I can imagine that
>> your `query_pr' function could be only optional and there could
>> be available simpler versions of query functions that can get a
>> list of all problem IDs, a particular PR and maybe also
>> optionally some index (similar to the current one).
PN> We can implement simplier functions in library that will open
PN> this module. And these functions will use query_pr as more low
PN> level function. Any objections?
I'm not sure we understand each other. To clarify the things: For
instance, we could make a backend library that defines three functions
query_pr, get_list_of_pr_ids, get_pr. query_pr is implemented in the
library using the other two functions and those are implemented using
query_pr. Every backend must provide its own implementation of either
query_pr or get_list_of_pr_ids and get_pr, the other functions may (but
needn't) be implemented using the library.
So a backend powered by a sophisticated query engine (e.g. SQL) can
implement the complex query_pr function itself and needn't bother to
implement the simpler functions get_*. On the other hand, a file system
backend would implement the get_* functions and use the library function
for query_pr.
OK?
Milan Zamazal
--
And why?