Extensible Storage Engine - Cursor Navigation and The Copy Buffer

Cursor Navigation and The Copy Buffer

A cursor is a logical pointer within a table index. The cursor may be positioned on a record, before the first record, after the last record or even between records. If a cursor is positioned before or after a record, there is no current record. It is possible to have multiple cursors into the same table index. Many record and column operations are based on the cursor position. Cursor position can be moved sequentially by Move operations or directly using index keys with Seek operations. Cursors can also be moved to a fractional position within an index. In this way, the cursor can be quickly moved to a thumb bar position. This operation is performed with the same speed as a Seek operation. No intervening data must be accessed.

Each cursor has a copy buffer in order to create a new record, or modify an existing record, column by column. This is an internal buffer whose contents can be changed with SetColumns operations. Modifications of the copy buffer do not automatically change the stored data. The contents of the current record can be copied into the copy buffer using the PrepareUpdate operation, and Update operations store the contents of the copy buffer as a record. The copy buffer is implicitly cleared on a transaction commit or rollback, as well as on navigation operations. RetrieveColumns may be used to retrieve column data either from the record or from the copy buffer, if one exists.

Read more about this topic:  Extensible Storage Engine

Famous quotes containing the word copy:

    Matisse makes a drawing, then he makes a copy of it. He recopies it five times, ten times, always clarifying the line. He’s convinced that the last, the most stripped down, is the best, the purest, the definitive one; and in fact, most of the time, it was the first. In drawing, nothing is better than the first attempt.
    Pablo Picasso (1881–1973)