blazer 1.7.6 → 1.7.7
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of blazer might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/app/views/blazer/queries/_form.html.erb +1 -1
- data/lib/blazer/adapters/sql_adapter.rb +12 -3
- data/lib/blazer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0960679b538f12dd8fc9df631a6dc5c66e3a17b4
|
4
|
+
data.tar.gz: 8207552bf1024524b3f32d0719b38c98666ee7a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a47660580a4ab89a49e9ff6e95838c742056b9b025143eda6bf2cba494842b6f182b8f21fe4b08a0d3b06d31721fc53599339358c149c95f06a874d92fbd93a
|
7
|
+
data.tar.gz: 7aa7dc39d4b669a1bc3988180a70ad7f8b9e3fe8d9ed92e830e6504a86b1244dd17d71d0e1fe6c32d117f644fa5a6823a396dc0d76d331e40c56ad4eee89ff1d
|
data/CHANGELOG.md
CHANGED
@@ -218,7 +218,7 @@
|
|
218
218
|
var $select = $("#table_names").selectize({})
|
219
219
|
var selectize = $select[0].selectize
|
220
220
|
selectize.on("change", function(val) {
|
221
|
-
editor.setValue(previewStatement[_this.dataSource].replace("{table}",
|
221
|
+
editor.setValue(previewStatement[_this.dataSource].replace("{table}", val), 1)
|
222
222
|
_this.run()
|
223
223
|
selectize.clear(true)
|
224
224
|
selectize.blur()
|
@@ -51,7 +51,11 @@ module Blazer
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def preview_statement
|
54
|
-
|
54
|
+
if postgresql?
|
55
|
+
"SELECT * FROM \"{table}\" LIMIT 10"
|
56
|
+
else
|
57
|
+
"SELECT * FROM {table} LIMIT 10"
|
58
|
+
end
|
55
59
|
end
|
56
60
|
|
57
61
|
def reconnect
|
@@ -93,6 +97,11 @@ module Blazer
|
|
93
97
|
connection_model.connection.select_all(statement)
|
94
98
|
end
|
95
99
|
|
100
|
+
# seperate from select_all to prevent mysql error
|
101
|
+
def execute(statement)
|
102
|
+
connection_model.connection.execute(statement)
|
103
|
+
end
|
104
|
+
|
96
105
|
def postgresql?
|
97
106
|
["PostgreSQL", "PostGIS"].include?(adapter_name)
|
98
107
|
end
|
@@ -116,9 +125,9 @@ module Blazer
|
|
116
125
|
|
117
126
|
def set_timeout(timeout)
|
118
127
|
if postgresql? || redshift?
|
119
|
-
|
128
|
+
execute("SET #{use_transaction? ? "LOCAL " : ""}statement_timeout = #{timeout.to_i * 1000}")
|
120
129
|
elsif mysql?
|
121
|
-
|
130
|
+
execute("SET max_execution_time = #{timeout.to_i * 1000}")
|
122
131
|
else
|
123
132
|
raise Blazer::TimeoutNotSupported, "Timeout not supported for #{adapter_name} adapter"
|
124
133
|
end
|
data/lib/blazer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blazer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|