public void WithIndexOn(string column, string name) { var sb = new StringBuilder(); sb.Append(string.Format("CREATE UNIQUE INDEX {0} ON {1} ({2})", _quoter.QuoteIndexName(name), _quoter.QuoteTableName(Name), _quoter.QuoteColumnName(column))); _processor.Execute(sb.ToString()); _indexies.Add(name); }
public void WithIndexOn(string column, string name) { var sb = new StringBuilder(); sb.Append(string.Format("CREATE UNIQUE INDEX {0} ON {1} ({2})", quoter.QuoteIndexName(name), quoter.QuoteTableName(Name), quoter.QuoteColumnName(column))); using (var command = Factory.CreateCommand(sb.ToString(), Connection, Transaction, Options)) command.ExecuteNonQuery(); indexies.Add(name); }
public void WithIndexOn(string column, string name) { var query = string.Format("CREATE UNIQUE INDEX {0} ON {1} ({2})", _quoter.QuoteIndexName(name, _schema), NameWithSchema, _quoter.QuoteColumnName(column) ); Processor.Execute(query); }
public string WithIndexOn(string column) { var indexName = string.Format("idx_{0}", column); var quotedObjectName = _quoter.QuoteTableName(Name); var quotedIndexName = _quoter.QuoteIndexName(indexName); using (var command = new HanaCommand(string.Format("CREATE INDEX {0} ON {1} ({2})", quotedIndexName, quotedObjectName, _quoter.QuoteColumnName(column)), Connection, Transaction)) command.ExecuteNonQuery(); return(indexName); }
public void WithIndexOn(string column, string name) { var query = string.Format("CREATE UNIQUE INDEX {0} ON {1} ({2})", quoter.QuoteIndexName(name), NameWithSchema, quoter.QuoteColumnName(column) ); using (var command = Factory.CreateCommand(query, Connection, Transaction, Processor.Options)) { command.ExecuteNonQuery(); } }