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

help

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

Visão geral

Este comando é usado para aprender a como usar os comandos.

Sintaxe

## Obtenção de todos os comandos e seus usos
help;

## Obtenção de instruções detalhadas de um comando específico
help [command];

Exemplo

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; ......;
--------------------------------------------------------------------------------

Ajuda e Suporte

Esta página foi útil?

comentários