[open-ils-commits] r11789 - trunk/Open-ILS/web/js/dojo/openils
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jan 9 15:10:32 EST 2009
Author: erickson
Date: 2009-01-09 15:10:29 -0500 (Fri, 09 Jan 2009)
New Revision: 11789
Modified:
trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js
Log:
added optional 'streaming' option to search and retrieveAll. For consistency (and backwards compat), both default to non-streaming (aka atomic)
Modified: trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js 2009-01-09 19:09:07 UTC (rev 11788)
+++ trunk/Open-ILS/web/js/dojo/openils/PermaCrud.js 2009-01-09 20:10:29 UTC (rev 11789)
@@ -100,13 +100,16 @@
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 (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 ]
}
);
More information about the open-ils-commits
mailing list