1 5 package org.h2.index; 6 7 import java.sql.SQLException ; 8 9 import org.h2.message.Message; 10 import org.h2.result.Row; 11 import org.h2.util.ObjectArray; 12 13 14 17 18 public class MetaCursor implements Cursor { 19 20 private Row current; 21 private ObjectArray rows; 22 private int index; 23 24 MetaCursor(ObjectArray rows) { 25 this.rows = rows; 26 } 27 28 public Row get() { 29 return current; 30 } 31 32 public int getPos() { 33 throw Message.getInternalError(); 34 } 35 36 public boolean next() throws SQLException { 37 current = (Row) (index >= rows.size() ? null : rows.get(index++)); 38 return current != null; 39 } 40 41 } 42 | Popular Tags |