-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
46 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.tsx text eol=lf | ||
*.ts text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
); | ||
} |