From 79c58e9796ade03b5ddd12804416397d217cd309 Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Fri, 8 Apr 2016 14:01:01 +0200 Subject: [PATCH] snippets: sqlpg sqlmysql - adding org snippet for postgresql - org snippet for mysql with adjustable password variable. --- snippets/org-mode/sqlmysql | 4 ++-- snippets/org-mode/sqlpg | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 snippets/org-mode/sqlpg diff --git a/snippets/org-mode/sqlmysql b/snippets/org-mode/sqlmysql index 3f1ab692..e1b1e461 100644 --- a/snippets/org-mode/sqlmysql +++ b/snippets/org-mode/sqlmysql @@ -7,13 +7,13 @@ :engine: mysql :dbhost: ${1:localhost} :dbuser: ${2:user} -:dbpassword: ${3:(concat bba-db)} +:dbpassword: (concat ${3:bba-db}) :database: ${4:mysql} :cmdline: --protocol=tcp :exports: both :END: -(setq bba-db "$5")$0 +(setq $3 "$5")$0 #+BEGIN_SRC sql diff --git a/snippets/org-mode/sqlpg b/snippets/org-mode/sqlpg new file mode 100644 index 00000000..3dd69f5d --- /dev/null +++ b/snippets/org-mode/sqlpg @@ -0,0 +1,19 @@ +# -*- mode: snippet -*- +# name: sqlpg +# expand-env: ((yas-indent-line 'fixed)) +# key: sqlpg +# -- +:PROPERTIES: +:engine: postgresql +:dbhost: ${1:localhost} +:dbuser: ${2:user} +:dbpassword: (concat ${3:bba-db}) +:database: ${4:postgres} +:exports: both +:END: + +(setq $3 "$5")$0 + +#+BEGIN_SRC sql + +#+END_SRC -- 2.47.3