1. We have built a person class, followed by the table's storage structure
2. Open Inspector, enter RowID first name is P_rowid, select Class->storage
3. Create a new Storage, Select Cachesqlstorage. In Sqlidexpression, enter $i (^mdata ("person")) is \$ not s
means to set rowid to self-increment, note stremlocation's notation
4.caché store data in a multidimensional array, All data is saved in global. Global is represented in the following form: ^ name (subscript 1, subscript 2, subscript 3 ...) = value
Set ^y (3,6,7) = "Third"
Set ^y (3,6,8) = "Fourth"
SET ^y (3,6,7,8,4) = "Fifth"
SET ^y (3,6,7,8,9) = "Sixth" Global has a tree structure such as the following:
5. Open the SQL Storage Map index, click Add, select the map type data, enter the global name. Typically uppercase
for the class name. 6. Tap left data. Select Add to add three data to Glabal, separated by "^"
7. Click on the left subscripts. Enter {P_rowid}
8. Click on the left side RowID and enter the
9 you see. A primary index is created. You can query the table data by rowID
^person (1) =xiaoming^18^man
^person is the global name. (1) indicates that ROWID is 1. The subsequent data positions are arranged according to the location in Data
10. Next. We are building an index, add an index in NewStorage1, map type Select index, enter the global name
11.Subscripts to see, this represents the four levels of global. The first and second levels are their own names, easy to understand the information stored by the global, three or four layer is the detailed content
12.rowid saw, is the fourth level
13. This index, which is established by name, is understood by global.
^personi ( 0, "name", "Xiaoming", 1) =0
Storage structure for table of cache database