1 5 package org.h2.index; 6 7 import java.sql.SQLException ; 8 9 import org.h2.message.Message; 10 import org.h2.result.LocalResult; 11 import org.h2.result.Row; 12 13 public class FunctionCursor implements Cursor { 14 15 private LocalResult result; 16 private Row row; 17 18 FunctionCursor(LocalResult result) { 19 this.result = result; 20 } 21 22 public Row get() { 23 return row; 24 } 25 26 public int getPos() { 27 throw Message.getInternalError(); 28 } 29 30 public boolean next() throws SQLException { 31 if(result.next()) { 32 row = new Row(result.currentRow()); 33 } else { 34 row = null; 35 } 36 return row != null; 37 } 38 39 } 40 | Popular Tags |