From 40dc994430475c7409089e7b849649124e6cb903 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 9 Jan 2009 20:10:29 +0000 Subject: [PATCH] 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 --- Open-ILS/web/js/dojo/openils/PermaCrud.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 ] } ); -- 2.11.0