public ISelectStatement CreateSelect()
        {
            var select = new BasicSelectStatement();

            foreach (string field in this.setup.SelectedFields)
            {
                select.AddField(field);
            }

            return select;
        }
コード例 #2
0
 /// <summary>
 /// Select a list of field names from the table or view
 /// </summary>
 /// <param name="tableName">The table/view that contains the data</param>
 /// <param name="fields">The list of field names containing the data to select</param>
 public SimpleSQLFactory(string tableName, List<string> fields)
 {
     this.tableName = tableName;
     this.fields = fields;
     this.select = new BasicSelectStatement();
 }
コード例 #3
0
 /// <summary>
 /// Specify a select all (*) query from the specified table/view
 /// </summary>
 /// <param name="tableName">The table/view that contains the data</param>
 public SimpleSQLFactory(string tableName)
 {
     this.tableName = tableName;
     this.fields = new List<string>() { "*" };
     this.select = new BasicSelectStatement();
 }
コード例 #4
0
 public ISelectStatement CreateSelect()
 {
     var select = new BasicSelectStatement();
     select.AddField(NAME_FIELD);
     return select;
 }
コード例 #5
0
 public ISelectStatement CreateSelect()
 {
     var select = new BasicSelectStatement();
     select.AddField(FIELDS_ONLY);
     return select;
 }
コード例 #6
0
ファイル: UnitTest1.cs プロジェクト: TomMonks/EasyDatabase
        public void TestSimpleSelectOneSpecifiedField()
        {
            string expected = "Select emp";

            var select = new BasicSelectStatement();
            select.AddField("emp");

            Assert.AreEqual(expected.ToLower(), select.ToString().ToLower());
        }