public string createTest(string testName, int subjectId)
 {
     return("INSERT INTO Objects VALUES(null, " + subjectId + ", '" +
            QueryFixer.fix(testName) + "', " +
            getSubQueryForGettingTypeId(DbTypes.test.getName()) + ");");
 }
 public string setUnswerContent(int unswerId, string content)
 {
     return("INSERT INTO Parameters VALUES(" + unswerId + ", " +
            getSubQueryForGettingAttrId(DbAttrs.content.getName()) + ", '" +
            QueryFixer.fix(content) + "');");
 }
 public string createSubject(string subjectName)
 {
     return("INSERT INTO Objects VALUES(null, null, '" + QueryFixer.fix(subjectName)
            + "', " + getSubQueryForGettingTypeId(DbTypes.subject.getName()) + ");");
 }
 public string updateUnswerContent(int unswerId, string newContent)
 {
     return(getQueryForUpdateParameters(unswerId, QueryFixer.fix(newContent),
                                        DbAttrs.content));
 }
 public string updateQuestionContent(int questionId, string newContent)
 {
     return(getQueryForUpdateParameters(questionId, QueryFixer.fix(newContent)
                                        , DbAttrs.content));
 }
 public string updateTestName(int testId, string newName)
 {
     return("UPDATE Objects SET name='" + QueryFixer.fix(newName) + "' WHERE id=" + testId);
 }
 public string getSubjectId(string name)
 {
     return("SELECT id FROM Objects WHERE name='" + QueryFixer.fix(name) + "' AND type=" +
            getSubQueryForGettingTypeId(DbTypes.subject.getName()));
 }