tencent cloud

TencentDB for TcaplusDB

Release Notes
Product Introduction
Product Overview
Benefits
Use Cases
Architecture
Regions
Purchase Guide
Product Pricing
Payment Overdue
Getting Started
Basic Concepts
Creating Cluster
Creating Table Group
Creating Table
Get Connection Information
Accessing TcaplusDB
Operation Guide
Managing Cluster and Table Group
Managing Table
Monitoring and Alarming
Access Management
Tag
Task List
TcaplusDB Client
Accessing by Client Tool
Client Tool Commands
TcaplusDB SDK
Release History
SDK Download
C++ SDK API
TcaplusDB Error Codes
SDK Installation
Directions for Protobuf Table SDK for C++
Directions for TDR Table SDK for C++
TcaplusDB RESTful APIs
Description
Go
Java
PHP
Python
Downloading RESTful API Samples in Multiple Languages
Practical Tutorial
Best Practice for Table Structure Design
Best Practice for Database Interaction
FAQs
Database Features
Database Use
Database Principles
API Documentation
History
Introduction
API Category
Making API Requests
Table Group APIs
Other APIs
Table APIs
Cluster APIs
Data Types
Error Codes
Service Agreement
Service Level Agreement
Terms of Service
Glossary
Contact Us

help

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2024-12-04 10:12:05

Overview

This command is used to learn about command usage.

Syntax

## Obtaining All Commands and Their Usage
help;

## Obtaining the Detailed Instruction of a Specific Command
help [command];

Sample

tcaplus> help;
--------------------------------------------------------------------------------
help: show usage of commands, example: "help select;".
show: get server status related information. executing "help show;" for details.
exit/quit: exit the client.
count: print record number in the database.

desc: print table field name and type.
select: query records from database.
insert: insert a new record into database.
replace: replace a record into the database.
update: update a record in the database.
delete: delete record(s) from database.

dump: dump records from database.
load: load records into the database.

setttl: set ttl for a record
getttl: get ttl for a record

--------------------------------------------------------------------------------

tcaplus> help select;
--------------------------------------------------------------------------------
example: select key1, key2, key3, value1, value2 [into result.csv] from table where key1 = 1 and key2 = "abc" [and -index = 1] [\\P] [\\G];
query records from database, you can specify part of the fields or whole fields (select *), and you can write the result to a file, which can be used by "insert" and "load"
for generic table, if the key in where clause is not complete, then it will send "GetByPartkey"
for list table, if "-index" is not specified in where clause, then it will send "ListGetAll", otherwise it will send "ListGet"
\\P: print time usage in detail
\\G: print fields in column
Note: "-index" only used for list table

example: select * [into result.xml] from table where key1 = 1 and key2 = "abc" [and -index = 1] using tdr [\\P];
if you specify "using tdr", then the records will be parsed by tdr file and print in xml format. you can write the result into a file, which can be used by "load"
it only support "select *" instead of select part of the fields when specify "using tdr"
Note: "-index" only used for list table

globle index query:
example: select * from table where key1 > 1 and value1 > 100;
example: select * from table where value1 like "test";
example: select field1, field2 from table where key1 > 1 or value1 > 100;
example: select * from table where value1 between 100 and 200;
example: select * from table where value1 > 100 limit 100 offset 0;
example: select sum(value2), max(value2), min(value2), avg(value2), count(*) from table where value1 > 100;
Note: globle index query is only support generic table;
Note: current support: =,!=,>,>=,<,<=, like, not like, betwwen, in, not in, and, or, limit offset;
Note: current support aggregation: count, sum, max, min, avg;
Note: for protobuf table, it support: "select field1.field2 from test where value1 > 100";
Note: limit must be used with offset, lack offset will query failed;
Note: the fields in where condition and in aggregation must had already created index;
Note: it not support: store the result to a file, such as "select * into file XXX" is not support;
Note: it not support: "select * from table"; which means to traverse table, you can used api traverse method to traverse table;
Note: it not support: order by, group by, having, join, union and so on;
Note: it not support: select a+b XXX; select * from table where a+b>0; select sum(XX),field1 from XXX; select *,field1 from XXX; ......;
--------------------------------------------------------------------------------

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백