vdkxdb 2.4.0
Public Member Functions | List of all members
VDKXTableIndex Class Reference

Provides a table index. More...

#include <vdkxtable.h>

Inherits xbNdx.

Public Member Functions

 VDKXTableIndex (VDKXTable *owner, char *s)
 
virtual ~VDKXTableIndex ()
 Destructor.
 
xbShort Create (char *key, bool unique=true, bool overwrite=false)
 
xbShort Open (void)
 Open index.
 
xbShort Close (void)
 
VDKString Name ()
 return index name
 
VDKString Key ()
 return index key
 
bool IsOpen ()
 return if index is open or not
 

Detailed Description

Provides a table index.

Constructor & Destructor Documentation

VDKXTableIndex::VDKXTableIndex ( VDKXTable owner,
char *  s 
)

Constructor

Parameters
ownerVDKXtable that owns index
sindex file name

Member Function Documentation

xbShort VDKXTableIndex::Close ( void  )

Close index.

  • Programming note: Isn't necessary to explicitely close an index, closing the table will close all associated indexes as well.
xbShort VDKXTableIndex::Create ( char *  key,
bool  unique = true,
bool  overwrite = false 
)

Creates an index

Parameters
kindex key (can be an expression as well)
uniqueif true allows duplicated keys
overwriteif true and table exist will be truncated and overwritten. Returns:
  • XB_NO_ERROR no errors
  • XB_OPEN_ERROR couldn't open file
  • XB_NO_MEMORY mem allocation error
  • XB_READ_ERROR couldn't read on device
  • XB_INVALID_KEY_EXPRESSION bad index key expression
  • XB_SEEK_ERROR seek error encountered
  • XB_NOT_OPEN database wasn't opened

The documentation for this class was generated from the following files: