Cursor Functions
querySpecFrame
is a frame that specifies the retrieval criteria for entries. It can also indicate the order in which to retrieve them. You do not, however, have to place restrictions on a query. Creating a query using a nil query frame will return every entry in the soup:
unionsoup:Query(nil)Here is a list of the possible slots in
querySpecFrame
:
indexPath
beginKey
indexPath slot
. The first entry returned has an indexed slot value greater than or equal to the value of beginKey
.
beginExclKey
indexPath slot
.The first entry returned has an indexed slot value strictly greater than the value of beginExclKey
.
endKey
indexPath slot
.The last entry returned has an indexed slot value less than or equal to the value of endKey
.
endExclKey
indexPath slot
.The last entry returned has an indexed slot value strictly less than the value of endExclKey
.
indexValidTest
indexPath slot
. This function takes an index value (or array of index values in the case of a multislot index) and returns true
or nil
. The index value of each potential query entry is passed to this function. If it returns nil
, the entry is not part of the query; otherwise, it is. Each time the cursor is moved, validTest
is called.
words
entireWords
words
slot.If this slot is true
, the words
array is used for exact string matching rather than as string prefixes.
text
text
's value in it. The text can be anywhere in the string.
validTest
true
or nil
. Each potential query entry is passed to this function. If it returns nil
, the entry is not part of the query; otherwise, it is. Each time the cursor is moved, validTest
is called.
tagSpec
An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.
Last modified: 1 DEC 1996