code: private boolean checkPermissions(String sentence) {
  
          sentence = sentence.toUpperCase();
  
          // protected user from the case where they accidentally left off the condition in DELETE statements
          // (you can still use dummy conditions like 'WHERE 1=1' if you really want to delete everything)
          if (sentence.contains("DELETE FROM") && !sentence.contains("WHERE")) {
              return false;
          }
          return true;
      }
docs: Checks the permission to be executed for a single sql sentence.<p>
  @param sentence the sentence to check for permission
  
  @return <code>true</code> if the sentence is allowed to be executed