as_DBMOpenSeqScanTableWithCursor

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

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

Parameters
tableIdÅ×À̺íÀÇ ID
indexFlag primary key Çʵå¿Í secondary key Çʵå Áß ³í¸®Àû ¼ø¼­ÀÇ ±âÁØÀÌ µÇ´Â Çʵ带 ¼±ÅÃÇÏ´Â Ç÷¡±×
DBM_PRIM : primary key Çʵå
DBM_SEC : secondary key Çʵå
recId GetOffsetÀ» ¼öÇàÇÑ recId¿Í µ¿ÀÏÇÑ °ª
recOrderFlag ·¹ÄÚµåÀÇ °Ë»ö ¼ø¼­
DBM_INCR : increasing order
DBM_DECR : decreasing order
scanIdopenµÈ ½ºÄµ 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
Ç×»ó as_DBMGetOffset API¸¦ È£ÃâÇÑ ÈÄ, ÀÌ ÇÔ¼ö¸¦ È£ÃâÇØ¾ß ÇÑ´Ù.
as_DBMGetOffsetÀ» ÇÑ ÈÄ¿¡ ·¹ÄÚµåÀÇ Ãß°¡/»èÁ¦/¼öÁ¤ µîÀÇ ÀÛ¾÷À» ÇÏ°í ÀÌ API¸¦ ÀÌ¿ëÇÏ´Â °æ¿ì, À߸øµÈ °á°ú¸¦ °¡Á®¿Ã ¼ö ÀÖ´Ù.

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

See Also
as_DBMGetOffset, as_DBMGetNextRecordId, as_DBMGetPrevRecordId,
as_DBMOpenSeqScanCategory, as_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 = as_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 = as_DBMGetNextRecordId( scanId, &recId, &numExistFields, fieldDataInfo) >= DBM_OK ) {
   ...
}