Azavea.Open.DAO.SQL.SqlConnectionUtilities.CreateIndex C# (CSharp) Method

CreateIndex() public static method

Creates an index on a database table.
public static CreateIndex ( AbstractSqlConnectionDescriptor connDesc, string indexName, bool isUnique, string tableName, IEnumerable columnNames ) : void
connDesc AbstractSqlConnectionDescriptor 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.
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.
return void
        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);
        }

Same methods

SqlConnectionUtilities::CreateIndex ( AbstractSqlConnectionDescriptor connDesc, string indexName, string tableName, IEnumerable columnNames ) : void