public MakeCreateIndexCommand ( string indexName, bool isUnique, string tableName, IEnumerable |
||
indexName | string | Name of the index to create. |
isUnique | bool | Is this a unique index? |
tableName | string | What table to create the index on. |
columnNames | IEnumerable |
The columns included in the index. |
Результат | string |
/// <summary> /// Creates an index on a database table. /// </summary> /// <param name="connDesc">The database connection descriptor. This is used both as /// a key for caching connections/commands as well as for /// getting the actual database connection the first time.</param> /// <param name="indexName">Name of the index to create.</param> /// <param name="isUnique">Is this a unique index?</param> /// <param name="tableName">What table to create the index on.</param> /// <param name="columnNames">The columns included in the index.</param> public static void CreateIndex(AbstractSqlConnectionDescriptor connDesc, string indexName, bool isUnique, string tableName, IEnumerable<string> columnNames) { string sql = connDesc.MakeCreateIndexCommand(indexName, isUnique, tableName, columnNames); XSafeCommand(connDesc, sql, null); }