Package com.kuzudb

Class PreparedStatement

java.lang.Object
com.kuzudb.PreparedStatement
All Implemented Interfaces:
AutoCloseable

public class PreparedStatement extends Object implements AutoCloseable
PreparedStatement is a parameterized query which can avoid planning the same query for repeated execution.
  • Constructor Details

    • PreparedStatement

      public PreparedStatement()
  • Method Details

    • close

      public void close()
      Close the prepared statement and release the underlying resources. This method is invoked automatically on objects managed by the try-with-resources statement.
      Specified by:
      close in interface AutoCloseable
      Throws:
      RuntimeException - If the prepared statement has been destroyed.
    • isSuccess

      public boolean isSuccess()
      Check if the query is prepared successfully or not.
      Returns:
      The query is prepared successfully or not.
      Throws:
      RuntimeException - If the prepared statement has been destroyed.
    • getErrorMessage

      public String getErrorMessage()
      Get the error message if the query is not prepared successfully.
      Returns:
      The error message if the query is not prepared successfully.
      Throws:
      RuntimeException - If the prepared statement has been destroyed.