--
You received this message because you are subscribed to the Google Groups "DataStax Node.js Driver for Apache Cassandra Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs-driver-u...@lists.datastax.com.
To view this discussion on the web visit https://groups.google.com/a/lists.datastax.com/d/msgid/nodejs-driver-user/f78c600c-ece5-4bea-931a-606458f7ffa1%40lists.datastax.com.
Hi,The Mapper uses the default type mapping of the core driver, you can look at the documentation for CQL types to ECMAScript types here: https://docs.datastax.com/en/developer/nodejs-driver/4.5/features/datatypes/For example, given the schema you send, it would be something like:sampleMapper.insert({ field1: 'value a', field2: 'value b', field3: [ 'set value 1', 'set value 2' ] })Thanks,Jorge
On Sun, May 24, 2020 at 7:30 AM Yarden Bar <ayash...@gmail.com> wrote:
--Hello,I have a table with complex types (not UDTs), such as:field1 text,field2 text,field3 set<text>,PRIMARY KEY (field1)Reading the documentation, I could not deduce how the Mapper will handle updates/upserts/deletes to/from set/list/map.My guess would be that if its not supported, then I'd need to use "mapWithQuery" to bypass the query generation.Any direction will help,J
You received this message because you are subscribed to the Google Groups "DataStax Node.js Driver for Apache Cassandra Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs-driver-user+unsub...@lists.datastax.com.
To view this discussion on the web visit https://groups.google.com/a/lists.datastax.com/d/msgid/nodejs-driver-user/f78c600c-ece5-4bea-931a-606458f7ffa1%40lists.datastax.com.
--
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs-driver-u...@lists.datastax.com.
To view this discussion on the web visit https://groups.google.com/a/lists.datastax.com/d/msgid/nodejs-driver-user/f78c600c-ece5-4bea-931a-606458f7ffa1%40lists.datastax.com.
--
--
You received this message because you are subscribed to the Google Groups "DataStax Node.js Driver for Apache Cassandra Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs-driver-u...@lists.datastax.com.
To view this discussion on the web visit https://groups.google.com/a/lists.datastax.com/d/msgid/nodejs-driver-user/72e7daa3-6c14-4089-a266-b81f8742f38fo%40lists.datastax.com.
Hi,
The update statements would work in the same way for a full value replacement.If you want to add values to the set (if not already there), you can use q.append():// import qconst q = cassandra.mapping.q;// Use q.append() in a update query for the column "tags"videoMapper.update({ id, tags: q.append(['coding', 'nodejs']) })Here's a test in the repo that shows the logic: https://github.com/datastax/nodejs-driver/blob/265118f7f0aa9ba6800ebebd400b6a6bdf841285/test/integration/short/mapping/model-mapper-tests.js#L543-L554Thanks,Jorge
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs-driver-user+unsub...@lists.datastax.com.
To view this discussion on the web visit https://groups.google.com/a/lists.datastax.com/d/msgid/nodejs-driver-user/f78c600c-ece5-4bea-931a-606458f7ffa1%40lists.datastax.com.
--
--
You received this message because you are subscribed to the Google Groups "DataStax Node.js Driver for Apache Cassandra Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs-driver-user+unsub...@lists.datastax.com.
To view this discussion on the web visit https://groups.google.com/a/lists.datastax.com/d/msgid/nodejs-driver-user/72e7daa3-6c14-4089-a266-b81f8742f38fo%40lists.datastax.com.
--