Copy bins between records in place

Hello,

Can anyone tell me if it is possible to take a bin from Record A, copy the data into Record B, without fetching it over the network? My use case is i have very large maps and i want to be able to merge them.

Example

Record A {
    bins {
      my_bin: {"a", "b", "c"}
  }
}

Record B {
    bins {
      my_bin: {"e", "f", "g"}
  }
}

After the merge, it should look like

Record B {
    bins {
      my_bin: {"a", "b", "c", "e", "f", "g"}
  }
}

I am using the Rust client. I see there are Operation Expressions in Aerospike but i don’t see how to make one with the Rust client.

No. You can modify only one record at a time from the client. Not possible to send two keys (of different records) via any client API currently and ask the server to move data between those records. Operation Expressions (read or write) also work on a single record, not across records.

So there is no sql equivalent of insert into my_table (select my_data from my_table where id=1)? Notice that record A is not being modified. You read from Record A and write to Record B.

Fundamentally not possible in current server design. (Hence no client APIs for such implementation.) Cannot have transaction on one record, record B, access another record, record A, as part of the transaction initiated on record B.

This topic was automatically closed 84 days after the last reply. New replies are no longer allowed.