background image
C H A P T E R 1 1
Data Storage and Retrieval
11-70
Summary of Data Storage
// maximum index key value examined by this query
// for all entries, (entry.indexPath
endKey)
endKey:
keyValue
, // optional
// excluded upper boundary of key range examined by query
// for all entries, (beginExclKey < entry.indexPath)
endExclKey :
keyValue
, // optional
// returns non-nil to include entry in result
indexValidTest: func (
keyValue
) begin ... end;, // optional
// returns non-nil to include entry in result
validTest: func (
entry
) begin ... end; // optional
// optional tags query spec frame; see page 11-71
tagSpec: {equal:[
t1, t2, ...tN
], all:[
t1, t2, ...tN
],
any:[
t1, t2, ...tN
],none:[
t1, t2, ...tN
]},
// when non-nil, match entire string in 'words slot
entireWords:
Boolean
, // optional
// string(s) to match w/ word beginnings in entries
words:
string
|[
str1
,
str2
, ... ,
strN
], // optional
// string to match w/ any substring in entries
text:
string
, // optional
}
// this frame used for queries on multiple-slot indexes
// see previous example for single-slot query spec frame
{
// use the specified multiple-slot index for this query
indexPath : ['
pathExpr1,
'
pathExpr2,
...'
pathExpr6
], // required
// minimum index key value examined by this query
// for all entries, (beginKey
entry.indexPath)
beginKey : [
keyValue1
,
keyValue2
...
keyValue6
], // optional
// excluded lower boundary of key range examined by query
// for all entries, (beginExclKey < entry.indexPath)
beginExclKey : [
keyValue1
,
keyValue2
...
keyValue6
], // optional
// maximum index key value examined by this query
// for all entries, (entry.indexPath
endKey)
endKey: [
keyValue1
,
keyValue2
...
keyValue6
], // optional
// excluded upper boundary of key range examined by query
// for all entries, (beginExclKey < entry.indexPath)
endExclKey : [
keyValue1
,
keyValue2
...
keyValue6
], // optional
// optional; returns non-nil to include entry in result
indexValidTest: func ([
keyValue1
,
keyValue2
...
keyValue6
])
begin ... end;,
// optional; returns non-nil to include entry in result
validTest: func (
entry
) begin ... end;
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна