[aur-dev] [PATCH] JSON: enable multiple arguments for "info" method

Justin Davis jrcd83 at gmail.com
Thu Nov 4 19:45:59 CET 2010


On Thu, Nov 4, 2010 at 3:31 AM, tuxce <tuxce.net at gmail.com> wrote:
> Hi, I read that aur is in maintenance mode, but I try anyway:
> https://bugs.archlinux.org/task/17583
> FS#17583 - JSON: enable multiple arguments for "info" method
>
> Patch also attached to bug report
>
> I tested it on current master git branch, it works.
>
> Thanks.
>

I think this would be a nice feature and I would like to contribute. I
attached a few patches to follow tuxce's. I noticed there is an old
bug that reports an error in unicode if the string (before unicode
conversion) is empty. Patch 1 fixes that.

It would be useful if the results were ordered the same as the query
arguments to make it easier for the RPC user to determine if the
search failed and which result corresponds to which argument. If one
of the provided arguments does not find a match in the DB than a null
is returned in place of its result. Patch 2 does this.

Patch 3 uses a regexp to make sure the argument used to search for an
ID is strictly an integer and not a floating point or hexadecimal
number. This doesn't really seem terribly important if a number with
scientific notation or hexadecimal is sent in the DB SELECT but I
thought it might be a good idea.

-- 
-Justin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-misleading-bug-report-about-UTF8-for-an-empty-st.patch
Type: application/octet-stream
Size: 2178 bytes
Desc: not available
URL: <http://mailman.archlinux.org/pipermail/aur-dev/attachments/20101104/19a1b5ba/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Force-info-RPC-to-order-results-the-same-as-argument.patch
Type: application/octet-stream
Size: 3813 bytes
Desc: not available
URL: <http://mailman.archlinux.org/pipermail/aur-dev/attachments/20101104/19a1b5ba/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Use-regexp-to-accept-only-integers-for-the-ID-column.patch
Type: application/octet-stream
Size: 883 bytes
Desc: not available
URL: <http://mailman.archlinux.org/pipermail/aur-dev/attachments/20101104/19a1b5ba/attachment-0005.obj>


More information about the aur-dev mailing list