Created
          October 13, 2013 23:25 
        
      - 
      
- 
        Save searler/6968493 to your computer and use it in GitHub Desktop. 
    comment transaction to record side effect
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // create attribute to record comment | |
| val comment = Attribute(new Namespace("meta") / "comment", SchemaType.string, Cardinality.one) | |
| Datomic.transact(comment) | |
| // data from txReportQueue | |
| val txr:datomisca.TxReport = ... | |
| // assert "sent email" on all the transactions | |
| Datomic.transact(txr.txData.map{case DDatom(_,_,_,tx,_) => tx}.distinct. | |
| map{id => SchemaEntity.add(FinalId(id))(Props() + (comment-> "sent email"))}) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment