欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

KV 存储-Aerospike AQL 的命令 (COMMANDS)-6.OPERATE

最编程 2024-07-15 13:19:01
...

6.1.OPERATE

OPERATE <op(<bin>, params...)>[with_policy(<map policy>),] [<op(<bin>, params...)> with_policy (<map policy>) ...] ON <ns>[.<set>] where PK=<key>
    <op> name of operation to perform.
    <bin> is the name of a bin.
    <params> parameters for operation.
    <map policy> map operation policy.
    <ns> is the namespace for the records to be queried.
    <set> is the set name for the record to be queried.
    <key> is the record's primary key.

6.2.OP

    LIST_APPEND (<bin>, <val>)
    LIST_INSERT (<bin>, <index>, <val>)
    LIST_SET    (<bin>, <index>, <val>)
    LIST_GET    (<bin>, <index>)
    LIST_POP    (<bin>, <index>)
    LIST_REMOVE (<bin>, <index>)
    LIST_APPEND_ITEMS (<bin>, <list of vals>)
    LIST_INSERT_ITEMS (<bin>, <index>, <list of vals>)
    LIST_GET_RANGE    (<bin>, <startindex>[, <count>])
    LIST_POP_RANGE    (<bin>, <startindex>[, <count>])
    LIST_REMOVE_RANGE (<bin>, <startindex>[, <count>])
    LIST_TRIM         (<bin>, <startindex>[, <count>])
    LIST_INCREMENT    (<bin>, <index>, <numeric val>)
    LIST_CLEAR        (<bin>)
    LIST_SIZE         (<bin>)
    MAP_PUT             (<bin>, <key>, <val>) [with_policy (<map policy>)]
    MAP_PUT_ITEMS       (<bin>, <map>)  [with_policy (<map policy>)]
    MAP_INCREMENT       (<bin>, <key>, <numeric val>) [with_policy (<map policy>)]
    MAP_DECREMENT       (<bin>, <key>, <numeric val>) [with_policy (<map policy>)]
    MAP_GET_BY_KEY      (<bin>, <key>)
    MAP_REMOVE_BY_KEY   (<bin>, <key>)
    MAP_GET_BY_VALUE    (<bin>, <value>)
    MAP_REMOVE_BY_VALUE (<bin>, <value>)
    MAP_GET_BY_INDEX    (<bin>, <index>)
    MAP_REMOVE_BY_INDEX (<bin>, <index>)
    MAP_GET_BY_RANK     (<bin>, <rank>)
    MAP_REMOVE_BY_RANK  (<bin>, <rank>)
    MAP_REMOVE_BY_KEY_LIST    (<bin>, <list of keys>)
    MAP_REMOVE_BY_VALUE_LIST  (<bin>, <list of vals>)
    MAP_GET_BY_KEY_RANGE      (<bin>, <startkey>, <endkey>)
    MAP_REMOVEBY_RANGE        (<bin>, <startkey>, <endkey>)
    MAP_GET_BY_VALUE_RANGE    (<bin>, <startval>, <endval>)
    MAP_REMOVE_BY_VALUE_RANGE (<bin>, <startval>, <endval>)
    MAP_GET_BY_INDEX_RANGE    (<bin>, <startindex>[, <count>])
    MAP_REMOVE_BY_INDEX_RANGE (<bin>, <startindex>[, <count>])
    MAP_GET_BY_RANK_RANGE     (<bin>, <startrank> [, <count>])
    MAP_REMOVE_BY_RANK_RANGE  (<bin>, <startrank> [, <count>])
    MAP_CLEAR     (<bin>)
    MAP_SET_TYPE  (<bin>, <map type>)
    MAP_SIZE      (<bin>)
    TOUCH   ()
    READ    (<bin>)
    WRITE   (<bin>, <val>)
    PREPEND (<bin>, <val>)
    APPEND  (<bin>, <val>)
    INCR    (<bin>, <numeric val>)

6.3.MAP_POLICY

    AS_MAP_UNORDERED
    AS_MAP_KEY_ORDERED
    AS_MAP_KEY_VALUE_ORDERED
    AS_MAP_UPDATE
    AS_MAP_UPDATE_ONLY
    AS_MAP_CREATE_ONLY

6.4.Examples

    OPERATE LIST_APPEND(listbin, 1), LIST_APPEND(listbin2, 10) ON test.demo where PK = 'key1'
    OPERATE LIST_POP_RANGE(listbin, 1, 10) ON test.demo where PK = 'key1'