tsql_parser 0.1.2 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/parsing/formatters/strategy/set_formatter.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0473885bdca58523ffe440e748c72c6918e0c549e33a65d9287d3c48bf63e6b9'
|
4
|
+
data.tar.gz: fe2f61520f1ee60df0ed980af63f187273a8d275d245d5aeeb688ce52e3c8760
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0286ddb36e63aa05587d22ebc8bd26578de851779934fe590c77f43d7ff646379922d6eae4b5f265dbbf6a609b3e12de3bb829f865ef8850fc2314076c19d11
|
7
|
+
data.tar.gz: 48797d07c9d3dc5615ea692692717c0ac5312af185a930bf12e089eab2a4f2e80ca347790514e62dfbcf6238617ffc61b0ef248769ad3de4bb411c8dbe22399f
|
@@ -55,7 +55,7 @@ module TSqlParser::Parsing::Formatters
|
|
55
55
|
formatted << line
|
56
56
|
formatted << ""
|
57
57
|
end
|
58
|
-
elsif first != "SET" and line.include? " SET "
|
58
|
+
elsif first != "SET" and line.include? " SET " and not line.strip.start_with? "--"
|
59
59
|
parts = line.strip.split(" SET ")
|
60
60
|
tab_count = self.get_tab_count(line, tab)
|
61
61
|
formatted << "#{tab * tab_count}#{parts[0]}\n"
|
@@ -107,8 +107,8 @@ module TSqlParser::Parsing::Formatters
|
|
107
107
|
builder = ""
|
108
108
|
end
|
109
109
|
elsif c == "\n"
|
110
|
-
parts << builder unless builder.empty?
|
111
|
-
builder = ""
|
110
|
+
#parts << builder unless builder.empty?
|
111
|
+
#builder = ""
|
112
112
|
elsif c == "-"
|
113
113
|
if next_c == "-"
|
114
114
|
comment = true
|
@@ -124,7 +124,7 @@ module TSqlParser::Parsing::Formatters
|
|
124
124
|
end
|
125
125
|
parts << builder unless builder.empty?
|
126
126
|
parts = parts.map { |p| p.strip }.select { |p| not p.empty? }
|
127
|
-
"\n#{parts.map { |p| "#{tab * (tab_count + 1)}#{p.strip}" }.join(",\n")}"
|
127
|
+
"\n#{parts.map { |p| "#{tab * (tab_count + 1)}#{p.strip.gsub(tab, " ")}" }.join(",\n")}"
|
128
128
|
end
|
129
129
|
end
|
130
130
|
end
|