public MySqlTable(MySqlCommand cmd, string name) { _name = name; string sql = string.Format("SHOW CREATE TABLE `{0}`;", name); _createTableSql = QueryExpress.ExecuteScalarStr(cmd, sql, 1).Replace(Environment.NewLine, "^~~~~~~^").Replace("\r", "^~~~~~~^").Replace("\n", "^~~~~~~^").Replace("^~~~~~~^", Environment.NewLine).Replace("CREATE TABLE ", "CREATE TABLE IF NOT EXISTS ") + ";"; _createTableSqlWithoutAutoIncrement = RemoveAutoIncrement(_createTableSql); _lst = new MySqlColumnList(cmd, name); GetInsertStatementHeaders(); }
public void Dispose() { _lst.Dispose(); _lst = null; }