public void addCustomFunction ( String name , int numArgs , CustomFunction function ) { // Create wrapper (also validates arguments). SQLiteCustomFunction wrapper = new SQLiteCustomFunction ( name , numArgs , function ) ; synchronized ( mLock ) { throwIfNotOpenLocked ( ) ; mConfigurationLocked . customFunctions . add ( wrapper ) ; try { mConnectionPoolLocked . reconfigure ( mConfigurationLocked ) ; } catch ( RuntimeException ex ) { mConfigurationLocked . customFunctions . remove ( wrapper ) ; throw ex ; } } }
Registers a CustomFunction callback as a function that can be called from SQLite database triggers .