duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] backend query_info question


From: Kenneth Loafman
Subject: Re: [Duplicity-talk] backend query_info question
Date: Fri, 30 Dec 2011 07:39:44 -0600

I agree.  It should follow the same naming convention as get/put/list/del.

...Ken


On Fri, Dec 30, 2011 at 7:03 AM, <address@hidden> wrote:
I see the point of confusion here. Usually a leading underscore points to a private method which is not supposed to be overwritten and only used within one object.

Removing the leading underscore from _query_*_info methods and add your hint to the query_info description comment should clear this up for future implementers. Don't you think?

..ede



On 30.12.2011 07:20, Michael Terry wrote:
Yeah, query_info is newer than the get/put calls and was done in a way
to allow individual backends to provide optimized ways of asking.

So if a backend can query multiple files at the same cost as one file,
it should implement  _query_list_info.  Otherwise, it should implement
the simpler _query_file_info.

A backend shouldn't reimplement query_info itself.

-mt

On 29 December 2011 19:43, Ken Bass<address@hidden>  wrote:
Hi,

I am writing a backend (for the idrive/ibackup online storage) and am
confused about the query_info().

Is a backend supposed to (optionally) provide query_info, or
_query_list_info or _query_file_info? It is rather confusing as to which is
really supposed to be provided and I wasn't sure what the leading underscore
was for.

Initially I was just thinking of providing my own query_info, which is
consistent with implementing other calls such as get, put, delete,  but then
when I looked at some other backend code, I noticed _boto, couldfiles, gio,
local and u1 all go the _query_file_info route. No one appears to be simply
implementing the query_info themselves.

_______________________________________________
Duplicity-talk mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/duplicity-talk

_______________________________________________
Duplicity-talk mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/duplicity-talk

_______________________________________________
Duplicity-talk mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/duplicity-talk


reply via email to

[Prev in Thread] Current Thread [Next in Thread]