Uses 911K of libraries. Click here for Pure Java version (9373L/49K).
1 | !7 |
2 | |
3 | concept RUM { |
4 | S context; |
5 | S ruleID; |
6 | SS varMap; |
7 | } |
8 | |
9 | cmodule RecentlyUsedMappings > DynCRUD<RUM> { |
10 | start { |
11 | dbIndexing(RUM, 'context); |
12 | } |
13 | |
14 | // API |
15 | |
16 | L<SS> getRecentlyUsedMappings(S context, S ruleID) { |
17 | ret collect varMap(conceptsWhere RUM(+context, +ruleID)); |
18 | } |
19 | |
20 | void storeRecentlyUsedMapping(S context, S ruleID, SS varMap) { |
21 | uniq_sync RUM(+context, +ruleID, varMap := asCIMap(varMap)); |
22 | } |
23 | |
24 | bool hasRecentlyUsedMapping(S context, S ruleID, SS varMap) { |
25 | ret findConceptWhere RUM(+context, +ruleID, varMap := asCIMap(varMap)) != null; |
26 | } |
27 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1022322 |
Snippet name: | Gazelle: Recently used mappings |
Eternal ID of this version: | #1022322/8 |
Text MD5: | a6cf813c5ce761f9316a6999fd893f8e |
Transpilation MD5: | 4742a026dce4859994bff4cf707f4391 |
Author: | stefan |
Category: | javax / gazelle |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-03-14 10:44:24 |
Source code size: | 606 bytes / 27 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 285 / 3242 |
Version history: | 7 change(s) |
Referenced in: | [show references] |