From 39cd6d1f28d2609c0c782c695db425879ef17bcf Mon Sep 17 00:00:00 2001 From: ujihisa Date: Wed, 3 Jul 2013 23:07:00 -0700 Subject: [PATCH] Improved sql snippets. --- autoload/neosnippet/snippets/sql.snip | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/autoload/neosnippet/snippets/sql.snip b/autoload/neosnippet/snippets/sql.snip index da12995..9f03173 100644 --- a/autoload/neosnippet/snippets/sql.snip +++ b/autoload/neosnippet/snippets/sql.snip @@ -6,6 +6,11 @@ options head ); DROP TABLE $1; +snippet CREATE INDEX +abbr CREATE INDEX ... ON ... ( ... ) +options head + CREATE INDEX ${1:_name} ON ${2:cities} (${3:name}); + snippet INSERT abbr INSERT INTO ... VALUES ( ... ) options head @@ -16,3 +21,10 @@ snippet SELECT abbr SELECT * from ... options head SELECT ${1:*} FROM ${2:cities} ${0:WHERE name = 'Vancouver'}; + +snippet TRANSACTION +alias BEGIN TRANSACTION +options head + BEGIN TRANSACTION; + ${0:TARGET} + COMMIT;