Apple Newton Utilities Guide de l'utilisateur Page 444

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 942
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 443
CHAPTER 11
Data Storage and Retrieval
11-12 About Data Storage on Newton Devices
Indexes sort key values in ascending order unless the index spec frame used to
create a particular index species descending order.
Begin Keys and End Keys 11
Because index keys are sorted by value, you can improve the speed of an index
query signicantly by limiting the range of index key values it tests. One way to do
this is to eliminate from the search any index key values that fall outside specied
minimum or maximum values. For example, you can specify a minimum index key
value used to select the rst entry to be tested, causing the query to “skip over” all
lesser-valued index keys. A minimum value used in this way is dened in the query
spec as a
beginKey value.
Similarly, you can specify a maximum index key value to be used in selecting the
last entry to be tested, causing the query to ignore entries having index keys of
greater value. A maximum value used in this way is dened in the query spec as an
endKey value.
You can use these optional
beginKey and endKey values together to specify a
subrange of index key values, as shown in Figure 11-3. Note that if an endrange
value is not specied, it is unbounded; for example, if you don’t specify an
endKey
value the query result potentially includes all entries through the end of the index.
Figure 11-3 Using beginKey and endKey values to specify an index subrange
You can also dene a special kind of key that is itself excluded from the valid
subrange of index values. These keys are dened as
beginExclKey and
endExclKey values in the query spec. Figure 11-4 depicts the use of
beginExclKey and endExclKey values to define the same index subrange
shown in Figure 11-3. Note that you cannot specify both the inclusive and
Ascending key order
Descending key order
beginKey endKey
subrange of index key values
3 4 5
Vue de la page 443
1 2 ... 439 440 441 442 443 444 445 446 447 448 449 ... 941 942

Commentaires sur ces manuels

Pas de commentaire