fn(items$0, then$1) =>
let stored$2 = @core.list-map(
T: @definy.content-item,
U: String,
f: fn(item$3) =>
$3.content_hash,
xs: $0
);
match @core.equal(left: @core.list-length(value: $0), right: 0) {
true =>
$1(stored: $2),
false =>
#sql<@definy.service-io>({
statements: @core.list-map(
T: @definy.content-item,
U: @definy.sql-statement,
f: fn(item$4) =>
{
sql: "INSERT OR IGNORE INTO cas_contents (content_hash, content_bytes) VALUES (?, ?)",
params: [#text<@definy.sql-value>($4.content_hash), #text<@definy.sql-value>($4.content_bytes)]
},
xs: $0
),
then: fn(results$5) =>
$1(stored: $2)
})
}