DBMOpenSeqScanTableWithCursor

Description
GetOffsetÀ¸·ÎºÎÅÍ ¾ò¾îÁø ·¹ÄÚµå À§Ä¡¿¡¼­ºÎÅÍ Æ¯Á¤ Å×ÀÌºí¿¡ ¼ÓÇÏ´Â ·¹ÄÚµåµéÀ» primary/secondary key ¼ø¼­·Î Àбâ À§ÇÑ ½ºÄµ °ü¸®ÀÚ¸¦ ÃʱâÈ­ÇÑ´Ù

Syntax
DBMErr DBMOpenSeqScanTableWithCursor(TableId tableId, IndexFlag indexFlag, RecId recId, RecOrder recOrder, ScanId* scanId);

Parameters
tableId Å×À̺íÀÇ ID
indexFlagprimary key Çʵå¿Í secondary key Çʵå Áß ³í¸®Àû ¼ø¼­ÀÇ ±âÁØÀÌ µÇ´Â Çʵ带 ¼±ÅÃÇÏ´Â Ç÷¡±×
DBM_PRIM : primary key Çʵå
DBM_SEC : secondary key Çʵå
recId GetOffsetÀ» ¼öÇàÇÑ recId¿Í µ¿ÀÏÇÑ °ª
recOrderFlag·¹ÄÚµåÀÇ °Ë»ö ¼ø¼­
DBM_INCR : increasing order
DBM_DECR : decreasing order
scanId openµÈ ½ºÄµ ID

Returns
value¼³¸í
DBM_OK¼º°øÀûÀ¸·Î ¼öÇàµÈ °æ¿ì
DBM_TOO_MANY_SCANSÀÌ¹Ì openµÈ ½ºÄµÀÇ ¼ö°¡ NUM_SCANSÀÎ °æ¿ì
DBM_INVALID_TABLE_IDÁÖ¾îÁø Å×À̺í id¸¦ °®´Â Å×À̺íÀÌ Á¸ÀçÇÏÁö ¾Ê´Â °æ¿ì
DBM_INVALID_FLAGindexFlag°¡ DBM_PRIMµµ DBM_SECµµ ¾Æ´Ñ °æ¿ì
DBM_INVALID_RECIDGetOffsetÀ» ¼öÇàÇÑ recId¿Í ´Ù¸¥ °æ¿ì
DBM_OPEN_SCAN_ERR recOrder°¡ DBM_INCR³ª DBM_DECRÀÌ ¾Æ´Ñ °æ¿ì
DBM_SECONDARY_INDEX_NOT_EXISTÅ×ÀÌºí¿¡ secondary index°¡ ¾ø´Âµ¥µµ indexFlag°¡ DBM_SECÀÎ °æ¿ì
DBM_DB_NOT_INITEDµ¥ÀÌŸº£À̽º°¡ ÃʱâÈ­µÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì

Comments
Ç×»ó DBMGetOffset API¸¦ È£ÃâÇÑ ÈÄ, ÀÌ ÇÔ¼ö¸¦ È£ÃâÇØ¾ß ÇÑ´Ù.

DBMGetOffsetÀ» ÇÑ ÈÄ¿¡ ·¹ÄÚµåÀÇ Ãß°¡/»èÁ¦/¼öÁ¤ µîÀÇ ÀÛ¾÷À» ÇÏ°í ÀÌ API¸¦ ÀÌ¿ëÇÏ´Â °æ¿ì, À߸øµÈ °á°ú¸¦ °¡Á®¿Ã ¼ö ÀÖ´Ù.

DBMGetOffset, DBMOpenSeqScanTable ÇÔ¼ö¿¡¼­ ½ºÄµÀ» ¿ÀÇÂÇÏ°í ·¹Äڵ忡 ´ëÇØ ºü¸¥ Á¢±ÙÀ» Áö¿øÇϱâ À§ÇØ »ç¿ë.

See Also
DBMGetOffset, DBMGetNextRecordId, DBMGetPrevRecordId, DBMOpenSeqScanCategory, DBMOpenSeqScanTableWithCursor

Example

  TableId tableId; ScanId scanId;
  RecId recId; DBMErr ret=DBM_OK;
  int numFields, numExistFields; FieldDataInfo fieldDataInfo;
  FieldData keyData, fieldData;
  IndexFlag indexFlag = DBM_PRIM;
  int offset = 10;
  RecOrder recOrder=DBM_INCR;
  
  // Get tableId, catId
  ret = DBMOpenSeqScanTableWithCursor( tableId, indexFlag, offset, recOrder, &scanId);
  if( ret < DBM_OK ) // error handling
  
  numFields = NUM_FIELDS;
  ...
  /* allocate space for fieldDataInfo */
  fieldDataInfo =(FieldDataInfo*)Lmalloc( sizeof(FieldDataInfo) * numFields );
  while( (ret = DBMGetNextRecordId( scanId, &recId, &numExistFields, fieldDataInfo) >= DBM_OK ) {
     ...
  }