docs: void checkAccessRights(Session session) {
  
          if (targetTable != null && !targetTable.isTemp()) {
              targetTable.checkDataReadOnly();
              session.checkReadWrite();
          }
  
          if (session.isAdmin()) {
              return;
          }
  
          for (int i = 0; i < sequences.length; i++) {
              session.getGrantee().checkAccess(sequences[i]);
          }
  
          for (int i = 0; i < routines.length; i++) {
              if (routines[i].isLibraryRoutine()) {
                  continue;
              }
  
              session.getGrantee().checkAccess(routines[i]);
          }
  
          for (int i = 0; i < rangeVariables.length; i++) {
              RangeVariable range = rangeVariables[i];
  
              if (range.rangeTable.getSchemaName()
                      == SqlInvariants.SYSTEM_SCHEMA_HSQLNAME) {
                  continue;
              }
  
              session.getGrantee().checkSelect(range.rangeTable,
                                               range.usedColumns);
          }
  
          switch (type) {
  
              case StatementTypes.CALL : {
                  break;
              }
              case StatementTypes.INSERT : {
                  session.getGrantee().checkInsert(targetTable,
                                                   insertCheckColumns);
  
                  break;
              }
              case StatementTypes.SELECT_CURSOR :
                  break;
  
              case StatementTypes.DELETE_WHERE : {
                  session.getGrantee().checkDelete(targetTable);
  
                  break;
              }
              case StatementTypes.UPDATE_WHERE : {
                  session.getGrantee().checkUpdate(targetTable,
                                                   updateCheckColumns);
  
                  break;
              }
              case StatementTypes.MERGE : {
                  session.getGrantee().checkInsert(targetTable,
                                                   insertCheckColumns);
                  session.getGrantee().checkUpdate(targetTable,
                                                   updateCheckColumns);
  
                  break;
              }
          }
      }