Skip to content

Commit

Permalink
Explain prepare as part of load and run, and update gitignore (#115)
Browse files Browse the repository at this point in the history
* Explain prepare as part of load and run and update gitignore

Explains that the prepare function is called during the load and run phase.
Adds generated logs and result json files to gitignore.
  • Loading branch information
k-rus authored Jan 15, 2025
1 parent e9365be commit 5e90d3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/target
*.iml
latte-*
.idea
.vscode
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,10 @@ pub async fn schema(ctx) {
### Prepared statements

Calling `ctx.execute` is not optimal, because it doesn't use prepared statements. You can prepare statements and
register them on the context object in the `prepare`
function:
register them on the context object in the `prepare` function.
They will be executed during [the load step](#populating-the-database) before the actual database population
and the run step before executing the run function.
An example of implementing and using prepare:
```rust
const INSERT = "my_insert";
Expand Down

0 comments on commit 5e90d3b

Please sign in to comment.