1 5 package org.h2.index; 6 7 import java.sql.SQLException ; 8 9 import org.h2.result.Row; 10 11 12 15 public class ScanCursor implements Cursor { 16 private ScanIndex scan; 17 private Row row; 18 19 ScanCursor(ScanIndex scan) { 20 this.scan = scan; 21 row = null; 22 } 23 24 public Row get() { 25 return row; 26 } 27 28 public int getPos() { 29 return row == null ? -1 : row.getPos(); 30 } 31 32 public boolean next() throws SQLException { 33 row = scan.getNextRow(row); 34 return row != null; 35 } 36 } 37 | Popular Tags |