简体   繁体   中英

run query in AQL in Aersopike Docker container outside the container

I have an aerospike docker container and I want for some reason to run a query in AQL from outside this container I know that this command can reach to AQL

docker exec -it <aerospike container name> bash -c aql 

but I do not know how to execute a query

After you run:

docker exec -it <aerospike container name> bash -c aql

You will enter the "AQL" mode of the specified docker container:

在此处输入图像描述

You can then type help which will list the available commands and some examples.

There is also the official AQL documentation on Aerospike website: https://docs.aerospike.com/tools/aql .

INSERT example:

aql> INSERT INTO test.testset (PK, a, b) VALUES ('xyz', 'abc', 123)

SELECT example:

aql> DELETE FROM test.testset WHERE PK='xyz'

SHOW NAMESPACES example:

aql> show namespaces
+------------+
| namespaces |
+------------+
| "test"     |
| "bar"      |
+------------+
2 rows in set (0.001 secs)

There is much more you can do with AQL I suggest you read the documentation in the above link.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM