summaryrefslogtreecommitdiff
path: root/.emacs.d/mysnippets/text-mode/sql-mode
diff options
context:
space:
mode:
authorSimeon Simeonov2013-09-19 22:27:58 +0200
committerSimeon Simeonov2013-09-19 22:27:58 +0200
commit7bf6712498ad2618bee7bf5b3866fb6da0772339 (patch)
treefd4d959c0f1679f2abf5663399d68df0a06472de /.emacs.d/mysnippets/text-mode/sql-mode
parentb045e27c545d4027811637193632ec3ea5ef7858 (diff)
All snippets imported, init file polished
Diffstat (limited to '.emacs.d/mysnippets/text-mode/sql-mode')
-rw-r--r--.emacs.d/mysnippets/text-mode/sql-mode/column4
-rw-r--r--.emacs.d/mysnippets/text-mode/sql-mode/constraint4
-rw-r--r--.emacs.d/mysnippets/text-mode/sql-mode/constraint.14
-rw-r--r--.emacs.d/mysnippets/text-mode/sql-mode/create10
-rw-r--r--.emacs.d/mysnippets/text-mode/sql-mode/create.112
-rw-r--r--.emacs.d/mysnippets/text-mode/sql-mode/references4
6 files changed, 38 insertions, 0 deletions
diff --git a/.emacs.d/mysnippets/text-mode/sql-mode/column b/.emacs.d/mysnippets/text-mode/sql-mode/column
new file mode 100644
index 0000000..90e4963
--- /dev/null
+++ b/.emacs.d/mysnippets/text-mode/sql-mode/column
@@ -0,0 +1,4 @@
1#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
2#name : , ColumnName ColumnType NOT NULL...
3# --
4 , ${1:Name} ${2:Type} ${3:NOT NULL}
diff --git a/.emacs.d/mysnippets/text-mode/sql-mode/constraint b/.emacs.d/mysnippets/text-mode/sql-mode/constraint
new file mode 100644
index 0000000..989e508
--- /dev/null
+++ b/.emacs.d/mysnippets/text-mode/sql-mode/constraint
@@ -0,0 +1,4 @@
1#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
2#name : CONSTRAINT [..] PRIMARY KEY ...
3# --
4CONSTRAINT [${1:PK_Name}] PRIMARY KEY ${2:CLUSTERED} ([${3:ColumnName}])
diff --git a/.emacs.d/mysnippets/text-mode/sql-mode/constraint.1 b/.emacs.d/mysnippets/text-mode/sql-mode/constraint.1
new file mode 100644
index 0000000..98d89f0
--- /dev/null
+++ b/.emacs.d/mysnippets/text-mode/sql-mode/constraint.1
@@ -0,0 +1,4 @@
1#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
2#name : CONSTRAINT [..] FOREIGN KEY ...
3# --
4CONSTRAINT [${1:FK_Name}] FOREIGN KEY ${2:CLUSTERED} ([${3:ColumnName}])
diff --git a/.emacs.d/mysnippets/text-mode/sql-mode/create b/.emacs.d/mysnippets/text-mode/sql-mode/create
new file mode 100644
index 0000000..a34624d
--- /dev/null
+++ b/.emacs.d/mysnippets/text-mode/sql-mode/create
@@ -0,0 +1,10 @@
1#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
2#name : create table ...
3# --
4CREATE TABLE [${1:dbo}].[${2:TableName}]
5(
6 ${3:Id} ${4:INT IDENTITY(1,1)} ${5:NOT NULL}
7$0
8 CONSTRAINT [${6:PK_}] PRIMARY KEY ${7:CLUSTERED} ([$3])
9)
10GO
diff --git a/.emacs.d/mysnippets/text-mode/sql-mode/create.1 b/.emacs.d/mysnippets/text-mode/sql-mode/create.1
new file mode 100644
index 0000000..1323daf
--- /dev/null
+++ b/.emacs.d/mysnippets/text-mode/sql-mode/create.1
@@ -0,0 +1,12 @@
1#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
2#name : create procedure ...
3# --
4CREATE PROCEDURE [${1:dbo}].[${2:Name}]
5(
6 $3 $4 = ${5:NULL} ${6:OUTPUT}
7)
8AS
9BEGIN
10$0
11END
12GO
diff --git a/.emacs.d/mysnippets/text-mode/sql-mode/references b/.emacs.d/mysnippets/text-mode/sql-mode/references
new file mode 100644
index 0000000..f2e4eab
--- /dev/null
+++ b/.emacs.d/mysnippets/text-mode/sql-mode/references
@@ -0,0 +1,4 @@
1#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
2#name : REFERENCES ...
3# --
4REFERENCES ${1:TableName}([${2:ColumnName}])