docs: void close(boolean script) {
  
          closeLog();
          deleteNewAndOldFiles();
          writeScript(script);
          closeAllTextCaches(script);
  
          if (cache != null) {
              cache.close(true);
          }
  
          properties.setProperty(HsqlDatabaseProperties.db_version,
                                 HsqlDatabaseProperties.THIS_VERSION);
          properties.setProperty(
              HsqlDatabaseProperties.hsqldb_compatible_version,
              HsqlDatabaseProperties.FIRST_COMPATIBLE_VERSION);
  
          // set this one last to save the props
          properties.setDBModified(HsqlDatabaseProperties.FILES_NEW);
          deleteLog();
  
          if (script) {
              deleteBackup();
              deleteData();
          } else {
              try {
                  backupData();
                  renameNewBackup();
              } catch (IOException e) {}
          }
  
          renameNewScript();
          properties.setProperty(HsqlDatabaseProperties.hsqldb_cache_version,
                                 HsqlDatabaseProperties.THIS_CACHE_VERSION);
          properties.setDBModified(HsqlDatabaseProperties.FILES_NOT_MODIFIED);
      }