Exemplo n.º 1
0
 public NoSqlCommand(string sqlText, DbBase dbBase)
 {
     try
     {
         if (string.IsNullOrEmpty(sqlText))
         {
             return;
         }
         sourceSql = sqlText;
         FormatSqlText(sqlText);
     }
     catch (Exception err)
     {
         Log.WriteLogToTxt(err);
     }
     if (IsSelect || IsUpdate || IsDelete || IsInsert)
     {
         MDataRow row = new MDataRow();
         if (TableSchema.FillTableSchema(ref row, ref dbBase, tableName, tableName))
         {
             row.Conn = dbBase.conn;
             action   = new NoSqlAction(ref row, tableName, dbBase.Con.DataSource, dbBase.dalType);
         }
     }
     else
     {
         Log.WriteLogToTxt("NoSql Grammar Error Or No Support : " + sqlText);
     }
 }