dbhero 1.0.2 → 1.1.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
  SHA1:
3
- metadata.gz: 493f4480ced388a705716e03bf4c47aece1125ce
4
- data.tar.gz: 1a7bd375cb7047857a5a13b0f9484565f0d01d8a
3
+ metadata.gz: 9618573ac123e59a6eb934c9703b7f052ab0d968
4
+ data.tar.gz: 17770f182841c085074d418624b8e1423181e9bf
5
5
  SHA512:
6
- metadata.gz: 8bacd64bb327651b3621555c086fae2e5fad22d17d11a25d6e23356de005112a520f7c299a59b1d4c29b3bd2bddfd0fecdca8b2b5774da2d2937614044db9f88
7
- data.tar.gz: f8b633e46e8fef175cb771d392124eadbbefa70cd18dd7a24d4181ed0ccfde997cb6c4cac4c6adcd2ba012c535e659b463aac5e714861c981563f5c91195ab23
6
+ metadata.gz: 2fb1828ca421b7e4af3667cf7116e591957d0c7f9d718c55c43794c1ec3355a0bd0483220ac78e7a0bee5eee78b86e5d65a7a2843eeb9b1718eb629a2a8921ac
7
+ data.tar.gz: 50bad8869d5f442355cb7ef36197f4f9f8a9f5e4e5cb3a5325c370329ef5ea20f0c238bcb839df5278db6779f5f8db864973dc6171cbfe224c7ee487851092d0
@@ -13,6 +13,10 @@
13
13
  //= require jquery
14
14
  //= require_tree .
15
15
 
