stream-ops-story Pub Share

send::  msg diesel.stream.new2  (stream="s2")

val s2=dieselStream send::  msg ctx.echo  (x)

// $val s2a = [1,2,3] >> s2 // $val s3 = s2a map x => x + 1

0 $mock:: diesel.stream.onData (stream is "s2", data)
   step => diesel.stream.debug (stream="s2")

Old school inventory calls

send::  msg diesel.inv.register  (inventory="diesel.db.memshared", classNames="Employee")

val emp:Array=[{name:"Ileana",email:"ileana@razie.com"},{name:"Razie",email:"razie@razie.com"}]

0 $mock:: setup.sample.domain
   . (y=(emp map x=>diesel.inv.upsert(entity=x)()))

send::  msg setup.sample.domain 

send::  msg diesel.inv.listAll  (className="Employee")

// $val ze = xp:Employee // $val ze = xpl:Employee // // $val ze = (xp:Employee) map x => x.name // $val s2b = ze >> s2 // $val y = (e.query asmsg) >> s2 // $val yy = s2 map x => x.name map x => "-${x}"


send::  msg diesel.stream.consume  (stream="s2")

send::  msg diesel.stream.debug  (stream="s2")


Was this useful?    

By: Razie | 2023-05-24 .. 2023-09-18 | Tags: story , dsl


Viewed 383 times ( | History | Print ) this page.

You need to log in to post a comment!

© Copyright DieselApps, 2012-2024, all rights reserved.