]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
update vertica-snippets
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Thu, 5 Dec 2019 18:29:23 +0000 (19:29 +0100)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Thu, 5 Dec 2019 18:29:23 +0000 (19:29 +0100)
76 files changed:
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/busy-hours [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/check_rle_overridden [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/config-changes [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/current_epoch [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/errors [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/external_table_details [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/format_numbers [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/get-partitions [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/get-projections [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/grants [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/last-statement-timing [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/licence-history [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/list-backups [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/list-tables-row-count-size [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/nodes [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/pool_queues [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/pset_footer [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/query-acquisition-queue [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/query-event-issues [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/query-long-acquisitions [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/query-requests [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/query-times [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/rebalance_status [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/resource-pool-move [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/resource_pools [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/resources [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/sessions [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/storage-containers [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/storage-locations [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/user_sessions [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/vertica_users [deleted file]
elpa/vertica-snippets-20191007.1546/snippets/sql-mode/.yas-parents [deleted file]
elpa/vertica-snippets-20191007.1546/vertica-snippets-autoloads.el [deleted file]
elpa/vertica-snippets-20191007.1546/vertica-snippets-pkg.el [deleted file]
elpa/vertica-snippets-20191007.1546/vertica-snippets.el [deleted file]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/.dir-locals.el [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/busy-hours [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/check_rle_overridden [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/config-changes [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/current_epoch [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/errors [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/external_table_details [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/format_numbers [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/get-partitions [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/get-projections [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/grants [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/last-statement-timing [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/licence-history [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/list-backups [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/list-tables-row-count-size [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/nodes [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/pool_queues [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/projection_storage [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/pset_footer [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/query-acquisition-queue [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/query-event-issues [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/query-long-acquisitions [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/query-requests [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/query-requests-overview [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/query-times [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/rebalance_status [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/resource-pool-move [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/resource_pool_status [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/resource_pools [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/resources [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/ros_count [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/sessions [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/storage-containers [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/storage-locations [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/table_locks [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/user_sessions [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/vertica_users [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/snippets/sql-mode/.yas-parents [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/vertica-snippets-autoloads.el [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/vertica-snippets-pkg.el [new file with mode: 0644]
elpa/vertica-snippets-20191205.1016/vertica-snippets.el [new file with mode: 0644]

diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/busy-hours b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/busy-hours
deleted file mode 100644 (file)
index e77634a..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- mode: snippet -*-
-# name: busy-hours
-# key: bh_
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# https://www.vertica.com/blog/find-the-busiest-hour-in-the-day-for-i-o/
-# --
-
-SELECT *
-  FROM (SELECT "HOUR", "Total IO (GB)", "Read IO (GB)", "Write IO (GB)"
-          FROM (SELECT MIN(TRUNC(start_time)) start_time,
-                       DATE_TRUNC('hour', start_time) as "HOUR",
-                       (SUM(read_kbytes_per_sec) + SUM(written_kbytes_per_sec)) * 60/1024/1024 as "Total IO (GB)",
-                       SUM(read_kbytes_per_sec) * 60/1024/1024 as "Read IO (GB)",
-                       SUM(written_kbytes_per_sec) * 60/1024/1024 as "Write IO (GB)"
-                  FROM v_monitor.io_usage
-                 GROUP BY 2) foo
-         WHERE start_time >= TRUNC(SYSDATE) - 5 -- LAST 5 DAYS!
-         LIMIT 1 OVER (PARTITION BY start_time ORDER BY start_time, "Total IO (GB)" DESC)) foo2
- ORDER BY "HOUR" DESC;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/check_rle_overridden b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/check_rle_overridden
deleted file mode 100644 (file)
index 962da6a..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- mode: snippet -*-
-# name: check_rle_overridden
-# key: rle_check_
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-select
-       qe.user_name,
-       count(*)
-from
-            v_monitor.query_events   qe
-       join v_monitor.query_requests qr
-         on qr.transaction_id        = qe.transaction_id
-        and qr.statement_id          = qe.statement_id
-where
-       qr.request_type                        = 'QUERY'
-  and  qe.event_type                          = 'RLE_OVERRIDDEN'
-  and  to_char(event_timestamp, 'YYYY-MM-DD') = '${1:`(format-time-string "%Y-%m-%d")`}'
-group by
-       1
-;
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/config-changes b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/config-changes
deleted file mode 100644 (file)
index 77740f8..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- mode: snippet -*-
-# name: config-changes
-# key: config-changes
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# https://www.vertica.com/blog/generate-ddl-for-changed-configuration-parameters/
-# --
-  SELECT DISTINCT ddl
-  FROM (SELECT CASE
-              WHEN current_level = 'DATABASE' OR (current_level = 'DEFAULT' AND INSTR(allowed_levels, 'DATABASE') > 0) THEN
-                                                                                                                           'SELECT set_config_parameter(''' || parameter || ''', ''' || value || ''');'
-                  WHEN current_level = 'NODE' THEN
-                                                 'ALTER NODE ' || configuration_changes.node_name || ' SET ' || parameter || ' = ''' || value || ''';'
-               END AS ddl
-          FROM configuration_changes
-                JOIN configuration_parameters
-                    ON parameter = parameter_name
-         WHERE allowed_levels <> 'SESSION'
-         LIMIT 1 OVER (PARTITION BY configuration_changes.node_name, parameter ORDER BY event_timestamp DESC)) foo
-  ORDER BY 1;$0
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/current_epoch b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/current_epoch
deleted file mode 100644 (file)
index cd4550f..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- mode: snippet -*-
-# name: current_epoch
-# key: epo_
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-SELECT current_epoch, ahm_epoch, last_good_epoch FROM v_monitor.system;
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/errors b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/errors
deleted file mode 100644 (file)
index f5629f0..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- mode: snippet -*-
-# name: errors
-# key: errors_
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-SELECT DISTINCT error_level, message FROM error_messages $0WHERE message ILIKE 'Vertica suggests%';
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/external_table_details b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/external_table_details
deleted file mode 100644 (file)
index 4684660..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- mode: snippet -*-
-# name: external_table_details
-# key: etd_
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-SELECT table_name, source_format, total_file_size_bytes FROM external_table_details;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/format_numbers b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/format_numbers
deleted file mode 100644 (file)
index 302d232..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-# -*- mode: snippet -*-
-# name: format_numbers
-# key: _fn_
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t) 
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-TO_CHAR( $0, '999g999g999g999') AS
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/get-partitions b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/get-partitions
deleted file mode 100644 (file)
index dadd295..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- mode: snippet -*-
-# name: get-partitions
-# key: get-part
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-SELECT * FROM v_monitor.partitions WHERE table_schema = '$1' AND projection_name LIKE '%$2%';$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/get-projections b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/get-projections
deleted file mode 100644 (file)
index c445780..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- mode: snippet -*-
-# name: get-projections
-# key: get-proj
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-SELECT GET_PROJECTIONS('$1');$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/grants b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/grants
deleted file mode 100644 (file)
index 96d0003..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- mode: snippet -*-
-# name: grants
-# key: grants_
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-SELECT grantee, object_name, privileges_description FROM v_catalog.grants WHERE object_type = '${1:$$(yas-choose-value '("RESOURCEPOOL" "ROLE" "SCHEMA" "TABLE" "VIEW" "STORAGELOCATION"))}' ORDER BY grantee $0LIMIT 50;
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/last-statement-timing b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/last-statement-timing
deleted file mode 100644 (file)
index c598f2e..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-# -*- mode: snippet -*-
-# name: last-statement-timing
-# key: lst_
-# group: vertica
-# --
-SELECT last_statement,
-       last_statement_duration_us / 1000000.0 last_statement_duration_seconds
-FROM current_session;
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/licence-history b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/licence-history
deleted file mode 100644 (file)
index 9e5272e..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# -*- mode: snippet -*-
-# name: licence-history
-# key: lic_history
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# https://www.vertica.com/blog/track-license-usage-over-time/
-# --
-  SELECT * FROM (
-    SELECT TRUNC(audit_start_timestamp)::DATE the_date, usage_percent * 100 AS usage_percent
-      FROM license_audits
-     WHERE audited_data = 'Total'
-     LIMIT 1 OVER (PARTITION BY TRUNC(audit_start_timestamp) ORDER BY audit_start_timestamp DESC)
-  ) foo
-  ORDER BY 1 DESC
-  LIMIT 7;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/list-backups b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/list-backups
deleted file mode 100644 (file)
index 4798d73..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- mode: snippet -*-
-# name: list-backups
-# key: ls_backups
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-SELECT * FROM v_monitor.database_backups ORDER BY 1 DESC;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/list-tables-row-count-size b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/list-tables-row-count-size
deleted file mode 100644 (file)
index 6cc9169..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-# -*- mode: snippet -*-
-# name: list-tables-row-count-size
-# key: ls-tables
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-SELECT tbl.table_schema AS "Schema Name",
-       tbl.table_name AS "Table Name",
-       to_char(sum(prs.ros_row_count)/count(DISTINCT prs.projection_name), '999G999G999G999') AS "No Of Rows",
-       to_char(sum(prs.ros_used_bytes)/count(DISTINCT prs.projection_name), '999G999G999G999G999') AS "Size In Bytes"
-FROM TABLES tbl
-JOIN projections prj ON tbl.table_id = prj.anchor_table_id
-JOIN projection_storage prs ON prj.projection_name = prs.projection_name
-GROUP BY 1, 2
-ORDER BY 1, 2;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/nodes b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/nodes
deleted file mode 100644 (file)
index 7ef2cc9..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- mode: snippet -*-
-# name: show nodes
-# key: nodes_
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-SELECT * FROM nodes;
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/pool_queues b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/pool_queues
deleted file mode 100644 (file)
index 2c07685..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-# -*- mode: snippet -*-
-# name: pool_queues
-# key: pq_
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# https://www.vertica.com/blog/calculate-request-queue-length-quick-tip/?utm_campaign=00164962
-# https://www.vertica.com/docs/latest/HTML/index.htm#Authoring/SQLReferenceManual/SystemTables/MONITOR/RESOURCE_ACQUISITIONS.htm
-# --
-SELECT node_name, request_type, transaction_id, statement_id, pool_name, (acquisition_timestamp - queue_entry_timestamp) request_queue_length FROM v_monitor.resource_acquisitions WHERE pool_name = '${1:general}' ${2:AND (acquisition_timestamp - queue_entry_timestamp) > '1 second'} ORDER BY (acquisition_timestamp - queue_entry_timestamp) DESC ${3:LIMIT 42};$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/pset_footer b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/pset_footer
deleted file mode 100644 (file)
index d66c50d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- mode: snippet -*-
-# name: pset_footer
-# key: footer_
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-\pset footer 0$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/query-acquisition-queue b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/query-acquisition-queue
deleted file mode 100644 (file)
index e0d46a3..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# -*- mode: snippet -*-
-# name: query-acquisition-queue
-# key: query-acq-queue
-# group: vertica
-# documentation: https://www.vertica.com/blog/calculate-request-queue-length-quick-tip/?utm_campaign=00164962
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-SELECT node_name,
-       request_type,
-       transaction_id,
-       statement_id,
-       pool_name,
-       (acquisition_timestamp - queue_entry_timestamp) request_queue_length
-FROM v_monitor.resource_acquisitions
-WHERE pool_name = 'general'
-ORDER BY (acquisition_timestamp - queue_entry_timestamp) DESC
-LIMIT 1;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/query-event-issues b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/query-event-issues
deleted file mode 100644 (file)
index 1870df6..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# -*- mode: snippet -*-
-# name: query-event-issues
-# key: qei_
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# https://www.vertica.com/blog/find-and-fix-issues-from-vertica-query-events/
-# --
-SELECT event_description,
-       suggested_action,
-       COUNT(*)
-  FROM query_events
- WHERE suggested_action IS NOT NULL
-   AND suggested_action <> 'Informational; No user action is necessary'
- GROUP BY 1,
-          2
- ORDER BY 3 DESC;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/query-long-acquisitions b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/query-long-acquisitions
deleted file mode 100644 (file)
index 6d828c0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# -*- mode: snippet -*-
-# name: query-long-acquisitions
-# key: query-long-acq
-# group: vertica
-# documentation: https://www.vertica.com/blog/calculate-request-queue-length-quick-tip/?utm_campaign=00164962
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-SELECT node_name,
-       request_type,
-       transaction_id,
-       statement_id,
-       pool_name,
-       (acquisition_timestamp - queue_entry_timestamp) request_queue_length
-FROM v_monitor.resource_acquisitions
-WHERE pool_name = 'general'
-AND (acquisition_timestamp - queue_entry_timestamp) > '1 second'
-ORDER BY (acquisition_timestamp - queue_entry_timestamp) DESC;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/query-requests b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/query-requests
deleted file mode 100644 (file)
index 6c54a2d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-# -*- mode: snippet -*-
-# name: query-requests
-# key: qr_
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-SELECT request
-  FROM v_monitor.query_requests
- WHERE user_name = '$1'
-   AND request_type = '${2:$$(yas-choose-value '("QUERY" "SHOW" "SET" "DDL" "TRUNCATE" "TRANSACTION" "LOAD"))}'
-   AND start_timestamp::DATE = '${3:`(insert (format-time-string "%Y-%m-%d"))`}'
-   AND request_label LIKE '$4'
- ORDER BY start_timestamp ASC;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/query-times b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/query-times
deleted file mode 100644 (file)
index 9fc08b9..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- mode: snippet -*-
-# name: query-times
-# key: qt_
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-SELECT DISTINCT theday,
-                user_name,
-                (min_dat / 1000) AS min_sec,
-                (max_dat / 1000) AS max_sec,
-                (avg_dat / 1000) AS avg_sec,
-                (median_dat / 1000) AS median_sec,
-                query_cnt
-FROM
-  (SELECT date(end_timestamp::TIMESTAMP) AS theday,
-          user_name,
-          min(request_duration_ms) over(partition BY date(end_timestamp::TIMESTAMP), user_name) min_dat,
-          max(request_duration_ms) over(partition BY date(end_timestamp::TIMESTAMP), user_name) max_dat,
-          avg(request_duration_ms) over(partition BY date(end_timestamp::TIMESTAMP), user_name) avg_dat,
-          median(request_duration_ms) over(partition BY date(end_timestamp::TIMESTAMP), user_name) median_dat,
-          count(*) over(partition BY date(end_timestamp::TIMESTAMP), user_name) AS query_cnt
-   FROM query_requests
-   WHERE is_executing IS FALSE
-   AND request ILIKE '%table%'
-   AND NOT (request LIKE 'SELECT * FROM columns%'
-         OR request LIKE '%query_requests%') ) my_alias
-ORDER BY 1 DESC, 2;
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/rebalance_status b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/rebalance_status
deleted file mode 100644 (file)
index 9c014ca..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-# -*- mode: snippet -*-
-# name: rebalance_status
-# key: rebalance_status_
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-SELECT rebalance_method rebalance_method,
-       status,
-       count(*) AS COUNT
-FROM
-  (SELECT rebalance_method,
-          CASE
-             WHEN (separated_percent = 100
-                    AND transferred_percent = 100) THEN 'Completed'
-             WHEN (separated_percent <> 0
-                    AND separated_percent <> 100)
-                   OR (transferred_percent <> 0
-                      AND transferred_percent <> 100) THEN 'In Progress'
-             ELSE 'Queued'
-          END AS status
-   FROM rebalance_projection_status
-   WHERE is_latest) AS tab
-GROUP BY 1,
-         2
-ORDER BY 1,
-         2;$0
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/resource-pool-move b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/resource-pool-move
deleted file mode 100644 (file)
index 5486fe9..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- mode: snippet -*-
-# name: resource-pool-move
-# key: rpmv
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-SELECT * FROM resource_pool_move ORDER BY move_timestamp DESC LIMIT 40;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/resource_pools b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/resource_pools
deleted file mode 100644 (file)
index 2138f59..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- mode: snippet -*-
-# name: resource_pools
-# key: pools_
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-SELECT * FROM resource_pools;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/resources b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/resources
deleted file mode 100644 (file)
index 16474d2..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- mode: snippet -*-
-# name: resources
-# key: res_
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-SELECT * FROM ${1:$$(yas-choose-value '("resource_pool_status" "resource_pool_move" "resource_rejections" "resource_rejection_details ORDER BY 1"))};$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/sessions b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/sessions
deleted file mode 100644 (file)
index 529f7a6..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- mode: snippet -*-
-# name: sessions
-# key: sess_
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-SELECT * FROM sessions;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/storage-containers b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/storage-containers
deleted file mode 100644 (file)
index 5bb25bb..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-# -*- mode: snippet -*-
-# name: storage-containers
-# key: storage-containers
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-SELECT s.node_name,
-       p.table_schema,
-       s.projection_name,
-       count(DISTINCT s.storage_oid) storage_container_count,
-       count(DISTINCT partition_key) partition_count,
-       count(r.rosid) ros_file_count
-FROM storage_containers s
-LEFT OUTER JOIN partitions p ON s.storage_oid = p.ros_id
-JOIN vs_ros r ON r.delid = s.storage_oid
-GROUP BY 1,
-         2,
-         3
-ORDER BY 4 DESC LIMIT 50;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/storage-locations b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/storage-locations
deleted file mode 100644 (file)
index 291fa40..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- mode: snippet -*-
-# name: storage-locations
-# key: storage-locations
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-SELECT * FROM v_catalog.grants gra, storage_locations loc WHERE gra.object_id = loc.location_id;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/user_sessions b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/user_sessions
deleted file mode 100644 (file)
index 2944456..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- mode: snippet -*-
-# name: user_sessions
-# key: ussess_
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-SELECT session_id, transaction_start FROM sessions WHERE user_name = '$1' ORDER BY 2 desc;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/vertica_users b/elpa/vertica-snippets-20191007.1546/snippets/sql-interactive-mode/vertica_users
deleted file mode 100644 (file)
index 73414e0..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- mode: snippet -*-
-# name: vertica_users
-# key: vertu_
-# group: vertica
-# condition: (if (string-equal sql-product 'vertica)t)
-# --
-SELECT user_name,resource_pool,default_roles FROM v_catalog.users ORDER BY 1;
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191007.1546/snippets/sql-mode/.yas-parents b/elpa/vertica-snippets-20191007.1546/snippets/sql-mode/.yas-parents
deleted file mode 100644 (file)
index a20f5c6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-sql-interactive-mode
diff --git a/elpa/vertica-snippets-20191007.1546/vertica-snippets-autoloads.el b/elpa/vertica-snippets-20191007.1546/vertica-snippets-autoloads.el
deleted file mode 100644 (file)
index 20d0609..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-;;; vertica-snippets-autoloads.el --- automatically extracted autoloads
-;;
-;;; Code:
-(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
-\f
-;;;### (autoloads nil "vertica-snippets" "vertica-snippets.el" (23994
-;;;;;;  46376 342293 671000))
-;;; Generated autoloads from vertica-snippets.el
-
-(autoload 'vertica-snippets-initialize "vertica-snippets" "\
-Add snippet dir to yas-snippet-dirs and load it.
-
-\(fn)" nil nil)
-
-(eval-after-load 'yasnippet '(vertica-snippets-initialize))
-
-;;;***
-\f
-;;;### (autoloads nil nil ("vertica-snippets-pkg.el") (23994 46376
-;;;;;;  343407 998000))
-
-;;;***
-\f
-;; Local Variables:
-;; version-control: never
-;; no-byte-compile: t
-;; no-update-autoloads: t
-;; End:
-;;; vertica-snippets-autoloads.el ends here
diff --git a/elpa/vertica-snippets-20191007.1546/vertica-snippets-pkg.el b/elpa/vertica-snippets-20191007.1546/vertica-snippets-pkg.el
deleted file mode 100644 (file)
index 2411512..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-(define-package "vertica-snippets" "20191007.1546" "Yasnippets for Vertica"
-  '((yasnippet "0.6.1"))
-  :keywords
-  '("convenience" "snippets")
-  :authors
-  '(("Andreas Gerler" . "baronNOSPAMbundesbrandschatzamt.de"))
-  :maintainer
-  '("Andreas Gerler" . "baronNOSPAMbundesbrandschatzamt.de")
-  :url "https://github.com/baron42bba/vertica-snippets")
-;; Local Variables:
-;; no-byte-compile: t
-;; End:
diff --git a/elpa/vertica-snippets-20191007.1546/vertica-snippets.el b/elpa/vertica-snippets-20191007.1546/vertica-snippets.el
deleted file mode 100644 (file)
index 3826da3..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-;;; vertica-snippets.el --- Yasnippets for Vertica
-
-;; Copyright (C) 2018 Andreas Gerler
-;; keywords: convenience,snippets
-;; Version: 0.1.0
-;; Package-Requires: ((yasnippet "0.6.1"))
-
-;; Author: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
-;; Maintainer: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
-
-;; URL: https://github.com/baron42bba/vertica-snippets
-
-;; Permission is hereby granted, free of charge, to any person obtaining
-;; a copy of this software and associated documentation files (the
-;; "Software"), to deal in the Software without restriction, including
-;; without limitation the rights to use, copy, modify, merge, publish,
-;; distribute, sublicense, and/or sell copies of the Software, and to
-;; permit persons to whom the Software is furnished to do so, subject to
-;; the following conditions:
-
-;; The above copyright notice and this permission notice shall be
-;; included in all copies or substantial portions of the Software.
-
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-;; LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-;; OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-;; WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-;;; Commentary:
-
-;; A collection of yasnippet snippets to be used with the Vertica Analytics Platform
-
-;;; Code:
-
-(require 'yasnippet)
-
-(defvar vertica-snippets-dir (file-name-directory (or (buffer-file-name)
-                                                 load-file-name)))
-
-;;;###autoload
-(defun vertica-snippets-initialize ()
-  "Add snippet dir to yas-snippet-dirs and load it."
-  (let ((snip-dir (expand-file-name "snippets" vertica-snippets-dir)))
-    (add-to-list 'yas-snippet-dirs snip-dir t)
-    (yas-load-directory snip-dir)))
-
-;;;###autoload
-(eval-after-load 'yasnippet
-   '(vertica-snippets-initialize))
-
-(provide 'vertica-snippets)
-;;; vertica-snippets.el ends here
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/.dir-locals.el b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/.dir-locals.el
new file mode 100644 (file)
index 0000000..584e23e
--- /dev/null
@@ -0,0 +1,7 @@
+;;; Directory Local Variables
+;;; For more information see (info "(emacs) Directory Variables")
+
+((fundamental-mode
+  (mode . snippet))
+ )
+
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/busy-hours b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/busy-hours
new file mode 100644 (file)
index 0000000..e77634a
--- /dev/null
@@ -0,0 +1,21 @@
+# -*- mode: snippet -*-
+# name: busy-hours
+# key: bh_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# https://www.vertica.com/blog/find-the-busiest-hour-in-the-day-for-i-o/
+# --
+
+SELECT *
+  FROM (SELECT "HOUR", "Total IO (GB)", "Read IO (GB)", "Write IO (GB)"
+          FROM (SELECT MIN(TRUNC(start_time)) start_time,
+                       DATE_TRUNC('hour', start_time) as "HOUR",
+                       (SUM(read_kbytes_per_sec) + SUM(written_kbytes_per_sec)) * 60/1024/1024 as "Total IO (GB)",
+                       SUM(read_kbytes_per_sec) * 60/1024/1024 as "Read IO (GB)",
+                       SUM(written_kbytes_per_sec) * 60/1024/1024 as "Write IO (GB)"
+                  FROM v_monitor.io_usage
+                 GROUP BY 2) foo
+         WHERE start_time >= TRUNC(SYSDATE) - 5 -- LAST 5 DAYS!
+         LIMIT 1 OVER (PARTITION BY start_time ORDER BY start_time, "Total IO (GB)" DESC)) foo2
+ ORDER BY "HOUR" DESC;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/check_rle_overridden b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/check_rle_overridden
new file mode 100644 (file)
index 0000000..962da6a
--- /dev/null
@@ -0,0 +1,21 @@
+# -*- mode: snippet -*-
+# name: check_rle_overridden
+# key: rle_check_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+select
+       qe.user_name,
+       count(*)
+from
+            v_monitor.query_events   qe
+       join v_monitor.query_requests qr
+         on qr.transaction_id        = qe.transaction_id
+        and qr.statement_id          = qe.statement_id
+where
+       qr.request_type                        = 'QUERY'
+  and  qe.event_type                          = 'RLE_OVERRIDDEN'
+  and  to_char(event_timestamp, 'YYYY-MM-DD') = '${1:`(format-time-string "%Y-%m-%d")`}'
+group by
+       1
+;
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/config-changes b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/config-changes
new file mode 100644 (file)
index 0000000..77740f8
--- /dev/null
@@ -0,0 +1,21 @@
+# -*- mode: snippet -*-
+# name: config-changes
+# key: config-changes
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# https://www.vertica.com/blog/generate-ddl-for-changed-configuration-parameters/
+# --
+  SELECT DISTINCT ddl
+  FROM (SELECT CASE
+              WHEN current_level = 'DATABASE' OR (current_level = 'DEFAULT' AND INSTR(allowed_levels, 'DATABASE') > 0) THEN
+                                                                                                                           'SELECT set_config_parameter(''' || parameter || ''', ''' || value || ''');'
+                  WHEN current_level = 'NODE' THEN
+                                                 'ALTER NODE ' || configuration_changes.node_name || ' SET ' || parameter || ' = ''' || value || ''';'
+               END AS ddl
+          FROM configuration_changes
+                JOIN configuration_parameters
+                    ON parameter = parameter_name
+         WHERE allowed_levels <> 'SESSION'
+         LIMIT 1 OVER (PARTITION BY configuration_changes.node_name, parameter ORDER BY event_timestamp DESC)) foo
+  ORDER BY 1;$0
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/current_epoch b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/current_epoch
new file mode 100644 (file)
index 0000000..cd4550f
--- /dev/null
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: current_epoch
+# key: epo_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT current_epoch, ahm_epoch, last_good_epoch FROM v_monitor.system;
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/errors b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/errors
new file mode 100644 (file)
index 0000000..f5629f0
--- /dev/null
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: errors
+# key: errors_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT DISTINCT error_level, message FROM error_messages $0WHERE message ILIKE 'Vertica suggests%';
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/external_table_details b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/external_table_details
new file mode 100644 (file)
index 0000000..4684660
--- /dev/null
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: external_table_details
+# key: etd_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT table_name, source_format, total_file_size_bytes FROM external_table_details;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/format_numbers b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/format_numbers
new file mode 100644 (file)
index 0000000..302d232
--- /dev/null
@@ -0,0 +1,8 @@
+# -*- mode: snippet -*-
+# name: format_numbers
+# key: _fn_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t) 
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+TO_CHAR( $0, '999g999g999g999') AS
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/get-partitions b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/get-partitions
new file mode 100644 (file)
index 0000000..dadd295
--- /dev/null
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: get-partitions
+# key: get-part
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT * FROM v_monitor.partitions WHERE table_schema = '$1' AND projection_name LIKE '%$2%';$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/get-projections b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/get-projections
new file mode 100644 (file)
index 0000000..c445780
--- /dev/null
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: get-projections
+# key: get-proj
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT GET_PROJECTIONS('$1');$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/grants b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/grants
new file mode 100644 (file)
index 0000000..96d0003
--- /dev/null
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: grants
+# key: grants_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT grantee, object_name, privileges_description FROM v_catalog.grants WHERE object_type = '${1:$$(yas-choose-value '("RESOURCEPOOL" "ROLE" "SCHEMA" "TABLE" "VIEW" "STORAGELOCATION"))}' ORDER BY grantee $0LIMIT 50;
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/last-statement-timing b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/last-statement-timing
new file mode 100644 (file)
index 0000000..c598f2e
--- /dev/null
@@ -0,0 +1,8 @@
+# -*- mode: snippet -*-
+# name: last-statement-timing
+# key: lst_
+# group: vertica
+# --
+SELECT last_statement,
+       last_statement_duration_us / 1000000.0 last_statement_duration_seconds
+FROM current_session;
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/licence-history b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/licence-history
new file mode 100644 (file)
index 0000000..9e5272e
--- /dev/null
@@ -0,0 +1,16 @@
+# -*- mode: snippet -*-
+# name: licence-history
+# key: lic_history
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# https://www.vertica.com/blog/track-license-usage-over-time/
+# --
+  SELECT * FROM (
+    SELECT TRUNC(audit_start_timestamp)::DATE the_date, usage_percent * 100 AS usage_percent
+      FROM license_audits
+     WHERE audited_data = 'Total'
+     LIMIT 1 OVER (PARTITION BY TRUNC(audit_start_timestamp) ORDER BY audit_start_timestamp DESC)
+  ) foo
+  ORDER BY 1 DESC
+  LIMIT 7;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/list-backups b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/list-backups
new file mode 100644 (file)
index 0000000..4798d73
--- /dev/null
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: list-backups
+# key: ls_backups
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT * FROM v_monitor.database_backups ORDER BY 1 DESC;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/list-tables-row-count-size b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/list-tables-row-count-size
new file mode 100644 (file)
index 0000000..6cc9169
--- /dev/null
@@ -0,0 +1,15 @@
+# -*- mode: snippet -*-
+# name: list-tables-row-count-size
+# key: ls-tables
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT tbl.table_schema AS "Schema Name",
+       tbl.table_name AS "Table Name",
+       to_char(sum(prs.ros_row_count)/count(DISTINCT prs.projection_name), '999G999G999G999') AS "No Of Rows",
+       to_char(sum(prs.ros_used_bytes)/count(DISTINCT prs.projection_name), '999G999G999G999G999') AS "Size In Bytes"
+FROM TABLES tbl
+JOIN projections prj ON tbl.table_id = prj.anchor_table_id
+JOIN projection_storage prs ON prj.projection_name = prs.projection_name
+GROUP BY 1, 2
+ORDER BY 1, 2;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/nodes b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/nodes
new file mode 100644 (file)
index 0000000..7ef2cc9
--- /dev/null
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: show nodes
+# key: nodes_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT * FROM nodes;
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/pool_queues b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/pool_queues
new file mode 100644 (file)
index 0000000..2c07685
--- /dev/null
@@ -0,0 +1,9 @@
+# -*- mode: snippet -*-
+# name: pool_queues
+# key: pq_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# https://www.vertica.com/blog/calculate-request-queue-length-quick-tip/?utm_campaign=00164962
+# https://www.vertica.com/docs/latest/HTML/index.htm#Authoring/SQLReferenceManual/SystemTables/MONITOR/RESOURCE_ACQUISITIONS.htm
+# --
+SELECT node_name, request_type, transaction_id, statement_id, pool_name, (acquisition_timestamp - queue_entry_timestamp) request_queue_length FROM v_monitor.resource_acquisitions WHERE pool_name = '${1:general}' ${2:AND (acquisition_timestamp - queue_entry_timestamp) > '1 second'} ORDER BY (acquisition_timestamp - queue_entry_timestamp) DESC ${3:LIMIT 42};$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/projection_storage b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/projection_storage
new file mode 100644 (file)
index 0000000..18102a0
--- /dev/null
@@ -0,0 +1,15 @@
+# -*- mode: snippet -*-
+# name: projection_storage
+# key: ps_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT node_name,
+       projection_schema,
+       projection_name,
+       (SUM(used_bytes)/1024^3)::INT size_in_GB
+  FROM projection_storage
+ WHERE anchor_table_name = '$1'
+ GROUP BY 1,2,3
+ ORDER BY 2,3,1
+ LIMIT 20;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/pset_footer b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/pset_footer
new file mode 100644 (file)
index 0000000..d66c50d
--- /dev/null
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: pset_footer
+# key: footer_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+\pset footer 0$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/query-acquisition-queue b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/query-acquisition-queue
new file mode 100644 (file)
index 0000000..e0d46a3
--- /dev/null
@@ -0,0 +1,17 @@
+# -*- mode: snippet -*-
+# name: query-acquisition-queue
+# key: query-acq-queue
+# group: vertica
+# documentation: https://www.vertica.com/blog/calculate-request-queue-length-quick-tip/?utm_campaign=00164962
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT node_name,
+       request_type,
+       transaction_id,
+       statement_id,
+       pool_name,
+       (acquisition_timestamp - queue_entry_timestamp) request_queue_length
+FROM v_monitor.resource_acquisitions
+WHERE pool_name = 'general'
+ORDER BY (acquisition_timestamp - queue_entry_timestamp) DESC
+LIMIT 1;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/query-event-issues b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/query-event-issues
new file mode 100644 (file)
index 0000000..1870df6
--- /dev/null
@@ -0,0 +1,17 @@
+# -*- mode: snippet -*-
+# name: query-event-issues
+# key: qei_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# https://www.vertica.com/blog/find-and-fix-issues-from-vertica-query-events/
+# --
+SELECT event_description,
+       suggested_action,
+       COUNT(*)
+  FROM query_events
+ WHERE suggested_action IS NOT NULL
+   AND suggested_action <> 'Informational; No user action is necessary'
+ GROUP BY 1,
+          2
+ ORDER BY 3 DESC;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/query-long-acquisitions b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/query-long-acquisitions
new file mode 100644 (file)
index 0000000..6d828c0
--- /dev/null
@@ -0,0 +1,17 @@
+# -*- mode: snippet -*-
+# name: query-long-acquisitions
+# key: query-long-acq
+# group: vertica
+# documentation: https://www.vertica.com/blog/calculate-request-queue-length-quick-tip/?utm_campaign=00164962
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT node_name,
+       request_type,
+       transaction_id,
+       statement_id,
+       pool_name,
+       (acquisition_timestamp - queue_entry_timestamp) request_queue_length
+FROM v_monitor.resource_acquisitions
+WHERE pool_name = 'general'
+AND (acquisition_timestamp - queue_entry_timestamp) > '1 second'
+ORDER BY (acquisition_timestamp - queue_entry_timestamp) DESC;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/query-requests b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/query-requests
new file mode 100644 (file)
index 0000000..6c54a2d
--- /dev/null
@@ -0,0 +1,14 @@
+# -*- mode: snippet -*-
+# name: query-requests
+# key: qr_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+SELECT request
+  FROM v_monitor.query_requests
+ WHERE user_name = '$1'
+   AND request_type = '${2:$$(yas-choose-value '("QUERY" "SHOW" "SET" "DDL" "TRUNCATE" "TRANSACTION" "LOAD"))}'
+   AND start_timestamp::DATE = '${3:`(insert (format-time-string "%Y-%m-%d"))`}'
+   AND request_label LIKE '$4'
+ ORDER BY start_timestamp ASC;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/query-requests-overview b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/query-requests-overview
new file mode 100644 (file)
index 0000000..da6332a
--- /dev/null
@@ -0,0 +1,17 @@
+# -*- mode: snippet -*-
+# name: query-requests-overview
+# key: qro_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+SELECT user_name,
+       start_timestamp,
+       request_duration_ms,
+       transaction_id,
+       STATEMENT_ID,
+       substr(request, 0, 1000) AS request
+ FROM v_monitor.query_requests
+WHERE transaction_id > 0
+ORDER BY request_duration_ms DESC
+LIMIT 10;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/query-times b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/query-times
new file mode 100644 (file)
index 0000000..9fc08b9
--- /dev/null
@@ -0,0 +1,27 @@
+# -*- mode: snippet -*-
+# name: query-times
+# key: qt_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT DISTINCT theday,
+                user_name,
+                (min_dat / 1000) AS min_sec,
+                (max_dat / 1000) AS max_sec,
+                (avg_dat / 1000) AS avg_sec,
+                (median_dat / 1000) AS median_sec,
+                query_cnt
+FROM
+  (SELECT date(end_timestamp::TIMESTAMP) AS theday,
+          user_name,
+          min(request_duration_ms) over(partition BY date(end_timestamp::TIMESTAMP), user_name) min_dat,
+          max(request_duration_ms) over(partition BY date(end_timestamp::TIMESTAMP), user_name) max_dat,
+          avg(request_duration_ms) over(partition BY date(end_timestamp::TIMESTAMP), user_name) avg_dat,
+          median(request_duration_ms) over(partition BY date(end_timestamp::TIMESTAMP), user_name) median_dat,
+          count(*) over(partition BY date(end_timestamp::TIMESTAMP), user_name) AS query_cnt
+   FROM query_requests
+   WHERE is_executing IS FALSE
+   AND request ILIKE '%table%'
+   AND NOT (request LIKE 'SELECT * FROM columns%'
+         OR request LIKE '%query_requests%') ) my_alias
+ORDER BY 1 DESC, 2;
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/rebalance_status b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/rebalance_status
new file mode 100644 (file)
index 0000000..9c014ca
--- /dev/null
@@ -0,0 +1,26 @@
+# -*- mode: snippet -*-
+# name: rebalance_status
+# key: rebalance_status_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT rebalance_method rebalance_method,
+       status,
+       count(*) AS COUNT
+FROM
+  (SELECT rebalance_method,
+          CASE
+             WHEN (separated_percent = 100
+                    AND transferred_percent = 100) THEN 'Completed'
+             WHEN (separated_percent <> 0
+                    AND separated_percent <> 100)
+                   OR (transferred_percent <> 0
+                      AND transferred_percent <> 100) THEN 'In Progress'
+             ELSE 'Queued'
+          END AS status
+   FROM rebalance_projection_status
+   WHERE is_latest) AS tab
+GROUP BY 1,
+         2
+ORDER BY 1,
+         2;$0
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/resource-pool-move b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/resource-pool-move
new file mode 100644 (file)
index 0000000..5486fe9
--- /dev/null
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: resource-pool-move
+# key: rpmv
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT * FROM resource_pool_move ORDER BY move_timestamp DESC LIMIT 40;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/resource_pool_status b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/resource_pool_status
new file mode 100644 (file)
index 0000000..b12a00f
--- /dev/null
@@ -0,0 +1,16 @@
+# -*- mode: snippet -*-
+# name: resource_pool_status
+# key: rps_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT node_name,
+       pool_name,
+       TO_CHAR( memory_size_kb / 1024, '999g999g999g999') AS memory_size_mb,
+       TO_CHAR( max_memory_size_kb / 1024, '999g999g999g999') AS max_memory_size_mb,
+       TO_CHAR( memory_size_actual_kb / 1024, '999g999g999g999') AS memory_size_actual_mb,
+       planned_concurrency,
+       TO_CHAR( query_budget_kb / 1024 , '999g999g999g999') AS query_budget_mb
+  FROM resource_pool_status
+ WHERE pool_name = '$1'
+ ORDER BY 1,2;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/resource_pools b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/resource_pools
new file mode 100644 (file)
index 0000000..2138f59
--- /dev/null
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: resource_pools
+# key: pools_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT * FROM resource_pools;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/resources b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/resources
new file mode 100644 (file)
index 0000000..16474d2
--- /dev/null
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: resources
+# key: res_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT * FROM ${1:$$(yas-choose-value '("resource_pool_status" "resource_pool_move" "resource_rejections" "resource_rejection_details ORDER BY 1"))};$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/ros_count b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/ros_count
new file mode 100644 (file)
index 0000000..35c1b18
--- /dev/null
@@ -0,0 +1,16 @@
+# -*- mode: snippet -*-
+# name: ros_count
+# key: ro_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT node_name,
+       projection_schema,
+       projection_name,
+       SUM(ros_count) AS ros_count
+  FROM v_monitor.projection_storage
+  GROUP BY node_name,
+         projection_schema,
+         projection_name
+ HAVING SUM(ros_count) > 100
+  ORDER BY ros_count DESC;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/sessions b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/sessions
new file mode 100644 (file)
index 0000000..529f7a6
--- /dev/null
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: sessions
+# key: sess_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT * FROM sessions;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/storage-containers b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/storage-containers
new file mode 100644 (file)
index 0000000..5bb25bb
--- /dev/null
@@ -0,0 +1,19 @@
+# -*- mode: snippet -*-
+# name: storage-containers
+# key: storage-containers
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT s.node_name,
+       p.table_schema,
+       s.projection_name,
+       count(DISTINCT s.storage_oid) storage_container_count,
+       count(DISTINCT partition_key) partition_count,
+       count(r.rosid) ros_file_count
+FROM storage_containers s
+LEFT OUTER JOIN partitions p ON s.storage_oid = p.ros_id
+JOIN vs_ros r ON r.delid = s.storage_oid
+GROUP BY 1,
+         2,
+         3
+ORDER BY 4 DESC LIMIT 50;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/storage-locations b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/storage-locations
new file mode 100644 (file)
index 0000000..291fa40
--- /dev/null
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: storage-locations
+# key: storage-locations
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT * FROM v_catalog.grants gra, storage_locations loc WHERE gra.object_id = loc.location_id;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/table_locks b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/table_locks
new file mode 100644 (file)
index 0000000..973008b
--- /dev/null
@@ -0,0 +1,12 @@
+# -*- mode: snippet -*-
+# name: table_locks
+# key: tl_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT locks.lock_mode,
+       locks.lock_scope,
+       substr(locks.transaction_description, 1, 100) AS "left",
+       locks.request_timestamp,
+       locks.grant_timestamp
+  FROM v_monitor.locks;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/user_sessions b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/user_sessions
new file mode 100644 (file)
index 0000000..2944456
--- /dev/null
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: user_sessions
+# key: ussess_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT session_id, transaction_start FROM sessions WHERE user_name = '$1' ORDER BY 2 desc;$0
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/vertica_users b/elpa/vertica-snippets-20191205.1016/snippets/sql-interactive-mode/vertica_users
new file mode 100644 (file)
index 0000000..73414e0
--- /dev/null
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: vertica_users
+# key: vertu_
+# group: vertica
+# condition: (if (string-equal sql-product 'vertica)t)
+# --
+SELECT user_name,resource_pool,default_roles FROM v_catalog.users ORDER BY 1;
\ No newline at end of file
diff --git a/elpa/vertica-snippets-20191205.1016/snippets/sql-mode/.yas-parents b/elpa/vertica-snippets-20191205.1016/snippets/sql-mode/.yas-parents
new file mode 100644 (file)
index 0000000..a20f5c6
--- /dev/null
@@ -0,0 +1 @@
+sql-interactive-mode
diff --git a/elpa/vertica-snippets-20191205.1016/vertica-snippets-autoloads.el b/elpa/vertica-snippets-20191205.1016/vertica-snippets-autoloads.el
new file mode 100644 (file)
index 0000000..756a1be
--- /dev/null
@@ -0,0 +1,34 @@
+;;; vertica-snippets-autoloads.el --- automatically extracted autoloads
+;;
+;;; Code:
+
+(add-to-list 'load-path (directory-file-name
+                         (or (file-name-directory #$) (car load-path))))
+
+\f
+;;;### (autoloads nil "vertica-snippets" "vertica-snippets.el" (0
+;;;;;;  0 0 0))
+;;; Generated autoloads from vertica-snippets.el
+
+(autoload 'vertica-snippets-initialize "vertica-snippets" "\
+Add snippet dir to yas-snippet-dirs and load it.
+
+\(fn)" nil nil)
+
+(eval-after-load 'yasnippet '(vertica-snippets-initialize))
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "vertica-snippets" '("vertica-snippets-dir")))
+
+;;;***
+\f
+;;;### (autoloads nil nil ("vertica-snippets-pkg.el") (0 0 0 0))
+
+;;;***
+\f
+;; Local Variables:
+;; version-control: never
+;; no-byte-compile: t
+;; no-update-autoloads: t
+;; coding: utf-8
+;; End:
+;;; vertica-snippets-autoloads.el ends here
diff --git a/elpa/vertica-snippets-20191205.1016/vertica-snippets-pkg.el b/elpa/vertica-snippets-20191205.1016/vertica-snippets-pkg.el
new file mode 100644 (file)
index 0000000..0a713c7
--- /dev/null
@@ -0,0 +1,12 @@
+(define-package "vertica-snippets" "20191205.1016" "Yasnippets for Vertica"
+  '((yasnippet "0.6.1"))
+  :keywords
+  '("convenience" "snippets")
+  :authors
+  '(("Andreas Gerler" . "baronNOSPAMbundesbrandschatzamt.de"))
+  :maintainer
+  '("Andreas Gerler" . "baronNOSPAMbundesbrandschatzamt.de")
+  :url "https://github.com/baron42bba/vertica-snippets")
+;; Local Variables:
+;; no-byte-compile: t
+;; End:
diff --git a/elpa/vertica-snippets-20191205.1016/vertica-snippets.el b/elpa/vertica-snippets-20191205.1016/vertica-snippets.el
new file mode 100644 (file)
index 0000000..3826da3
--- /dev/null
@@ -0,0 +1,55 @@
+;;; vertica-snippets.el --- Yasnippets for Vertica
+
+;; Copyright (C) 2018 Andreas Gerler
+;; keywords: convenience,snippets
+;; Version: 0.1.0
+;; Package-Requires: ((yasnippet "0.6.1"))
+
+;; Author: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
+;; Maintainer: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
+
+;; URL: https://github.com/baron42bba/vertica-snippets
+
+;; Permission is hereby granted, free of charge, to any person obtaining
+;; a copy of this software and associated documentation files (the
+;; "Software"), to deal in the Software without restriction, including
+;; without limitation the rights to use, copy, modify, merge, publish,
+;; distribute, sublicense, and/or sell copies of the Software, and to
+;; permit persons to whom the Software is furnished to do so, subject to
+;; the following conditions:
+
+;; The above copyright notice and this permission notice shall be
+;; included in all copies or substantial portions of the Software.
+
+;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+;; LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+;; OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+;; WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+;;; Commentary:
+
+;; A collection of yasnippet snippets to be used with the Vertica Analytics Platform
+
+;;; Code:
+
+(require 'yasnippet)
+
+(defvar vertica-snippets-dir (file-name-directory (or (buffer-file-name)
+                                                 load-file-name)))
+
+;;;###autoload
+(defun vertica-snippets-initialize ()
+  "Add snippet dir to yas-snippet-dirs and load it."
+  (let ((snip-dir (expand-file-name "snippets" vertica-snippets-dir)))
+    (add-to-list 'yas-snippet-dirs snip-dir t)
+    (yas-load-directory snip-dir)))
+
+;;;###autoload
+(eval-after-load 'yasnippet
+   '(vertica-snippets-initialize))
+
+(provide 'vertica-snippets)
+;;; vertica-snippets.el ends here