Re: [sqlite] Cell pointer array values

2019-05-18 Thread Richard Hipp
On 5/18/19, Gravis wrote: > So would this pseudocode yield the correct address for cell number > "x"? (assuming cell x exists) > > ((page_number - 1) * page_size) + cell_pointer_array[x] Yes. You seem to be thinking in terms of overall file offsets. We tend to think in terms of offsets within

Re: [sqlite] Cell pointer array values

2019-05-18 Thread Gravis
So would this pseudocode yield the correct address for cell number "x"? (assuming cell x exists) ((page_number - 1) * page_size) + cell_pointer_array[x] On Sat, May 18, 2019 at 9:10 AM Richard Hipp wrote: > > On 5/18/19, Gravis wrote: > > I've been working on making a simple DB file reader an

Re: [sqlite] Cell pointer array values

2019-05-18 Thread Richard Hipp
On 5/18/19, Gravis wrote: > I've been working on making a simple DB file reader and according to > the file format document (https://sqlite.org/fileformat.html), > immediately after a "B-tree Page Header" is the "cell pointer array". > Unfortunately, it never actually states how to use these 16-bi

[sqlite] Cell pointer array values

2019-05-18 Thread Gravis
I've been working on making a simple DB file reader and according to the file format document (https://sqlite.org/fileformat.html), immediately after a "B-tree Page Header" is the "cell pointer array". Unfortunately, it never actually states how to use these 16-bit values to compute the addresses t