I'm doing a small utility that needs to go through all rows of one Cassandra table, without knowing previously the schema of such table.
For that it looks like MapScan or SliceMap were what I needed, but:
1) MapScan works, but only returns the first row, even if PageSize has, let's say, 1000 rows.
2) I don't get how to use SliceMap with Iter and pages.
Do you guys have made something like this before in gocql?
best,
Herbert
--
You received this message because you are subscribed to the Google Groups "gocql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gocql+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Herbert,I'm not quite sure what you mean about MapScan returning only the first row, here is how we have used it to select many rows:values = map[string]interface{}{}iter = db.Query("SELECT * FROM my_table").Iter()for iter.MapScan(values) {doStuff(values)values = map[string]interface{}{}}err = iter.Close()
On Mon, Oct 31, 2016 at 9:27 AM, <herbert.fischer@crossengage.io> wrote:Hi,
I'm doing a small utility that needs to go through all rows of one Cassandra table, without knowing previously the schema of such table.
For that it looks like MapScan or SliceMap were what I needed, but:
1) MapScan works, but only returns the first row, even if PageSize has, let's say, 1000 rows.
2) I don't get how to use SliceMap with Iter and pages.
Do you guys have made something like this before in gocql?
best,
Herbert
--
You received this message because you are subscribed to the Google Groups "gocql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gocql+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--