doutan5724 2017-06-08 01:04
浏览 217
已采纳

如何执行纯aql查询?

I'm using Official Aerospike Package for golang.

Is there any way to get list of all existing indexes this like?

aql> show indexes

Also I haven't found any way to execute pure aql query.

How can I do this?

Update: I'm looking for something similar to this but for aerospike (example from Rails) custom_query = "select * from users" result = ActiveRecord::Base.connection.execute(custom_query)

  • 写回答

2条回答 默认 最新

  • drwo2014 2017-06-09 18:04
    关注

    AQL is an admin and data browsing tool. It's not really Aerospike's SQL, as Aerospike doesn't natively implement a query language. Instead, all the Aerospike clients give you an API to make direct get, put, scan, query calls, and those are procedural, not declarative like SQL (where you state how you want the result and the server figures out a query plan). Piyush mentioned the predicate filtering API which is fantastic and lets you create complex queries over scans and secondary-index queries.

    Specifically to your question about getting all the indexes, that's the type of thing you should use the info command for. Aerospike allows you to get and set config parameters through it, and get a wide range of metrics, run microbenchmark, etc. Everything you need for admin and monitoring.

    You can run sindex through the standalone asinfo tool, or you can call it using the info command that any client provides.

    asinfo -v "sindex"
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥30 Python调用dll文件输出Nan重置dll状态
  • ¥15 浮动div的高度控制问题。
  • ¥66 换电脑后应用程序报错
  • ¥50 array数据同步问题
  • ¥15 pic16F877a单片机的外部触发中断程序仿真失效
  • ¥15 Matlab插值拟合差分微分规划图论
  • ¥15 keil5 target not created
  • ¥15 C/C++数据与算法请教
  • ¥15 怎么找志同道合的伙伴
  • ¥20 如何让程序ab.eXe自已删除干净硬盘里的本文件自己的ab.eXe文件