Example #1
0
		internal IndexInfo(Table table, Index index)
		{
			_name = MakeName("IX_", table.Name, index.ColumnIterator);
			_columns = CollectionUtils.Map<Column, string>(
				index.ColumnIterator,
				delegate(Column column) { return column.Name; });
		}
 public void AddIndex(Index index, bool inSecondPass)
 {
     if (index == null) return;
     String indexName = index.Name;
     AddIndex(indexName, inSecondPass);
 }
		/// <summary>
		/// Gets the <see cref="Index"/> identified by the name.
		/// </summary>
		/// <param name="name">The name of the <see cref="Index"/> to get.</param>
		/// <returns>
		/// The <see cref="Index"/> identified by the name.  If the <see cref="Index"/>
		/// identified by the name does not exist then it is created.
		/// </returns>
		public Index GetIndex( string name )
		{
			Index index = ( Index ) indexes[ name ];

			if( index == null )
			{
				index = new Index();
				index.Name = name;
				index.Table = this;
				indexes.Add( name, index );
			}

			return index;
		}