Skip to content
This repository was archived by the owner on Sep 2, 2022. It is now read-only.
This repository was archived by the owner on Sep 2, 2022. It is now read-only.

inspect: page debug #71

@SUMUKHA-PK

Description

@SUMUKHA-PK

As a user of the inspector, I want to be able to access every page in the database file by its ID, and I want to be able to see its contents. That is, I want to see how many cells there are on the page, how much free space there is, whether or not there is an overflow page and maybe even more.

>>> page 9
ID: 9
Cells: 12
Free: 62/64KiB
Overflow: no

I would like to see things like boolean attributes as yes and no only, and have them colored respectively (yes in green, no in red).

The page command must be able to be stateful and respond to specific commands. A typical use case is shown below:

$ xdb inspect myFile.db
> pages
[0, 1, 2, 3, 4, 5, 6, 9, 11, 12, 16]
> page 5
1522 cells
overflow: no
page 5> somecellkey            # key of a cell, this should also have autocompletion
type=data
key=somecellkey
value=somecelldata             # if this is row-data, it would be nice if it was formatted accordingly
page 5> othercell
type=page
key=othercell
page=9
page 5> k
k
> page 9
page 9>
  • page x to provide data about page x.
  • scope switching both up and down (up when a page is queries and down when k (our exit) is entered)
  • cell details inside page scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions