mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-12-23 08:21:09 +00:00
Add bindInt
This commit is contained in:
parent
21d6f33c6b
commit
cc09cb7d51
1 changed files with 16 additions and 0 deletions
|
|
@ -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.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue