Open tatu-at-datastax opened 6 months ago
@amorton @maheshrajamani WDYT?
I took a look and MongoDB does support :
in property names. I don't see any reason to avoid supporting :
from my perspective, but I'll defer to @amorton
MongoDB Enterprise > db.test.findOne({ ':': 42 })
null
MongoDB Enterprise > db.test.insertOne({ ':': 42 })
{
"acknowledged" : true,
"insertedId" : ObjectId("665f5a7f601e93e9dea81748")
}
MongoDB Enterprise > db.test.find()
{ "_id" : ObjectId("665f3353716ac3d79e8fa439"), "x:y" : 42 }
{ "_id" : ObjectId("665f5a7f601e93e9dea81748"), ":" : 42 }
MongoDB Enterprise >
Hold on this until we chat, there are implications for interacting with CQL column names.
Yes, was not planning on proceeding until we sync on this one.
Currently we allow a small set of characters in the path names (regex
[a-zA-Z0-9_\-]*
). Some characters are excluded by design ($
is reserved for operators and special fields;.
is path separator) but many are left out just because we want to be careful of never having to go back to excluding something we have allowed. There was also some concern about keeping character set limited to allow possible mapping to underlying physical Cassandra columns in future (not sure if that is concern any more).One specific character that seems useful and safe to allow is colon (
:
). So I suggest we add it as an allowed path segment character.