Package com.kuzudb
Class QueryResult
java.lang.Object
com.kuzudb.QueryResult
QueryResult stores the result of a query execution.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Destroy the query result.protected void
finalize()
Finalize.getColumnDataType
(long index) Get the column data type at the given index.getColumnName
(long index) Get the column name at the given index.Get the error message if any.getNext()
Get the next tuple.long
Get the number of columns in the query result.long
Get the number of tuples in the query result.Get the query summary.boolean
hasNext()
Return if the query result has next tuple or not.boolean
Check if the query is executed successfully.void
Reset the query result iterator.toString()
Convert the query result to string.
-
Constructor Details
-
QueryResult
public QueryResult()
-
-
Method Details
-
finalize
Finalize.- Overrides:
finalize
in classObject
- Throws:
ObjectRefDestroyedException
- If the query result has been destroyed.
-
destroy
Destroy the query result.- Throws:
ObjectRefDestroyedException
- If the query result has been destroyed.
-
isSuccess
Check if the query is executed successfully.- Returns:
- Query is executed successfully or not.
- Throws:
ObjectRefDestroyedException
- If the query result has been destroyed.
-
getErrorMessage
Get the error message if any.- Returns:
- Error message of the query execution if the query fails.
- Throws:
ObjectRefDestroyedException
- If the query result has been destroyed.
-
getNumColumns
Get the number of columns in the query result.- Returns:
- The number of columns in the query result.
- Throws:
ObjectRefDestroyedException
- If the query result has been destroyed.
-
getColumnName
Get the column name at the given index.- Parameters:
index
- : The index of the column.- Returns:
- The column name at the given index.
- Throws:
ObjectRefDestroyedException
- If the query result has been destroyed.
-
getColumnDataType
Get the column data type at the given index.- Parameters:
index
- : The index of the column.- Returns:
- The column data type at the given index.
- Throws:
ObjectRefDestroyedException
- If the query result has been destroyed.
-
getNumTuples
Get the number of tuples in the query result.- Returns:
- The number of tuples in the query result.
- Throws:
ObjectRefDestroyedException
- If the query result has been destroyed.
-
getQuerySummary
Get the query summary.- Returns:
- The query summary.
- Throws:
ObjectRefDestroyedException
- If the query result has been destroyed.
-
hasNext
Return if the query result has next tuple or not.- Returns:
- Whether there are more tuples to read.
- Throws:
ObjectRefDestroyedException
- If the query result has been destroyed.
-
getNext
Get the next tuple.- Returns:
- The next tuple.
- Throws:
ObjectRefDestroyedException
- If the query result has been destroyed.
-
toString
Convert the query result to string. -
resetIterator
Reset the query result iterator.- Throws:
ObjectRefDestroyedException
- If the query result has been destroyed.
-