![]() |
![]() An Information Portal to Biological Macromolecular Structures |
|
PDB Home |
Contact Us ![]() |
![]() |
Software Tools Home | Dictionary Home | PDBML Home |
![]() |
#include "ISTable.h"
int ISTable::RenameColumn(const char * oldColumnName,
const char * newColumnName);
#include "ISTable.h"
...
ISTable * pTable = new ISTable();
ReVarCifArray<CifString> last_column;
CifString cs;
while (tokenizer.hasMoreTokens()) {
cs = (char *) tokenizer.GetNextToken();
last_column.Add(cs);
cs.Clear();
}
// put a column in 1st position ...
pTable->InsertColumn("FirstColumn", 0);
pTable->InsertColumn(last_column, "LastColumn",
pTable->GetNumColumns());
pTable->InsertColumn("MiddleColumn", pTable->GetNumColumns()/2,
ISTable::DT_INTEGER);
pTable->RenameColumn("FirstColumn", "Column1");
RenameColumn renames existing column defined by oldColumnName and this column will have new name defined by newColumnName;
oldColumnName | The name of the columnthat will be renamed. |
newColumnName | New name of the column. The column name must be unique to the table. |
A negative value indicates an error or warning.
It is safe to use this method after index creation.
See also: | FillColumn |
---|---|
Column Option Constants |