private bool RunStatements(string sqlStatements)
        {
            var db = _dbStorage;

            return(db.RunInTransaction(() =>
            {
                if (_dbStorage.RunStatements(QueryString(sqlStatements)))
                {
                    return new Status(StatusCode.Ok);
                }

                return new Status(StatusCode.DbError);
            }).IsSuccessful);
        }
        private void RunStatements(string sqlStatements)
        {
            var db = _dbStorage;

            db.RunInTransaction(() =>
            {
                try {
                    _dbStorage.RunStatements(QueryString(sqlStatements));
                } catch (Exception) {
                    return(new Status(StatusCode.DbError));
                }

                return(new Status(StatusCode.Ok));
            });
        }
        private void RunStatements(string sqlStatements)
        {
            var db = _dbStorage;

            db.RunInTransaction(() =>
            {
                try {
                    _dbStorage.RunStatements(QueryString(sqlStatements));
                } catch (CouchbaseLiteException) {
                    Log.To.Database.E(Tag, "Failed to run statments ({0}), rethrowing...",
                                      new SecureLogString(sqlStatements, LogMessageSensitivity.PotentiallyInsecure));
                    throw;
                } catch (Exception e) {
                    throw Misc.CreateExceptionAndLog(Log.To.View, e, Tag,
                                                     "Exception running sql statements ({0}), ",
                                                     new SecureLogString(sqlStatements, LogMessageSensitivity.PotentiallyInsecure));
                }

                return(true);
            });
        }
        private void RunStatements(string sqlStatements)
        {
            var db = _dbStorage;

            db.RunInTransaction(() =>
            {
                try {
                    _dbStorage.RunStatements(QueryString(sqlStatements));
                } catch (CouchbaseLiteException) {
                    Log.W(TAG, "Failed to run statments ({0})", sqlStatements);
                    throw;
                } catch (Exception e) {
                    throw new CouchbaseLiteException(String.Format("Error running statements ({0})", sqlStatements),
                                                     e)
                    {
                        Code = StatusCode.Exception
                    };
                }

                return(true);
            });
        }