示例#1
0
文件: Repository.cs 项目: 200351/MBD
        public List <PairData> findTextScoreGreaterThen(double score)
        {
            SQLQueryExecutor executor = new SQLQueryExecutor();
            SQLCommand       command  = new SQLCommand();

            command.query = "SELECT * FROM TEXTS WHERE {SCORE > @score}";
            command.parameters.Add("@score", score.ToString());
            List <PairData> datas = executor.executeQuery(command);

            return(datas);
        }
示例#2
0
文件: Repository.cs 项目: 200351/MBD
        public List <PairData> findTextWithWordContainsAndScoreLessEquals(string name, double score)
        {
            SQLQueryExecutor executor = new SQLQueryExecutor();
            SQLCommand       command  = new SQLCommand();

            command.query = "SELECT * FROM TEXTS WHERE CONTENT LIKE @content AND {SCORE <= @score}";
            command.parameters.Add("@content", "%" + name + "%");
            command.parameters.Add("@score", score.ToString());
            List <PairData> datas = executor.executeQuery(command);

            return(datas);
        }
示例#3
0
文件: Repository.cs 项目: 200351/MBD
        public List <PairData> findTextWithNameContainsAndScoreGreaterEquals(string name, double score)
        {
            SQLQueryExecutor executor = new SQLQueryExecutor();
            SQLCommand       command  = new SQLCommand();

            command.query = "SELECT * FROM TEXTS WHERE TITLE LIKE @title AND {SCORE >= @anotherscore}";
            command.parameters.Add("@title", "%" + name + "%");
            command.parameters.Add("@anotherscore", score.ToString());
            List <PairData> datas = executor.executeQuery(command);

            return(datas);
        }