Skip to content

Commit

Permalink
find-website fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nahuedu committed Jan 12, 2025
1 parent 8963825 commit 077bab5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extensions/find-website/src/query-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ export class QueryBuilder {
return `(${titleFilter}) or (${hostFilter})`;
}

filterBlock(words, op, column) {
filterBlock(words: string[], op: string, column: string) {
return words.map((w) => `${column} like '${w}'`).join(` ${op} `);
}

words(text: string) {
return text.split(" ").map((w) => `%${w}%`);
}

queryTopVisited(size, text) {
queryTopVisited(size: number, text: string) {
const order = `order by visit_count desc`;

return this.buildQuery(size, text, order);
}

queryRecents(size, text) {
queryRecents(size: number, text: string) {
const order = `order by last_visit_time desc`;

return this.buildQuery(size, text, order);
Expand Down

0 comments on commit 077bab5

Please sign in to comment.