DBMGetOffset

Description
Å×ÀÌºí ³»¿¡¼­, ¶Ç´Â Category ³»¿¡¼­ ƯÁ¤ À妽º »ó¿¡¼­ÀÇ ÁÖ¾îÁø ·¹ÄÚµåÀÇ offsetÀ» ±¸ÇÑ´Ù.

Syntax
DBMErr DBMGetOffset(TableId tableId, CatId catId, IndexFlag indexFlag, RecId recId, RecOrder recOrder, int* offset);

Parameters
tableId Å×À̺íÀÇ ID
catId Category ID
ƯÁ¤ CategoryÀ» ÁöÁ¤ÇÏÁö ¾ÊÀ» ¶§´Â NULL_CAT_ID¸¦ »ç¿ëÇÑ´Ù.
indexFlag·¹ÄÚµåÀÇ ¼ø¼­¸¦ °áÁ¤Çϱâ À§ÇØ »ç¿ëÇÏ´Â À妽º
recId ·¹ÄÚµåÀÇ id
recOrder·¹ÄÚµåÀÇ Á¤·Ä ¼ø¼­
(DBM_INCR ¶Ç´Â DBM_DECR)
offset·¹ÄÚµåÀÇ offset ¹Ýȯ

Returns
value¼³¸í
DBM_OK¼º°øÀûÀ¸·Î ¼öÇàµÈ °æ¿ì
DBM_TOO_MANY_SCANSÀÌ¹Ì openµÈ ½ºÄµÀÇ ¼ö°¡ NUM_SCANSÀÎ °æ¿ì
DBM_INVALID_TABLE_ID ÁÖ¾îÁø Å×À̺í id¸¦ °®´Â Å×À̺íÀÌ Á¸ÀçÇÏÁö ¾Ê´Â °æ¿ì
DBM_INVALID_CAT_ID catId!=NULL_CAT_IDÀ̸鼭 ÁÖ¾îÁø Category id¸¦ °®´Â Category°¡ Á¸ÀçÇÏÁö ¾Ê´Â °æ¿ì
¶Ç´Â ÁÖ¾îÁø ·¹Äڵ尡 ÇØ´ç Category¿¡ ¼ÓÇÏÁö ¾Ê´Â °æ¿ì
DBM_INVALID_FLAGindexFlag!=DBM_PRIM&&indexFlag!=DBM_SECÀÎ °æ¿ì
DBM_SECONDARY_INDEX_NOT_EXISTindexFlag==DBM_SECÀ̸鼭 Å×ÀÌºí¿¡ secondary index°¡ Á¸ÀçÇÏÁö ¾Ê´Â °æ¿ì
DBM_INVALID_REC_IDÅ×ÀÌºí¿¡ ÁÖ¾îÁø ·¹ÄÚµå id°¡ Á¸ÀçÇÏÁö ¾Ê°Å³ª, virtual deleteµÈ ·¹ÄÚµåÀÎ °æ¿ì
DBM_DB_NOT_INITED µ¥ÀÌŸº£À̽º°¡ ÃʱâÈ­µÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì

Comments
Å×ÀÌºí¿¡ ¸¹Àº ¼öÀÇ ·¹Äڵ尡 Á¸ÀçÇÒ ¶§, ÀÓÀÇ ·¹Äڵ忡 ´ëÇÑ ºü¸¥ Á¢±ÙÀ» À§ÇØ DBMGetOffset, DBMOpenSeqScanTableWithCursor / DBMOpenSeqScanCategoryWithCursor¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù.

See Also
DBMOpenSeqScanTableWithCursor, DBMOpenSeqScanCategoryWithCursor

Example
  TableId tableId; ScanId scanId; RecId recId; DBMErr ret=DBM_OK;
  int numResults, offset;
  // Get tableId and recId
  ret = DBMGetOffset( tableId, NULL_CAT_ID, DBM_PRIM, DBM_INCR, &offset);
  if( ret < DBM_OK ) // error handling
  ...
  ret = DBMOpenSeqScanTableWithCursor(tableId, DBM_PRIM, recId, DBM_INCR, &scanId);
  if( ret < DBM_OK ) // error handling
  ...