public NoSqlCommand(string sqlText, DbBase dbBase) { try { 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); } }
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); } }
public NoSqlCommand(string sqlText, DalBase dalBase) { try { if (string.IsNullOrEmpty(sqlText)) { return; } sourceSql = sqlText; ss = SqlSyntax.Analyze(sqlText); } catch (Exception err) { Log.Write(err, LogType.DataBase); } if (ss.IsSelect || ss.IsUpdate || ss.IsDelete || ss.IsInsert) { MDataRow row = new MDataRow(); row.Conn = dalBase.ConnName; if (ColumnSchema.FillTableSchema(ref row, ss.TableName, ss.TableName)) { action = new NoSqlAction(ref row, ss.TableName, dalBase.Con.DataSource, dalBase.DataBaseType); } } else { Log.Write("NoSql Grammar Error Or No Support : " + sqlText, LogType.DataBase); } }