Ordering and paging
Grouping calculates values over related rows.
orderBy sets the order of those rows. distinct removes repeated rows.
offset and limit cut a window from the ordered rows. page reads a long
result in stable parts. Each example reads the same five entities as
Queries.
Order
Each orderBy entry is a variable, or a variable with a direction. A variable without a direction uses ascending order. An entry can also be an expression. Stardust calculates
it for each row and sorts the rows by the result.
| Offset (hex) | Bytes (hex) | Meaning |
|---|---|---|
| 00 | 54 52 4F 4E | magic TRON |
| 04 | 5C 3F6E616D65 | txt "?name" |
| 0A | 4C 3F73616C | txt "?sal" |
| 0F | 0E 11 00 0300 020000 00 04000000 0A0000 00 | array leaf, size 17, shift 0, bitmap 0003, count 2 (root): @4 → @A |
| 20 | 2C 3F65 | txt "?e" |
| 23 | 6C 73616C617279 | txt "salary" |
| 2A | 4C 3F73616C | txt "?sal" |
| 2F | 0E 15 00 0700 030000 00 20000000 230000 00 2A000000 | array leaf, size 21, shift 0, bitmap 0007, count 3 (root): @20 → @23 → @2A |
| 44 | 2C 3F65 | txt "?e" |
| 47 | 4C 6E616D65 | txt "name" |
| 4C | 5C 3F6E616D65 | txt "?name" |
| 52 | 0E 15 00 0700 030000 00 44000000 470000 00 4C000000 | array leaf, size 21, shift 0, bitmap 0007, count 3 (root): @44 → @47 → @4C |
| 67 | 0E 11 00 0300 020000 00 2F000000 520000 00 | array leaf, size 17, shift 0, bitmap 0003, count 2 (root): @2F → @52 |
| 78 | 4C 3F73616C | txt "?sal" |
| 7D | 4C 64657363 | txt "desc" |
| 82 | 0E 11 00 0300 020000 00 78000000 7D0000 00 | array leaf, size 17, shift 0, bitmap 0003, count 2 (root): @78 → @7D |
| 93 | 0E 0D 00 0100 010000 00 82000000 | array leaf, size 13, shift 0, bitmap 0001, count 1 (root): @82 |
| A0 | 5C 7768657265 | txt "where" |
| A6 | 0F 0A A0000000 6700 0000 | map leaf, size 10: @A0 → @67 |
| B0 | 4C 66696E64 | txt "find" |
| B5 | 0F 0A B0000000 0F00 0000 | map leaf, size 10: @B0 → @F |
| BF | 7C 6F726465724279 | txt "orderBy" |
| C7 | 0F 0A BF000000 9300 0000 | map leaf, size 10: @BF → @93 |
| D1 | 07 12 2A000000 A600 0000 B5000000 C700 0000 | map branch, size 18, depth 0 (root), slots 1, 3, 5: @A6 → @B5 → @C7 |
| E3 | D1000000 00000000 | root → @D1; previous: none |
| Offset (hex) | Bytes (hex) | Meaning |
|---|---|---|
| 000 | 54 52 4F 4E | magic TRON |
| 004 | 3C 73616C | txt "sal" |
| 008 | 02 78000000000000 00 | i64 120 |
| 011 | 0F 0A 04000000 0800 0000 | map leaf, size 10: @4 → @8 |
| 01B | 4C 6E616D65 | txt "name" |
| 020 | 3C 416461 | txt "Ada" |
| 024 | 0F 0A 1B000000 2000 0000 | map leaf, size 10: @1B → @20 |
| 02E | 07 0E 80800000 1100 0000 24000000 | map branch, size 14, depth 0 (root), slots 7, 15: @11 → @24 |
| 03C | 3C 73616C | txt "sal" |
| 040 | 02 64000000000000 00 | i64 100 |
| 049 | 0F 0A 3C000000 4000 0000 | map leaf, size 10: @3C → @40 |
| 053 | 4C 6E616D65 | txt "name" |
| 058 | 3C 426F62 | txt "Bob" |
| 05C | 0F 0A 53000000 5800 0000 | map leaf, size 10: @53 → @58 |
| 066 | 07 0E 80800000 4900 0000 5C000000 | map branch, size 14, depth 0 (root), slots 7, 15: @49 → @5C |
| 074 | 3C 73616C | txt "sal" |
| 078 | 02 5A000000000000 00 | i64 90 |
| 081 | 0F 0A 74000000 7800 0000 | map leaf, size 10: @74 → @78 |
| 08B | 4C 6E616D65 | txt "name" |
| 090 | 2C 4379 | txt "Cy" |
| 093 | 0F 0A 8B000000 9000 0000 | map leaf, size 10: @8B → @90 |
| 09D | 07 0E 80800000 8100 0000 93000000 | map branch, size 14, depth 0 (root), slots 7, 15: @81 → @93 |
| 0AB | 3C 73616C | txt "sal" |
| 0AF | 02 50000000000000 00 | i64 80 |
| 0B8 | 0F 0A AB000000 AF00 0000 | map leaf, size 10: @AB → @AF |
| 0C2 | 4C 6E616D65 | txt "name" |
| 0C7 | 3C 457665 | txt "Eve" |
| 0CB | 0F 0A C2000000 C700 0000 | map leaf, size 10: @C2 → @C7 |
| 0D5 | 07 0E 80800000 B800 0000 CB000000 | map branch, size 14, depth 0 (root), slots 7, 15: @B8 → @CB |
| 0E3 | 3C 73616C | txt "sal" |
| 0E7 | 02 46000000000000 00 | i64 70 |
| 0F0 | 0F 0A E3000000 E700 0000 | map leaf, size 10: @E3 → @E7 |
| 0FA | 4C 6E616D65 | txt "name" |
| 0FF | 3C 44616E | txt "Dan" |
| 103 | 0F 0A FA000000 FF00 0000 | map leaf, size 10: @FA → @FF |
| 10D | 07 0E 80800000 F000 0000 03010000 | map branch, size 14, depth 0 (root), slots 7, 15: @F0 → @103 |
| 11B | 0E 1D 00 1F00 050000 00 2E000000 660000 00 9D000000 D50000 00 0D010000 | array leaf, size 29, shift 0, bitmap 001F, count 5 (root): @2E → @66 → @9D → @D5 → @10D |
| 138 | 1B010000 00000000 | root → @11B; previous: none |
asc and desc are the two directions. Several entries make several sort
keys, and the first entry is the strongest.
| Offset (hex) | Bytes (hex) | Meaning |
|---|---|---|
| 000 | 54 52 4F 4E | magic TRON |
| 004 | 5C 3F64657074 | txt "?dept" |
| 00A | 5C 3F6E616D65 | txt "?name" |
| 010 | 0E 11 00 0300 020000 00 04000000 0A0000 00 | array leaf, size 17, shift 0, bitmap 0003, count 2 (root): @4 → @A |
| 021 | 2C 3F65 | txt "?e" |
| 024 | 4C 64657074 | txt "dept" |
| 029 | 5C 3F64657074 | txt "?dept" |
| 02F | 0E 15 00 0700 030000 00 21000000 240000 00 29000000 | array leaf, size 21, shift 0, bitmap 0007, count 3 (root): @21 → @24 → @29 |
| 044 | 2C 3F65 | txt "?e" |
| 047 | 6C 73616C617279 | txt "salary" |
| 04E | 4C 3F73616C | txt "?sal" |
| 053 | 0E 15 00 0700 030000 00 44000000 470000 00 4E000000 | array leaf, size 21, shift 0, bitmap 0007, count 3 (root): @44 → @47 → @4E |
| 068 | 2C 3F65 | txt "?e" |
| 06B | 4C 6E616D65 | txt "name" |
| 070 | 5C 3F6E616D65 | txt "?name" |
| 076 | 0E 15 00 0700 030000 00 68000000 6B0000 00 70000000 | array leaf, size 21, shift 0, bitmap 0007, count 3 (root): @68 → @6B → @70 |
| 08B | 0E 15 00 0700 030000 00 2F000000 530000 00 76000000 | array leaf, size 21, shift 0, bitmap 0007, count 3 (root): @2F → @53 → @76 |
| 0A0 | 4C 3F73616C | txt "?sal" |
| 0A5 | 4C 64657363 | txt "desc" |
| 0AA | 0E 11 00 0300 020000 00 A0000000 A50000 00 | array leaf, size 17, shift 0, bitmap 0003, count 2 (root): @A0 → @A5 |
| 0BB | 5C 3F64657074 | txt "?dept" |
| 0C1 | 0E 11 00 0300 020000 00 BB000000 AA0000 00 | array leaf, size 17, shift 0, bitmap 0003, count 2 (root): @BB → @AA |
| 0D2 | 5C 7768657265 | txt "where" |
| 0D8 | 0F 0A D2000000 8B00 0000 | map leaf, size 10: @D2 → @8B |
| 0E2 | 4C 66696E64 | txt "find" |
| 0E7 | 0F 0A E2000000 1000 0000 | map leaf, size 10: @E2 → @10 |
| 0F1 | 7C 6F726465724279 | txt "orderBy" |
| 0F9 | 0F 0A F1000000 C100 0000 | map leaf, size 10: @F1 → @C1 |
| 103 | 07 12 2A000000 D800 0000 E7000000 F900 0000 | map branch, size 18, depth 0 (root), slots 1, 3, 5: @D8 → @E7 → @F9 |
| 115 | 03010000 00000000 | root → @103; previous: none |
| Offset (hex) | Bytes (hex) | Meaning |
|---|---|---|
| 000 | 54 52 4F 4E | magic TRON |
| 004 | 4C 64657074 | txt "dept" |
| 009 | 3C 656E67 | txt "eng" |
| 00D | 0F 0A 04000000 0900 0000 | map leaf, size 10: @4 → @9 |
| 017 | 4C 6E616D65 | txt "name" |
| 01C | 3C 416461 | txt "Ada" |
| 020 | 0F 0A 17000000 1C00 0000 | map leaf, size 10: @17 → @1C |
| 02A | 07 0E 00900000 0D00 0000 20000000 | map branch, size 14, depth 0 (root), slots 12, 15: @D → @20 |
| 038 | 4C 64657074 | txt "dept" |
| 03D | 3C 656E67 | txt "eng" |
| 041 | 0F 0A 38000000 3D00 0000 | map leaf, size 10: @38 → @3D |
| 04B | 4C 6E616D65 | txt "name" |
| 050 | 3C 426F62 | txt "Bob" |
| 054 | 0F 0A 4B000000 5000 0000 | map leaf, size 10: @4B → @50 |
| 05E | 07 0E 00900000 4100 0000 54000000 | map branch, size 14, depth 0 (root), slots 12, 15: @41 → @54 |
| 06C | 4C 64657074 | txt "dept" |
| 071 | 3C 6F7073 | txt "ops" |
| 075 | 0F 0A 6C000000 7100 0000 | map leaf, size 10: @6C → @71 |
| 07F | 4C 6E616D65 | txt "name" |
| 084 | 3C 457665 | txt "Eve" |
| 088 | 0F 0A 7F000000 8400 0000 | map leaf, size 10: @7F → @84 |
| 092 | 07 0E 00900000 7500 0000 88000000 | map branch, size 14, depth 0 (root), slots 12, 15: @75 → @88 |
| 0A0 | 4C 64657074 | txt "dept" |
| 0A5 | 5C 73616C6573 | txt "sales" |
| 0AB | 0F 0A A0000000 A500 0000 | map leaf, size 10: @A0 → @A5 |
| 0B5 | 4C 6E616D65 | txt "name" |
| 0BA | 2C 4379 | txt "Cy" |
| 0BD | 0F 0A B5000000 BA00 0000 | map leaf, size 10: @B5 → @BA |
| 0C7 | 07 0E 00900000 AB00 0000 BD000000 | map branch, size 14, depth 0 (root), slots 12, 15: @AB → @BD |
| 0D5 | 4C 64657074 | txt "dept" |
| 0DA | 5C 73616C6573 | txt "sales" |
| 0E0 | 0F 0A D5000000 DA00 0000 | map leaf, size 10: @D5 → @DA |
| 0EA | 4C 6E616D65 | txt "name" |
| 0EF | 3C 44616E | txt "Dan" |
| 0F3 | 0F 0A EA000000 EF00 0000 | map leaf, size 10: @EA → @EF |
| 0FD | 07 0E 00900000 E000 0000 F3000000 | map branch, size 14, depth 0 (root), slots 12, 15: @E0 → @F3 |
| 10B | 0E 1D 00 1F00 050000 00 2A000000 5E0000 00 92000000 C70000 00 FD000000 | array leaf, size 29, shift 0, bitmap 001F, count 5 (root): @2A → @5E → @92 → @C7 → @FD |
| 128 | 0B010000 00000000 | root → @10B; previous: none |
Distinct
distinct true keeps the first row of each set of equal rows. It compares the
find columns, and it respects the type of each value. The integer 1 and the
number 1.0 are two different values.
Stardust can drop a repeated partial result during a where join.
No later clause, find column or ordering key can read the distinguishing
variables. Aggregates, grouping, windows and projection prevent this optimization.
The result rows remain the same. A join that reaches one answer along many
paths does the work once.
| Offset (hex) | Bytes (hex) | Meaning |
|---|---|---|
| 00 | 54 52 4F 4E | magic TRON |
| 04 | 5C 3F64657074 | txt "?dept" |
| 0A | 0E 0D 00 0100 010000 00 04000000 | array leaf, size 13, shift 0, bitmap 0001, count 1 (root): @4 |
| 17 | 2C 3F65 | txt "?e" |
| 1A | 4C 64657074 | txt "dept" |
| 1F | 5C 3F64657074 | txt "?dept" |
| 25 | 0E 15 00 0700 030000 00 17000000 1A0000 00 1F000000 | array leaf, size 21, shift 0, bitmap 0007, count 3 (root): @17 → @1A → @1F |
| 3A | 0E 0D 00 0100 010000 00 25000000 | array leaf, size 13, shift 0, bitmap 0001, count 1 (root): @25 |
| 47 | 5C 3F64657074 | txt "?dept" |
| 4D | 0E 0D 00 0100 010000 00 47000000 | array leaf, size 13, shift 0, bitmap 0001, count 1 (root): @47 |
| 5A | 5C 7768657265 | txt "where" |
| 60 | 0F 0A 5A000000 3A00 0000 | map leaf, size 10: @5A → @3A |
| 6A | 4C 66696E64 | txt "find" |
| 6F | 0F 0A 6A000000 0A00 0000 | map leaf, size 10: @6A → @A |
| 79 | 8C 64697374696E63 74 | txt "distinct" |
| 82 | 09 | bit true |
| 83 | 0F 0A 79000000 8200 0000 | map leaf, size 10: @79 → @82 |
| 8D | 7C 6F726465724279 | txt "orderBy" |
| 95 | 0F 0A 8D000000 4D00 0000 | map leaf, size 10: @8D → @4D |
| 9F | 07 0E 00090000 8300 0000 95000000 | map branch, size 14, depth 1, slots 8, 11: @83 → @95 |
| AD | 07 12 2A000000 6000 0000 6F000000 9F00 0000 | map branch, size 18, depth 0 (root), slots 1, 3, 5: @60 → @6F → @9F |
| BF | AD000000 00000000 | root → @AD; previous: none |
| Offset (hex) | Bytes (hex) | Meaning |
|---|---|---|
| 00 | 54 52 4F 4E | magic TRON |
| 04 | 4C 64657074 | txt "dept" |
| 09 | 3C 656E67 | txt "eng" |
| 0D | 0F 0A 04000000 0900 0000 | map leaf, size 10: @4 → @9 |
| 17 | 4C 64657074 | txt "dept" |
| 1C | 3C 6F7073 | txt "ops" |
| 20 | 0F 0A 17000000 1C00 0000 | map leaf, size 10: @17 → @1C |
| 2A | 4C 64657074 | txt "dept" |
| 2F | 5C 73616C6573 | txt "sales" |
| 35 | 0F 0A 2A000000 2F00 0000 | map leaf, size 10: @2A → @2F |
| 3F | 0E 15 00 0700 030000 00 0D000000 200000 00 35000000 | array leaf, size 21, shift 0, bitmap 0007, count 3 (root): @D → @20 → @35 |
| 54 | 3F000000 00000000 | root → @3F; previous: none |
Offset and limit
offset and limit are counts of rows, and each one accepts 0 or more.
Stardust applies them after orderBy and after distinct.
| Offset (hex) | Bytes (hex) | Meaning |
|---|---|---|
| 000 | 54 52 4F 4E | magic TRON |
| 004 | 5C 3F6E616D65 | txt "?name" |
| 00A | 0E 0D 00 0100 010000 00 04000000 | array leaf, size 13, shift 0, bitmap 0001, count 1 (root): @4 |
| 017 | 2C 3F65 | txt "?e" |
| 01A | 6C 73616C617279 | txt "salary" |
| 021 | 4C 3F73616C | txt "?sal" |
| 026 | 0E 15 00 0700 030000 00 17000000 1A0000 00 21000000 | array leaf, size 21, shift 0, bitmap 0007, count 3 (root): @17 → @1A → @21 |
| 03B | 2C 3F65 | txt "?e" |
| 03E | 4C 6E616D65 | txt "name" |
| 043 | 5C 3F6E616D65 | txt "?name" |
| 049 | 0E 15 00 0700 030000 00 3B000000 3E0000 00 43000000 | array leaf, size 21, shift 0, bitmap 0007, count 3 (root): @3B → @3E → @43 |
| 05E | 0E 11 00 0300 020000 00 26000000 490000 00 | array leaf, size 17, shift 0, bitmap 0003, count 2 (root): @26 → @49 |
| 06F | 5C 3F6E616D65 | txt "?name" |
| 075 | 0E 0D 00 0100 010000 00 6F000000 | array leaf, size 13, shift 0, bitmap 0001, count 1 (root): @6F |
| 082 | 5C 7768657265 | txt "where" |
| 088 | 0F 0A 82000000 5E00 0000 | map leaf, size 10: @82 → @5E |
| 092 | 4C 66696E64 | txt "find" |
| 097 | 0F 0A 92000000 0A00 0000 | map leaf, size 10: @92 → @A |
| 0A1 | 7C 6F726465724279 | txt "orderBy" |
| 0A9 | 0F 0A A1000000 7500 0000 | map leaf, size 10: @A1 → @75 |
| 0B3 | 5C 6C696D6974 | txt "limit" |
| 0B9 | 02 02000000000000 00 | i64 2 |
| 0C2 | 0F 0A B3000000 B900 0000 | map leaf, size 10: @B3 → @B9 |
| 0CC | 07 0E 00280000 A900 0000 C2000000 | map branch, size 14, depth 1, slots 11, 13: @A9 → @C2 |
| 0DA | 6C 6F6666736574 | txt "offset" |
| 0E1 | 02 02000000000000 00 | i64 2 |
| 0EA | 0F 0A DA000000 E100 0000 | map leaf, size 10: @DA → @E1 |
| 0F4 | 07 16 2A400000 8800 0000 97000000 CC00 0000 EA000000 | map branch, size 22, depth 0 (root), slots 1, 3, 5, 14: @88 → @97 → @CC → @EA |
| 10A | F4000000 00000000 | root → @F4; previous: none |
| Offset (hex) | Bytes (hex) | Meaning |
|---|---|---|
| 00 | 54 52 4F 4E | magic TRON |
| 04 | 4C 6E616D65 | txt "name" |
| 09 | 2C 4379 | txt "Cy" |
| 0C | 0F 0A 04000000 0900 0000 | map leaf, size 10: @4 → @9 |
| 16 | 4C 6E616D65 | txt "name" |
| 1B | 3C 44616E | txt "Dan" |
| 1F | 0F 0A 16000000 1B00 0000 | map leaf, size 10: @16 → @1B |
| 29 | 0E 11 00 0300 020000 00 0C000000 1F0000 00 | array leaf, size 17, shift 0, bitmap 0003, count 2 (root): @C → @1F |
| 3A | 29000000 00000000 | root → @29; previous: none |
Pages
page reads a long result in parts. It has size, the number of rows in one
page, and an optional after, the cursor of the page before it.
| Offset (hex) | Bytes (hex) | Meaning |
|---|---|---|
| 000 | 54 52 4F 4E | magic TRON |
| 004 | 5C 3F6E616D65 | txt "?name" |
| 00A | 0E 0D 00 0100 010000 00 04000000 | array leaf, size 13, shift 0, bitmap 0001, count 1 (root): @4 |
| 017 | 2C 3F65 | txt "?e" |
| 01A | 6C 73616C617279 | txt "salary" |
| 021 | 4C 3F73616C | txt "?sal" |
| 026 | 0E 15 00 0700 030000 00 17000000 1A0000 00 21000000 | array leaf, size 21, shift 0, bitmap 0007, count 3 (root): @17 → @1A → @21 |
| 03B | 2C 3F65 | txt "?e" |
| 03E | 4C 6E616D65 | txt "name" |
| 043 | 5C 3F6E616D65 | txt "?name" |
| 049 | 0E 15 00 0700 030000 00 3B000000 3E0000 00 43000000 | array leaf, size 21, shift 0, bitmap 0007, count 3 (root): @3B → @3E → @43 |
| 05E | 0E 11 00 0300 020000 00 26000000 490000 00 | array leaf, size 17, shift 0, bitmap 0003, count 2 (root): @26 → @49 |
| 06F | 5C 3F6E616D65 | txt "?name" |
| 075 | 0E 0D 00 0100 010000 00 6F000000 | array leaf, size 13, shift 0, bitmap 0001, count 1 (root): @6F |
| 082 | 4C 73697A65 | txt "size" |
| 087 | 02 02000000000000 00 | i64 2 |
| 090 | 0F 0A 82000000 8700 0000 | map leaf, size 10: @82 → @87 |
| 09A | 5C 7768657265 | txt "where" |
| 0A0 | 0F 0A 9A000000 5E00 0000 | map leaf, size 10: @9A → @5E |
| 0AA | 4C 66696E64 | txt "find" |
| 0AF | 0F 0A AA000000 0A00 0000 | map leaf, size 10: @AA → @A |
| 0B9 | 7C 6F726465724279 | txt "orderBy" |
| 0C1 | 0F 0A B9000000 7500 0000 | map leaf, size 10: @B9 → @75 |
| 0CB | 4C 70616765 | txt "page" |
| 0D0 | 0F 0A CB000000 9000 0000 | map leaf, size 10: @CB → @90 |
| 0DA | 07 0E 00280000 C100 0000 D0000000 | map branch, size 14, depth 1, slots 11, 13: @C1 → @D0 |
| 0E8 | 07 12 2A000000 A000 0000 AF000000 DA00 0000 | map branch, size 18, depth 0 (root), slots 1, 3, 5: @A0 → @AF → @DA |
| 0FA | E8000000 00000000 | root → @E8; previous: none |
| Offset (hex) | Bytes (hex) | Meaning |
|---|---|---|
| 00 | 54 52 4F 4E | magic TRON |
| 04 | 4C 6E616D65 | txt "name" |
| 09 | 3C 416461 | txt "Ada" |
| 0D | 0F 0A 04000000 0900 0000 | map leaf, size 10: @4 → @9 |
| 17 | 4C 6E616D65 | txt "name" |
| 1C | 3C 426F62 | txt "Bob" |
| 20 | 0F 0A 17000000 1C00 0000 | map leaf, size 10: @17 → @1C |
| 2A | 0E 11 00 0300 020000 00 0D000000 200000 00 | array leaf, size 17, shift 0, bitmap 0003, count 2 (root): @D → @20 |
| 3B | 2A000000 00000000 | root → @2A; previous: none |
The reply carries hasMore. While more rows exist, it also carries
nextCursor. The next page gives that cursor as after.
Copy the first page's cursor into the next query's page.after string. Stardust generates its value at runtime. It is not an entity
name. Do not reuse a literal from this article.
A cursor holds the last row of the page and a fingerprint of the query. The
fingerprint covers every part of the query except page. A cursor from a
different query is Cursor_Mismatch, and a cursor that Stardust cannot open is
Invalid_Cursor.
| Offset (hex) | Bytes (hex) | Meaning |
|---|---|---|
| 000 | 54 52 4F 4E | magic TRON |
| 004 | 5C 3F6E616D65 | txt "?name" |
| 00A | 0E 0D 00 0100 010000 00 04000000 | array leaf, size 13, shift 0, bitmap 0001, count 1 (root): @4 |
| 017 | 2C 3F65 | txt "?e" |
| 01A | 6C 73616C617279 | txt "salary" |
| 021 | 4C 3F73616C | txt "?sal" |
| 026 | 0E 15 00 0700 030000 00 17000000 1A0000 00 21000000 | array leaf, size 21, shift 0, bitmap 0007, count 3 (root): @17 → @1A → @21 |
| 03B | 2C 3F65 | txt "?e" |
| 03E | 4C 6E616D65 | txt "name" |
| 043 | 5C 3F6E616D65 | txt "?name" |
| 049 | 0E 15 00 0700 030000 00 3B000000 3E0000 00 43000000 | array leaf, size 21, shift 0, bitmap 0007, count 3 (root): @3B → @3E → @43 |
| 05E | 0E 11 00 0300 020000 00 26000000 490000 00 | array leaf, size 17, shift 0, bitmap 0003, count 2 (root): @26 → @49 |
| 06F | 5C 3F6E616D65 | txt "?name" |
| 075 | 0E 0D 00 0100 010000 00 6F000000 | array leaf, size 13, shift 0, bitmap 0001, count 1 (root): @6F |
| 082 | 4C 73697A65 | txt "size" |
| 087 | 02 02000000000000 00 | i64 2 |
| 090 | 0F 0A 82000000 8700 0000 | map leaf, size 10: @82 → @87 |
| 09A | 5C 6166746572 | txt "after" |
| 0A0 | CC 6E6F742D612D63 7572736F72 | txt "not-a-cursor" |
| 0AD | 0F 0A 9A000000 A000 0000 | map leaf, size 10: @9A → @A0 |
| 0B7 | 07 0E 00090000 9000 0000 AD000000 | map branch, size 14, depth 0 (root), slots 8, 11: @90 → @AD |
| 0C5 | 5C 7768657265 | txt "where" |
| 0CB | 0F 0A C5000000 5E00 0000 | map leaf, size 10: @C5 → @5E |
| 0D5 | 4C 66696E64 | txt "find" |
| 0DA | 0F 0A D5000000 0A00 0000 | map leaf, size 10: @D5 → @A |
| 0E4 | 7C 6F726465724279 | txt "orderBy" |
| 0EC | 0F 0A E4000000 7500 0000 | map leaf, size 10: @E4 → @75 |
| 0F6 | 4C 70616765 | txt "page" |
| 0FB | 0F 0A F6000000 B700 0000 | map leaf, size 10: @F6 → @B7 |
| 105 | 07 0E 00280000 EC00 0000 FB000000 | map branch, size 14, depth 1, slots 11, 13: @EC → @FB |
| 113 | 07 12 2A000000 CB00 0000 DA000000 0501 0000 | map branch, size 18, depth 0 (root), slots 1, 3, 5: @CB → @DA → @105 |
| 125 | 13010000 00000000 | root → @113; previous: none |
Error
Invalid_Cursor
When a page is rejected
A page boundary needs a total order, and it cannot share a query with the other window clauses.
| Condition | Reason |
|---|---|
page without orderBy | A stable boundary needs a total order |
page with limit | limit cuts the rows that page divides |
page with offset | offset moves the boundary of each page |
page {size 0} | size accepts 1 or more |
page with project | A projected shape has no row boundary |
Each of these conditions gives one error. This query has page and limit:
| Offset (hex) | Bytes (hex) | Meaning |
|---|---|---|
| 000 | 54 52 4F 4E | magic TRON |
| 004 | 5C 3F6E616D65 | txt "?name" |
| 00A | 0E 0D 00 0100 010000 00 04000000 | array leaf, size 13, shift 0, bitmap 0001, count 1 (root): @4 |
| 017 | 2C 3F65 | txt "?e" |
| 01A | 6C 73616C617279 | txt "salary" |
| 021 | 4C 3F73616C | txt "?sal" |
| 026 | 0E 15 00 0700 030000 00 17000000 1A0000 00 21000000 | array leaf, size 21, shift 0, bitmap 0007, count 3 (root): @17 → @1A → @21 |
| 03B | 2C 3F65 | txt "?e" |
| 03E | 4C 6E616D65 | txt "name" |
| 043 | 5C 3F6E616D65 | txt "?name" |
| 049 | 0E 15 00 0700 030000 00 3B000000 3E0000 00 43000000 | array leaf, size 21, shift 0, bitmap 0007, count 3 (root): @3B → @3E → @43 |
| 05E | 0E 11 00 0300 020000 00 26000000 490000 00 | array leaf, size 17, shift 0, bitmap 0003, count 2 (root): @26 → @49 |
| 06F | 5C 3F6E616D65 | txt "?name" |
| 075 | 0E 0D 00 0100 010000 00 6F000000 | array leaf, size 13, shift 0, bitmap 0001, count 1 (root): @6F |
| 082 | 4C 73697A65 | txt "size" |
| 087 | 02 02000000000000 00 | i64 2 |
| 090 | 0F 0A 82000000 8700 0000 | map leaf, size 10: @82 → @87 |
| 09A | 5C 7768657265 | txt "where" |
| 0A0 | 0F 0A 9A000000 5E00 0000 | map leaf, size 10: @9A → @5E |
| 0AA | 4C 66696E64 | txt "find" |
| 0AF | 0F 0A AA000000 0A00 0000 | map leaf, size 10: @AA → @A |
| 0B9 | 7C 6F726465724279 | txt "orderBy" |
| 0C1 | 0F 0A B9000000 7500 0000 | map leaf, size 10: @B9 → @75 |
| 0CB | 5C 6C696D6974 | txt "limit" |
| 0D1 | 02 02000000000000 00 | i64 2 |
| 0DA | 0F 0A CB000000 D100 0000 | map leaf, size 10: @CB → @D1 |
| 0E4 | 4C 70616765 | txt "page" |
| 0E9 | 0F 0A E4000000 9000 0000 | map leaf, size 10: @E4 → @90 |
| 0F3 | 07 0E 01800000 DA00 0000 E9000000 | map branch, size 14, depth 2, slots 0, 15: @DA → @E9 |
| 101 | 07 0E 00280000 C100 0000 F3000000 | map branch, size 14, depth 1, slots 11, 13: @C1 → @F3 |
| 10F | 07 12 2A000000 A000 0000 AF000000 0101 0000 | map branch, size 18, depth 0 (root), slots 1, 3, 5: @A0 → @AF → @101 |
| 121 | 0F010000 00000000 | root → @10F; previous: none |
Error
Invalid_Page
Bounds and history covers the limits on the work of a query.