/* SetRowId * seek to given row id * * "row_id" [ IN ] - row id to select */ rc_t VTableReadCursorSetRowId ( const VTableCursor *cself, int64_t row_id ) { rc_t rc; VTableCursor *self = ( VTableCursor* ) cself; if ( self == NULL ) rc = RC ( rcVDB, rcCursor, rcPositioning, rcSelf, rcNull ); else if ( self -> dad . state > vcReady ) rc = RC ( rcVDB, rcCursor, rcPositioning, rcCursor, rcBusy ); else rc = VCursorSetRowIdRead ( & self -> dad, row_id ); return rc; }
/* SetRowId * seek to given row id * * "row_id" [ IN ] - row id to select */ LIB_EXPORT rc_t CC VCursorSetRowId ( const VCursor *cself, int64_t row_id ) { rc_t rc; VCursor *self = ( VCursor* ) cself; if ( self == NULL ) rc = RC ( rcVDB, rcCursor, rcPositioning, rcSelf, rcNull ); else if ( self -> state > vcReady ) rc = RC ( rcVDB, rcCursor, rcPositioning, rcCursor, rcBusy ); else rc = VCursorSetRowIdRead ( self, row_id ); return rc; }
/* SetRowId * seek to given row id * * "row_id" [ IN ] - row id to select */ LIB_EXPORT rc_t CC VCursorSetRowId ( const VCursor *cself, int64_t row_id ) { rc_t rc; VCursor *self = ( VCursor* ) cself; if ( self == NULL ) rc = RC ( rcVDB, rcCursor, rcPositioning, rcSelf, rcNull ); else if ( self -> state == vcFailed ) rc = RC ( rcVDB, rcCursor, rcPositioning, rcCursor, rcInvalid ); else if ( self -> state > vcReady || self -> start_id < self -> end_id ) rc = RC ( rcVDB, rcCursor, rcPositioning, rcCursor, rcBusy ); else if ( self -> read_only ) rc = VCursorSetRowIdRead ( self, row_id ); else { /* the test of start/end range above tells us that no rows are buffered, so the row id can be simply set */ self -> start_id = self -> end_id = self -> row_id = row_id; rc = 0; } return rc; }