Domanda

Cassaforte has an insert-batch function for inserting multiple rows into a cassandra CQL table in one go.

I've recently switched to Alia and I'm wondering if it offers the same? I can't see anything immediately in the documentation, and (hayt/values ..) seems to only support a single row insertion at one time.

È stato utile?

Soluzione

Alia supports CQL batch inserts through the Hayt DSL.

(alia/execute
  session    
  (hayt/batch 
    (hayt/queries
      (hayt/insert ...)
      (hayt/insert ...)
      (hayt/insert ...))

As per the CQL spec, only DML statements are supported: http://www.datastax.com/documentation/cql/3.0/cql/cql_reference/batch_r.html

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top