From b0ad589a38bcb2d354f7573421d9e9acc57ab1e7 Mon Sep 17 00:00:00 2001 From: Evan Grim Date: Wed, 25 Aug 2021 16:30:24 -0600 Subject: [PATCH 1/7] Update databases.md Minor edit --- docs/databases.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/databases.md b/docs/databases.md index cb085c67d2..21839781db 100644 --- a/docs/databases.md +++ b/docs/databases.md @@ -85,7 +85,7 @@ Some examples of databases that work like this could be **PostgreSQL**, **MySQL* ### Distributed servers -In some cases, the database could even be a group server applications running on different machines, working together and communicating between them to be more efficient and handle more data. +In some cases, the database could even be a group of server applications running on different machines, working together and communicating between them to be more efficient and handle more data. In this case, your code would talk to one or more of these server applications running on different machines. From 111949747e71069fdb7fa5592c01f295c607bc99 Mon Sep 17 00:00:00 2001 From: Evan Grim Date: Thu, 26 Aug 2021 12:56:47 -0600 Subject: [PATCH 2/7] Update select.md --- docs/tutorial/select.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tutorial/select.md b/docs/tutorial/select.md index 5f917f69ad..b5a092224f 100644 --- a/docs/tutorial/select.md +++ b/docs/tutorial/select.md @@ -97,9 +97,9 @@ FROM hero That would end up in the same result. Although we won't use that for **SQLModel**. -### `SELECT` Less Columns +### `SELECT` Fewer Columns -We can also `SELECT` less columns, for example: +We can also `SELECT` fewer columns, for example: ```SQL SELECT id, name @@ -150,7 +150,7 @@ Another variation is that most of the SQL keywords like `SELECT` can also be wri This is the interesting part. The tables returned by SQL databases **don't have to exist** in the database as independent tables. 🧙 -For example, in our database, we only have one table that has all the columns, `id`, `name`, `secret_name`, `age`. And here we are getting a result table with less columns. +For example, in our database, we only have one table that has all the columns, `id`, `name`, `secret_name`, `age`. And here we are getting a result table with fewer columns. One of the main points of SQL is to be able to keep the data structured in different tables, without repeating data, etc, and then query the database in many ways and get many different tables as a result. From 58585575d3c33da58628b927559ff30dd9503896 Mon Sep 17 00:00:00 2001 From: Evan Grim Date: Thu, 26 Aug 2021 15:30:42 -0600 Subject: [PATCH 3/7] Update where.md --- docs/tutorial/where.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/where.md b/docs/tutorial/where.md index e52173128b..249ccd530c 100644 --- a/docs/tutorial/where.md +++ b/docs/tutorial/where.md @@ -271,7 +271,7 @@ In the example above we are using two equal signs (`==`). That's called the "**e !!! tip An **operator** is just a symbol that is put beside one value or in the middle of two values to do something with them. - `==` is called **equality** operator because it checks if two things are **equal**. + `==` is called the **equality** operator because it checks if two things are **equal**. When writing Python, if you write something using this equality operator (`==`) like: From 4f2ec2f98710841b7a1840f51723110575c83bb9 Mon Sep 17 00:00:00 2001 From: Evan Grim Date: Thu, 26 Aug 2021 15:31:19 -0600 Subject: [PATCH 4/7] Update limit-and-offset.md --- docs/tutorial/limit-and-offset.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/tutorial/limit-and-offset.md b/docs/tutorial/limit-and-offset.md index 0a964cc508..3fb001cf97 100644 --- a/docs/tutorial/limit-and-offset.md +++ b/docs/tutorial/limit-and-offset.md @@ -81,7 +81,7 @@ In this case, instead of getting all the 7 rows, we are limiting them to only ge table with first 3 rows selected -## Run the Program on the Comamnd Line +## Run the Program on the Command Line If we run it on the command line, it will output: @@ -153,7 +153,7 @@ Each of those methods applies the change in the internal special select statemen **Offset** means "skip this many rows", and as we want to skip the ones we already saw, the first three, we use `.offset(3)`. -## Run the Program with Offset on the Comamnd Line +## Run the Program with Offset on the Command Line Now we can run the program on the command line, and it will output: @@ -207,9 +207,9 @@ The database right now has **only 7 rows**, so this query can only get 1 row. But don't worry, the database won't throw an error trying to get 3 rows when there's only one (as would happen with a Python list). -The database knows that we want to **limit** the number of results, but it doesn't necessarily has to find those many results. +The database knows that we want to **limit** the number of results, but it doesn't necessarily have to find that many results. -## Run the Program with the Last Batch on the Comamnd Line +## Run the Program with the Last Batch on the Command Line And if we run it in the command line, it will output: @@ -271,7 +271,7 @@ Of course, you can also combine `.limit()` and `.offset()` with `.where()` and o -## Run the Program with Limit and Where on the Comamnd Line +## Run the Program with Limit and Where on the Command Line If we run it on the command line, it will find all the heroes in the database with an age above 32. That would normally be 4 heroes. From 9a57462626d12ec2a93d02ca6391212abe2627e7 Mon Sep 17 00:00:00 2001 From: Evan Grim Date: Fri, 27 Aug 2021 10:17:35 -0600 Subject: [PATCH 5/7] Update update.md --- docs/tutorial/update.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tutorial/update.md b/docs/tutorial/update.md index 3348615762..420616d78a 100644 --- a/docs/tutorial/update.md +++ b/docs/tutorial/update.md @@ -39,7 +39,7 @@ In a similar way to `SELECT` statements, the first part defines the columns to w And the second part, with the `WHERE`, defines to which rows it should apply that update. -In this case, as we only have one hero with the name `"Spider-Boy"`, it will only apply the udpate in that row. +In this case, as we only have one hero with the name `"Spider-Boy"`, it will only apply the update in that row. !!! info Notice that in the `UPDATE` the single equals sign (`=`) means **assignment**, setting a column to some value. @@ -70,7 +70,7 @@ After that update, the data in the table will look like this, with the new age f !!! tip - It will probably be more common to find the row to update by Id, for example: + It will probably be more common to find the row to update by `id`, for example: ```SQL UPDATE hero @@ -340,7 +340,7 @@ Now let's review all that code: The update process with **SQLModel** is more or less the same as with creating new objects, you add them to the session, and then commit them. -This also means that you can update several fields (atributes, columns) at once, and you can also update several objects (heroes) at once: +This also means that you can update several fields (attributes, columns) at once, and you can also update several objects (heroes) at once: ```{ .python .annotate hl_lines="15-17 19-21 23" } # Code above omitted 👆 From 1a12999258f71644ca9a155258f8f18dd1c01b6d Mon Sep 17 00:00:00 2001 From: Evan Grim Date: Fri, 27 Aug 2021 10:17:51 -0600 Subject: [PATCH 6/7] Update create-connected-tables.md --- docs/tutorial/connect/create-connected-tables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/connect/create-connected-tables.md b/docs/tutorial/connect/create-connected-tables.md index 3485ccf087..78da040f15 100644 --- a/docs/tutorial/connect/create-connected-tables.md +++ b/docs/tutorial/connect/create-connected-tables.md @@ -107,7 +107,7 @@ Most of that should look familiar: The column will be named `team_id`. It will be an integer, and it could be `NULL` in the database (or `None` in Python), becase there could be some heroes that don't belong to any team. -As we don't have to explicitly pass `team_id=None` when creating a hero, we add a default of `None` to the `Field()`. +We add a default of `None` to the `Field()` so we don't have to explicitly pass `team_id=None` when creating a hero. Now, here's the new part: From f43d357eded86e79fb938adaf5453b5985c1ce2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 14 Dec 2021 18:15:16 +0100 Subject: [PATCH 7/7] =?UTF-8?q?=F0=9F=8E=A8=20Remove=20trailing=20whitespa?= =?UTF-8?q?ce?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/tutorial/connect/create-connected-tables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/connect/create-connected-tables.md b/docs/tutorial/connect/create-connected-tables.md index 78da040f15..90301ee41f 100644 --- a/docs/tutorial/connect/create-connected-tables.md +++ b/docs/tutorial/connect/create-connected-tables.md @@ -107,7 +107,7 @@ Most of that should look familiar: The column will be named `team_id`. It will be an integer, and it could be `NULL` in the database (or `None` in Python), becase there could be some heroes that don't belong to any team. -We add a default of `None` to the `Field()` so we don't have to explicitly pass `team_id=None` when creating a hero. +We add a default of `None` to the `Field()` so we don't have to explicitly pass `team_id=None` when creating a hero. Now, here's the new part: