Uses 1059K of libraries. Click here for Pure Java version (10872L/58K).
1 | !7 |
2 | |
3 | concept Bla { |
4 | S name; |
5 | } |
6 | |
7 | cmodule2 QuickReloadTest > DynPrintLog { |
8 | transient virtual Concepts oldConcepts; |
9 | |
10 | start { |
11 | print(+oldConcepts); |
12 | print(+Bla); |
13 | db(); |
14 | printVars_str(concepts := db_mainConcepts().concepts); |
15 | pnlStruct(list(Bla)); |
16 | db_checkConceptIDs(); |
17 | print(conceptsWhere(Bla, name := "yo")); |
18 | uniq(Bla, name := "yo"); |
19 | } |
20 | |
21 | Concepts _getReloadData() { ret db_mainConcepts(); } |
22 | void _setReloadData_early(virtual Concepts data) { |
23 | if (data == null) ret; |
24 | |
25 | oldConcepts = data; |
26 | Concepts concepts = db_mainConcepts(); |
27 | concepts.miscMapPut("dbGrabber", func -> Bool { |
28 | concepts.miscMapRemove("dbGrabber"); |
29 | pcall { |
30 | concepts.idCounter = getLong idCounter(oldConcepts); |
31 | printVars_str(idCounter := concepts.idCounter); |
32 | Map<Long, virtual Concept> oldMap = cast _get concepts(oldConcepts); |
33 | printVars_str(+oldMap); |
34 | concepts.concepts.putAll((Map<Long, Concept>) quickImport_unlisted(oldMap)); |
35 | |
36 | // Note: this calls _doneLoading2() on all concepts |
37 | concepts.assignConceptsToUs(); |
38 | true; |
39 | } |
40 | false; |
41 | }); |
42 | } |
43 | } |
Began life as a copy of #1030837
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1030841 |
Snippet name: | DB quickImport reload test, cmodule2 version [OK] |
Eternal ID of this version: | #1030841/3 |
Text MD5: | 79283c9bfd02a62b369edc5d2052a0bb |
Transpilation MD5: | 1832aaf5f2dca9f7c4a9b1a46d454b88 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-04-02 14:57:35 |
Source code size: | 1196 bytes / 43 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 173 / 258 |
Version history: | 2 change(s) |
Referenced in: | [show references] |