docs: boolean checkHasMainRef(Session session, Object[] row) {
  
          if (ArrayUtil.hasNull(row, core.refCols)) {
              return false;
          }
  
          PersistentStore store =
              session.sessionData.getRowStore(core.mainTable);
          boolean exists = core.mainIndex.exists(session, store, row,
                                                 core.refCols);
  
          if (!exists) {
              String[] info = new String[] {
                  core.refName.name, core.mainTable.getName().name
              };
  
              throw Error.error(ErrorCode.X_23502, ErrorCode.CONSTRAINT, info);
          }
  
          return exists;
      }