Including and excluding fields
Gervase Markham
gerv at mozilla.org
Fri Jan 15 21:24:48 UTC 2010
On 15/01/10 21:14, Gervase Markham wrote:
>> If you do stick with this, I'd use "_default" instead of "all", though,
>> since I'd interpret all to mean "every single field possible".
>
> "all" _does_ mean "every single field possible". Perhaps what I wrote
> above was unclear. Let me try again:
>
> fields=<comma-separated list>|"all"
>
> If the value is a list, then those fields are _added_ to the default set
> to produce the set returned.
>
> If the value is "all", then every possible field is returned.
Oh, hang on. I've just thought this through again and I see what you mean.
We actually need:
fields=<comma-separated list of field names starting from *scratch*,
or starting from default if one of values is '_default',
or single value '_all'.>
exclude_fields=<comma-separated list of field names to not send>
Either list can contain the special value '_custom' which is an '_all'
for custom fields.
Algorithm: fields sent = 'fields' - 'exclude_fields'.
The default value for 'fields' is, conceptually, '_default'!
This scheme allows for small-number-of-named, everything,
default-plus-some and default-minus-some. Which covers all use cases.
Gerv
_______________________________________________
dev-apps-bugzilla mailing list
dev-apps-bugzilla at lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-apps-bugzilla
More information about the developers
mailing list