// assumes main concepts are empty before // only works when you call db() afterwards svoid quickImportMainConcepts(virtual Concepts oldConcepts, IF0 enabled default null) { if (!shortNameIs(oldConcepts, "Concepts")) ret; Concepts concepts = db_mainConcepts(); concepts.miscMapPut("dbGrabber", func -> Bool { concepts.miscMapRemove("dbGrabber"); pcall { if (isFalse(callF(enabled))) false; concepts.idCounter = getLong idCounter(oldConcepts); printVars_str(idCounter := concepts.idCounter); Map oldMap = cast _get concepts(oldConcepts); printVars_str(+oldMap); concepts.concepts.putAll((Map) quickImport_unlisted(oldMap)); // Note: this calls _doneLoading2() on all concepts concepts.assignConceptsToUs(); print(nConcepts(countConcepts()) + " quick-imported"); true; } false; }); }