File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/components/QuestDbSqlRunnerEmbedded Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ interface QuestDBErrorResponse {query: string; error: string; position?: number;
6
6
type QuestDBResponse = QuestDBSuccessfulResponse | QuestDBErrorResponse ;
7
7
8
8
const QUESTDB_DEMO_URL_EMBEDDED : string = 'https://demo.questdb.io' ;
9
+ const ROW_LIMIT = 20 ;
9
10
10
11
interface QuestDbSqlRunnerEmbeddedProps {
11
12
queryToExecute : string ;
@@ -42,7 +43,7 @@ export function QuestDbSqlRunnerEmbedded({
42
43
setNonTabularResponse ( null ) ; setRowCount ( null ) ;
43
44
44
45
const encodedQuery = encodeURIComponent ( queryToExecute ) ;
45
- const url = `${ questdbUrl } /exec?query=${ encodedQuery } &count=true&timings=true&limit=20 ` ;
46
+ const url = `${ questdbUrl } /exec?query=${ encodedQuery } &count=true&timings=true&limit=${ ROW_LIMIT } ` ;
46
47
47
48
try {
48
49
const response = await fetch ( url ) ;
@@ -129,7 +130,7 @@ export function QuestDbSqlRunnerEmbedded({
129
130
</ table >
130
131
</ div >
131
132
) }
132
- { rowCount !== null && < p > Total rows: { rowCount } </ p > }
133
+ { rowCount !== null && < p > Showing { Math . min ( rowCount , ROW_LIMIT ) } out of { rowCount } rows </ p > }
133
134
</ div >
134
135
) }
135
136
</ div >
You can’t perform that action at this time.
0 commit comments