string

Plain text, such as a name, a note or a message.

At a glance

Writing

Write the text itself, as a JSON string. It is kept exactly as written, line breaks included; nothing is normalized.

Written as

A JSON string whose schema format is string.

Reading

get_content reads a text by its lines, numbered from 1:

A long text shown by its handle, as a tool result is, starts with a map when it has one. A Markdown document shows its outline: each heading with the line range that reads its section. A text without headings, such as a transcript, shows its parts, each with its lines and how it begins. Every line number you are shown is one that range takes.

Querying

A field of this type has a full-text index and is split into passages for search by meaning, so every search operator works on it, as do =, like and regular expressions on the whole value. match.text is the passage that matched, and <field>.size.chars the length of the text. See the HQL reference.

Document | lines ~~ "opening hours" | select id, name, match.text | limit 10
Party | display_name ilike "%lee%" | select id, display_name

Editing

edit replaces text with old and new. old must occur exactly once, unless you set replace_all, and an old that is not found is refused. The result is a new value under a new handle. JSON Pointer ops are refused: a text has no structure.

Operations

Through the dtypes resource: