I'm working with a SQLite FTS3 table as explained here: https://www.sqlite.org/fts3.html
I'm interested in the field end_block, described as:
This field may contain either an integer or a text field consisting of two integers separated by a space character (unicode codepoint 0x20). The first, or only, integer is the blockid that corresponds to the interior node with the largest blockid that belongs to this segment b-tree. Or zero if the entire segment b-tree fits on the root node. If it exists, this node is always an interior node.
The second integer, if it is present, is the aggregate size of all data stored on leaf pages in bytes. If the value is negative, then the segment is the output of an unfinished incremental-merge operation, and the absolute value is current size in bytes.
I'm trying to make a consistency checker to make sure some FTS3 tables haven't been modified.
I need a way to encode strings in FTS3 to get the block_number but haven't been able to find anything on the internet. Some example of encoding:
Good morning! How is it going? - 0 96
Everything is okey - 0 71
Okay I will get back to you once everything is in place - 0 167
EDIT: To clarify the question, what I really need is some method to input a string as "Everything is okey" and get the second integer of the end_block field (71).
Any idea?