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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f8f87990be2cd7082b9e63283da48848a6815c38
4
- data.tar.gz: cdaacc750e40af335e7ce7d32e208f60b5ac9dc5
3
+ metadata.gz: 0960679b538f12dd8fc9df631a6dc5c66e3a17b4
4
+ data.tar.gz: 8207552bf1024524b3f32d0719b38c98666ee7a7
5
5
  SHA512:
6
- metadata.gz: edb80ba4ba8372ac7118ff28b1b3025dcefb13f4ab5a816ce1c6039720b6911bebe4666ea5e7f5e9b190b4cee1ffd00af9f755723cf6c1becaf2e83718f15a1e
7
- data.tar.gz: 9625b2373ebcef0a78556a4bbb8613b77e879c4dab9618175e3aadd41c138873e716b26a12df8d3ee4a14ffff0c65269455b9831ec7d8555a154b8a0b43f7997
6
+ metadata.gz: 9a47660580a4ab89a49e9ff6e95838c742056b9b025143eda6bf2cba494842b6f182b8f21fe4b08a0d3b06d31721fc53599339358c149c95f06a874d92fbd93a
7
+ data.tar.gz: 7aa7dc39d4b669a1bc3988180a70ad7f8b9e3fe8d9ed92e830e6504a86b1244dd17d71d0e1fe6c32d117f644fa5a6823a396dc0d76d331e40c56ad4eee89ff1d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 1.7.7
2
+
3
+ - Fixed preview error for MySQL
4
+ - Fixed error with timeouts for MySQL
5
+
1
6
  ## 1.7.6
2
7
 
3
8
  - Added scatter chart
@@ -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}", '"' + val + '"'), 1)
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
- "SELECT * FROM {table} LIMIT 10"
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
- select_all("SET #{use_transaction? ? "LOCAL " : ""}statement_timeout = #{timeout.to_i * 1000}")
128
+ execute("SET #{use_transaction? ? "LOCAL " : ""}statement_timeout = #{timeout.to_i * 1000}")
120
129
  elsif mysql?
121
- select_all("SET max_execution_time = #{timeout.to_i * 1000}")
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
@@ -1,3 +1,3 @@
1
1
  module Blazer
2
- VERSION = "1.7.6"
2
+ VERSION = "1.7.7"
3
3
  end
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.6
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-14 00:00:00.000000000 Z
11
+ date: 2016-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails