Clone() 공개 메소드

Clones a Database Cursor
This method wraps the native ups_cursor_clone function.
Clones an existing Cursor. The new Cursor will point to exactly the same item as the old Cursor. If the old Cursor did not point to any item, so will the new Cursor. If the old Cursor is bound to a Transaction, then the new Cursor will also be bound to this Transaction.
/// /// /// if the new structure could not be allocated /// ///
public Clone ( ) : Cursor
리턴 Cursor
예제 #1
0
 private void Clone()
 {
     Cursor c1 = new Cursor(db);
     Cursor c2 = c1.Clone();
 }
예제 #2
0
 private void AutoCleanupCursors4()
 {
     Upscaledb.Environment env = new Upscaledb.Environment();
     Database db = new Database();
     env.Create("ntest.db");
     db = env.CreateDatabase(1);
     Cursor cursor1 = new Cursor(db);
     Cursor cursor2 = cursor1.Clone();
     Cursor cursor3 = cursor1.Clone();
     Cursor cursor4 = cursor1.Clone();
     Cursor cursor5 = cursor1.Clone();
     cursor3.Close();
     cursor5.Close();
     // let gc do the cleanup
     env.Close();
 }