aerospike-client-python
aerospike-client-python copied to clipboard
Query on two fields (Alternate of predexp)
I had working code like this before but it is not working anymore since predexp has been deprecated. Can you tell me what should be the alternative code now?
query = client.query(NAMESPACE, SET)
query.select(
BIN_CUSTOMER_ID,
BIN_TEXT
)
key = "1234"
query.where(aerospike.predicates.equals(BIN_KEY, key))
predicate = [
aerospike.predexp.integer_bin(BIN_WRITE_TS),
aerospike.predexp.integer_value(effective_ts),
aerospike.predexp.integer_lesseq()
]
query.predexp(predicate)
query.foreach(process_record_fn)
I get this error with newer versions of aerospike:
AttributeError: module 'aerospike' has no attribute 'predexp'