From: erickson Date: Fri, 9 Jan 2009 20:10:29 +0000 (+0000) Subject: added optional 'streaming' option to search and retrieveAll. For consistency (and... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=40dc994430475c7409089e7b849649124e6cb903;p=Evergreen.git added optional 'streaming' option to search and retrieveAll. For consistency (and backwards compat), both default to non-streaming (aka atomic) git-svn-id: svn://svn.open-ils.org/ILS/trunk@11789 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/js/dojo/openils/PermaCrud.js b/Open-ILS/web/js/dojo/openils/PermaCrud.js index 59757d1ad0..e59b2fc614 100644 --- a/Open-ILS/web/js/dojo/openils/PermaCrud.js +++ b/Open-ILS/web/js/dojo/openils/PermaCrud.js @@ -100,13 +100,16 @@ if(!dojo._hasResource["openils.PermaCrud"]) { var order_by = {}; if (opts.order_by) order_by.order_by = opts.order_by; if (opts.select) order_by.select = opts.select; + + var method = 'open-ils.pcrud.search.' + fm_class; + if(!opts.streaming) method += '.atomic'; var search = {}; search[pkey] = { '!=' : null }; var req_hash = dojo.mixin( opts, - { method : 'open-ils.pcrud.search.' + fm_class + '.atomic', + { method : method, params : [ this.auth(), search, order_by ] } ); @@ -134,9 +137,12 @@ if(!dojo._hasResource["openils.PermaCrud"]) { if (opts.order_by) order_by.order_by = opts.order_by; if (opts.select) order_by.select = opts.select; + var method = 'open-ils.pcrud.search.' + fm_class; + if(!opts.streaming) method += '.atomic'; + var req_hash = dojo.mixin( opts, - { method : 'open-ils.pcrud.search.' + fm_class + '.atomic', + { method : method, params : [ this.auth(), search, order_by ] } );