public ISelectStatement CreateSelect() { var select = new BasicSelectStatement(); foreach (string field in this.setup.SelectedFields) { select.AddField(field); } return select; }
/// <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(); }
/// <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(); }
public ISelectStatement CreateSelect() { var select = new BasicSelectStatement(); select.AddField(NAME_FIELD); return select; }
public ISelectStatement CreateSelect() { var select = new BasicSelectStatement(); select.AddField(FIELDS_ONLY); return select; }
public void TestSimpleSelectOneSpecifiedField() { string expected = "Select emp"; var select = new BasicSelectStatement(); select.AddField("emp"); Assert.AreEqual(expected.ToLower(), select.ToString().ToLower()); }