Skip to content

Commit

Permalink
Add SQL basics
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Oct 20, 2023
1 parent 51e2f32 commit c4f8a60
Show file tree
Hide file tree
Showing 5 changed files with 8,260 additions and 6 deletions.
1 change: 1 addition & 0 deletions _toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ parts:
maxdepth: 2
chapters:
- file: book/duckdb/01_duckdb_intro
- file: book/duckdb/02_sql_basics

- caption: PostGIS
numbered: true
Expand Down
6 changes: 3 additions & 3 deletions book/duckdb/01_duckdb_intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@
"\n",
"## Setting up VS Code\n",
"\n",
"To make it easier to run DuckDB commands and SQL queries, it is recommended that yout create a keyboard shortcut to run selected text in VS Code. To do this, open VS Code and press `Ctrl+Shift+P` to open the Command Palette. Then, search for \"Preferences: Open Keyboard Shortcuts (JSON)\" and press `Enter`. This will open the `keybindings.json` file. Add the following keyboard binding within the square brackets:\n",
"To make it easier to run DuckDB commands and SQL queries, it is recommended that you create a keyboard shortcut to run selected text in VS Code. To do this, open VS Code and press `Ctrl+Shift+P` to open the Command Palette. Then, search for \"Preferences: Open Keyboard Shortcuts (JSON)\" and press `Enter`. This will open the `keybindings.json` file. Add the following keyboard binding within the square brackets:\n",
"\n",
"```json\n",
" {\n",
" \"key\": \"shift+enter\",\n",
" \"key\": \"ctrl+enter\",\n",
" \"command\": \"workbench.action.terminal.runSelectedText\",\n",
" }\n",
"```\n",
Expand All @@ -98,7 +98,7 @@
"SELECT * FROM duckdb_extensions();\n",
"```\n",
"\n",
"Select the text and press `Shift+Enter`. If the keyboard shortcut is working, you should see the following output in the terminal:\n",
"Select the text and press `Ctrl+Enter`. If the keyboard shortcut is working, you should see the following output in the terminal:\n",
"\n",
"![](https://i.imgur.com/5mGW8hj.png)\n",
"\n",
Expand Down
6 changes: 3 additions & 3 deletions book/duckdb/01_duckdb_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ If the installation was successful, you should see the version number of the Duc

## Setting up VS Code

To make it easier to run DuckDB commands and SQL queries, it is recommended that yout create a keyboard shortcut to run selected text in VS Code. To do this, open VS Code and press `Ctrl+Shift+P` to open the Command Palette. Then, search for "Preferences: Open Keyboard Shortcuts (JSON)" and press `Enter`. This will open the `keybindings.json` file. Add the following keyboard binding within the square brackets:
To make it easier to run DuckDB commands and SQL queries, it is recommended that you create a keyboard shortcut to run selected text in VS Code. To do this, open VS Code and press `Ctrl+Shift+P` to open the Command Palette. Then, search for "Preferences: Open Keyboard Shortcuts (JSON)" and press `Enter`. This will open the `keybindings.json` file. Add the following keyboard binding within the square brackets:

```json
{
"key": "shift+enter",
"key": "ctrl+enter",
"command": "workbench.action.terminal.runSelectedText",
}
```
Expand All @@ -101,7 +101,7 @@ To test if the keyboard shortcut is working, create a new file with the `.sql` e
SELECT * FROM duckdb_extensions();
```

Select the text and press `Shift+Enter`. If the keyboard shortcut is working, you should see the following output in the terminal:
Select the text and press `Ctrl+Enter`. If the keyboard shortcut is working, you should see the following output in the terminal:

![](https://i.imgur.com/5mGW8hj.png)

Expand Down
Loading

0 comments on commit c4f8a60

Please sign in to comment.