Skip to content
This repository was archived by the owner on Jul 11, 2021. It is now read-only.

Commit 9992fb9

Browse files
committed
minor doc fix and add suggestion to open issues
1 parent 4727905 commit 9992fb9

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

doc/docs/blog/golang/using-redisql-with-golang.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ if err != nil {
2828

2929
## Setting up the database
3030

31-
In order to work with RediSQL is necessary to do a small setup. The first step is always to create a database, then we create the tables inside the databases and finally the different statements if they are necessary.
31+
In order to work with RediSQL is necessary to do a small setup.
32+
The first step is always to create a database, then we create the tables inside the databases and finally the different statements if they are necessary.
3233

33-
It is always a good idea to use statements instead of building query by hand. but it is not mandatory. The use of statements eliminate the risk of SQL injection and it is more performant, since the query is parsed only once and not every time it get executed.
34+
It is always a good idea to use statements instead of building query by hand, but it is not mandatory.
35+
The use of statements eliminate the risk of SQL injection and it is more performant, since the query is parsed only once and not every time it get executed.
3436

35-
In our case we create a simple database, `HN`.
37+
In our case we create a simple database that we will call `HN`.
3638

3739
```golang
3840
r.Do(radix.Cmd(nil, "REDISQL.CREATE_DB", "HN"))
@@ -58,7 +60,9 @@ stmt := `INSERT INTO hn VALUES(
5860
r.Do(radix.Cmd(nil, "REDISQL.CREATE_STATEMENT", "HN", "insert_item", stmt))
5961
```
6062

61-
The statement is a little complex. It exploit the [JSON1][json1] sqlite extension to extract the necessary fields from a JSON string. In particular we extract the `id`, the `by` (author) and the `time` fields.
63+
The statement is a little complex.
64+
It exploit the [JSON1][json1] sqlite extension to extract the necessary fields from a JSON string.
65+
In particular we extract the `id`, the `by` (author) and the `time` fields.
6266

6367
After that those fields are extracted from the JSON string we store all of them into the database along with the whole item.
6468

@@ -83,7 +87,7 @@ go func() {
8387
}()
8488
```
8589

86-
The `getMaxItem()` function is implemented as:
90+
The API provide an endpoint that show the biggest element in HN at the moment, it is a simple auto-incremental id that we can fetch using the `getMaxItem()` function implemented as:
8791

8892
```golang
8993
func getMaxItem() int {
@@ -150,7 +154,7 @@ Feel free to explore our [references documentation][ref] to understand better wh
150154

151155
The complete code of this example is [available here.](https://github.com/RedBeardLab/rediSQL/blob/master/doc/docs/blog/golang/main.go)
152156

153-
157+
If you wish to see a similar tutorial for a different language, [open an issue on github.](https://github.com/RedBeardLab/rediSQL/issues/new)
154158

155159
[hn-api]: https://github.com/HackerNews/API
156160
[json1]: https://www.sqlite.org/json1.html

doc/docs/blog/python/using-redisql-with-python.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ Then we obtain the data from the Hacker News API and we show how to insert the d
181181

182182
Hopefully this tutorial will be helpful and sufficient to get started, but if you have any question feel free to get in touch or to open an issue.
183183

184+
If you wish to see a similar tutorial for a different language, [open an issue on github.](https://github.com/RedBeardLab/rediSQL/issues/new)
185+
184186
[asyncio]: https://docs.python.org/3/library/asyncio.html
185187
[aiohttp]: https://github.com/aio-libs/aiohttp/
186188
[aioredis]: https://github.com/aio-libs/aioredis

0 commit comments

Comments
 (0)