aboutsummaryrefslogtreecommitdiff
path: root/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2021-07-23 21:36:29 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2021-07-25 15:44:48 +0100
commit91c8da0e835a83afef27f707f16ec6c24c30430b (patch)
treee20a734522c6036f7ce752c7e0602bf95bc00791 /Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode
parent597bb886d926b4910c555efebe5c60a991bbd5fd (diff)
downloaddotfiles-91c8da0e835a83afef27f707f16ec6c24c30430b.tar.gz
dotfiles-91c8da0e835a83afef27f707f16ec6c24c30430b.tar.bz2
dotfiles-91c8da0e835a83afef27f707f16ec6c24c30430b.zip
(Emacs)+snippets from doom-snippet and removed default package
I've re-enabled yasnippet for ease of use, and added a ton of snippets directly into my Dotfiles so only I get to curate what snippets are removed. Screw downloading them off someone else's repository at their total mercy.
Diffstat (limited to 'Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode')
-rw-r--r--Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/column5
-rw-r--r--Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/constraint5
-rw-r--r--Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/constraint.15
-rw-r--r--Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/create11
-rw-r--r--Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/create.113
-rw-r--r--Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/references5
6 files changed, 44 insertions, 0 deletions
diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/column b/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/column
new file mode 100644
index 0000000..849b43d
--- /dev/null
+++ b/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/column
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
+# name: , ColumnName ColumnType NOT NULL...
+# --
+ , ${1:Name} ${2:Type} ${3:NOT NULL}
diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/constraint b/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/constraint
new file mode 100644
index 0000000..312190c
--- /dev/null
+++ b/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/constraint
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
+# name: CONSTRAINT [..] PRIMARY KEY ...
+# --
+CONSTRAINT [${1:PK_Name}] PRIMARY KEY ${2:CLUSTERED} ([${3:ColumnName}])
diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/constraint.1 b/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/constraint.1
new file mode 100644
index 0000000..f54ea0a
--- /dev/null
+++ b/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/constraint.1
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
+# name: CONSTRAINT [..] FOREIGN KEY ...
+# --
+CONSTRAINT [${1:FK_Name}] FOREIGN KEY ${2:CLUSTERED} ([${3:ColumnName}])
diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/create b/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/create
new file mode 100644
index 0000000..2d0ed21
--- /dev/null
+++ b/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/create
@@ -0,0 +1,11 @@
+# -*- mode: snippet -*-
+# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
+# name: create table ...
+# --
+CREATE TABLE [${1:dbo}].[${2:TableName}]
+(
+ ${3:Id} ${4:INT IDENTITY(1,1)} ${5:NOT NULL}
+$0
+ CONSTRAINT [${6:PK_}] PRIMARY KEY ${7:CLUSTERED} ([$3])
+)
+GO
diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/create.1 b/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/create.1
new file mode 100644
index 0000000..fb8b1ae
--- /dev/null
+++ b/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/create.1
@@ -0,0 +1,13 @@
+# -*- mode: snippet -*-
+# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
+# name: create procedure ...
+# --
+CREATE PROCEDURE [${1:dbo}].[${2:Name}]
+(
+ $3 $4 = ${5:NULL} ${6:OUTPUT}
+)
+AS
+BEGIN
+$0
+END
+GO
diff --git a/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/references b/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/references
new file mode 100644
index 0000000..ec3e58f
--- /dev/null
+++ b/Emacs/.config/emacs/.config/yasnippet/snippets/sql-mode/references
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# contributor: Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
+# name: REFERENCES ...
+# --
+REFERENCES ${1:TableName}([${2:ColumnName}])