|
||||||||||
| 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
public abstract class Function
User-Defined function class.
JdbcConnection.createFunction(Function),
JdbcConnection.dropFunction(Function)| Field Summary | |
|---|---|
protected int |
argc
the number of arguments that the SQL function or aggregate takes |
| Constructor Summary | |
|---|---|
protected |
Function(java.lang.String name)
invoke Function(String, -1) constructor. |
protected |
Function(java.lang.String name,
int argc)
create Function object with SQLITE_UTF8. |
protected |
Function(java.lang.String name,
int argc,
int enc)
create Function object. |
| Method Summary | |
|---|---|
int |
getArgumentCount()
Returns the number of arguments that the SQL function or aggregate takes. |
void |
register(SWIGTYPE_p_sqlite3 db)
invoke sqlite3_create_function() function and this object is registered in the database. WARNING! Do not use this method because it is called internally. |
void |
unregister(SWIGTYPE_p_sqlite3 db)
Unregister this object from the database. WARNING! Do not use this method because it is called internally. |
protected abstract void |
xFunc(Context ctx)
Called from the sqlite3_step() function. |
protected void |
xFunc(long context,
int argc,
long value)
Called from the sqlite3_step() function. |
| 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 int argc
| Constructor Detail |
|---|
protected Function(java.lang.String name)
name - the function nameFunction(java.lang.String, int)
protected Function(java.lang.String name,
int argc)
name - the function nameargc - the number of arguments that the SQL function or aggregate takes.NamedCallback.NamedCallback(java.lang.String)
protected Function(java.lang.String name,
int argc,
int enc)
name - the function nameargc - the number of arguments that the SQL function or aggregate takes.enc - the specifies what text encoding this function prefers for its parameters.NamedCallback.NamedCallback(java.lang.String, int)| Method Detail |
|---|
public final void register(SWIGTYPE_p_sqlite3 db)
throws java.sql.SQLException
register in class Callbackdb - the database handle.
java.sql.SQLException - When the return value of the sqlite3_create_function() function is not SQLITE_OK.Database.createFunction(Function)
public final void unregister(SWIGTYPE_p_sqlite3 db)
throws java.sql.SQLException
unregister in class Callbackdb - the database handle.
java.sql.SQLException - When the return value of the sqlite3_create_function() function is not SQLITE_OK.Database.dropFunction(Function)public int getArgumentCount()
protected final void xFunc(long context,
int argc,
long value)
context - the sqlite3_context* valueargc - the number of argumentsvalue - the sqlite3_value** valuexFunc(org.sqlite.udf.Context)
protected abstract void xFunc(Context ctx)
throws java.sql.SQLException
ctx - sqlite3_context wrapper object
java.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||