From mboxrd@z Thu Jan 1 00:00:00 1970 From: Milan Zamazal To: Peter Novodvorsky Cc: gnats-devel@sources.redhat.com Subject: Re: modular database backends Date: Sun, 17 Jun 2001 12:26:00 -0000 Message-id: <8766dvxqk9.fsf@blackbird.zamazal.org> References: <7xr8xaac5q.fsf@lambda.novdv.ru> <878zjhdvwu.fsf@blackbird.zamazal.org> <7x4ru4kl9y.fsf@lambda.novdv.ru> <87pucbyt1r.fsf@blackbird.zamazal.org> <3B27A419.2060703@altlinux.ru> X-SW-Source: 2001-q2/msg00181.html >>>>> "PN" == Peter Novodvorsky 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?