|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sqlite.callback.Callback
org.sqlite.callback.NamedCallback
org.sqlite.udf.Function
org.sqlite.udf.AggregateFunction<T>
public abstract class AggregateFunction<T>
User-Defined aggregate function class.
JdbcConnection.createFunction(Function)
,
JdbcConnection.dropFunction(Function)
Field Summary | |
---|---|
protected java.lang.ThreadLocal<T> |
tls
thread local storage |
Fields inherited from class org.sqlite.udf.Function |
---|
argc |
Constructor Summary | |
---|---|
AggregateFunction(java.lang.String name)
create aggregate function object. |
|
AggregateFunction(java.lang.String name,
int argc)
create aggregate function object. |
|
AggregateFunction(java.lang.String name,
int argc,
int enc)
create aggregate function object. |
Method Summary | |
---|---|
protected T |
get()
Returns the value in the current thread's copy of this thread-local variable. |
protected abstract T |
initialValue()
Returns the current thread's "initial value" for this thread-local variable. |
protected void |
remove()
Removes the current thread's value for this thread-local variable. |
protected void |
set(T value)
Sets the current thread's copy of this thread-local variable to the specified value. |
protected abstract void |
xFinal(Context ctx)
|
protected void |
xFinal(long context)
Called from the sqlite3_step() function. |
protected void |
xFunc(Context ctx)
invoke xStep() method. |
protected abstract void |
xStep(Context ctx)
|
Methods inherited from class org.sqlite.udf.Function |
---|
getArgumentCount, register, unregister, xFunc |
Methods inherited from class org.sqlite.callback.NamedCallback |
---|
getEncoding, getName |
Methods inherited from class org.sqlite.callback.Callback |
---|
delete, isRegistered |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final java.lang.ThreadLocal<T> tls
Constructor Detail |
---|
public AggregateFunction(java.lang.String name)
name
- the function nameFunction.Function(java.lang.String)
public AggregateFunction(java.lang.String name, int argc)
name
- the function nameargc
- the number of arguments that the aggregate takes.Function.Function(java.lang.String, int)
public AggregateFunction(java.lang.String name, int argc, int enc)
name
- the function nameargc
- the number of arguments that the aggregate takes.enc
- the specifies what text encoding this function prefers for its parametersFunction.Function(java.lang.String, int, int)
Method Detail |
---|
protected final void xFunc(Context ctx) throws java.sql.SQLException
xFunc
in class Function
ctx
- sqlite3_context wrapper object
java.sql.SQLException
xStep(org.sqlite.udf.Context)
protected final void xFinal(long context)
context
- xFinal(org.sqlite.udf.Context)
protected abstract T initialValue()
ThreadLocal.initialValue()
protected T get()
ThreadLocal.get()
protected void remove()
ThreadLocal.remove()
protected void set(T value)
value
- the value to be stored in the current thread's copy of this thread-local.ThreadLocal.set(Object)
protected abstract void xStep(Context ctx) throws java.sql.SQLException
java.sql.SQLException
protected abstract void xFinal(Context ctx) throws java.sql.SQLException
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |