Skip to content

Commit

Permalink
Merge pull request #773 from dpevunov-cp/fix_count_query
Browse files Browse the repository at this point in the history
fix count sql query to use index
  • Loading branch information
poeti8 authored Dec 9, 2024
2 parents 041aed5 + 0d3b6a0 commit 31ad3a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/queries/link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const total = async (match: Match<Link>, params: TotalParams = {}) => {
);
}

const [{ count }] = await query.count("id");
const [{ count }] = await query.count("*");

return typeof count === "number" ? count : parseInt(count);
};
Expand Down

0 comments on commit 31ad3a7

Please sign in to comment.