sql-jarvis 2.1.9 → 2.1.10

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: bed2c3742ad4617f4a401c4bca5715650847a537a11b26e60002e8d3524b4e57
4
- data.tar.gz: 51ae9548f63a59916e0ae1a3237f90b1f36c8427b23b9207cb563a2ae12341f1
3
+ metadata.gz: ec2dab35b960fcb7b8e8e9f66403fbba3441edb57f44883bf32190d0a07c7c95
4
+ data.tar.gz: 3b30a74a600936ba7f86c39d9ae82c2ecb08df3113582ca2e3c0fffd02f72af8
5
5
  SHA512:
6
- metadata.gz: abf69aec7584c0d0949f0fb6cfc5ebeca932a8ed1f79adafd6f3188a3b081185fc3f39486d6f169490ee90ce2507f5f0615a3b388e1c02325e6b5a110d1d30a0
7
- data.tar.gz: d2bdaf214ea4838a2be9b394613664409b517d716cbec038ebb4550300176e699cd178e85eaa8a512e3d551bd9afaea6cfb1b807a4419b402cf8c553676c46e2
6
+ metadata.gz: 2b2bac495e28c4033ee8e63784f4056ea4749fb783ec89e377c26d6714eeb8fabb3363fd57771ce2b801646475abc6689233f17fb52b3349bf077af334f541d5
7
+ data.tar.gz: f9a0974280ad528fa120e017b3a4aeb6eb71867e1d5da73aa306b5c0ffe5f05c51969b60f1614e9cf70491203edcfe7611d32ab171823017dcc4ced9bf89c7d8
@@ -296,7 +296,7 @@
296
296
  var $select = $("#table_names").selectize({})
297
297
  var selectize = $select[0].selectize
298
298
  selectize.on("change", function(val) {
299
- editor.setValue(previewStatement[_this.dataSource].replace("{table}", val), 1)
299
+ editor.setValue(previewStatement[_this.dataSource].replaceAll("{table}", val), 1)
300
300
  _this.run()
301
301
  selectize.clear(true)
302
302
  selectize.blur()
@@ -56,7 +56,7 @@ module Blazer
56
56
  elsif sqlserver?
57
57
  "SELECT TOP (30) * FROM {table}"
58
58
  else
59
- "SELECT *\nFROM {table}\nORDER BY id DESC\nLIMIT 30"
59
+ "SELECT *\nFROM {table}\nORDER BY {table}.id DESC\nLIMIT 30"
60
60
  end
61
61
  end
62
62
 
@@ -27,7 +27,8 @@ module Blazer
27
27
  end
28
28
 
29
29
  def save_file!
30
- tmp_file = Tempfile.new.path
30
+ file_name = "#{query.id}_#{Time.current.to_i}"
31
+ tmp_file = Tempfile.new([file_name, '.xlsx']).path
31
32
  excel.serialize(tmp_file)
32
33
  return tmp_file
33
34
  end
@@ -1,3 +1,3 @@
1
1
  module Blazer
2
- VERSION = '2.1.9'
2
+ VERSION = '2.1.10'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sql-jarvis
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.9
4
+ version: 2.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-07 00:00:00.000000000 Z
11
+ date: 2024-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties