MCPcopy Create free account
hub / github.com/cruppstahl/upscaledb / cloneCursor

Method cloneCursor

java/java/de/crupp/upscaledb/Cursor.java:126–136  ·  view source on GitHub ↗

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. More information: <a href="http://files.u

()

Source from the content-addressed store, hash-verified

124 * @return the new Cursor object
125 */
126 public Cursor cloneCursor()
127 throws DatabaseException {
128 if (m_handle == 0)
129 throw new DatabaseException(Const.UPS_INV_PARAMETER);
130 long newhandle = ups_cursor_clone(m_handle);
131 if (newhandle == 0)
132 throw new DatabaseException(Const.UPS_INTERNAL_ERROR);
133 Cursor c = new Cursor(m_db, newhandle);
134 m_db.addCursor(c);
135 return c;
136 }
137
138 /**
139 * Moves the Cursor to the direction specified in the flags.

Callers 1

testCloneCursorMethod · 0.95

Calls 2

ups_cursor_cloneMethod · 0.95
addCursorMethod · 0.80

Tested by 1

testCloneCursorMethod · 0.76