Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

27
LINES

< > BotCompany Repo | #1022322 // Gazelle: Recently used mappings

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 911K of libraries. Click here for Pure Java version (9373L/49K).

!7

concept RUM {
  S context;
  S ruleID;
  SS varMap;
}

cmodule RecentlyUsedMappings > DynCRUD<RUM> {
  start {
    dbIndexing(RUM, 'context);
  }
  
  // API
  
  L<SS> getRecentlyUsedMappings(S context, S ruleID) {
    ret collect varMap(conceptsWhere RUM(+context, +ruleID));
  }
  
  void storeRecentlyUsedMapping(S context, S ruleID, SS varMap) {
    uniq_sync RUM(+context, +ruleID, varMap := asCIMap(varMap));
  }
  
  bool hasRecentlyUsedMapping(S context, S ruleID, SS varMap) {
    ret findConceptWhere RUM(+context, +ruleID, varMap := asCIMap(varMap)) != null;
  }
}

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: 284 / 3241
Version history: 7 change(s)
Referenced in: #1022324 - gazelle_rumCRUD