mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-25 12:04:21 +01:00
Add bindInt
This commit is contained in:
@@ -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).
|
||||
*
|
||||
* <p>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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user