Transaction result processing: full-text values #192
Labels
No labels
A-build
A-cli
A-core
A-design
A-edn
A-ffi
A-query
A-sdk
A-sdk-android
A-sdk-ios
A-sync
A-transact
A-views
A-vocab
P-Android
P-desktop
P-iOS
bug
correctness
dependencies
dev-ergonomics
discussion
documentation
duplicate
enhancement
enquiry
good first bug
good first issue
help wanted
hygiene
in progress
invalid
question
ready
size
speed
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: greg/mentat#192
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In two places — the cache update observer (#566) and in sync — we retrieve values from a committed transaction.
Those values include references into the fulltext values table. These values have
ValueType::String
but a non-string value. That means you can't successfully make aTypedValue
out of them.The query engine knows what to do with these and automatically translates them back into strings in results sets.
For cache updates and sync we'll need to do similarly. In some situations we'll want to quietly and automatically substitute in a copy of the string retrieved from the values table.
In general, though, we'll want these consumers to be able to lazily handle fulltext strings. Typically they'll be on the larger side, perhaps unused (e.g., in change observers that just trigger a refresh), and potentially duplicated (the fulltext values table dedupes on insert). Ideally sync will itself be able to do content-addressable handling of large strings, reducing bytes stored and bytes transmitted.
That means we need an API for resolving
(v, value_type_tag)
pairs against the database, and also perhaps some logic to avoid using it in the simple case.@grigoryk, this is the thing you mentioned on Slack this morning.