-
Notifications
You must be signed in to change notification settings - Fork 123
Types of KeySets #3598
Comments
Thank you for creating the issue!
DataKeySet sounds contradictory to its purpose as it is about Config, which can be defined as input of applications which is not domain-specific data. What about ConfigKeySet? |
|
This type of KeySet is not used in the API anyway, so we also do not need to make this typedef. |
It would be the return type of the function proposed in point 3 above. The basic idea would be that these work: KeySet * ks = ksNew (1, keyNew ("user:/test", KEY_END), KS_END);
assert(ks != NULL);
DataKeySet * dks = ksNewData (1, keyNew ("/test", KEY_END), KS_END);
assert(dks != NULL); But these will fail (= return KeySet * ks = ksNew (2, keyNew ("/test", KEY_END), KS_END);
assert(ks == NULL);
DataKeySet * dks = ksNewData (1, keyNew ("user:/test", KEY_END), KS_END);
assert(dks == NULL); The use of |
I mark this issue stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. If you want it to be alive again, ping the issue by writing a message here or create a new issue with the remainder of this issue. |
I closed this issue now because it has been inactive for more than one year. If I closed it by mistake, please do not hesitate to reopen it or create a new issue with the remainder of this issue. |
See also #4478 |
I mark this stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. If you want it to be alive again, ping by writing a message here or create a new issue with the remainder of this issue. |
I closed this now because it has been inactive for more than one year. If I closed it by mistake, please do not hesitate to reopen it or create a new issue with the remainder of this issue. |
The different types of KeySets should be made explicit. The types are:
"Normal" data: Keys of the namespaces
proc:/
,dir:/
,user:/
,system:/
anddefault:/
are allowed to be added to the KeySet. This is the default and what will be created by a simpleksNew
.Metdata: Only keys of namespace
meta:/
are allowed. This type cannot be created via the public API. It is only created internally in akeyVNew
call.Cascading keys: Only cascading keys are allowed in these KeySets. This will be needed after Remove cascading key from cascading lookup order #3597 to still allow the use of KeySets as a general map-like data structure. This type of KeySet will be created via
ksNewData
(name open to suggestions).Internally the type of KeySet will be determined by a flag in the
struct _KeySet
.The public API could be made more intuitive by adding two
typedef
s:typedef KeySet MetaKeySet
andtypedef KeySet DataKeySet
. These would be used for the return types ofkeyMeta
andksNewData
respectively.ksAppend
,ksAppendKey
and all other functions that modify the KeySet need to be updated to respect the new flag.In addition to #3597
ksLookup
has to modified to ignore the normal cascading lookup in Type 3 KeySets and instead lookup the cascading name directly.The text was updated successfully, but these errors were encountered: