Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 public virtual void SetFields(FieldValuesSQL fields)
 {
     this.fields = fields;
 }
Esempio n. 3
0
 public CreateTableSQL(string tableName)
 {
     this.tableName = tableName;
     this.fields    = new FieldValuesSQL();
     this.options   = new TableOptions();
 }
Esempio n. 4
0
 public CreateTableSQL()
 {
     this.fields  = new FieldValuesSQL();
     this.options = new TableOptions();
 }
Esempio n. 5
0
 public WhereSQL()
 {
     this.fieldValues = new FieldValuesSQL(" and ");
 }
Esempio n. 6
0
 public InsertSQL()
 {
     this.tables      = new SQLTable();
     this.fieldValues = new FieldValuesSQL();
     this.ignore      = true;
 }
Esempio n. 7
0
 public UpdateSQL()
 {
     this.tables      = new SQLTable();
     this.fieldValues = new FieldValuesSQL();
     this.where       = new WhereSQL();
 }