tencent cloud

TencentDB for TcaplusDB

Notas de versão
Introdução do produto
Visão geral do produto
Benefícios
Casos de uso
Arquitetura
Visão geral das regiões
Guia de aquisição
Preços do produto
Pagamento em atraso
Introdução
Conceitos básicos
Criação de cluster
Criação de grupo de tabelas
Criação de tabela
Acessar o TcaplusDB
Guia de operação
Gerenciamento de cluster e grupo de tabelas
Gerenciamento de tabela
Monitoramento e alarmes
Gerenciamento de acesso
Tag
Lista de tarefas
Cliente do TcaplusDB
Acesso pela ferramenta do cliente
Comandos da ferramenta do cliente
Tutoriais Práticas
Práticas recomendadas para design de estrutura de tabela
Práticas recomendadas para interação de banco de dados
Perguntas frequentes
Funcionalidades do banco de dados
Uso do banco de dados
Princípios do banco de dados
Service Agreement
Service Level Agreement
Terms of Service
Glossário
Fale conosco

desc

PDF
Modo Foco
Tamanho da Fonte
Última atualização: 2024-12-04 10:23:03

Visão geral

Este comando é usado para exibir as informações de definição da tabela. Para um campo aninhado, você só pode ver que seu atributo é do tipo aninhado, mas não pode ver a definição da estrutura aninhada.

Sintaxe

desc [table]/[table.field] [using tdr];

Parâmetros

Parâmetro
Protobuf
TDR
table
Nome da tabela
Nome da tabela
table.field
Não aceito
Para mostrar a estrutura de um campo aninhado, using tdr precisa ser usado junto com esse parâmetro.
using tdr
Não aceito
Esse parâmetro é usado para consultar a estrutura da tabela de um arquivo TDR que deve ser fornecido quando o cliente é iniciado.

Erros

Para obter mais informações, consulte Códigos de erro.

Exemplo

tcaplus> desc table_list;

Table Structure From: Tcaplus System
TableName: table_list
TableType: LIST, IdlType: TDRXML
SvrTdrCurrentVersion: 5
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|Field |Type |Key |Index|Size |Version|DefaultValue|Count|Select |Desc |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|uin |unsigned long long |PRI,SPLT|- |8 |1 |- |1 |- |QQ |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|name |string |PRI |- |640 |1 |- |1 |- |Name |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|key1 |unsigned char |PRI |- |1 |1 |- |1 |- |key4 |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|level |int |- |- |4 |1 |1 |1 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|count |unsigned char |- |- |1 |1 |0 |1 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|array_count |unsigned int |- |- |4 |1 |1 |1 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|items |unsigned long long[]|- |- |8 |1 |- |10 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|c_int8 |char |- |- |1 |1 |-1 |1 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|c_uint8 |unsigned char |- |- |1 |1 |2 |1 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|c_int16 |short |- |- |2 |1 |-3 |1 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|c_uint16 |unsigned short |- |- |2 |1 |4 |1 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|c_int32 |int |- |- |4 |1 |-5 |1 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|c_uint32 |unsigned int |- |- |4 |1 |6 |1 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|c_int64 |long long |- |- |8 |1 |-7 |1 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|c_uint64 |unsigned long long |- |- |8 |1 |- |1 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|c_float |float |- |- |4 |2 |1.234568 |1 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|c_double |double |- |- |8 |3 |9.876543 |1 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|c_string |string |- |- |200 |3 |- |1 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|c_string_128K |string |- |- |131072|1 |123456789 |1 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|c_string_256K |string |- |- |262144|1 |123456789 |1 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|c_binary |char[] |- |- |1 |1 |- |10 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|binary |char |- |- |1 |5 |- |1 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|selector |short |- |- |2 |1 |- |1 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|single_struct |struct_type |- |- |119 |1 |- |1 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|simple_struct |simple_struct |- |- |30 |4 |- |1 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|single_union_selector|char |- |- |1 |1 |0 |1 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|single_union |union_type |- |- |64 |1 |- |1 |single_union_selector|- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|array |TableInfo[] |- |- |125 |1 |- |3 |- |three lyaer struct|
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|c_union |union_type |- |- |64 |1 |- |1 |selector |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|union_array |union_type[] |- |- |64 |1 |- |3 |selector |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|c_struct |struct_type |- |- |119 |1 |- |1 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+
|struct_array |struct_type[] |- |- |119 |1 |- |3 |- |- |
+---------------------+--------------------+--------+-----+------+-------+------------+-----+---------------------+--------------+

32 rows in set (36252 us)

tcaplus> desc table_list.single_struct using tdr;

Table Structure From: Local tdr file(/mnt/e/tdr/2.3.table_list.tdr)
table_list.single_struct
|---single_struct(struct)
| |---x(int)
| |---y(int)
| |---score(double)
| |---rank(uchar)
| |---title(string)
| |---level2_struct(struct)
| | |---uin(int)
| | |---name(string)

Ajuda e Suporte

Esta página foi útil?

comentários