Skip to content

Commit

Permalink
updated doc
Browse files Browse the repository at this point in the history
  • Loading branch information
adranwit committed May 30, 2023
1 parent d9036d5 commit 979eb0f
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,18 @@ check **deploy.yaml** [endly](https://github.com/viant/endly) deployment workflo
#### Executing rule with go debuger

Datly is purely written and go, and thus it's possible to take any rule and load it and run it as if it was
defined in the managed mode, for hava breakpoint on any rule to go call methods.
defined in the managed mode, you can set breakpoint to any method call from template.
In addition, you can implement one of the following to be invoked on actual insert or update.

```go
type Insertable interface {
OnInsert(ctx context.Context) error
}

type Updatable interface {
OnUpdate(ctx context.Context) error
}
```

##### Debugging executor rule

Expand Down Expand Up @@ -950,6 +961,12 @@ func Example_ExecutionRuleDebuging() {

##### Debugging reader rule

You can define of one to following for setting debugger breakpoint:

- **OnFetch(ctx context.Context) error**: invoked by reader one record is fetched from database
- **OnRelation(ctx context.Context)**: invoked by reader once all relations are assembled


```go

//Example_ReadRuleExecution show how to programmatically execute read rule
Expand Down

0 comments on commit 979eb0f

Please sign in to comment.