C H A P T E R 1 2
Special-Purpose Objects for Data Storage and Retrieval
Using Special-Purpose Data Storage Objects
// decide to go back to the original
// clean up
foreach store in GetStores() do
mySoup := store:GetSoup("foo:myApp:mySig") ;
if mySoup then
VBOs and String Data
In most cases, you should avoid using the
with VBO-based strings. These operators work by allocating a new string in the
NewtonScript heap and copying data from its arguments into the new object. You
can run out of heap space easily when attempting this operation with large strings.
Instead, use the
global function to concatenate two strings. The
following code fragment appends the
string to the
the size of
as necessary, regardless of whether
is VBO data or resident
in the NewtonScript heap.
StrMunger(str1, MAXINT, nil, str2, 0, nil);
The value of
; however, any number larger
Using Store Parts
This section describes how to create a store part and add soup data to it. This
discussion is followed by a description of how to access the store part's soups
from your application.
Note that other representations may provide better space efficiency or faster access
to data. Store parts are useful when you wish to avoid recoding soup data in a more
efficient representation, or when you need multiple indexes or some other
convenience that soup-based queries provide.