public string BuildIndexCreateSql(TableInfo table, IndexInfo index) { var indexName = string.Format("{0}_{1}", table.OutputTableName, index.Name); var unique = index.IsUnique ? "UNIQUE " : ""; return(string.Format("CREATE {0}INDEX {1} ON {2} ({3});", unique, _escaper(indexName), _escaper(table.OutputTableName), string.Join(",", index.ColumnNames.Select(c => _escaper(c))))); }
public TableInfo AddIndex(IndexInfo indexInfo) { _indexes.Add(indexInfo); return(this); }