Skip to content

raw_json: write Long values as decimal strings #108

Closed

Description

@neoromantic

mtcute 0.32 gives Telegram Long values (accessHash, hash, groupedId and others) as objects of the long library, {low, high, unsigned}, not as bigint. raw_json therefore stores each of them as an object of three keys, which is bigger than the number and awkward to read in tg sql. AGENTS.md still says "Telegram Long values (hash, accessHash) are BigInt".

Proposed: the raw_json serializer from #86 writes a Long as its decimal string, as it does for bigint; existing rows change with the background re-encode (#89). Fix the AGENTS.md line and say in docs/database-schema.md how Long fields are stored.

Done when a test serializes a made-up message with Long fields to decimal strings, the docs and AGENTS.md match, and tg sql can read an access hash from raw_json with json_extract. Related: #80, #86.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions