I'm going through a tutorial below
and am having trouble converting js to cljs in the dataHandler function
function dataHandler(transaction, results)
{
// Handle the results
var string = "Green shirt list contains the following people:\n\n";
for (var i=0; i<results.rows.length; i++) {
// Each row is a standard JavaScript array indexed by
// column names.
var row = results.rows.item(i);
string = string + row['name'] + " (ID "+row['id']+")\n";
}
alert(string);
}
Here is my cljs code
(defn success-handler [tx, results]
(println "success handler")
(println results)
;;the below doesn't work, I get an error here
;;:Uncaught Error: [object SQLResultSet] is not ISeqable
(doseq [result results]
(prn result)))
So my question is how would I convert the js dataHandler to my cljs success-handler?