/** * Helper for error callbacks that just returns the Status.ERROR by default * * @param message The message to add to the error result. */ public void error(String message) { errorCallback.invoke(message); } }
public SQLitePlugin(ReactApplicationContext reactContext) { super(reactContext); this.context = reactContext.getApplicationContext(); this.threadPool = Executors.newCachedThreadPool(); }
@ReactMethod public void executeSqlBatch(ReadableMap args, Callback success, Callback error) { String actionAsString = "executeSqlBatch"; try { this.execute(actionAsString, args, new CallbackContext(success, error)); } catch (Exception ex){ error.invoke("Unexpected error"); } }
@ReactMethod public void echoStringValue(ReadableMap args, Callback success, Callback error) { String actionAsString = "echoStringValue"; try { this.execute(actionAsString, args, new CallbackContext(success, error)); } catch (Exception ex){ error.invoke("Unexpected error"); } }
/** * Helper for error callbacks that just returns the Status.ERROR by default * * @param message The message to add to the error result. */ public void error(WritableMap message) { errorCallback.invoke(message); }
@ReactMethod public void executeSqlBatch(ReadableMap args, Callback success, Callback error) { String actionAsString = "executeSqlBatch"; try { this.execute(actionAsString, args, new CallbackContext(success, error)); } catch (Exception ex){ error.invoke("Unexpected error"); } }
/** * Helper for error callbacks that just returns the Status.ERROR by default * * @param message The message to add to the error result. */ public void error(String message) { errorCallback.invoke(message); } }
@ReactMethod public void echoStringValue(ReadableMap args, Callback success, Callback error) { String actionAsString = "echoStringValue"; try { this.execute(actionAsString, args, new CallbackContext(success, error)); } catch (Exception ex){ error.invoke("Unexpected error"); } }
/** * Helper for success callbacks that just returns the Status.OK by default * * @param message The message to add to the success result. */ public void success(WritableMap message) { successCallback.invoke(message); }
@ReactMethod public void delete(ReadableMap args, Callback success, Callback error) { String actionAsString = "delete"; try { this.execute(actionAsString, args, new CallbackContext(success, error)); } catch (Exception ex){ error.invoke("Unexpected error"+ex.getMessage()); } }
/** * Helper for success callbacks that just returns the Status.OK by default */ public void success() { successCallback.invoke("Success"); }
@ReactMethod public void attach(ReadableMap args, Callback success, Callback error) { String actionAsString = "attach"; try { this.execute(actionAsString, args, new CallbackContext(success, error)); } catch (Exception ex){ error.invoke("Unexpected error"+ex.getMessage()); } }
/** * Helper for success callbacks that just returns the Status.OK by default * * @param message The message to add to the success result. */ public void success(WritableArray message) { successCallback.invoke(message); }
@ReactMethod public void attach(ReadableMap args, Callback success, Callback error) { String actionAsString = "attach"; try { this.execute(actionAsString, args, new CallbackContext(success, error)); } catch (Exception ex){ error.invoke("Unexpected error"+ex.getMessage()); } }
/** * Helper for success callbacks that just returns the Status.OK by default */ public void success() { successCallback.invoke("Success"); }
/** * Helper for success callbacks that just returns the Status.OK by default * * @param message The message to add to the success result. */ public void success(String message) { successCallback.invoke(message); }
/** * Helper for success callbacks that just returns the Status.OK by default * * @param message The message to add to the success result. */ public void success(String message) { successCallback.invoke(message); }
/** * Helper for success callbacks that just returns the Status.OK by default * * @param message The message to add to the success result. */ public void success(WritableArray message) { successCallback.invoke(message); }
/** * Helper for error callbacks that just returns the Status.ERROR by default * * @param message The message to add to the error result. */ public void error(WritableMap message) { errorCallback.invoke(message); }
/** * Helper for success callbacks that just returns the Status.OK by default * * @param message The message to add to the success result. */ public void success(WritableMap message) { successCallback.invoke(message); }