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
{{ message }}
This repository was archived by the owner on Sep 12, 2018. It is now read-only.
For simplicity, in #214 I only handled namespaced keywords, like :namespaced/keyword. However, the transactor and query engine can and should handle non-namespaced keywords, like :keyword. This ticket tracks adding support for such keywords.
This ticket is similar to #201, but a little simpler and potentially a little longer, since there are no new :db.type/* definitions and no new ValueType. You'll need to:
Add a new TypedValue case, preferably by encapsulating the two types of keywords into one enum Keyword { NamespacedKeyword(...), Keyword(...) };
Implement the conversions to and from SQL, using the facts that:
the SQL TEXT representation of ":namespaced/keyword" and ":keyword" doesn't overlap;
the value type tag of namespaced and non-namespaced keywords is the same (tag 13)
Update the transactor to handle the two types of keywords as required -- start by generalizingto_namespaced_keyword to handle both types of keyword (around
For simplicity, in #214 I only handled namespaced keywords, like
:namespaced/keyword. However, the transactor and query engine can and should handle non-namespaced keywords, like:keyword. This ticket tracks adding support for such keywords.This ticket is similar to #201, but a little simpler and potentially a little longer, since there are no new
:db.type/*definitions and no newValueType. You'll need to:TypedValuecase, preferably by encapsulating the two types of keywords into oneenum Keyword { NamespacedKeyword(...), Keyword(...) };TEXTrepresentation of ":namespaced/keyword" and ":keyword" doesn't overlap;mentat/db/tests/value_tests.rs
Line 25 in 1deed24
to_namespaced_keywordto handle both types of keyword (aroundmentat/db/src/lib.rs
Line 42 in 1deed24