SQLite
Class FunctionContext

java.lang.Object
  extended bySQLite.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
private  long handle
          Internal handle for the native SQLite API.
 
Constructor Summary
FunctionContext()
           
 
Method Summary
 int count()
          Retrieve number of rows for aggregate function.
private static void internal_init()
          Internal native initializer.
 void set_error(String r)
          Set function result from error message.
 void set_result_zeroblob(int n)
          Set function result as empty blob given size.
 void set_result(byte[] r)
          Set function result from byte array.
 void set_result(double r)
          Set function result from double.
 void set_result(int r)
          Set function result from integer.
 void set_result(String r)
          Set function result from string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handle

private long handle
Internal handle for the native SQLite API.

Constructor Detail

FunctionContext

public FunctionContext()
Method Detail

count

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

Returns:
number of rows

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_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

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

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

Parameters:
r - result double

set_result

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

Parameters:
r - result integer

set_result

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

Parameters:
r - result string


Contact: Christian Werner