From 5389571e2db6b62ecc8e45b5e8bea1739ab67957 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 4 Jul 2021 12:48:02 +0100 Subject: Introduce the cursor concept Not implemented for PQ yet. --- lib/input/mysqlRecordSet.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/input/mysqlRecordSet.cpp') diff --git a/lib/input/mysqlRecordSet.cpp b/lib/input/mysqlRecordSet.cpp index 494ce13..5fbbfe9 100644 --- a/lib/input/mysqlRecordSet.cpp +++ b/lib/input/mysqlRecordSet.cpp @@ -116,4 +116,16 @@ namespace MyGrate::Input { } return extras[col]->getValue(); } + + bool + MySQLCursor::fetch() + { + switch (mysql_stmt_fetch(stmt.get())) { + case 0: + return true; + case MYSQL_NO_DATA: + return false; + } + throw MySQLErr("Fetch", stmt.get()); + } } -- cgit v1.2.3