我正在尝试使用新的 crate db。链接 我有一个包含“基础设施”和“网络”对象的表:
CREATE TABLE servers (infrastructure object(strict) as (
#etc...
os_name string,
#etc...
network array(object as
(etc.., hosting_id string, etc... ))
我需要从“infrastructure”中查询 os_name 并从网络数组中查询 hosting_id。我怎么做?我试图谷歌找到正确的语法,但没有成功。我想要这样的东西:
SELECT * FROM servers WHERE infrastructure[os_name] = "some value"
和
SELECT * FROM servers WHERE infrastructure["network"]["hosting_id"] = "some value"