Skip to content

Commit f11f32a

Browse files
committed
readme
1 parent 3962287 commit f11f32a

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

RESCRIPT.md

+2-19
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ Optionally, you can write SQL directly in your ReScript code and have a seamless
9090

9191
```rescript
9292
let query = %sql.one(`
93-
SELECT * FROM books WHERE id = :id!;
93+
SELECT * FROM books WHERE id = :id!
9494
`)
9595
9696
let res = await client->query({id: 1})
9797
Console.log(res)
9898
```
9999

100-
Notice that with the `%sql` tags, **there's no requirment to name your queries**. You can still name them if you want, but you don't have to.
100+
Notice that with the `%sql` tags, **there's no requirement to name your queries**. You can still name them if you want, but you don't have to.
101101

102102
In order for this mode to work, you need one more thing - configure the `rescript-embed-lang` PPX in `rescript.json`:
103103

@@ -119,20 +119,3 @@ The package comes with minimal bindings to be able to set up a `pg` client. Plea
119119
120120
await client->end
121121
```
122-
123-
## Future
124-
125-
Here are a few loose thoughts around what we could do to improve things even more.
126-
127-
### SQL-in-ReScript version
128-
129-
Co-locate SQL directly in ReScript files. This could look something like:
130-
131-
```rescript
132-
let findBookById = %sql.one(`
133-
/* @name findBookById */
134-
SELECT * FROM books WHERE id = :id!;
135-
`)
136-
137-
let res = await client->findBookById({id: 1})
138-
```

0 commit comments

Comments
 (0)