RCSB PDB Protein Data Bank A Member of the wwPDB
An Information Portal to Biological Macromolecular Structures
PDB Home | Contact Us
next up previous contents
Next: RebuildIndex Up: Index Methods Previous: Index Methods

CreateIndex

NAME CreateIndex

PROTOTYPE

#include "ISTable.h"

ReVarPCifArray<int> * ISTable::CreateIndex(CifString IndexName,
                                  ReVarPCifArray<int> & ListOfCols);
ReVarPCifArray<int> * ISTable::CreateIndex(CifString IndexName,
                                  ReVarCifArray<CifString> & ListOfNames);

EXAMPLE

#include "ISTable.h"

ISTable s("MyTable");
...

ReVarPCifArray<int> list;
list.Add(0); list.Add(2);

s->CreateIndex("index0",list);
PURPOSE

CreateIndex creates an index for the table. Once the index is created, it can be used for table searching.

RECEIVES

CreateIndex(CifString&, ReVarPCifArray<int>&)
IndexName Name of an index that is created.
ListOfCols An array of column indices indicating which column is part of an index
CreateIndex(CifString&, ReVarCifArray<CifString>&)
IndexName Name of an index that is created.
ListOfNames An array of column names indicating which column is part of an index

RETURN VALUE

A negative value in errCode indicates an error or warning.

REMARKS

See also: DeleteIndex
  RebuildIndex
  RebuildIndices



Olivera Tosic
6/12/2002

 

© RCSB PDB