mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Lots of JNI internal API renaming, for consistency, and moving-around of utility functions. Make it safe for more callback types to throw.
FossilOrigin-Name: 9a494394b9eb28cf88dc5e7075a4b8c682c8e14fdd6837b595bec8011d7e9e72
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -1120,7 +1120,7 @@ JNIEXPORT jstring JNICALL Java_org_sqlite_jni_SQLite3Jni_sqlite3_1db_1filename
|
||||
* Method: sqlite3_db_config
|
||||
* Signature: (Lorg/sqlite/jni/sqlite3;ILorg/sqlite/jni/OutputPointer/Int32;)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL Java_org_sqlite_jni_SQLite3Jni_sqlite3_1db_1config__Lorg_sqlite_jni_sqlite3_2ILorg_sqlite_jni_OutputPointer_Int32_2
|
||||
JNIEXPORT jint JNICALL Java_org_sqlite_jni_SQLite3Jni_sqlite3_1db_1config__Lorg_sqlite_jni_sqlite3_2ILorg_sqlite_jni_OutputPointer_00024Int32_2
|
||||
(JNIEnv *, jclass, jobject, jint, jobject);
|
||||
|
||||
/*
|
||||
|
@ -19,12 +19,10 @@ package org.sqlite.jni;
|
||||
public interface CollationNeeded {
|
||||
/**
|
||||
Has the same semantics as the C-level sqlite3_create_collation()
|
||||
callback. Must not throw.
|
||||
callback.
|
||||
|
||||
Pedantic note: the first argument to this function will always be
|
||||
the same object reference which was passed to sqlite3_open() or
|
||||
sqlite3_open_v2(), even if the client has managed to create other
|
||||
Java-side references to the same C-level object.
|
||||
If it throws, the exception message is passed on to the db and
|
||||
the exception is suppressed.
|
||||
*/
|
||||
int xCollationNeeded(sqlite3 db, int eTextRep, String collationName);
|
||||
}
|
||||
|
@ -19,7 +19,9 @@ package org.sqlite.jni;
|
||||
public interface ProgressHandler {
|
||||
/**
|
||||
Works as documented for the sqlite3_progress_handler() callback.
|
||||
Must not throw.
|
||||
|
||||
If it throws, the exception message is passed on to the db and
|
||||
the exception is suppressed.
|
||||
*/
|
||||
int xCallback();
|
||||
}
|
||||
|
@ -382,6 +382,10 @@ public final class SQLite3Jni {
|
||||
public static native sqlite3_value sqlite3_column_value(@NotNull sqlite3_stmt stmt,
|
||||
int ndx);
|
||||
|
||||
/**
|
||||
This functions like C's sqlite3_collation_needed16() because
|
||||
Java's string type is compatible with that interface.
|
||||
*/
|
||||
public static native int sqlite3_collation_needed(@NotNull sqlite3 db,
|
||||
@Nullable CollationNeeded callback);
|
||||
|
||||
|
Reference in New Issue
Block a user