16
+ var Dbhero = {
17
+ Dataclips: {}
18
+ };
19
+
16
20
  $(function(){
17
21
 
18
22
  $('.dropdown-button').dropdown({
@@ -26,20 +30,5 @@ $(function(){
26
30
  }
27
31
  );
28
32
 
29
- try {
30
- var $table = $('table#clip_table')
31
-
32
- $table.dataTable({
33
- scrollX: true,
34
- searching: false,
35
- lengthChange: false,
36
- pagingType: 'simple'
37
- });
38
-
39
- //$table.floatThead({
40
- // scrollingTop: 'pageTop',
41
- //});
42
- } catch(e) {
43
- console.log(e);
44
- }
33
+ Dbhero.Dataclips.LoadDatatable();
45
34
  });
@@ -1,42 +1,83 @@
1
1
  $(function(){
2
+ Dbhero.Dataclips.LoadDatatable = function() {
3
+ if($('.dataTables_wrapper').length < 1) {
4
+ try {
5
+ var $table = $('table#clip_table');
2
6
 
3
- startAce = function() {
4
- var textarea = $('textarea#dataclip_raw_query');
5
- console.log(textarea.width());
6
- console.log(textarea.height());
7
+ $table.dataTable({
8
+ scrollX: true,
9
+ searching: false,
10
+ lengthChange: false,
11
+ pagingType: 'simple'
12
+ });
7
13
 
8
- var editDiv = $('<div>', {
9
- id: "ace_editor",
10
- position: 'absolute',
11
- width: textarea.width(),
12
- height: textarea.height(),
13
- 'class': textarea.attr('class')
14
- }).insertBefore(textarea);
14
+ } catch(e) {
15
+ console.log(e);
16
+ }
17
+ }
18
+ };
15
19
 
16
- textarea.css('display', 'none');
20
+ Dbhero.Dataclips.Editor = {
21
+ render: function() {
22
+ this.textarea = $('textarea#dataclip_raw_query');
23
+ this.buildAndInsertEditor();
17
24
 
18
- var editor = ace.edit(editDiv[0]);
19
- editor.renderer.setShowGutter(true);
25
+ try {
26
+ this.textarea.css('display', 'none');
27
+ this.startAce();
20
28
 
21
- editor.getSession().setUseWrapMode(true);
22
- editor.getSession().setValue(textarea.val());
23
- editor.getSession().setTabSize(2);
24
- editor.getSession().setUseSoftTabs(true);
25
- editor.getSession().setMode("ace/mode/pgsql");
29
+ $('.ace_editor').css({'padding':'0'});
30
+ } catch(e) {
31
+ console.log(e);
32
+ this.textarea.css('display', 'block');
33
+ }
26
34
 
27
- textarea.closest('form').submit(function () {
28
- textarea.val(editor.getSession().getValue());
29
- });
35
+ var that = this;
36
+ this.textarea.closest('form').submit(function () {
37
+ that.textarea.val(that.ace_editor.getSession().getValue());
38
+ });
39
+ },
30
40
 
31
- $('.ace_editor').css({'padding':'0'});
41
+ buildAndInsertEditor: function() {
42
+ this.editor = $('<div>', {
43
+ id: "ace_editor",
44
+ position: 'absolute',
45
+ width: this.textarea.width(),
46
+ height: this.textarea.height(),
47
+ class: this.textarea.attr('class')
48
+ });
32
49
 
33
- editor.setTheme("ace/theme/xcode");
34
- $(editDiv).css({ 'font-size': '15px' })
35
- }
50
+ this.editor.insertBefore(this.textarea);
51
+ this.editor.css({ 'font-size': '15px' })
52
+
53
+ return this;
54
+ },
55
+
56
+ startAce: function() {
57
+ this.ace_editor = ace.edit(this.editor[0]);
58
+ this.ace_editor.renderer.setShowGutter(true);
36
59
 
37
- if($('textarea#dataclip_raw_query').length > 0){
38
- startAce();
60
+ this.ace_editor.getSession().setUseWrapMode(true);
61
+ this.ace_editor.getSession().setValue(this.textarea.val());
62
+ this.ace_editor.getSession().setTabSize(2);
63
+ this.ace_editor.getSession().setUseSoftTabs(true);
64
+ this.ace_editor.getSession().setMode("ace/mode/pgsql");
65
+ this.ace_editor.setTheme("ace/theme/xcode");
66
+
67
+ return this;
39
68
  }
69
+ };
70
+
71
+ if($('textarea#dataclip_raw_query').length > 0){
72
+ Dbhero.Dataclips.Editor.render();
73
+ }
40
74
 
75
+ if($('.fetch-remote-clip-table').length > 0){
76
+ var $fetchremote = $('.fetch-remote-clip-table');
77
+ $.get($fetchremote.data('path'), function(response) {
78
+ $fetchremote.html(response);
79
+ Dbhero.Dataclips.LoadDatatable();
80
+ });
81
+ }
41
82
  });
42
83
 
@@ -27,11 +27,12 @@ module Dbhero
27
27
 
28
28
  def show
29
29
  check_auth if @dataclip.private?
30
-
31
30
  @dataclip.query_result
32
31
 
33
32
  respond_to do |format|
34
33
  format.html do
34
+ return render :show, layout: false if request.xhr?
35
+
35
36
  if params[:export_gdrive]
36
37
  session[:clip_token] = @dataclip.token
37
38
  redirect_to google_client.auth.authorization_uri.to_s
@@ -1,38 +1,42 @@
1
- = stylesheet_link_tag "//cdn.datatables.net/1.10.5/css/jquery.dataTables.min.css"
2
- = javascript_include_tag "//cdn.datatables.net/1.10.5/js/jquery.dataTables.min.js"
3
- = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/floatthead/1.2.10/jquery.floatThead.min.js"
4
-
5
1
  - show_public_link = defined?(show_public_link) ? show_public_link : false
6
- .section
7
- .row
8
- .col.s6.style-text-field
9
- - if show_public_link
10
- .input-field
11
- i.tiny.mdi-social-share.prefix
12
- input#icon_prefix.validate type="text" value=dataclip_url(@dataclip)
13
- label for="icon_prefix"
14
- strong PUBLIC URL
15
- - else
16
- p style="margin-top: 40px; margin-bottom: 0;"
17
- | total rows returned&nbsp;
18
- strong= @dataclip.total_rows
19
- .col.s6.right-align style="margin-top: 25px;"
20
- a class='dropdown-button btn' href='#' data-activates='export-drop' Export
21
-
22
- ul id='export-drop' class='dropdown-content'
23
- li
24
- = link_to 'csv', dataclip_path(@dataclip, format: 'csv')
25
- li
26
- = link_to 'google drive', dataclip_path(@dataclip, export_gdrive: true)
27
-
28
- .col.s12 style="overflow: auto;"
29
- table#clip_table.cell-border.striped data-page-length='300'
30
- thead.grey.lighten-2
31
- tr
32
- - @dataclip.q_result.columns.each do |column|
33
- th= column
34
- tbody
35
- - @dataclip.q_result.rows.each do |row|
2
+ - if Dbhero.max_rows_limit >=@dataclip.q_result.rows.size
3
+ .section
4
+ .row
5
+ .col.s6.style-text-field
6
+ - if show_public_link
7
+ .input-field
8
+ i.tiny.mdi-social-share.prefix
9
+ input#icon_prefix.validate type="text" value=dataclip_url(@dataclip)
10
+ label for="icon_prefix"
11
+ strong PUBLIC URL
12
+ - else
13
+ p style="margin-top: 40px; margin-bottom: 0;"
14
+ | total rows returned&nbsp;
15
+ strong= @dataclip.total_rows
16
+ .col.s6.right-align style="margin-top: 25px;"
17
+ a class='dropdown-button btn' href='#' data-activates='export-drop' Export
18
+
19
+ ul id='export-drop' class='dropdown-content'
20
+ li
21
+ = link_to 'csv', dataclip_path(@dataclip, format: 'csv')
22
+ li
23
+ = link_to 'google drive', dataclip_path(@dataclip, export_gdrive: true)
24
+
25
+ .col.s12 style="overflow: auto;"
26
+ table#clip_table.cell-border.striped data-page-length='300'
27
+ thead.grey.lighten-2
36
28
  tr
37
- - row.each do |value|
38
- td style="min-width: 200px;"= value
29
+ - @dataclip.q_result.columns.each do |column|
30
+ th= column
31
+ tbody
32
+ - @dataclip.q_result.rows.each do |row|
33
+ tr
34
+ - row.each do |value|
35
+ td style="min-width: 200px;"= value
36
+ - else
37
+ .section
38
+ .row
39
+ .col.s12.center-align
40
+ h2.flow-text this clip is too large, please download the csv:
41
+ .col.s12.center-align
42
+ = link_to "download csv", dataclip_url(@dataclip, format: :csv), class: "btn"
@@ -2,5 +2,13 @@
2
2
  == render 'form'
3
3
  - if @dataclip.valid? && @dataclip.q_result
4
4
  .section
5
- .row
6
- == render 'clip_table', show_public_link: true
5
+ .row.fetch-remote-clip-table data-path=dataclip_path(@dataclip)
6
+ .col.s12.center-align
7
+ .preloader-wrapper.big.active
8
+ .spinner-layer.spinner-blue-only
9
+ .circle-clipper.left
10
+ .circle
11
+ .gap-patch
12
+ .circle
13
+ .circle-clipper.right
14
+ .circle
@@ -2,9 +2,17 @@ doctype html
2
2
  html.grey.lighten-3
3
3
  head
4
4
  title DBHero
5
- = stylesheet_link_tag "dbhero/application", "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.95.3/css/materialize.min.css", media: "all"
6
- = javascript_include_tag "dbhero/application", "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.95.3/js/materialize.min.js"
7
- = csrf_meta_tags
5
+
6
+ = stylesheet_link_tag "dbhero/application",
7
+ "//cdnjs.cloudflare.com/ajax/libs/materialize/0.95.3/css/materialize.min.css",
8
+ "//cdn.datatables.net/1.10.5/css/jquery.dataTables.min.css",
9
+ media: "all"
10
+
11
+ = javascript_include_tag "dbhero/application",
12
+ "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.95.3/js/materialize.min.js",
13
+ "//cdn.datatables.net/1.10.5/js/jquery.dataTables.min.js"
14
+
15
+ = csrf_meta_tags
8
16
  body
9
17
  - unless action_name == 'show'
10
18
  header.grey.lighten-5
@@ -1,7 +1,7 @@
1
1
  module Dbhero
2
2
  module Configuration
3
3
  VALID_CONFIG_KEYS = [:authenticate, :current_user_method, :custom_user_auth_condition,
4
- :user_representation, :google_api_id, :google_api_secret].freeze
4
+ :user_representation, :google_api_id, :google_api_secret, :max_rows_limit].freeze
5
5
 
6
6
  DEFAULT_AUTHENTICATE = true
7
7
  DEFAULT_CURRENT_USER_METHOD = :current_user
@@ -9,6 +9,7 @@ module Dbhero
9
9
  DEFAULT_GOOGLE_API_SECRET = ''
10
10
  DEFAULT_USER_PRESENTATION = :email
11
11
  DEFAULT_CUSTOM_USER_AUTH_CONDITION = nil
12
+ DEFAULT_MAX_ROWS_LIMIT = 10_000
12
13
 
13
14
  attr_accessor *VALID_CONFIG_KEYS
14
15
 
@@ -31,6 +32,7 @@ module Dbhero
31
32
  self.google_api_id = DEFAULT_GOOGLE_API_ID
32
33
  self.google_api_secret = DEFAULT_GOOGLE_API_SECRET
33
34
  self.custom_user_auth_condition = DEFAULT_CUSTOM_USER_AUTH_CONDITION
35
+ self.max_rows_limit = DEFAULT_MAX_ROWS_LIMIT
34
36
  end
35
37
 
36
38
  end
@@ -40,7 +40,7 @@ module Dbhero
40
40
  spreadsheet = @session.spreadsheet_by_title(file_title)
41
41
 
42
42
  worksheet = (spreadsheet || upload_from_string(file_title)).worksheets[0]
43
- worksheet[1,1] = "=importData('#{@options[:import_data_url]}')"
43
+ worksheet[1,1] = "=importData(\"#{@options[:import_data_url]}\")"
44
44
  worksheet.save
45
45
 
46
46
  spreadsheet || @uploaded_file
@@ -48,7 +48,7 @@ module Dbhero
48
48
 
49
49
  def upload_from_string file_title
50
50
  @uploaded_file ||= @session.upload_from_string(
51
- @dataclip.csv_string,
51
+ "",
52
52
  file_title,
53
53
  content_type: 'text/csv')
54
54
  end
@@ -1,3 +1,3 @@
1
1
  module Dbhero
2
- VERSION = "1.0.2"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -1,4 +1,9 @@
1
1
  Dbhero.configure do |config|
2
+ # max rows to show, if the number of rows on query result is greater of
3
+ # configuration then should display a button to download csv
4
+ # default value: 10000
5
+ # config.max_rows_limit = 10_000
6
+
2
7
  # if you are using devise you can keep the "authenticate_user!"
3
8
  config.authenticate = true
4
9
 
@@ -4183,3 +4183,418 @@ PG::SyntaxError: ERROR: cannot insert multiple commands into a prepared stateme
4183
4183
   (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
4184
4184
   (0.4ms) SELECT COUNT(*) FROM "dbhero_dataclips"
4185
4185
   (0.4ms) ROLLBACK
4186
+ ActiveRecord::SchemaMigration Load (3.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
4187
+  (136.9ms) DROP DATABASE IF EXISTS "dummy_test"
4188
+  (414.7ms) CREATE DATABASE "dummy_test" ENCODING = 'unicode'
4189
+ SQL (2.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
4190
+  (100.2ms) CREATE TABLE "dbhero_dataclips" ("id" serial primary key, "description" text NOT NULL, "raw_query" text NOT NULL, "token" text NOT NULL, "user" text, "private" boolean DEFAULT 'f' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
4191
+  (1.8ms) CREATE UNIQUE INDEX "index_dbhero_dataclips_on_token" ON "dbhero_dataclips" USING btree ("token")
4192
+  (3.8ms) CREATE INDEX "index_dbhero_dataclips_on_user" ON "dbhero_dataclips" USING btree ("user")
4193
+  (3.6ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
4194
+  (1.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4195
+  (2.8ms) SELECT version FROM "schema_migrations"
4196
+  (4.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20150323172444')
4197
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
4198
+  (0.2ms) BEGIN
4199
+ Processing by Dbhero::DataclipsController#index as HTML
4200
+ Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)
4201
+  (0.2ms) ROLLBACK
4202
+  (0.2ms) BEGIN
4203
+ Processing by Dbhero::DataclipsController#index as HTML
4204
+ Rendered /Users/ton/code/dbhero/app/views/dbhero/dataclips/index.html.slim within layouts/dbhero/application (0.3ms)
4205
+ Completed 200 OK in 18ms (Views: 17.1ms | ActiveRecord: 0.0ms)
4206
+  (0.2ms) ROLLBACK
4207
+  (0.1ms) BEGIN
4208
+ Processing by Dbhero::DataclipsController#index as HTML
4209
+ Rendered /Users/ton/code/dbhero/app/views/dbhero/dataclips/index.html.slim within layouts/dbhero/application (0.3ms)
4210
+ Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)
4211
+  (0.2ms) ROLLBACK
4212
+  (0.1ms) BEGIN
4213
+ Processing by Dbhero::DataclipsController#index as HTML
4214
+ Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)
4215
+  (0.2ms) ROLLBACK
4216
+  (0.1ms) BEGIN
4217
+ Processing by Dbhero::DataclipsController#index as HTML
4218
+ Rendered /Users/ton/code/dbhero/app/views/dbhero/dataclips/index.html.slim within layouts/dbhero/application (0.2ms)
4219
+ Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
4220
+  (0.2ms) ROLLBACK
4221
+  (0.1ms) BEGIN
4222
+ Processing by Dbhero::DataclipsController#new as HTML
4223
+ Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)
4224
+  (0.2ms) ROLLBACK
4225
+  (0.1ms) BEGIN
4226
+ Processing by Dbhero::DataclipsController#new as HTML
4227
+ Rendered /Users/ton/code/dbhero/app/views/dbhero/dataclips/new.html.slim within layouts/dbhero/application (0.3ms)
4228
+ Completed 200 OK in 28ms (Views: 3.9ms | ActiveRecord: 15.0ms)
4229
+  (0.2ms) ROLLBACK
4230
+  (0.1ms) BEGIN
4231
+ Processing by Dbhero::DataclipsController#new as HTML
4232
+ Rendered /Users/ton/code/dbhero/app/views/dbhero/dataclips/new.html.slim within layouts/dbhero/application (0.2ms)
4233
+ Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)
4234
+  (0.2ms) ROLLBACK
4235
+  (0.1ms) BEGIN
4236
+ Processing by Dbhero::DataclipsController#new as HTML
4237
+ Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)
4238
+  (0.2ms) ROLLBACK
4239
+  (0.1ms) BEGIN
4240
+ Processing by Dbhero::DataclipsController#new as HTML
4241
+ Rendered /Users/ton/code/dbhero/app/views/dbhero/dataclips/new.html.slim within layouts/dbhero/application (0.2ms)
4242
+ Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
4243
+  (0.2ms) ROLLBACK
4244
+  (0.1ms) BEGIN
4245
+ Processing by Dbhero::DataclipsController#create as HTML
4246
+ Parameters: {"dataclip"=>{"description"=>"foo bar", "raw_query"=>"select 'foo' as bar"}}
4247
+ Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)
4248
+  (0.2ms) ROLLBACK
4249
+  (0.1ms) BEGIN
4250
+ Processing by Dbhero::DataclipsController#create as HTML
4251
+ Parameters: {"dataclip"=>{"description"=>"foo bar", "raw_query"=>"select 'foo' as bar"}}
4252
+  (0.2ms) SAVEPOINT active_record_1
4253
+ SQL (4.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "user", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["description", "foo bar"], ["raw_query", "select 'foo' as bar"], ["user", "foo@bar.com"], ["created_at", "2015-03-26 05:19:54.320108"], ["updated_at", "2015-03-26 05:19:54.320108"], ["token", "0a3becc3-1c60-44f3-b8f7-513d78188a9a"]]
4254
+  (0.2ms) RELEASE SAVEPOINT active_record_1
4255
+ Redirected to http://test.host/dbhero/dataclips/0a3becc3-1c60-44f3-b8f7-513d78188a9a/edit
4256
+ Completed 302 Found in 23ms (ActiveRecord: 4.8ms)
4257
+  (0.3ms) ROLLBACK
4258
+  (0.1ms) BEGIN
4259
+ Processing by Dbhero::DataclipsController#create as HTML
4260
+ Parameters: {"dataclip"=>{"description"=>"foo bar", "raw_query"=>"select 'foo' as bar"}}
4261
+  (0.2ms) SAVEPOINT active_record_1
4262
+ SQL (0.5ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "user", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["description", "foo bar"], ["raw_query", "select 'foo' as bar"], ["user", "foo@bar.com"], ["created_at", "2015-03-26 05:19:54.343508"], ["updated_at", "2015-03-26 05:19:54.343508"], ["token", "fd736a96-8099-4af9-9c7f-c8007d549d7b"]]
4263
+  (0.2ms) RELEASE SAVEPOINT active_record_1
4264
+ Redirected to http://test.host/dbhero/dataclips/fd736a96-8099-4af9-9c7f-c8007d549d7b/edit
4265
+ Completed 302 Found in 4ms (ActiveRecord: 0.8ms)
4266
+ Dbhero::Dataclip Load (0.6ms) SELECT "dbhero_dataclips".* FROM "dbhero_dataclips" WHERE "dbhero_dataclips"."description" = $1 LIMIT 1 [["description", "foo bar"]]
4267
+  (0.2ms) ROLLBACK
4268
+  (0.1ms) BEGIN
4269
+ Processing by Dbhero::DataclipsController#create as HTML
4270
+ Parameters: {"dataclip"=>{"description"=>"foo bar", "raw_query"=>"select 'foo' as bar"}}
4271
+  (0.1ms) SAVEPOINT active_record_1
4272
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "user", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["description", "foo bar"], ["raw_query", "select 'foo' as bar"], ["user", "foo@bar.com"], ["created_at", "2015-03-26 05:19:54.361439"], ["updated_at", "2015-03-26 05:19:54.361439"], ["token", "69d79a88-725e-4a9c-87e2-ca9cfcfa9dc4"]]
4273
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4274
+ Redirected to http://test.host/dbhero/dataclips/69d79a88-725e-4a9c-87e2-ca9cfcfa9dc4/edit
4275
+ Completed 302 Found in 4ms (ActiveRecord: 0.6ms)
4276
+  (0.2ms) ROLLBACK
4277
+  (0.1ms) BEGIN
4278
+ Processing by Dbhero::DataclipsController#create as HTML
4279
+ Parameters: {"dataclip"=>{"description"=>"foo bar", "raw_query"=>"select 'foo' as bar"}}
4280
+  (0.2ms) SAVEPOINT active_record_1
4281
+ SQL (0.4ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "user", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["description", "foo bar"], ["raw_query", "select 'foo' as bar"], ["user", "foo@bar.com"], ["created_at", "2015-03-26 05:19:54.369886"], ["updated_at", "2015-03-26 05:19:54.369886"], ["token", "9b124808-6e2c-4357-83f3-cf3ac0d98fed"]]
4282
+  (0.2ms) RELEASE SAVEPOINT active_record_1
4283
+ Redirected to http://test.host/dbhero/dataclips/9b124808-6e2c-4357-83f3-cf3ac0d98fed/edit
4284
+ Completed 302 Found in 7ms (ActiveRecord: 0.8ms)
4285
+ Dbhero::Dataclip Load (0.4ms) SELECT "dbhero_dataclips".* FROM "dbhero_dataclips" WHERE "dbhero_dataclips"."description" = $1 LIMIT 1 [["description", "foo bar"]]
4286
+  (0.2ms) ROLLBACK
4287
+  (0.1ms) BEGIN
4288
+ Processing by Dbhero::DataclipsController#create as HTML
4289
+ Parameters: {"dataclip"=>{"description"=>"foo bar", "raw_query"=>"select 'foo' as bar"}}
4290
+ Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)
4291
+  (0.1ms) ROLLBACK
4292
+  (0.1ms) BEGIN
4293
+ Processing by Dbhero::DataclipsController#create as HTML
4294
+ Parameters: {"dataclip"=>{"description"=>"foo bar disabled", "raw_query"=>"select 'foo' as bar"}}
4295
+  (0.1ms) SAVEPOINT active_record_1
4296
+ SQL (0.4ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "foo bar disabled"], ["raw_query", "select 'foo' as bar"], ["created_at", "2015-03-26 05:19:54.386308"], ["updated_at", "2015-03-26 05:19:54.386308"], ["token", "ebd818b5-7c2c-4ad8-9216-47707be633c5"]]
4297
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4298
+ Redirected to http://test.host/dbhero/dataclips/ebd818b5-7c2c-4ad8-9216-47707be633c5/edit
4299
+ Completed 302 Found in 4ms (ActiveRecord: 0.6ms)
4300
+  (0.1ms) ROLLBACK
4301
+  (0.1ms) BEGIN
4302
+ Processing by Dbhero::DataclipsController#create as HTML
4303
+ Parameters: {"dataclip"=>{"description"=>"foo bar disabled", "raw_query"=>"select 'foo' as bar"}}
4304
+  (0.1ms) SAVEPOINT active_record_1
4305
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "foo bar disabled"], ["raw_query", "select 'foo' as bar"], ["created_at", "2015-03-26 05:19:54.393261"], ["updated_at", "2015-03-26 05:19:54.393261"], ["token", "6a2dd0c9-f165-45e0-95e8-601d666420e8"]]
4306
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4307
+ Redirected to http://test.host/dbhero/dataclips/6a2dd0c9-f165-45e0-95e8-601d666420e8/edit
4308
+ Completed 302 Found in 3ms (ActiveRecord: 0.6ms)
4309
+ Dbhero::Dataclip Load (0.3ms) SELECT "dbhero_dataclips".* FROM "dbhero_dataclips" WHERE "dbhero_dataclips"."description" = $1 LIMIT 1 [["description", "foo bar disabled"]]
4310
+  (0.1ms) ROLLBACK
4311
+  (0.1ms) BEGIN
4312
+  (0.1ms) SAVEPOINT active_record_1
4313
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'dummy_foo' as dummy_bar, vesion() as db_version"], ["created_at", "2015-03-26 05:19:54.399865"], ["updated_at", "2015-03-26 05:19:54.399865"], ["token", "e5290fad-5a20-4272-8b66-26f31fa4e2dc"]]
4314
+  (0.2ms) RELEASE SAVEPOINT active_record_1
4315
+ Processing by Dbhero::DataclipsController#edit as HTML
4316
+ Parameters: {"id"=>"e5290fad-5a20-4272-8b66-26f31fa4e2dc"}
4317
+ Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)
4318
+  (0.2ms) ROLLBACK
4319
+  (0.1ms) BEGIN
4320
+  (0.2ms) SAVEPOINT active_record_1
4321
+ SQL (0.4ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'dummy_foo' as dummy_bar, vesion() as db_version"], ["created_at", "2015-03-26 05:19:54.407278"], ["updated_at", "2015-03-26 05:19:54.407278"], ["token", "6f17fbd0-1248-40e5-8c0f-66294298fabd"]]
4322
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4323
+ Processing by Dbhero::DataclipsController#edit as HTML
4324
+ Parameters: {"id"=>"6f17fbd0-1248-40e5-8c0f-66294298fabd"}
4325
+ Dbhero::Dataclip Load (0.3ms) SELECT "dbhero_dataclips".* FROM "dbhero_dataclips" WHERE "dbhero_dataclips"."token" = $1 LIMIT 1 [["token", "6f17fbd0-1248-40e5-8c0f-66294298fabd"]]
4326
+  (0.1ms) SAVEPOINT active_record_1
4327
+  (2.5ms) select 'dummy_foo' as dummy_bar, vesion() as db_version
4328
+ PG::UndefinedFunction: ERROR: function vesion() does not exist
4329
+ LINE 1: select 'dummy_foo' as dummy_bar, vesion() as db_version
4330
+ ^
4331
+ HINT: No function matches the given name and argument types. You might need to add explicit type casts.
4332
+ : select 'dummy_foo' as dummy_bar, vesion() as db_version
4333
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
4334
+ Rendered /Users/ton/code/dbhero/app/views/dbhero/dataclips/edit.html.slim within layouts/dbhero/application (0.3ms)
4335
+ Completed 200 OK in 9ms (Views: 3.4ms | ActiveRecord: 3.0ms)
4336
+  (0.3ms) ROLLBACK
4337
+  (0.1ms) BEGIN
4338
+  (0.1ms) SAVEPOINT active_record_1
4339
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'dummy_foo' as dummy_bar, vesion() as db_version"], ["created_at", "2015-03-26 05:19:54.423002"], ["updated_at", "2015-03-26 05:19:54.423002"], ["token", "940b252d-f5cb-41ab-8f81-e0074b5429e9"]]
4340
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4341
+ Processing by Dbhero::DataclipsController#edit as HTML
4342
+ Parameters: {"id"=>"940b252d-f5cb-41ab-8f81-e0074b5429e9"}
4343
+ Dbhero::Dataclip Load (0.3ms) SELECT "dbhero_dataclips".* FROM "dbhero_dataclips" WHERE "dbhero_dataclips"."token" = $1 LIMIT 1 [["token", "940b252d-f5cb-41ab-8f81-e0074b5429e9"]]
4344
+  (0.1ms) SAVEPOINT active_record_1
4345
+  (0.3ms) select 'dummy_foo' as dummy_bar, vesion() as db_version
4346
+ PG::UndefinedFunction: ERROR: function vesion() does not exist
4347
+ LINE 1: select 'dummy_foo' as dummy_bar, vesion() as db_version
4348
+ ^
4349
+ HINT: No function matches the given name and argument types. You might need to add explicit type casts.
4350
+ : select 'dummy_foo' as dummy_bar, vesion() as db_version
4351
+  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1
4352
+ Rendered /Users/ton/code/dbhero/app/views/dbhero/dataclips/edit.html.slim within layouts/dbhero/application (0.2ms)
4353
+ Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.9ms)
4354
+  (0.2ms) ROLLBACK
4355
+  (0.1ms) BEGIN
4356
+  (0.1ms) SAVEPOINT active_record_1
4357
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'dummy_foo' as dummy_bar, vesion() as db_version"], ["created_at", "2015-03-26 05:19:54.431898"], ["updated_at", "2015-03-26 05:19:54.431898"], ["token", "5dac2c84-c298-4dec-b2fd-2e6914ff2311"]]
4358
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4359
+ Processing by Dbhero::DataclipsController#edit as HTML
4360
+ Parameters: {"id"=>"5dac2c84-c298-4dec-b2fd-2e6914ff2311"}
4361
+ Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)
4362
+  (0.2ms) ROLLBACK
4363
+  (0.1ms) BEGIN
4364
+  (0.1ms) SAVEPOINT active_record_1
4365
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'dummy_foo' as dummy_bar, vesion() as db_version"], ["created_at", "2015-03-26 05:19:54.438552"], ["updated_at", "2015-03-26 05:19:54.438552"], ["token", "1d31725f-0a31-4c3c-b977-aba1851bf25b"]]
4366
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4367
+ Processing by Dbhero::DataclipsController#edit as HTML
4368
+ Parameters: {"id"=>"1d31725f-0a31-4c3c-b977-aba1851bf25b"}
4369
+ Dbhero::Dataclip Load (0.4ms) SELECT "dbhero_dataclips".* FROM "dbhero_dataclips" WHERE "dbhero_dataclips"."token" = $1 LIMIT 1 [["token", "1d31725f-0a31-4c3c-b977-aba1851bf25b"]]
4370
+  (0.1ms) SAVEPOINT active_record_1
4371
+  (0.4ms) select 'dummy_foo' as dummy_bar, vesion() as db_version
4372
+ PG::UndefinedFunction: ERROR: function vesion() does not exist
4373
+ LINE 1: select 'dummy_foo' as dummy_bar, vesion() as db_version
4374
+ ^
4375
+ HINT: No function matches the given name and argument types. You might need to add explicit type casts.
4376
+ : select 'dummy_foo' as dummy_bar, vesion() as db_version
4377
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
4378
+ Rendered /Users/ton/code/dbhero/app/views/dbhero/dataclips/edit.html.slim within layouts/dbhero/application (0.2ms)
4379
+ Completed 200 OK in 3ms (Views: 1.1ms | ActiveRecord: 0.9ms)
4380
+  (0.2ms) ROLLBACK
4381
+  (0.1ms) BEGIN
4382
+ Processing by Dbhero::DataclipsController#create as HTML
4383
+ Parameters: {"dataclip"=>{"description"=>"foo bar", "raw_query"=>"select 'foo' as bar"}}
4384
+ Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)
4385
+  (0.2ms) ROLLBACK
4386
+  (0.1ms) BEGIN
4387
+  (0.2ms) SAVEPOINT active_record_1
4388
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "foo bar"], ["raw_query", "select 'foo' as bar"], ["created_at", "2015-03-26 05:19:54.452888"], ["updated_at", "2015-03-26 05:19:54.452888"], ["token", "0a972503-3127-47d9-98e9-2c03e0f057db"]]
4389
+  (0.3ms) RELEASE SAVEPOINT active_record_1
4390
+ Processing by Dbhero::DataclipsController#update as HTML
4391
+ Parameters: {"dataclip"=>{"description"=>"updated"}, "id"=>"0a972503-3127-47d9-98e9-2c03e0f057db"}
4392
+ Dbhero::Dataclip Load (0.4ms) SELECT "dbhero_dataclips".* FROM "dbhero_dataclips" WHERE "dbhero_dataclips"."token" = $1 LIMIT 1 [["token", "0a972503-3127-47d9-98e9-2c03e0f057db"]]
4393
+  (0.1ms) SAVEPOINT active_record_1
4394
+ SQL (0.4ms) UPDATE "dbhero_dataclips" SET "description" = $1, "updated_at" = $2 WHERE "dbhero_dataclips"."id" = $3 [["description", "updated"], ["updated_at", "2015-03-26 05:19:54.458977"], ["id", 12]]
4395
+  (0.2ms) RELEASE SAVEPOINT active_record_1
4396
+ Redirected to http://test.host/dbhero/dataclips/0a972503-3127-47d9-98e9-2c03e0f057db/edit
4397
+ Completed 302 Found in 9ms (ActiveRecord: 1.1ms)
4398
+  (0.2ms) ROLLBACK
4399
+  (0.3ms) BEGIN
4400
+  (0.3ms) SAVEPOINT active_record_1
4401
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "foo bar"], ["raw_query", "select 'foo' as bar"], ["created_at", "2015-03-26 05:19:54.470735"], ["updated_at", "2015-03-26 05:19:54.470735"], ["token", "ea8079d3-21d2-43ff-a61e-ec05224d46e9"]]
4402
+  (0.2ms) RELEASE SAVEPOINT active_record_1
4403
+ Processing by Dbhero::DataclipsController#update as HTML
4404
+ Parameters: {"dataclip"=>{"description"=>"updated"}, "id"=>"ea8079d3-21d2-43ff-a61e-ec05224d46e9"}
4405
+ Dbhero::Dataclip Load (0.4ms) SELECT "dbhero_dataclips".* FROM "dbhero_dataclips" WHERE "dbhero_dataclips"."token" = $1 LIMIT 1 [["token", "ea8079d3-21d2-43ff-a61e-ec05224d46e9"]]
4406
+  (0.2ms) SAVEPOINT active_record_1
4407
+ SQL (0.4ms) UPDATE "dbhero_dataclips" SET "description" = $1, "updated_at" = $2 WHERE "dbhero_dataclips"."id" = $3 [["description", "updated"], ["updated_at", "2015-03-26 05:19:54.476329"], ["id", 13]]
4408
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4409
+ Redirected to http://test.host/dbhero/dataclips/ea8079d3-21d2-43ff-a61e-ec05224d46e9/edit
4410
+ Completed 302 Found in 4ms (ActiveRecord: 1.1ms)
4411
+ Dbhero::Dataclip Load (0.3ms) SELECT "dbhero_dataclips".* FROM "dbhero_dataclips" WHERE "dbhero_dataclips"."description" = $1 LIMIT 1 [["description", "updated"]]
4412
+  (0.2ms) ROLLBACK
4413
+  (0.1ms) BEGIN
4414
+  (0.2ms) SAVEPOINT active_record_1
4415
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "foo bar"], ["raw_query", "select 'foo' as bar"], ["created_at", "2015-03-26 05:19:54.483170"], ["updated_at", "2015-03-26 05:19:54.483170"], ["token", "f1a17cf5-6315-41cc-879a-75b3aab6ca36"]]
4416
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4417
+ Processing by Dbhero::DataclipsController#update as HTML
4418
+ Parameters: {"dataclip"=>{"description"=>"updated"}, "id"=>"f1a17cf5-6315-41cc-879a-75b3aab6ca36"}
4419
+ Dbhero::Dataclip Load (0.5ms) SELECT "dbhero_dataclips".* FROM "dbhero_dataclips" WHERE "dbhero_dataclips"."token" = $1 LIMIT 1 [["token", "f1a17cf5-6315-41cc-879a-75b3aab6ca36"]]
4420
+  (0.1ms) SAVEPOINT active_record_1
4421
+ SQL (0.3ms) UPDATE "dbhero_dataclips" SET "description" = $1, "updated_at" = $2 WHERE "dbhero_dataclips"."id" = $3 [["description", "updated"], ["updated_at", "2015-03-26 05:19:54.488556"], ["id", 14]]
4422
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4423
+ Redirected to http://test.host/dbhero/dataclips/f1a17cf5-6315-41cc-879a-75b3aab6ca36/edit
4424
+ Completed 302 Found in 4ms (ActiveRecord: 1.1ms)
4425
+  (0.1ms) ROLLBACK
4426
+  (0.1ms) BEGIN
4427
+  (0.1ms) SAVEPOINT active_record_1
4428
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "foo bar"], ["raw_query", "select 'foo' as bar"], ["created_at", "2015-03-26 05:19:54.494349"], ["updated_at", "2015-03-26 05:19:54.494349"], ["token", "2a7cfed3-86bf-49b2-a765-74fb402a1f00"]]
4429
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4430
+ Processing by Dbhero::DataclipsController#update as HTML
4431
+ Parameters: {"dataclip"=>{"description"=>"updated"}, "id"=>"2a7cfed3-86bf-49b2-a765-74fb402a1f00"}
4432
+ Dbhero::Dataclip Load (0.2ms) SELECT "dbhero_dataclips".* FROM "dbhero_dataclips" WHERE "dbhero_dataclips"."token" = $1 LIMIT 1 [["token", "2a7cfed3-86bf-49b2-a765-74fb402a1f00"]]
4433
+  (0.1ms) SAVEPOINT active_record_1
4434
+ SQL (0.3ms) UPDATE "dbhero_dataclips" SET "description" = $1, "updated_at" = $2 WHERE "dbhero_dataclips"."id" = $3 [["description", "updated"], ["updated_at", "2015-03-26 05:19:54.498348"], ["id", 15]]
4435
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4436
+ Redirected to http://test.host/dbhero/dataclips/2a7cfed3-86bf-49b2-a765-74fb402a1f00/edit
4437
+ Completed 302 Found in 4ms (ActiveRecord: 0.8ms)
4438
+ Dbhero::Dataclip Load (0.4ms) SELECT "dbhero_dataclips".* FROM "dbhero_dataclips" WHERE "dbhero_dataclips"."description" = $1 LIMIT 1 [["description", "updated"]]
4439
+  (0.3ms) ROLLBACK
4440
+  (0.1ms) BEGIN
4441
+  (0.2ms) SAVEPOINT active_record_1
4442
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "foo bar"], ["raw_query", "select 'foo' as bar"], ["created_at", "2015-03-26 05:19:54.521061"], ["updated_at", "2015-03-26 05:19:54.521061"], ["token", "83ac900f-5c82-453e-a038-9d6939ec8946"]]
4443
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4444
+ Processing by Dbhero::DataclipsController#update as HTML
4445
+ Parameters: {"dataclip"=>{"description"=>"updated"}, "id"=>"83ac900f-5c82-453e-a038-9d6939ec8946"}
4446
+ Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)
4447
+  (0.2ms) ROLLBACK
4448
+  (0.1ms) BEGIN
4449
+  (0.1ms) SAVEPOINT active_record_1
4450
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "foo bar"], ["raw_query", "select 'foo' as bar"], ["created_at", "2015-03-26 05:19:54.528862"], ["updated_at", "2015-03-26 05:19:54.528862"], ["token", "b772e780-fa8e-42fe-bec5-9ad77a696943"]]
4451
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4452
+ Dbhero::Dataclip Load (0.3ms) SELECT "dbhero_dataclips".* FROM "dbhero_dataclips" WHERE "dbhero_dataclips"."id" = $1 LIMIT 1 [["id", 17]]
4453
+  (0.1ms) ROLLBACK
4454
+  (0.1ms) BEGIN
4455
+  (0.1ms) SAVEPOINT active_record_1
4456
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "foo bar"], ["raw_query", "select 'foo' as bar"], ["created_at", "2015-03-26 05:19:54.534643"], ["updated_at", "2015-03-26 05:19:54.534643"], ["token", "fb439620-358a-4624-ab0d-3de083b55a7f"]]
4457
+  (0.3ms) RELEASE SAVEPOINT active_record_1
4458
+ Processing by Dbhero::DataclipsController#update as HTML
4459
+ Parameters: {"dataclip"=>{"description"=>"updated"}, "id"=>"fb439620-358a-4624-ab0d-3de083b55a7f"}
4460
+ Dbhero::Dataclip Load (0.3ms) SELECT "dbhero_dataclips".* FROM "dbhero_dataclips" WHERE "dbhero_dataclips"."token" = $1 LIMIT 1 [["token", "fb439620-358a-4624-ab0d-3de083b55a7f"]]
4461
+  (0.2ms) SAVEPOINT active_record_1
4462
+ SQL (0.4ms) UPDATE "dbhero_dataclips" SET "description" = $1, "updated_at" = $2 WHERE "dbhero_dataclips"."id" = $3 [["description", "updated"], ["updated_at", "2015-03-26 05:19:54.539926"], ["id", 18]]
4463
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4464
+ Redirected to http://test.host/dbhero/dataclips/fb439620-358a-4624-ab0d-3de083b55a7f/edit
4465
+ Completed 302 Found in 4ms (ActiveRecord: 1.0ms)
4466
+  (0.2ms) ROLLBACK
4467
+  (0.1ms) BEGIN
4468
+  (0.1ms) SAVEPOINT active_record_1
4469
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "foo bar"], ["raw_query", "select 'foo' as bar"], ["created_at", "2015-03-26 05:19:54.545420"], ["updated_at", "2015-03-26 05:19:54.545420"], ["token", "9b98afc4-c542-49a1-b9d3-5928240e2111"]]
4470
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4471
+ Processing by Dbhero::DataclipsController#update as HTML
4472
+ Parameters: {"dataclip"=>{"description"=>"updated"}, "id"=>"9b98afc4-c542-49a1-b9d3-5928240e2111"}
4473
+ Dbhero::Dataclip Load (0.4ms) SELECT "dbhero_dataclips".* FROM "dbhero_dataclips" WHERE "dbhero_dataclips"."token" = $1 LIMIT 1 [["token", "9b98afc4-c542-49a1-b9d3-5928240e2111"]]
4474
+  (0.2ms) SAVEPOINT active_record_1
4475
+ SQL (0.4ms) UPDATE "dbhero_dataclips" SET "description" = $1, "updated_at" = $2 WHERE "dbhero_dataclips"."id" = $3 [["description", "updated"], ["updated_at", "2015-03-26 05:19:54.550914"], ["id", 19]]
4476
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4477
+ Redirected to http://test.host/dbhero/dataclips/9b98afc4-c542-49a1-b9d3-5928240e2111/edit
4478
+ Completed 302 Found in 5ms (ActiveRecord: 1.1ms)
4479
+ Dbhero::Dataclip Load (0.4ms) SELECT "dbhero_dataclips".* FROM "dbhero_dataclips" WHERE "dbhero_dataclips"."description" = $1 LIMIT 1 [["description", "updated"]]
4480
+  (0.2ms) ROLLBACK
4481
+  (0.1ms) BEGIN
4482
+  (0.3ms) ROLLBACK
4483
+  (0.1ms) BEGIN
4484
+  (0.2ms) ROLLBACK
4485
+  (0.1ms) BEGIN
4486
+  (0.1ms) ROLLBACK
4487
+  (0.1ms) BEGIN
4488
+  (0.1ms) SAVEPOINT active_record_1
4489
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'dummy_foo' as dummy_bar, vesion() as db_version"], ["created_at", "2015-03-26 05:19:54.582085"], ["updated_at", "2015-03-26 05:19:54.582085"], ["token", "81c2949c-c462-46cf-aa8e-dae2e3f1a8cc"]]
4490
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4491
+  (0.1ms) ROLLBACK
4492
+  (0.1ms) BEGIN
4493
+  (0.2ms) SAVEPOINT active_record_1
4494
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "updated_at", "created_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'dummy_foo' as dummy_bar, vesion() as db_version"], ["updated_at", "2015-03-24 05:19:54.584719"], ["created_at", "2015-03-26 05:19:54.586485"], ["token", "9a4105fa-505d-4fb8-9f0e-7158e343d362"]]
4495
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4496
+  (0.1ms) SAVEPOINT active_record_1
4497
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "updated_at", "created_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'dummy_foo' as dummy_bar, vesion() as db_version"], ["updated_at", "2015-03-25 05:19:54.588312"], ["created_at", "2015-03-26 05:19:54.589115"], ["token", "83e09bcc-095c-4bd9-8f2c-7c58e2210d28"]]
4498
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4499
+  (0.1ms) SAVEPOINT active_record_1
4500
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "updated_at", "created_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'dummy_foo' as dummy_bar, vesion() as db_version"], ["updated_at", "2015-03-22 05:19:54.590589"], ["created_at", "2015-03-26 05:19:54.591415"], ["token", "13717853-6d5d-4d5b-90db-b218d580c80e"]]
4501
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4502
+ Dbhero::Dataclip Load (0.9ms) SELECT "dbhero_dataclips".* FROM "dbhero_dataclips" ORDER BY "dbhero_dataclips"."updated_at" DESC
4503
+  (0.2ms) ROLLBACK
4504
+  (0.2ms) BEGIN
4505
+  (0.2ms) SAVEPOINT active_record_1
4506
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'dummy_foo' as dummy_bar, vesion() as db_version"], ["created_at", "2015-03-26 05:19:54.598358"], ["updated_at", "2015-03-26 05:19:54.598358"], ["token", "811cde90-6f4e-46bf-8de8-e91a3e1df170"]]
4507
+  (0.2ms) RELEASE SAVEPOINT active_record_1
4508
+  (0.1ms) ROLLBACK
4509
+  (0.1ms) BEGIN
4510
+  (0.1ms) SAVEPOINT active_record_1
4511
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "title\ndescription\nfoo"], ["raw_query", "select 'dummy_foo' as dummy_bar, vesion() as db_version"], ["created_at", "2015-03-26 05:19:54.602412"], ["updated_at", "2015-03-26 05:19:54.602412"], ["token", "5042709f-4646-4281-8611-129b2d496ed7"]]
4512
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4513
+  (0.1ms) ROLLBACK
4514
+  (0.1ms) BEGIN
4515
+  (0.1ms) SAVEPOINT active_record_1
4516
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "title\ndescription\nfoo"], ["raw_query", "select 'dummy_foo' as dummy_bar, vesion() as db_version"], ["created_at", "2015-03-26 05:19:54.605974"], ["updated_at", "2015-03-26 05:19:54.605974"], ["token", "bd3042fa-da29-4e72-8cef-4d6c799e0a7a"]]
4517
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4518
+  (0.1ms) ROLLBACK
4519
+  (0.1ms) BEGIN
4520
+  (0.1ms) SAVEPOINT active_record_1
4521
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'foo'::text as bar, 'bar'::text as foo"], ["created_at", "2015-03-26 05:19:54.609500"], ["updated_at", "2015-03-26 05:19:54.609500"], ["token", "f0e3b266-6c2f-46b5-95d6-9fc813fb1337"]]
4522
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4523
+  (0.1ms) SAVEPOINT active_record_1
4524
+  (0.3ms) select 'foo'::text as bar, 'bar'::text as foo
4525
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
4526
+  (0.1ms) ROLLBACK
4527
+  (0.1ms) BEGIN
4528
+  (0.1ms) SAVEPOINT active_record_1
4529
+ SQL (0.2ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select foo.nest from (select unnest(ARRAY[1,2,3]) as nest) foo"], ["created_at", "2015-03-26 05:19:54.613916"], ["updated_at", "2015-03-26 05:19:54.613916"], ["token", "c5241e6d-bbac-4097-b2b4-f7ba61d1cfe5"]]
4530
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4531
+  (0.1ms) SAVEPOINT active_record_1
4532
+  (1.6ms) select foo.nest from (select unnest(ARRAY[1,2,3]) as nest) foo
4533
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
4534
+  (0.1ms) ROLLBACK
4535
+  (0.1ms) BEGIN
4536
+  (0.1ms) SAVEPOINT active_record_1
4537
+ SQL (0.5ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'foo'::text as bar, 'bar'::text as foo"], ["created_at", "2015-03-26 05:19:54.619598"], ["updated_at", "2015-03-26 05:19:54.619598"], ["token", "12548a3b-bc28-4d3a-8a92-2e8857c5f063"]]
4538
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4539
+  (0.1ms) SAVEPOINT active_record_1
4540
+  (0.2ms) select 'foo'::text as bar, 'bar'::text as foo
4541
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
4542
+  (0.2ms) ROLLBACK
4543
+  (0.1ms) BEGIN
4544
+  (0.1ms) SAVEPOINT active_record_1
4545
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'foo'::text as bar, 'bar'::text as foo"], ["created_at", "2015-03-26 05:19:54.626015"], ["updated_at", "2015-03-26 05:19:54.626015"], ["token", "50a0d892-843c-4d73-9c53-c89a1da82ca8"]]
4546
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4547
+  (0.1ms) SAVEPOINT active_record_1
4548
+  (0.2ms) select 'foo'::text as bar, 'bar'::text as foo
4549
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
4550
+  (0.1ms) ROLLBACK
4551
+  (0.1ms) BEGIN
4552
+  (0.1ms) SAVEPOINT active_record_1
4553
+ SQL (0.2ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'dummy_foo' as dummy_bar, vesion() as db_version"], ["created_at", "2015-03-26 05:19:54.630239"], ["updated_at", "2015-03-26 05:19:54.630239"], ["token", "b608a842-47ea-4881-a6ad-e4581fc1390e"]]
4554
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4555
+  (0.1ms) SAVEPOINT active_record_1
4556
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'dummy_foo' as dummy_bar, vesion() as db_version"], ["created_at", "2015-03-26 05:19:54.632359"], ["updated_at", "2015-03-26 05:19:54.632359"], ["token", "0691e8e8-7baf-4d56-a590-28f53e6ae78d"]]
4557
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4558
+  (0.1ms) SAVEPOINT active_record_1
4559
+ SQL (0.4ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'dummy_foo' as dummy_bar, vesion() as db_version"], ["created_at", "2015-03-26 05:19:54.634679"], ["updated_at", "2015-03-26 05:19:54.634679"], ["token", "9a2e9463-a7a9-4f8b-9331-6a678f7798cb"]]
4560
+  (0.2ms) RELEASE SAVEPOINT active_record_1
4561
+  (0.1ms) SAVEPOINT active_record_1
4562
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'dummy_foo' as dummy_bar, vesion() as db_version"], ["created_at", "2015-03-26 05:19:54.637495"], ["updated_at", "2015-03-26 05:19:54.637495"], ["token", "e422d859-13c7-4158-b352-22de696c831a"]]
4563
+  (0.2ms) RELEASE SAVEPOINT active_record_1
4564
+  (0.1ms) SAVEPOINT active_record_1
4565
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'dummy_foo' as dummy_bar, vesion() as db_version"], ["created_at", "2015-03-26 05:19:54.639810"], ["updated_at", "2015-03-26 05:19:54.639810"], ["token", "6d7cb021-2f00-4da6-b957-72d89c629b26"]]
4566
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4567
+  (0.1ms) SAVEPOINT active_record_1
4568
+ SQL (0.2ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "TRUNCATE table dbhero_dataclips"], ["created_at", "2015-03-26 05:19:54.641899"], ["updated_at", "2015-03-26 05:19:54.641899"], ["token", "7a534f14-179a-45da-a552-189deae79187"]]
4569
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4570
+  (0.1ms) SAVEPOINT active_record_1
4571
+  (6.6ms) TRUNCATE table dbhero_dataclips
4572
+  (1.3ms) ROLLBACK TO SAVEPOINT active_record_1
4573
+  (0.7ms) SELECT COUNT(*) FROM "dbhero_dataclips"
4574
+  (0.2ms) ROLLBACK
4575
+  (0.1ms) BEGIN
4576
+  (0.1ms) SAVEPOINT active_record_1
4577
+ SQL (0.4ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'dummy_foo' as dummy_bar, vesion() as db_version"], ["created_at", "2015-03-26 05:19:54.656037"], ["updated_at", "2015-03-26 05:19:54.656037"], ["token", "18d4d564-51f6-4a89-aa2a-2e8faa2e9d32"]]
4578
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4579
+  (0.1ms) SAVEPOINT active_record_1
4580
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'dummy_foo' as dummy_bar, vesion() as db_version"], ["created_at", "2015-03-26 05:19:54.658503"], ["updated_at", "2015-03-26 05:19:54.658503"], ["token", "d87d881d-fda8-4bd9-9e66-82e35b765492"]]
4581
+  (0.2ms) RELEASE SAVEPOINT active_record_1
4582
+  (0.1ms) SAVEPOINT active_record_1
4583
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'dummy_foo' as dummy_bar, vesion() as db_version"], ["created_at", "2015-03-26 05:19:54.661097"], ["updated_at", "2015-03-26 05:19:54.661097"], ["token", "210a5d36-02d0-4734-9110-473dfa404b70"]]
4584
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4585
+  (0.2ms) SAVEPOINT active_record_1
4586
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'dummy_foo' as dummy_bar, vesion() as db_version"], ["created_at", "2015-03-26 05:19:54.664207"], ["updated_at", "2015-03-26 05:19:54.664207"], ["token", "c1b1dbff-cc5c-4e30-a891-0557ade39505"]]
4587
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4588
+  (0.1ms) SAVEPOINT active_record_1
4589
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "select 'dummy_foo' as dummy_bar, vesion() as db_version"], ["created_at", "2015-03-26 05:19:54.666511"], ["updated_at", "2015-03-26 05:19:54.666511"], ["token", "66e7f65a-0ffe-4ee3-b689-7ab40685c2e8"]]
4590
+  (0.2ms) RELEASE SAVEPOINT active_record_1
4591
+  (0.1ms) SAVEPOINT active_record_1
4592
+ SQL (0.3ms) INSERT INTO "dbhero_dataclips" ("description", "raw_query", "created_at", "updated_at", "token") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["description", "Dummy query\nwich describes a dummy string and database version"], ["raw_query", "TRUNCATE table dbhero_dataclips; commit;"], ["created_at", "2015-03-26 05:19:54.668799"], ["updated_at", "2015-03-26 05:19:54.668799"], ["token", "4b065730-14ae-40fc-a4f6-fb79ef3b9c5b"]]
4593
+  (0.2ms) RELEASE SAVEPOINT active_record_1
4594
+  (0.1ms) SAVEPOINT active_record_1
4595
+  (0.4ms) TRUNCATE table dbhero_dataclips; commit;
4596
+ PG::SyntaxError: ERROR: cannot insert multiple commands into a prepared statement
4597
+ : TRUNCATE table dbhero_dataclips; commit;
4598
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
4599
+  (0.4ms) SELECT COUNT(*) FROM "dbhero_dataclips"
4600
+  (0.2ms) ROLLBACK
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbhero
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antônio Roberto Silva
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-26 00:00:00.000000000 Z
11
+ date: 2015-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails