fix: remove db-journal from git

This commit is contained in:
Julien Calixte
2026-02-17 14:07:09 +01:00
parent 8e6ac4faa9
commit 1c7a4d3a11
3 changed files with 11 additions and 8 deletions

3
.gitignore vendored
View File

@@ -33,4 +33,5 @@ report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
# Finder (MacOS) folder config # Finder (MacOS) folder config
.DS_Store .DS_Store
*.db *.db
*.db-journal

Binary file not shown.

View File

@@ -80,6 +80,14 @@ export const saveCursor = (cursor: number) => {
export const upsertNote = (note: Note) => { export const upsertNote = (note: Note) => {
const now = new Date().toISOString(); const now = new Date().toISOString();
const params = [
note.title,
note.publishedAt ? new Date(note.publishedAt).toISOString() : now,
note.createdAt ? new Date(note.createdAt).toISOString() : now,
note.did,
note.rkey,
];
console.log(`[db] upsertNote params: ${JSON.stringify(params)}`);
db.query( db.query(
` `
@@ -96,12 +104,6 @@ export const upsertNote = (note: Note) => {
title = excluded.title, title = excluded.title,
publishedAt = excluded.publishedAt publishedAt = excluded.publishedAt
`, `,
[ params,
note.title,
note.publishedAt ? new Date(note.publishedAt).toISOString() : now,
note.createdAt ? new Date(note.createdAt).toISOString() : now,
note.did,
note.rkey,
],
); );
}; };