New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I access and verify the DB schema? #151
Comments
|
I did not know my post was closed. Thanks for the good info. |
If you still have some questions, be free to reply in this issue |
Hello. |
there is a tool from sybase called powerdesigner |
Thank you very much. I'll try the way you told me. |
How are you? I did not solve the answer to the previous ERD diagram. The following are some of the code we've identified. [src / pages / oj / views / problem / problem.vue] <script>
submitCode () {
if (this.code.trim() === '') {
this.$error('Code can not be empty')
return
}
this.submissionId = ''
this.result = {result: 9}
this.submitting = true
let data = {
problem_id: this.problem.id,
language: this.language,
code: this.code,
contest_id: this.contestID
}
if (this.captchaRequired) {
data.captcha = this.captchaCode
}
const submitFunc = (data, detailsVisible) => {
this.statusVisible = true
api.submitCode(data).then(res => {
this.submissionId = res.data.data && res.data.data.submission_id
this.submitting = false
this.submissionExists = true
if (!detailsVisible) {
this.$Modal.success({
title: 'Success',
content: 'Submit code successfully'
})
return
}
this.checkSubmissionStatus()
}, res => {
this.getCaptchaSrc()
if (res.data.data.startsWith('Captcha is required')) {
this.captchaRequired = true
}
this.submitting = false
this.statusVisible = false
})
}
if (this.contestRuleType === 'OI' && !this.OIContestRealTimePermission) {
if (this.submissionExists) {
this.$Modal.confirm({
title: '',
content: '<h3>You have submission in this problem, sure to cover it?<h3>',
onOk: () => {
setTimeout(() => {
submitFunc(data, false)
}, 1000)
},
onCancel: () => {
this.submitting = false
}
})
} else {
submitFunc(data, false)
}
} else {
submitFunc(data, true)
}
}
</script> A sequence diagram created through the code. I additionally I want to know the location of the code that requests the query to the DB |
Thank you very much. We will check the link you provided and we will study hard. I will also try using the method you have mentioned (Pycharm). |
Fixed issue with DB query passing. |
ajax request |
by http request, i guess |
I expected it to be ajax. However, I did not know how the ajax works. I am grateful to know for sure by the answer. |
if you use chrome, try press F12 , switch to network tab, check on "Preserve log" , then watch the log while operating the web UI. |
the most simple way is to change this line https://github.com/QingdaoU/OnlineJudge/blob/master/judge/dispatcher.py#L149 and then you can get the output from the database WARNING: database size may increase significantly PS: you can search |
thank you. However, in order to prevent the DB usage from increasing, the link is predicted to store data in line 176 'submission.save ()' (DB of the given code) I am looking for a way not to use this. |
maybe just delete it by ajax after showed once in browser |
Thanks zhblue |
maybe add a new table to the db, like here what i did in another system.
|
Hello I am a beginner programmer.
I tried many times to check the DB schema structure while looking at the code through the project, but it continued to fail because of insufficient knowledge.
Can you teach me how to check and access the schema structure of a DB in Windows local environment?
The text was updated successfully, but these errors were encountered: