diff --git a/bindings/java/src/main/java/org/github/tursodatabase/core/LimboStatement.java b/bindings/java/src/main/java/org/github/tursodatabase/core/LimboStatement.java index bb3bb47e0..0fdf243e0 100644 --- a/bindings/java/src/main/java/org/github/tursodatabase/core/LimboStatement.java +++ b/bindings/java/src/main/java/org/github/tursodatabase/core/LimboStatement.java @@ -123,6 +123,22 @@ public class LimboStatement { private native int bindNull(long statementPointer, int position) throws SQLException; + /** + * Binds an integer value to the prepared statement at the specified position. This function calls + * bindLong because Limbo treats all integers as long (as well as SQLite). + * + *

According to SQLite documentation, the value is a signed integer, stored in 0, 1, 2, 3, 4, + * 6, or 8 bytes depending on the magnitude of the value. + * + * @param position The index of the SQL parameter to be set. + * @param value The integer value to bind to the parameter. + * @return A result code indicating the success or failure of the operation. + * @throws SQLException If a database access error occurs. + */ + public int bindInt(int position, int value) throws SQLException { + return bindLong(position, value); + } + /** * Binds a long value to the prepared statement at the specified position. *