Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Support Statements and Multiple Ops on a Record (Feature Request) #8

Open
critikaled opened this issue Nov 3, 2014 · 1 comment
Open

Comments

@critikaled
Copy link

Provision to do Multiple Ops on a Record.
http://www.aerospike.com/docs/client/java/usage/kvs/multiops.html
Provision to execute statements on client.
http://www.aerospike.com/docs/client/java/usage/query/query.html

@mfirry
Copy link

mfirry commented Nov 3, 2014

I kinda did it in my own fork.

It looks like this

  private[aerospike] def query[R](policy: QueryPolicy, stmt: Statement) = {
    log.info(s"called for $stmt")
    var results = Vector.empty[Map[String, R]]

    val recordSet = underlying.query(policy, stmt)

    while (recordSet.next()) {
      results +:= extractMultiBin[R](recordSet.getRecord())
    }
    results
  }

There are better ways, I'm sure :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants