apple / swift-cassandra-client

Cassandra client in Swift
https://swiftpackageindex.com/apple/swift-cassandra-client/main/documentation/cassandraclient
Apache License 2.0
94 stars 21 forks source link

Feature request: .array() #24

Closed samuelmn3 closed 1 year ago

samuelmn3 commented 1 year ago

Hi, I would need .array() feature in order to inject String array with IN clause. Is there an alternative in the meantime ?

yim-lee commented 1 year ago

You can see if any of the CassandraSession.query variants suits your needs.

Otherwise, at quick glance, this will require adding .stringArray([String]) (and potentially other types) to Statement.Value. We will need to use cass_collection_append_* to build up a collection then pass it to cass_statement_bind_collection, as shown in the code below (source):

image