onInvoke method

  1. @override
void onInvoke(
  1. Map params
)
override

This is called when this node is invoked. You can return the following types from this method:

You can also return a future that resolves to one (like if the method is async) of the following types:

Implementation

@override
void onInvoke(Map params) async {
  String name = params['Name'];
  var realName = NodeNamer.createName(name);

  _link.addNode('/$realName', <String, dynamic>{
    r'$is': 'database',
    r'$name': name,
    r'$$db_config': params,
  });
  _link.save();
}