You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The table/scan method should have a simple consumer API for making prefix scans on the table. This likely has specific behavior for each lexicoder, but it may be possible to generalize it:
bytes can trivially construct a key which matches a prefix of the key bytes.
string can similarly encode characters into key prefix bytes.
integer keys cannot easily construct a prefix, nor does it really make sense for them.
float keys similarly cannot be prefixed sensibly.
instant keys are converted to integers internally, so the same prefix restrictions apply. In most cases a 'prefix' query here means 'in this year' or 'in this month' or other time unit, for which a range scan would work just as well.
sequence keys could work by providing one or more elements of the sequence, even if the underlying key type does not support prefixes. If it does, then the last segment should be able to match a prefix against further key segments.
tuple keys should also be workable by providing one or more of the tuple elements to generate the prefix. This requires some care however, since by default a tuple lexicoder will throw an error if not all elements of the key are given.
reverse lexicoder requires a bit of thought, but it seems like it should compose with the other prefix approaches here.
The text was updated successfully, but these errors were encountered:
The
table/scan
method should have a simple consumer API for making prefix scans on the table. This likely has specific behavior for each lexicoder, but it may be possible to generalize it:bytes
can trivially construct a key which matches a prefix of the key bytes.string
can similarly encode characters into key prefix bytes.integer
keys cannot easily construct a prefix, nor does it really make sense for them.float
keys similarly cannot be prefixed sensibly.instant
keys are converted to integers internally, so the same prefix restrictions apply. In most cases a 'prefix' query here means 'in this year' or 'in this month' or other time unit, for which a range scan would work just as well.sequence
keys could work by providing one or more elements of the sequence, even if the underlying key type does not support prefixes. If it does, then the last segment should be able to match a prefix against further key segments.tuple
keys should also be workable by providing one or more of the tuple elements to generate the prefix. This requires some care however, since by default a tuple lexicoder will throw an error if not all elements of the key are given.reverse
lexicoder requires a bit of thought, but it seems like it should compose with the other prefix approaches here.The text was updated successfully, but these errors were encountered: