Skip to content

Commit

Permalink
Add show, drop.d and create.d yasnippets
Browse files Browse the repository at this point in the history
  • Loading branch information
kostafey committed Nov 10, 2024
1 parent 249666a commit 597eeca
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1065,10 +1065,11 @@ List of other interactive functions
List of snippets:

__select__ | __where__ | __inner__
-----------|-----------|------------
-----------|-----------|-------------
__insert__ | __begin__ | __left__
__update__ | __grant__ | __right__
__delete__ | __revoke__| __alter__
__show__ | __drop.d__| __create.d__


## Troubleshooting
Expand Down
6 changes: 6 additions & 0 deletions snippets/sql-mode/create.d.yasnippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# -*- mode: snippet -*-
# name: create.d
# key: create.d
# --
CREATE DATABASE ${1:database_name}
`(if (eq sql-product 'ansi) "character set 'utf8' collate 'utf8_general_ci'")`;
5 changes: 5 additions & 0 deletions snippets/sql-mode/drop.d.yasnippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: drop.d
# key: drop.d
# --
DROP DATABASE ${1:database_name};
5 changes: 5 additions & 0 deletions snippets/sql-mode/show.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: show
# key: show
# --
SHOW TABLES

0 comments on commit 597eeca

Please sign in to comment.