This page is not created by, affiliated with, or supported by Slack Technologies, Inc.


Hi, wonder how people normally use Hugsql’s tuple? aka the batch insert?


do you have to give a vector of vector for the value list? normally the json body is a map containing a vector of maps, which means we need to convert that map to a vector with the correct order


@rui.yang Author of HugSQL here. Inserts with the tuple parameter type has its limits--especially if you're inserting a lot of data. Depending on your use case, I'd suggest: 1) looping through your data in a transaction and calling your insert function multiple times, 2) the underlying multi-insert might be just what you need, or 3) use HugSQL's Clojure Expressions to build a "generic insert" (See the clj-expr-generic-update example:


@rui.yang That function should be insert-multi!


@curtis.summers thanks for the tips