|
A database cursor refers to a single key/data pair in the database. It supports traversal of the database and is the only way to access individual duplicate data items. Cursors are used for operating on collections of records, for iterating over a database, and for saving handles to individual records, so that they can be modified after they have been read.
(Ä¿¼´Â ´ÜÀÏ Å°/µ¥ÀÌŸ½ÖÀ» ÂüÁ¶ÇÑ´Ù.ÀÌ°ÍÀº µðºñ ¼øȸ¸¦ Áö¿øÇÏ°í º¹Á¦µÈ µ¥ÀÌŸ ¾ÆÀÌÅÛÀ» °³º°ÀûÀ¸·Î Á¢±ÙÇÒ ¼ö ÀÖ´Â À¯ÀÏÇÑ ¹æ¹ýÀÌ´Ù.Ä¿¼´Â ·¹ÄÚµåÀÇ ÁýÇÕ¿¡ ´ëÇÑ ¿ÀÆÛ·¹À̼Ç(µðºñ iterationg,·¹Äڵ带 ÀÐÀºÈÄ º¯°æµÉ¼ö ÀÖµµ·Ï °³º°·¹Äڵ忡 ÇÚµéÀúÀå)À» À§ÇØ »ç¿ëµÈ´Ù.)
The DB->cursor method opens a cursor into a database. Upon return the cursor is uninitialized, cursor positioning occurs as part of the first cursor operation.
(DB->cursor ´Â Ä¿¼¸¦ ¿ÀÇÂÇÑ´Ù. ¸®ÅÏµÈ Ä¿¼´Â ÃʱâȵÇÁö ¾ÊÀº»óÅÂÀÌ°í Ä¿¼Æ÷Áö¼Å´×Àº ù Ä¿¼¿ÀÆÛ·¹À̼Ƕ§ ¹ß»ýÇÑ´Ù.)
Once a database cursor has been opened, records may be retrieved (DBcursor->c_get), stored (DBcursor->c_put), and deleted (DBcursor->c_del).
(ÀÏ´Ü Ä¿¼°¡ ¿¸®¸é,·¹ÄÚµå´Â ¸®Æ®¸®ºù,ÀúÀå,»èÁ¦°¡ °¡´ÉÇÏ´Ù.)
Additional operations supported by the cursor handle include duplication (DBcursor->c_dup), equality join (DB->join), and a count of duplicate data items (DBcursor->c_count). Cursors are eventually closed using DBcursor->c_close.
Database Cursors and Related Methods | Description |
---|---|
DB->cursor | Create a cursor handle |
DBcursor->c_close | Close a cursor |
DBcursor->c_count | Return count of duplicates |
DBcursor->c_del | Delete by cursor |
DBcursor->c_dup | Duplicate a cursor |
DBcursor->c_get | Retrieve by cursor |
DBcursor->c_pget | Retrieve by cursor |
DBcursor->c_put | Store by cursor |
Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.