tangled
alpha
login
or
join now
moth11.net
/
88x31
0
fork
atom
tiny 88x31 lexicon for atproto
0
fork
atom
overview
issues
pulls
pipelines
fix upsert
moth11.net
1 month ago
eca902e8
84da354a
+16
-2
1 changed file
expand all
collapse all
unified
split
db
lexicon.go
+16
-2
db/lexicon.go
···
260
260
posted_at
261
261
) VALUES (
262
262
$1, $2, $3, $4, $5, $6, $7, $8, $9
263
263
-
) ON CONFLICT (uri) DO UPDATE
263
263
+
) ON CONFLICT (uri) DO UPDATE SET
264
264
+
blob_cid = EXCLUDED.blob_cid,
265
265
+
blob_mime = EXCLUDED.blob_mime,
266
266
+
alt = EXCLUDED.alt,
267
267
+
title = EXCLUDED.title,
268
268
+
href = EXCLUDED.href,
269
269
+
cid = EXCLUDED.cid,
270
270
+
posted_at = EXCLUDED.posted_at,
271
271
+
indexed_at = now()
272
272
+
264
273
`, tbr.URI, tbr.DID, tbr.BlobCID, tbr.BlobMIME, tbr.Alt, tbr.Title, tbr.HREF, tbr.CID, tbr.PostedAt)
265
274
return err
266
275
}
···
276
285
created_at
277
286
) VALUES (
278
287
$1, $2, $3, $4, $5, $6
279
279
-
) ON CONFLICT (uri) DO UPDATE
288
288
+
) ON CONFLICT (uri) DO UPDATE SET
289
289
+
subject_uri = EXCLUDED.subject_uri,
290
290
+
subject_cid = EXCLUDED.subject_cid,
291
291
+
cid = EXCLUDED.cid,
292
292
+
created_at = EXCLUDED.created_at,
293
293
+
indexed_at = now()
280
294
`, tlr.URI, tlr.SubjectURI, tlr.SubjectCID, tlr.DID, tlr.CID, tlr.CreatedAt)
281
295
return err
282
296
}