aerospike-client-python icon indicating copy to clipboard operation
aerospike-client-python copied to clipboard

Query on two fields (Alternate of predexp)

Open aamirbutt opened this issue 3 years ago • 0 comments

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'

aamirbutt avatar Oct 10 '22 13:10 aamirbutt