public override string GetSQLString(ISQL.DBType type) { if (orList.Count > 0 || andList.Count > 0) { string sb = string.Empty; if (andList.Count > 0) { FieldValuesSQL fv = new FieldValuesSQL(" and "); foreach (ISQL sql in andList) { fv.AddSQLCondition(sql); } sb = sb + fv.GetSQLString(type); } if (orList.Count > 0) { FieldValuesSQL fv = new FieldValuesSQL(" or "); foreach (ISQL sql in orList) { fv.AddSQLCondition(sql); } if (andList.Count > 0) { sb = sb + " and (" + fv.GetSQLString(type) + ")"; } else { sb = fv.GetSQLString(type); } } return("(" + sb + ")"); } return(string.Empty); }
public virtual void SetFields(FieldValuesSQL fields) { this.fields = fields; }
public CreateTableSQL(string tableName) { this.tableName = tableName; this.fields = new FieldValuesSQL(); this.options = new TableOptions(); }
public CreateTableSQL() { this.fields = new FieldValuesSQL(); this.options = new TableOptions(); }
public WhereSQL() { this.fieldValues = new FieldValuesSQL(" and "); }
public InsertSQL() { this.tables = new SQLTable(); this.fieldValues = new FieldValuesSQL(); this.ignore = true; }
public UpdateSQL() { this.tables = new SQLTable(); this.fieldValues = new FieldValuesSQL(); this.where = new WhereSQL(); }