Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 06089ae

Browse files
author
Brad Miller
committed
Only show 100 rows
1 parent bf382b6 commit 06089ae

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

runestone/activecode/js/activecode.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2429,6 +2429,9 @@ SQLActiveCode.prototype.runProg = function() {
24292429
}
24302430

24312431
//
2432+
if (res[0].values.length > 100) {
2433+
$(this.output).text("Result set is longer than 100 rows limiting output to first 100")
2434+
}
24322435
let table = createTable(res[0]);
24332436
respDiv = document.createElement('div')
24342437
respDiv.id = divid;
@@ -2454,7 +2457,7 @@ function createTable(tableData) {
24542457
});
24552458
table.appendChild(head);
24562459
head.appendChild(theads);
2457-
tableData.values.forEach(function(rowData) {
2460+
tableData.values.slice(0,100).forEach(function(rowData) {
24582461
var row = document.createElement('tr');
24592462

24602463
rowData.forEach(function(cellData) {

0 commit comments

Comments
 (0)