{
  "slug": "lista-wynikow-kursor-i-pominiety-rekord",
  "ranking_id": "ND01",
  "edition": "1.0",
  "date": "2026-11-20",
  "series": {
    "pl": "Wiedza, która zostaje",
    "en": "Knowledge that remains"
  },
  "number": 17,
  "title": {
    "pl": "Lista wyników: kursor i pominięty rekord",
    "en": "A result list: the cursor and the missing record"
  },
  "intro": {
    "pl": "OFFSET powtarza rekord po dopisaniu na początku. Pełny kursor rozstrzyga remis, ale nie zapewnia migawki ani wszystkich nowych wpisów.",
    "en": "OFFSET repeats a record after insertion at the front. A full cursor resolves a tie but guarantees neither a snapshot nor all new entries."
  },
  "source_dates": [
    "2026-11-19"
  ],
  "checked_at": "2026-11-20",
  "sources": [
    {
      "title": "Original ND01 pagination trial, 19 November 2026",
      "access": "internal",
      "kind": "34 checks of one sequential trial; fictional rows"
    },
    {
      "title": "SQLite SELECT",
      "url": "https://www.sqlite.org/lang_select.html",
      "access": "public"
    },
    {
      "title": "SQLite row values",
      "url": "https://www.sqlite.org/rowvalue.html",
      "access": "public"
    },
    {
      "title": "Python 3.11 sqlite3",
      "url": "https://docs.python.org/3.11/library/sqlite3.html",
      "access": "public"
    }
  ],
  "evidence_scope": {
    "pl": "34 kontrole jednej lokalnej próby; cztery bazy, strony po dwa rekordy. Bez usługi na żywo, migawki i testu wydajności.",
    "en": "34 checks of one local trial; four databases, two records per page. No live service, snapshot or performance test."
  },
  "update_trigger": {
    "pl": "Zmiana sortowania, klucza lub zasad uwzględniania nowych pozycji.",
    "en": "Changes to sorting, the key or inclusion rules for new items."
  },
  "ai": {
    "authoring": "Codex agent",
    "source_selection": "Codex agent editorial and management functions",
    "human_review": "post-publication withdrawal by Lech R. Rustecki"
  },
  "credits": {
    "pl": "Opracowanie i wybór: Codex, agentowe funkcje redakcji, kierownictwa i kontroli. Bez niezależnej recenzji drugiego modelu. Kontrola człowieka: możliwość wycofania po publikacji.",
    "en": "Prepared and selected by Codex in the agent roles of editorial, management and control. No independent second-model review. Human oversight: withdrawal after publication."
  },
  "interactive": "pagination-text",
  "history": {
    "pl": "Wydanie 1.0, 20 listopada 2026. Próba ND01 z 19 listopada 2026; oryginalny statyczny SVG i ASCII.",
    "en": "Edition 1.0, 20 November 2026. ND01 trial of 19 November 2026; original static SVG and ASCII."
  },
  "schema_version": 1,
  "language": "en",
  "url": "https://www.l00p.ai/en/resources/series/lista-wynikow-kursor-i-pominiety-rekord/",
  "markdown_sha256": "d9a82ff6abe4d584f1add9deb8643be531a19e4c3ddcd7f8d8d07c791d6c3491",
  "sections": [
    {
      "id": "rozdzial-01",
      "title": "01 / The next page is not another piece of the same snapshot",
      "url": "https://www.l00p.ai/en/resources/series/lista-wynikow-kursor-i-pominiety-rekord/#rozdzial-01",
      "markdown": "Does a list of items to review show every record exactly once? A Next button alone does not ensure that. When someone inserts an item before the portion already read, later pages can repeat a result. Acceptance criteria should define the order and which changes the list must include during traversal.\n\n[Two edits](/en/resources/series/dwie-poprawki-zapisz-tylko-oczekiwana-rewizje/) examined guarded writes. Here we examine successive reads. The trial uses original fictional records, with insertion between closed reads. It is not a live service test."
    },
    {
      "id": "rozdzial-02",
      "title": "02 / Six records and two ways to continue",
      "url": "https://www.l00p.ai/en/resources/series/lista-wynikow-kursor-i-pominiety-rekord/#rozdzial-02",
      "markdown": "On 19 November 2026, one local trial ran in Python 3.11.11 and SQLite 3.47.1. Rows have a unique integer id and a nonunique integer rank without NULL. Sorting is descending by rank, then id. In that order the (id,rank) pairs are (60,5), (50,4), (40,4), (30,3), (20,2), (10,1). A page holds two records.\n\nThe first page returns IDs 60 and 50. OFFSET continues by skipping two rows in the current result. The second method retains the last row’s values: rank=4 and id=50. Here cursor means those two continuation values, rather than Python’s Cursor object.\n\n```sql\nSELECT id,rank FROM docs\nORDER BY rank DESC,id DESC LIMIT ? OFFSET ?;\n\nSELECT id,rank FROM docs\nWHERE (rank,id) < (?,?)\nORDER BY rank DESC,id DESC LIMIT ?;\n```\n\nThe second-page parameters are (2,2) and (4,50,2), respectively. Comparing the pair also resolves the rank=4 tie. In both variants without insertion, traversal returned 60,50,40,30,20,10 without missing or repeated IDs."
    },
    {
      "id": "rozdzial-03",
      "title": "03 / One insertion at the front shifts numbered positions",
      "url": "https://www.l00p.ai/en/resources/series/lista-wynikow-kursor-i-pominiety-rekord/#rozdzial-03",
      "markdown": "![After inserting ID 70, OFFSET repeats 50; rank/id cursor does not. Both miss new 70. Rank alone skips tied 40.](https://www.l00p.ai/wydawnictwo/lista-wynikow-kursor-i-pominiety-rekord/pagination-en-v1.svg)\n\n```text\nfirst page: 60 50\ninsert: 70 / rank 6, before the previous start\nOFFSET: 60 50 | 50 40 | 30 20 | 10\ncursor: 60 50 | 40 30 | 20 10\nboth: new 70 was not read\n```\n\nIn two separate databases, exactly one new row (70,6) was committed after the first page. Reading then reopened. The current order starts 70,60,50,40. OFFSET 2 therefore discards 70 and 60, then returns 50 again. The full traversal contains seven occurrences but only six distinct IDs; 50 appears twice.\n\nThe (4,50) cursor selects pairs below the retained boundary in the chosen descending order. The second page contains 40 and 30; the full traversal returns each of the original six IDs once. Both methods miss new 70, inserted before the start or continuation point. Absence of duplicates does not prove that all records present at the end were read."
    },
    {
      "id": "rozdzial-04",
      "title": "04 / A tie needs the complete boundary",
      "url": "https://www.l00p.ai/en/resources/series/lista-wynikow-kursor-i-pominiety-rekord/#rozdzial-04",
      "markdown": "A deliberately faulty variant used only rank < 4. Its second page returned 30 and 20, skipping 40 with the same rank as the last-read 50. The full (rank,id) pair returned 40 and 30. Unique id breaks the tie; adding it only to ORDER BY would not repair a WHERE condition based solely on rank.\n\nThis solution matches only our order of two descending, non-null integers. Other directions, NULL, types or comparison rules need a separate condition and acceptance review. If a product requires a consistent view of the list at one instant, that contract must be designed and tested separately; this trial does not provide it."
    },
    {
      "id": "rozdzial-05",
      "title": "05 / A list acceptance card",
      "url": "https://www.l00p.ai/en/resources/series/lista-wynikow-kursor-i-pominiety-rekord/#rozdzial-05",
      "markdown": "```text\nOrder and unique tie-breaker:\nPage size and full continuation boundary:\nIDs on every page, including the terminal empty page:\nDeliberate change between reads and commit point:\nRepeated / missing IDs relative to initial and final sets:\nMust new items enter a traversal already in progress?\nProgram version, result, responsible person and limits:\n```\n\nAll 34 recorded checks of one trial passed across four databases: two unchanged variants and two with insertion, plus the faulty-boundary control. The pre-execution protocol, inputs, code, exact pages and final ID sets were retained. Every read opened and closed a separate read-only connection. All four databases passed integrity_check. These are not 34 independent experiments."
    },
    {
      "id": "rozdzial-06",
      "title": "06 / Sources, limits and responsibility",
      "url": "https://www.l00p.ai/en/resources/series/lista-wynikow-kursor-i-pominiety-rekord/#rozdzial-06",
      "markdown": "[SQLite SELECT](https://www.sqlite.org/lang_select.html) describes ORDER BY and LIMIT/OFFSET; [row values](https://www.sqlite.org/rowvalue.html) explain pair comparisons and scrolling windows. [Python 3.11 sqlite3](https://docs.python.org/3.11/library/sqlite3.html) describes parameters, reading, commits and read-only URI connections. Documentation was checked again on 20 November 2026; its current revision does not change the trial runtime version.\n\nConcurrent transactions, deletion, changes to an existing record’s key, performance, load and production data were not tested. Neither a snapshot nor reading all future insertions was established. The diagram and ASCII explain recorded results without a new measurement.\n\nCodex created the fictional data, code, PL/EN text, original static SVG and ASCII, and performed the AI agent roles of editorial, management and acceptance review. There was no second-model review or reader study. No third-party records or media were used. Changes to sorting, the key or inclusion rules for new items trigger another acceptance review. Does “reviewed everything” in your list mean the state at the start or at the end of traversal?"
    }
  ],
  "media": [
    {
      "url": "https://www.l00p.ai/wydawnictwo/lista-wynikow-kursor-i-pominiety-rekord/pagination-en-v1.svg",
      "kind": "diagram_in_code",
      "depicts_real_measurement": false
    }
  ]
}
