tencent cloud

游戏数据库 TcaplusDB

产品动态
产品简介
产品概述
产品优势
应用场景
产品架构
地域介绍
购买指南
产品定价
欠费说明
快速入门
了解基本概念
创建集群
创建表格组
创建表格
获取连接信息
访问 TcaplusDB
操作指南
管理集群与表格组
管理表格
监控与告警
访问管理
标签
任务列表
使用 TcaplusDB client
使用 client 工具访问数据
client 工具命令参考
使用 TcaplusDB SDK
变更历史
SDK 下载
SDK for C++ 接口说明
TcaplusDB 错误码
SDK 安装
PB 表 C++SDK 操作方法
TDR 表 C++SDK 操作方法
使用 TcaplusDB RESTful API
RESTful API 接口说明
Go RESTful API 接口说明
Java RESTful API 接口说明
PHP RESTful API 接口说明
Python RESTful API 接口说明
RESTful API 各语言示例下载
实践教程
表结构设计
数据库交互
常见问题
信息咨询类
数据库使用类
数据库原理类
API 文档
History
Introduction
API Category
Making API Requests
Table Group APIs
Other APIs
Table APIs
Cluster APIs
Data Types
Error Codes
相关协议
服务等级协议
服务条款
词汇表
联系我们

desc

PDF
聚焦模式
字号
最后更新时间: 2024-12-04 09:56:32

简介

查看表的定义信息。嵌套字段只能看到其属性为嵌套类型,但是无法查看嵌套结构体的定义。

语法

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

参数

参数
Protobuf
TDR
table
表格的名字
表格的名字
table.field
不支持
显示嵌套字段的结构,必须配合 using tdr 使用
using tdr
不支持
从 tdr 文件中读取表结构,该操作必须在启动 client 时提供 tdr 文件

错误

请参考 错误码列表

示例

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)

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