Comment 4 for bug 487522

Revision history for this message
Michael Nelson (michael.nelson) wrote : Re: getPublishedSources() does not support batch operations

Hrm, looking at the code, getPublishedSources is definitely exposed with the @operation_returns_collection_of() decorator, which according to the lazr.restful source, ensures that a CollectionField is the return type. And the method itself returns an SQL object SelectResults (well, storm compatibility version), so it *should* support batching.

Checking in a console, it *seems* to be tagged correctly:

{{{
In [6]: IArchive['getPublishedSources'].queryTaggedValue('lazr.restful.exported')
Out[6]:
{'as': 'getPublishedSources',
 'call_with': {},
 'params': {'created_since_date': <zope.schema._field.Datetime object at 0x9e1d54c>,
            'distroseries': <lazr.restful.fields.Reference object at 0x9e1d4cc>,
            'exact_match': <zope.schema._bootstrapfields.Bool object at 0x9e1d52c>,
            'name': <zope.schema._bootstrapfields.TextLine object at 0x9e1d3ec>,
            'pocket': <zope.schema._field.Choice object at 0x9e1d4ac>,
            'status': <zope.schema._field.Choice object at 0x9e1d44c>,
            'version': <zope.schema._bootstrapfields.TextLine object at 0x9e1d48c>},
 'return_type': <lazr.restful.fields.CollectionField object at 0x9e1d5ac>,
 'type': 'read_operation'}
}}}

I'll ask Leonard if he can take a quick read of this info and see if we're missing something.