protected void CreateIndex(Table table, IEnumerable<Column> columns) { string indexName = string.Format("IX_{0}{1}", table.Name, StringUtilities.Combine(columns, "", delegate(Column c) { return c.Name; })); CollectionUtils.ForEach(columns, delegate(Column c) { table.GetOrCreateIndex(indexName).AddColumn(c); }); }
private static void BindIndex(string indexAttribute, Table table, Column column) { if (indexAttribute != null && table != null) { var tokens = indexAttribute.Split(','); System.Array.ForEach(tokens, t => table.GetOrCreateIndex(t.Trim()).AddColumn(column)); } }
protected static void BindIndex(XmlAttribute indexAttribute, Table table, Column column) { if (indexAttribute != null && table != null) { StringTokenizer tokens = new StringTokenizer(indexAttribute.Value, ", "); foreach (string token in tokens) table.GetOrCreateIndex(token).AddColumn(column); } }
protected static void BindIndex(string indexAttribute, Table table, Column column) { if (indexAttribute != null && table != null) { var tokens = new StringTokenizer(indexAttribute, ",", false); foreach (string token in tokens) table.GetOrCreateIndex(token.Trim()).AddColumn(column); } }