[ library(dbi) | Reference Manual | Alphabetic Index ]

cursor_all_tuples(++Cursor, -ResultTuples)

Retrieve all remaining result tuples from the SQL query in ResultTuples
Cursor
A cursor handle
ResultTuples
Returned list of result tuples

Description

Retrieve the all remaining result tuples from the SQL query represented by Cursor, and unify them with ResultTuples list. Each element of the list is a single result tuple. Cursor is a cursor previously created with session_sql_query/4 or session_sql_prepare_query/5. Each tuple in ResultTuples is a structure with the same name and arity as defined by the tuple template when the cursor was created. The predicate converts the result to the type specified in the template, except that NULL values are returned as variables.

If the SQL query have not yet been executed, and it contains no parameters, then the SQL query will first be executed before retrieving the results.

Exceptions

(5) type error
Cursor is not a valid cursor handle
(5) type error
Unable to convert tuple result to ECLiPSe type
(dbi_error)
Error from DBMS while executing SQL associated with Cursor.
(dbi_error)
Error from DBMS while fetching result
(dbi_bad_query)
The SQL associated with Cursor is not a query and so cannot return results.

See Also

session_sql_query / 4, session_sql_prepare_query / 5, cursor_next_tuple / 2, cursor_N_tuples / 4