Skip to content

Commit

Permalink
show SQLite database properly
Browse files Browse the repository at this point in the history
  • Loading branch information
zsarge committed Jan 20, 2024
1 parent 02fcd85 commit ebc6ffa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion services/judge0-ide/ide/js/ide.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,11 @@ function setChallengeInfo() {
async: true,
headers: AUTH_HEADERS,
success: function (data, _textStatus, _jqXHR) {
stdinEditor.setValue(data.input || "");
if (data.language_id == 82) {
stdinEditor.setValue("<SQLite 3 Database>");
} else {
stdinEditor.setValue(data.input || "");
}
sourceEditor.setValue(data.prompt);
answerEditor.setValue(data.answer.trim());
currentLanguageId = data.language_id;
Expand Down
2 changes: 1 addition & 1 deletion services/judge0-wrapper/challenges.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,5 @@ challenges:
prompt_path: "challenges/sql/select/challenge.yml"
input_path: "challenges/sql/select/db.sqlite"
challenge_id: 100
language_id: 82 # Python, according to Judge0's id system
language_id: 82 # SQL, according to Judge0's id system
answer_path: "challenges/python/fizzbuzz/answer.yml"

0 comments on commit ebc6ffa

Please sign in to comment.