-
Notifications
You must be signed in to change notification settings - Fork 83
Move feat from %sqlrender to %sqlcmd snippets #656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,15 +5,14 @@ jupytext: | |
| extension: .md | ||
| format_name: myst | ||
| format_version: 0.13 | ||
| jupytext_version: 1.14.5 | ||
| jupytext_version: 1.14.6 | ||
| kernelspec: | ||
| display_name: Python 3 (ipykernel) | ||
| language: python | ||
| name: python3 | ||
| myst: | ||
| html_meta: | ||
| description lang=en: Documentation for %sqlcmd snippets | ||
| from JupySQL | ||
| description lang=en: Documentation for %sqlcmd snippets from JupySQL | ||
| keywords: jupyter, sql, jupysql, snippets | ||
| property=og:locale: en_US | ||
| --- | ||
|
|
@@ -73,14 +72,22 @@ Returns all the snippets saved in the environment | |
|
|
||
| Arguments: | ||
|
|
||
| `{snippet_name}` Return a snippet. | ||
|
|
||
| `-d`/`--delete` Delete a snippet. | ||
|
|
||
| `-D`/`--delete-force` Force delete a snippet. This may be useful if there are other dependent snippets, and you still need to delete this snippet. | ||
|
|
||
| `-A`/`--delete-force-all` Force delete a snippet and all dependent snippets. | ||
|
|
||
| ```{code-cell} ipython3 | ||
| cte = %sqlcmd snippets gentoo | ||
| print(cte) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is currently displaying Is it supposed to display Also, previously we could
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @neelasha23: yes, this is a bug we discovered recently. I reported it on #657, @bbeat2782 will work on it. @bbeat2782: please work on this first, and then tackle the other one |
||
| ``` | ||
|
|
||
| This returns the stored snippet `gentoo`. | ||
|
|
||
| ```{code-cell} ipython3 | ||
| %sqlcmd snippets -d gentoo | ||
| ``` | ||
|
|
||
|
|
@@ -94,7 +101,6 @@ To demonstrate `force-delete` let's create a snippet dependent on `chinstrap` sn | |
| %%sql --save chinstrap_sub | ||
| SELECT * FROM chinstrap where island == 'Dream' | ||
| ``` | ||
| +++ | ||
|
|
||
| Trying to delete the `chinstrap` snippet will display an error message: | ||
|
|
||
|
|
@@ -107,7 +113,6 @@ Trying to delete the `chinstrap` snippet will display an error message: | |
| If you still wish to delete this snippet, you can run the below command: | ||
|
|
||
| ```{code-cell} ipython3 | ||
|
|
||
| %sqlcmd snippets -D chinstrap | ||
| ``` | ||
|
|
||
|
|
@@ -130,6 +135,5 @@ SELECT * FROM chinstrap where island == 'Dream' | |
| Now, force delete `chinstrap` and its dependent `chinstrap_sub`: | ||
|
|
||
| ```{code-cell} ipython3 | ||
|
|
||
| %sqlcmd snippets -A chinstrap | ||
| ``` | ||

Uh oh!
There was an error while loading. Please reload this page.