Skip to content

Commit

Permalink
fixing lf check
Browse files Browse the repository at this point in the history
  • Loading branch information
invisal committed Apr 27, 2024
1 parent acbe642 commit 44e50e2
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 44 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.tsx text eol=lf
*.ts text eol=lf
68 changes: 34 additions & 34 deletions gui/src/components/result-stat.tsx
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
import { DatabaseResultStat } from "@gui/driver";

export default function ResultStats({ stats }: { stats: DatabaseResultStat }) {
return (
<div className="text-xs p-2 flex">
{stats.queryDurationMs !== null && (
<div className="px-2 border-r">
<span className="font-semibold">Query Duration</span>:{" "}
{stats.queryDurationMs}s
</div>
)}

{!!stats.rowsRead && (
<div className="px-2 border-r">
<span className="font-semibold">Rows Read</span>: {stats.rowsRead}
</div>
)}

{!!stats.rowsWritten && (
<div className="px-2 border-r">
<span className="font-semibold">Rows Written</span>:{" "}
{stats.rowsWritten}
</div>
)}

{!!stats.rowsAffected && (
<div className="px-2 border-r">
<span className="font-semibold">Affected Rows</span>:{" "}
{stats.rowsAffected}
</div>
)}
</div>
);
}
import { DatabaseResultStat } from "@gui/driver";

export default function ResultStats({ stats }: { stats: DatabaseResultStat }) {
return (
<div className="text-xs p-2 flex">
{stats.queryDurationMs !== null && (
<div className="px-2 border-r">
<span className="font-semibold">Query Duration</span>:{" "}
{stats.queryDurationMs}s
</div>
)}

{!!stats.rowsRead && (
<div className="px-2 border-r">
<span className="font-semibold">Rows Read</span>: {stats.rowsRead}
</div>
)}

{!!stats.rowsWritten && (
<div className="px-2 border-r">
<span className="font-semibold">Rows Written</span>:{" "}
{stats.rowsWritten}
</div>
)}

{!!stats.rowsAffected && (
<div className="px-2 border-r">
<span className="font-semibold">Affected Rows</span>:{" "}
{stats.rowsAffected}
</div>
)}
</div>
);
}
20 changes: 10 additions & 10 deletions gui/src/lib/empty-stats.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { DatabaseResultStat } from "@gui/driver";

export default function isEmptyResultStats(stats: DatabaseResultStat) {
return (
!stats.queryDurationMs &&
!stats.rowsAffected &&
!stats.rowsRead &&
!stats.rowsWritten
);
}
import { DatabaseResultStat } from "@gui/driver";

export default function isEmptyResultStats(stats: DatabaseResultStat) {
return (
!stats.queryDurationMs &&
!stats.rowsAffected &&
!stats.rowsRead &&
!stats.rowsWritten
);
}

0 comments on commit 44e50e2

Please sign in to comment.