1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Javadoc and internal API cleanups.

FossilOrigin-Name: 10a43cba9bb2c23b5f31b31fcac81be34acec1940cca47d0b8e5a5ccbf1aa8eb
This commit is contained in:
stephan
2023-08-25 04:02:33 +00:00
parent 5276552083
commit aec1361a2b
6 changed files with 245 additions and 257 deletions

File diff suppressed because it is too large Load Diff

View File

@ -50,13 +50,13 @@ public final class OutputPointer {
*/
public static final class sqlite3 {
private org.sqlite.jni.sqlite3 value;
//! Initializes with a null value.
/** Initializes with a null value. */
public sqlite3(){value = null;}
//! Sets the current value to null.
/** Sets the current value to null. */
public void clear(){value = null;}
//! Returns the current value.
/** Returns the current value. */
public final org.sqlite.jni.sqlite3 get(){return value;}
//! Equivalent to calling get() then clear().
/** Equivalent to calling get() then clear(). */
public final org.sqlite.jni.sqlite3 take(){
final org.sqlite.jni.sqlite3 v = value;
value = null;
@ -72,13 +72,13 @@ public final class OutputPointer {
*/
public static final class sqlite3_stmt {
private org.sqlite.jni.sqlite3_stmt value;
//! Initializes with a null value.
/** Initializes with a null value. */
public sqlite3_stmt(){value = null;}
//! Sets the current value to null.
/** Sets the current value to null. */
public void clear(){value = null;}
//! Returns the current value.
/** Returns the current value. */
public final org.sqlite.jni.sqlite3_stmt get(){return value;}
//! Equivalent to calling get() then clear().
/** Equivalent to calling get() then clear(). */
public final org.sqlite.jni.sqlite3_stmt take(){
final org.sqlite.jni.sqlite3_stmt v = value;
value = null;
@ -94,13 +94,13 @@ public final class OutputPointer {
*/
public static final class sqlite3_value {
private org.sqlite.jni.sqlite3_value value;
//! Initializes with a null value.
/** Initializes with a null value. */
public sqlite3_value(){value = null;}
//! Sets the current value to null.
/** Sets the current value to null. */
public void clear(){value = null;}
//! Returns the current value.
/** Returns the current value. */
public final org.sqlite.jni.sqlite3_value get(){return value;}
//! Equivalent to calling get() then clear().
/** Equivalent to calling get() then clear(). */
public final org.sqlite.jni.sqlite3_value take(){
final org.sqlite.jni.sqlite3_value v = value;
value = null;
@ -118,13 +118,13 @@ public final class OutputPointer {
consistency with the higher-level types.
*/
public int value;
//! Initializes with the value 0.
/** Initializes with the value 0. */
public Int32(){this(0);}
//! Initializes with the value v.
/** Initializes with the value v. */
public Int32(int v){value = v;}
//! Returns the current value.
/** Returns the current value. */
public final int get(){return value;}
//! Sets the current value to v.
/** Sets the current value to v. */
public final void set(int v){value = v;}
}
@ -138,13 +138,13 @@ public final class OutputPointer {
consistency with the higher-level types.
*/
public long value;
//! Initializes with the value 0.
/** Initializes with the value 0. */
public Int64(){this(0);}
//! Initializes with the value v.
/** Initializes with the value v. */
public Int64(long v){value = v;}
//! Returns the current value.
/** Returns the current value. */
public final long get(){return value;}
//! Sets the current value.
/** Sets the current value. */
public final void set(long v){value = v;}
}
@ -158,13 +158,13 @@ public final class OutputPointer {
consistency with the higher-level types.
*/
public java.lang.String value;
//! Initializes with a null value.
/** Initializes with a null value. */
public String(){this(null);}
//! Initializes with the value v.
/** Initializes with the value v. */
public String(java.lang.String v){value = v;}
//! Returns the current value.
/** Returns the current value. */
public final java.lang.String get(){return value;}
//! Sets the current value.
/** Sets the current value. */
public final void set(java.lang.String v){value = v;}
}
@ -178,13 +178,13 @@ public final class OutputPointer {
consistency with the higher-level types.
*/
public byte[] value;
//! Initializes with the value null.
/** Initializes with the value null. */
public ByteArray(){this(null);}
//! Initializes with the value v.
/** Initializes with the value v. */
public ByteArray(byte[] v){value = v;}
//! Returns the current value.
/** Returns the current value. */
public final byte[] get(){return value;}
//! Sets the current value.
/** Sets the current value. */
public final void set(byte[] v){value = v;}
}
}

View File

@ -1270,7 +1270,7 @@ public final class SQLite3Jni {
/**
A variant of sqlite3_value_java_object() which returns the
fetched object cast to T if the object is an instance of the
given Class. It returns null in all other cases.
given Class, else it returns null.
*/
@SuppressWarnings("unchecked")
public static <T> T sqlite3_value_java_casted(@NotNull sqlite3_value v,

View File

@ -23,28 +23,19 @@ public interface trace_v2_callback extends sqlite3_callback_proxy {
argument to the native trace callback, as that role is better
filled by instance-local state.
<p>The 2nd argument to this function, if non-0, will be a native
pointer to either an sqlite3 or sqlite3_stmt object, depending on
the first argument (see below). Client code can pass it to the
sqlite3 resp. sqlite3_stmt constructor to create a wrapping
object, if necessary. This API does not do so by default because
tracing can be called frequently, creating such a wrapper for
each call is comparatively expensive, and the objects are
probably only seldom useful.
These callbacks may throw, in which case their exceptions are
converted to C-level error information.
<p>The 2nd argument to this function, if non-null, will be a an
sqlite3 or sqlite3_stmt object, depending on the first argument
(see below).
<p>The final argument to this function is the "X" argument
documented for sqlite3_trace() and sqlite3_trace_v2(). Its type
depends on value of the first argument:
<p>- SQLITE_TRACE_STMT: pNative is a sqlite3_stmt. pX is a string
containing the prepared SQL, with one caveat: JNI only provides
us with the ability to convert that string to MUTF-8, as
opposed to standard UTF-8, and is cannot be ruled out that that
difference may be significant for certain inputs. The
alternative would be that we first convert it to UTF-16 before
passing it on, but there's no readily-available way to do that
without calling back into the db to peform the conversion
(which would lead to further tracing).
<p>- SQLITE_TRACE_STMT: pNative is a sqlite3_stmt. pX is a String
containing the prepared SQL.
<p>- SQLITE_TRACE_PROFILE: pNative is a sqlite3_stmt. pX is a Long
holding an approximate number of nanoseconds the statement took