在android的SQLiteDatabase里有个接口函数CustomFunction,如何使用这个接口函数? public final class SQLiteDatabase extends SQLiteClosable { //...其它代码 /** * A callback interface for a custom sqlite3 function. * This can be used to create a function that can be called from * sqlite3 database triggers. * @hide */ public interface CustomFunction { public void callback(String[] args); } }
就像楼上说的那样,先用函数求值,再把值组合到SQL语句中去就好。
也就是说,InNum函数实现的功能需要字段内容做参数...
public final class SQLiteDatabase extends SQLiteClosable {
//...其它代码
/**
* A callback interface for a custom sqlite3 function.
* This can be used to create a function that can be called from
* sqlite3 database triggers.
* @hide
*/
public interface CustomFunction {
public void callback(String[] args);
}
}