public MysqlExplain(QueryComposer comp, MysqlHandler connection) { this.composer = comp; this.db = connection; this.explainSelect(); this.analyse(); }
public static String getCompareString(QueryComposer qc, string fieldName) { string Statement = ""; string compare = qc.getCompareValue(fieldName); if (null != compare) { switch (compare.ToUpper()) { case "LIKE": Statement = fieldName + " " + compare + " '%" + qc.getWhereValue(fieldName).ToString().Replace("'", @"\'") + "%' "; break; case "IN": Statement = fieldName + " " + compare + " (" + qc.getWhereValue(fieldName).ToString().Replace("'", @"\'") + ") "; break; case "SUBSELECT": Statement = fieldName + " IN (" + qc.getWhereValue(fieldName) + ") "; break; default: Statement = fieldName + " " + compare + " '" + qc.getWhereValue(fieldName).ToString().Replace("'", @"\'") + "' "; break; } } return(Statement); }
public MysqlExplain(String sqlStr, MysqlHandler connection) { this.composer = null; this.sql = sqlStr; this.db = connection; this.explainSelect(); this.analyse(); }
public TableToForm(string tableName, MysqlHandler DataBase) { this.db = DataBase; this.TableName = tableName; if (!DataBase.isConnected()) { throw new Exception("Database not connected. TableToForm needs an connected MysqlHandler"); } maskQuery = new QueryComposer(this.TableName); }