import type { SelectQueryBuilder } from "typeorm";
import type { Note } from "@/models/entities/note.js";

export function generateExcludeMemorietQuery(query: SelectQueryBuilder<Note>) {
	query.andWhere(
		`NOT EXISTS (SELECT 1 FROM "memoriet" "memoriet_exclude" WHERE "memoriet_exclude"."noteId" = note.id)`,
	);
}
