如何在 cqlsh 中查看 UDT 的架构?

问题描述 投票:0回答:3

我创建了一个

UDT
,但我现在不记得它的定义了。
cqlsh
中是否有一个命令可以用来列出所有 UDT 及其定义?

cassandra cassandra-3.0
3个回答
0
投票

您可以使用以下方法逐行读取值:

UDTValue UdtData = row.getUDTValue(address);
UdtData.getString("Id");

0
投票

使用

DESCRIBE
命令。要在 cqlsh 中查看键空间的架构:

cqlsh> DESCRIBE KEYSPACE myks;

详情请参阅cqlsh

DESCRIBE
命令。干杯!


0
投票

这将显示当前密钥空间中的所有 UDT。

cqlsh> desc types

cqlsh> describe types

查看特定类型的模式

cqlsh> desc type <name of the UDT>

cqlsh> describe type <name of the UDT>

© www.soinside.com 2019 - 2024. All rights reserved.