SQLite

Class FunctionContext

public class FunctionContext extends Object

Context for execution of SQLite's user defined functions. A reference to an instance of this class is passed to user defined functions.
Field Summary
longhandle
Internal handle for the native SQLite API.
Method Summary
intcount()
Retrieve number of rows for aggregate function.
static voidinternal_init()
Internal native initializer.
voidset_error(String r)
Set function result from error message.
voidset_result(String r)
Set function result from string.
voidset_result(int r)
Set function result from integer.
voidset_result(double r)
Set function result from double.
voidset_result(byte[] r)
Set function result from byte array.
voidset_result_zeroblob(int n)
Set function result as empty blob given size.

Field Detail

handle

private long handle
Internal handle for the native SQLite API.

Method Detail

count

public int count()
Retrieve number of rows for aggregate function.

internal_init

private static void internal_init()
Internal native initializer.

set_error

public void set_error(String r)
Set function result from error message.

Parameters: r result string (error message)

set_result

public void set_result(String r)
Set function result from string.

Parameters: r result string

set_result

public void set_result(int r)
Set function result from integer.

Parameters: r result integer

set_result

public void set_result(double r)
Set function result from double.

Parameters: r result double

set_result

public void set_result(byte[] r)
Set function result from byte array. Only provided by SQLite3 databases.

Parameters: r result byte array

set_result_zeroblob

public void set_result_zeroblob(int n)
Set function result as empty blob given size. Only provided by SQLite3 databases.

Parameters: n size for empty blob

Contact: Christian Werner