sqlsnip 0.2.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b168b2c36faf3caa780d2ad91300cd40c8a55ea762c13a0417334a8e0819f0d0
4
- data.tar.gz: 473e5732ced5119690d24204b1a02e1cf91a36e1793d70fa6114a0dc976bebe9
3
+ metadata.gz: da5dc4aa93bac3c09d7b2df296116bbe8d9a1ad83785e30b1bf3a253f01d91f6
4
+ data.tar.gz: 78598632051075b2d1893c94bcf4340087d8bc0628d1deaca9c80c1d35cba201
5
5
  SHA512:
6
- metadata.gz: 994efc1c387cd1a2b35f0e21e20fb43aa9e912852f87a6f064e7889019ae5a5bb483faea69af18374fe11cb19b24ebc0fad38b80dca3355c14b309cd6d568b58
7
- data.tar.gz: b16c28f4e078aab3c20a7c28c8eabd0f6d577071e30305a021d4a4b618649db23c0b138fd41e15f00cda1aec2a23d1960bb93cd5f7de57274f01e46f8b93a9c0
6
+ metadata.gz: 9ba077ae02097d9d94bbc7d81e8b5cf203f0922dd40c7efaf7d2f580e00659df088bb9dac95f44ac5ab1747574644dd2f0b2dfc64a8d755898b6c12ec9b5cab1
7
+ data.tar.gz: dc1aef5440a47282ec653bf3a65e5cdb48fff8688b81779f6a4b7cd813ce01434e7e33d59d2c8766fa3b3852df22a0f34360ececc40fee84341569c0eb6c0933
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sqlsnip
4
- VERSION = "0.2.3"
4
+ VERSION = "0.3.0"
5
5
  end
data/lib/sqlsnip.rb CHANGED
@@ -23,6 +23,7 @@ module Sqlsnip
23
23
 
24
24
  TABLE_RE = /(?:#{TABLE_MODIFIERS_RE}\s+)*table\s+(?:#{IF_NOT_EXISTS_RE}?\s+)?(#{UID_RE})/i
25
25
  VIEW_RE = /(?:#{VIEW_MODIFIERS_RE}\s+)*view\s+(#{UID_RE})/i
26
+ MATERIALIZED_VIEW_RE = /materialized\s+view\s*(#{UID_RE})/i
26
27
  FUNCTION_RE = /function\s+(#{UID_RE})\s*\((.*?)\)\s+(?:returns|$)/i
27
28
  PROCEDURE_RE = /function\s+(#{UID_RE})\s*\((.*?)\)\s+(?:as|$)/i
28
29
  TRIGGER_RE = /trigger\s+(#{UID_RE})\s+.*\s+on\s+(#{UID_RE})/i
@@ -89,6 +90,9 @@ module Sqlsnip
89
90
  when TABLE_RE
90
91
  table = $1
91
92
  sql = "drop table if exists #{table} cascade;"
93
+ when MATERIALIZED_VIEW_RE
94
+ view = $1
95
+ sql = "drop materialized view if exists #{view} cascade;"
92
96
  when VIEW_RE
93
97
  view = $1
94
98
  sql = "drop view if exists #{view} cascade;"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqlsnip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen