]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
snippets: sqlpg sqlmysql
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Fri, 8 Apr 2016 12:01:01 +0000 (14:01 +0200)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Fri, 8 Apr 2016 12:01:01 +0000 (14:01 +0200)
- adding org snippet for postgresql
- org snippet for mysql with adjustable password variable.

snippets/org-mode/sqlmysql
snippets/org-mode/sqlpg [new file with mode: 0644]

index 3f1ab6927c5ebd89bf5f8a3bbd5849f99feb9f7c..e1b1e461b715da704e5556f9be3e235242898fe9 100644 (file)
@@ -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 (file)
index 0000000..3dd69f5
--- /dev/null
@@ -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