rails_db 0.6 → 0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +24 -0
- data/Gemfile.lock +159 -0
- data/app/assets/images/rails_db/railsdb.png +0 -0
- data/app/assets/images/rails_db/runsql.png +0 -0
- data/app/assets/javascripts/rails_db/application.js +2 -1
- data/app/assets/javascripts/rails_db/foundation.min.js +20 -0
- data/app/assets/javascripts/rails_db/foundation/foundation.abide.js +426 -0
- data/app/assets/javascripts/rails_db/foundation/foundation.accordion.js +125 -0
- data/app/assets/javascripts/rails_db/foundation/foundation.alert.js +43 -0
- data/app/assets/javascripts/rails_db/foundation/foundation.clearing.js +586 -0
- data/app/assets/javascripts/rails_db/foundation/foundation.dropdown.js +468 -0
- data/app/assets/javascripts/rails_db/foundation/foundation.equalizer.js +104 -0
- data/app/assets/javascripts/rails_db/foundation/foundation.interchange.js +360 -0
- data/app/assets/javascripts/rails_db/foundation/foundation.joyride.js +935 -0
- data/app/assets/javascripts/rails_db/foundation/foundation.js +732 -0
- data/app/assets/javascripts/rails_db/foundation/foundation.magellan.js +214 -0
- data/app/assets/javascripts/rails_db/foundation/foundation.offcanvas.js +225 -0
- data/app/assets/javascripts/rails_db/foundation/foundation.orbit.js +476 -0
- data/app/assets/javascripts/rails_db/foundation/foundation.reveal.js +522 -0
- data/app/assets/javascripts/rails_db/foundation/foundation.slider.js +296 -0
- data/app/assets/javascripts/rails_db/foundation/foundation.tab.js +247 -0
- data/app/assets/javascripts/rails_db/foundation/foundation.tooltip.js +348 -0
- data/app/assets/javascripts/rails_db/foundation/foundation.topbar.js +458 -0
- data/app/assets/javascripts/rails_db/sticky.js +4 -16
- data/app/assets/javascripts/rails_db/vendor/fastclick.js +8 -0
- data/app/assets/javascripts/rails_db/vendor/jquery.cookie.js +8 -0
- data/app/assets/javascripts/rails_db/vendor/jquery.js +26 -0
- data/app/assets/javascripts/rails_db/vendor/modernizr.js +8 -0
- data/app/assets/javascripts/rails_db/vendor/placeholder.js +2 -0
- data/app/assets/stylesheets/rails_db/application.css +1 -0
- data/app/assets/stylesheets/rails_db/foundation.css +6579 -0
- data/app/assets/stylesheets/rails_db/foundation.min.css +1 -0
- data/app/assets/stylesheets/rails_db/foundation_and_overrides.css.scss +7 -4
- data/app/assets/stylesheets/rails_db/normalize.css +424 -0
- data/app/views/layouts/rails_db/application.html.erb +0 -1
- data/app/views/rails_db/dashboard/index.html.erb +1 -0
- data/app/views/rails_db/dashboard/standalone.html.erb +19 -0
- data/app/views/rails_db/shared/_footer.html.erb +36 -35
- data/app/views/rails_db/shared/_header.html.erb +7 -0
- data/app/views/rails_db/tables/data.js.erb +3 -1
- data/app/views/rails_db/tables/show.js.erb +3 -1
- data/bin/rails_db +3 -0
- data/bin/railsdb +3 -0
- data/bin/runsql +50 -0
- data/config/routes.rb +1 -1
- data/lib/ext/string_ext.rb +10 -0
- data/lib/libs.rb +24 -0
- data/lib/rails_db.rb +16 -8
- data/lib/rails_db/adapters/base_adapter.rb +21 -2
- data/lib/rails_db/adapters/mysql.rb +8 -0
- data/lib/rails_db/blank_results.rb +8 -0
- data/lib/rails_db/database.rb +12 -0
- data/lib/rails_db/mysql_result.rb +18 -0
- data/lib/rails_db/table.rb +10 -10
- data/lib/rails_db/table_data.rb +4 -4
- data/lib/rails_db/table_pagination.rb +1 -1
- data/lib/rails_db/version.rb +1 -1
- data/lib/standalone.rb +49 -0
- data/rails_db.gemspec +32 -0
- data/test/dashboard_controller_test.rb +3 -0
- data/test/dummy/db/rails_db.sqlite3 +0 -0
- data/test/dummy/db/rails_db_dev.sqlite3 +0 -0
- data/test/dummy/db/schema.rb +40 -40
- data/test/sql_query_test.rb +13 -0
- data/test/standalone/Gemfile +17 -0
- data/test/standalone/Gemfile.lock +138 -0
- data/test/standalone/README.rdoc +28 -0
- data/test/standalone/Rakefile +6 -0
- data/test/standalone/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/test/standalone/app/assets/fonts/glyphicons-halflings-regular.svg +288 -0
- data/test/standalone/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/test/standalone/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/test/standalone/app/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/test/standalone/app/assets/javascripts/application.js +13 -0
- data/test/standalone/app/assets/stylesheets/application.css +15 -0
- data/test/standalone/app/assets/stylesheets/bootstrap-theme.min.css +5 -0
- data/test/standalone/app/assets/stylesheets/bootstrap.min.css +5 -0
- data/test/standalone/app/controllers/application_controller.rb +5 -0
- data/test/standalone/app/controllers/home_controller.rb +7 -0
- data/test/standalone/app/helpers/application_helper.rb +2 -0
- data/test/standalone/app/views/home/index.html.erb +3 -0
- data/test/standalone/app/views/layouts/application.html.erb +16 -0
- data/test/standalone/bin/bundle +3 -0
- data/test/standalone/bin/rails +4 -0
- data/test/standalone/bin/rake +4 -0
- data/test/standalone/bin/setup +29 -0
- data/test/standalone/config.ru +4 -0
- data/test/standalone/config/application.rb +40 -0
- data/test/standalone/config/boot.rb +7 -0
- data/test/standalone/config/database.yml +0 -0
- data/test/standalone/config/environment.rb +5 -0
- data/test/standalone/config/environments/development.rb +43 -0
- data/test/standalone/config/environments/production.rb +82 -0
- data/test/standalone/config/environments/test.rb +46 -0
- data/test/standalone/config/initializers/assets.rb +11 -0
- data/test/standalone/config/initializers/backtrace_silencers.rb +7 -0
- data/test/standalone/config/initializers/cookies_serializer.rb +3 -0
- data/test/standalone/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/standalone/config/initializers/inflections.rb +16 -0
- data/test/standalone/config/initializers/mime_types.rb +4 -0
- data/test/standalone/config/initializers/quite_assets.rb +11 -0
- data/test/standalone/config/initializers/rails_db.rb +23 -0
- data/test/standalone/config/initializers/session_store.rb +3 -0
- data/test/standalone/config/initializers/wrap_parameters.rb +14 -0
- data/test/standalone/config/locales/en.yml +23 -0
- data/test/standalone/config/routes.rb +5 -0
- data/test/standalone/config/secrets.yml +22 -0
- data/test/standalone/public/404.html +67 -0
- data/test/standalone/public/422.html +67 -0
- data/test/standalone/public/500.html +66 -0
- data/test/standalone/public/favicon.ico +0 -0
- metadata +160 -37
@@ -0,0 +1,19 @@
|
|
1
|
+
<h1>Rails DB - Command Line</h1>
|
2
|
+
|
3
|
+
<p>
|
4
|
+
After installing Rails DB gem you can execute locally in any application folder following commands <code>railsdb</code> and <code>runsql</code>.
|
5
|
+
</p>
|
6
|
+
|
7
|
+
<h3>railsdb</h3>
|
8
|
+
|
9
|
+
<p><code>>railsdb</code> to start railsdb standalone application automatically connected to local <code>config/database.yml</code> file.</p>
|
10
|
+
|
11
|
+
<p><%= image_tag 'rails_db/railsdb.png' %>
|
12
|
+
|
13
|
+
<h3>runsql</h3>
|
14
|
+
|
15
|
+
<p><code>>runsql 'select count(*) from users'</code> to run sql within your database (configured in <code>config/database.yml</code> file).</p>
|
16
|
+
|
17
|
+
<p><%= image_tag 'rails_db/runsql.png' %>
|
18
|
+
|
19
|
+
<p>You can connect to production DB by using environment variable <code>RAILS_ENV=production</code>.</p>
|
@@ -7,48 +7,49 @@
|
|
7
7
|
<div class="large-6 columns">
|
8
8
|
<ul class="inline-list right">
|
9
9
|
<li>
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
<%= link_to '/' do %>
|
11
|
+
<%= fa_icon 'home' %>
|
12
|
+
Home
|
13
|
+
<% end %>
|
14
14
|
</li>
|
15
15
|
<li>|</li>
|
16
16
|
<li>
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
<%= link_to rails_db.root_path do %>
|
18
|
+
<%= fa_icon 'list-ul' %>
|
19
|
+
Dashboard
|
20
|
+
<% end %>
|
21
21
|
</li>
|
22
22
|
<li>|</li>
|
23
23
|
<li>
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
</li>
|
24
|
+
<%= link_to rails_db.sql_path do %>
|
25
|
+
<%= fa_icon 'database' %>
|
26
|
+
SQL Editor
|
27
|
+
<% end %>
|
28
|
+
</li>
|
29
|
+
<li>|</li>
|
30
|
+
<li>
|
31
|
+
<%= link_to rails_db.sql_import_path do %>
|
32
|
+
<%= fa_icon 'download' %>
|
33
|
+
Import
|
34
|
+
<% end %>
|
35
|
+
</li>
|
36
|
+
<li>|</li>
|
37
|
+
<li>
|
38
|
+
<%= link_to rails_db.data_table_path do %>
|
39
|
+
<%= fa_icon 'table' %>
|
40
|
+
Data Table
|
41
|
+
<% end %>
|
42
|
+
</li>
|
43
|
+
<li>|</li>
|
44
|
+
<li>
|
45
|
+
<a data-reveal-id="more_gems_modal">
|
46
|
+
<%= fa_icon 'heart' %>
|
47
|
+
More Gems
|
48
|
+
</a>
|
49
|
+
</li>
|
51
50
|
</ul>
|
51
|
+
<div class='clear'></div>
|
52
52
|
</div>
|
53
53
|
</div>
|
54
|
+
<%= render '/rails_db/shared/gems' %>
|
54
55
|
</div>
|
data/bin/rails_db
ADDED
data/bin/railsdb
ADDED
data/bin/runsql
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'active_record'
|
4
|
+
require 'erb'
|
5
|
+
require 'yaml'
|
6
|
+
require 'terminal-table'
|
7
|
+
|
8
|
+
require_relative "../lib/rails_db"
|
9
|
+
|
10
|
+
debug = false
|
11
|
+
|
12
|
+
ENGINE_ROOT = File.expand_path('../..', __FILE__)
|
13
|
+
ENGINE_PATH = File.expand_path('../../lib/rails_db/engine', __FILE__)
|
14
|
+
|
15
|
+
require "#{ENGINE_ROOT}/lib/ext/string_ext"
|
16
|
+
require "#{ENGINE_ROOT}/lib/libs"
|
17
|
+
|
18
|
+
database_yml = ::File.expand_path(File.join('.', 'config', 'database.yml'))
|
19
|
+
app_path = ::File.expand_path(File.join('.'))
|
20
|
+
|
21
|
+
db_conf = YAML.load(ERB.new(File.open(database_yml).read).result) || {}
|
22
|
+
env = ENV['RAILS_ENV'] || ENV['ENV'] || 'development'
|
23
|
+
db_env = db_conf[env]
|
24
|
+
|
25
|
+
if db_env['adapter'] == 'sqlite3'
|
26
|
+
db_env['database'] = "#{app_path}/#{db_env['database']}"
|
27
|
+
end
|
28
|
+
|
29
|
+
if debug
|
30
|
+
puts "ENV: #{db_env.inspect}"
|
31
|
+
end
|
32
|
+
|
33
|
+
ActiveRecord::Base.establish_connection(db_env)
|
34
|
+
|
35
|
+
RailsDb.use_default_configuration!
|
36
|
+
|
37
|
+
sql = "#{ARGV[0]}".strip
|
38
|
+
puts "Executing: #{sql}".red
|
39
|
+
|
40
|
+
sql_query = RailsDb::SqlQuery.new(sql).execute
|
41
|
+
|
42
|
+
rows = sql_query.data.rows
|
43
|
+
cols = sql_query.data.columns
|
44
|
+
|
45
|
+
if rows.any?
|
46
|
+
table = Terminal::Table.new rows: rows, headings: cols
|
47
|
+
puts table
|
48
|
+
else
|
49
|
+
puts []
|
50
|
+
end
|
data/config/routes.rb
CHANGED
@@ -15,9 +15,9 @@ RailsDb::Engine.routes.draw do
|
|
15
15
|
post '/import-start' => 'sql#import_start', as: :sql_start_import
|
16
16
|
|
17
17
|
get '/data-table' => 'dashboard#data_table', as: :data_table
|
18
|
+
get '/standalone' => 'dashboard#standalone', as: :standalone
|
18
19
|
end
|
19
20
|
|
20
|
-
|
21
21
|
if RailsDb.automatic_routes_mount
|
22
22
|
Rails.application.routes.draw do
|
23
23
|
mount_rails_db_routes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
class String
|
2
|
+
def red; colorize(self, "\e[1m\e[31m"); end
|
3
|
+
def green; colorize(self, "\e[1m\e[32m"); end
|
4
|
+
def dark_green; colorize(self, "\e[32m"); end
|
5
|
+
def yellow; colorize(self, "\e[1m\e[33m"); end
|
6
|
+
def blue; colorize(self, "\e[1m\e[34m"); end
|
7
|
+
def dark_blue; colorize(self, "\e[34m"); end
|
8
|
+
def pur; colorize(self, "\e[1m\e[35m"); end
|
9
|
+
def colorize(text, color_code) "#{color_code}#{text}\e[0m" end
|
10
|
+
end
|
data/lib/libs.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
require_relative 'rails_db/version'
|
2
|
+
|
3
|
+
require_relative 'rails_db/connection'
|
4
|
+
require_relative 'rails_db/database'
|
5
|
+
require_relative 'rails_db/blank_results'
|
6
|
+
require_relative 'rails_db/mysql_result'
|
7
|
+
require_relative 'rails_db/result'
|
8
|
+
require_relative 'rails_db/rails_db_error'
|
9
|
+
require_relative 'rails_db/history'
|
10
|
+
|
11
|
+
require_relative 'rails_db/sql_query_data'
|
12
|
+
require_relative 'rails_db/sql_explain'
|
13
|
+
require_relative 'rails_db/sql_import'
|
14
|
+
require_relative 'rails_db/sql_query'
|
15
|
+
|
16
|
+
require_relative 'rails_db/table_pagination'
|
17
|
+
require_relative 'rails_db/table'
|
18
|
+
require_relative 'rails_db/table_data'
|
19
|
+
|
20
|
+
require_relative 'rails_db/adapters/base_adapter'
|
21
|
+
require_relative 'rails_db/adapters/mysql'
|
22
|
+
require_relative 'rails_db/adapters/postgres'
|
23
|
+
require_relative 'rails_db/adapters/sqlite'
|
24
|
+
|
data/lib/rails_db.rb
CHANGED
@@ -1,16 +1,17 @@
|
|
1
|
+
require "rails"
|
1
2
|
require "font-awesome-rails"
|
2
|
-
require "foundation-rails"
|
3
3
|
require "sass"
|
4
4
|
require "sass-rails"
|
5
5
|
require "jquery-rails"
|
6
6
|
require 'codemirror-rails'
|
7
|
+
require 'terminal-table'
|
7
8
|
|
8
9
|
module RailsDb
|
9
10
|
# Custom require relative that work with older rubies also
|
10
|
-
def self.require_relative(path)
|
11
|
-
|
12
|
-
|
13
|
-
end
|
11
|
+
# def self.require_relative(path)
|
12
|
+
# full_path = File.expand_path(path, File.dirname(__FILE__))
|
13
|
+
# Kernel.require(full_path)
|
14
|
+
# end
|
14
15
|
|
15
16
|
# gem in enabled
|
16
17
|
mattr_accessor :enabled
|
@@ -48,8 +49,15 @@ module RailsDb
|
|
48
49
|
yield(self)
|
49
50
|
end
|
50
51
|
|
51
|
-
|
52
|
+
def self.use_default_configuration!
|
53
|
+
self.enabled = true
|
54
|
+
self.automatic_routes_mount = true
|
55
|
+
self.black_list_tables = white_list_tables = []
|
56
|
+
self.http_basic_authentication_enabled = false
|
57
|
+
self.verify_access_proc = proc { |controller| true }
|
58
|
+
end
|
52
59
|
|
53
|
-
|
60
|
+
end
|
54
61
|
|
55
|
-
|
62
|
+
require_relative "rails_db/engine"
|
63
|
+
require_relative "rails/routes"
|
@@ -12,14 +12,21 @@ module RailsDb
|
|
12
12
|
Time.now - t0
|
13
13
|
end
|
14
14
|
|
15
|
-
def self.exec_query(sql
|
15
|
+
def self.exec_query(sql)
|
16
16
|
t0 = Time.now
|
17
|
-
Rails.logger.debug "--> Executing: #{sql}" if log
|
18
17
|
results = connection.exec_query(sql)
|
19
18
|
execution_time = Time.now - t0
|
20
19
|
[results, execution_time]
|
21
20
|
end
|
22
21
|
|
22
|
+
def self.select(sql)
|
23
|
+
BaseAdapter.exec_query(sql)
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.explain(sql)
|
27
|
+
BaseAdapter.exec_query(sql)
|
28
|
+
end
|
29
|
+
|
23
30
|
def self.adapter_name
|
24
31
|
'base'
|
25
32
|
end
|
@@ -36,6 +43,18 @@ module RailsDb
|
|
36
43
|
execute("DELETE FROM #{table_name} WHERE #{pk_name} = #{pk_id};")
|
37
44
|
end
|
38
45
|
|
46
|
+
def self.count(table_name)
|
47
|
+
select("SELECT COUNT(*) FROM #{table_name}")[0].rows.flatten.last.to_i
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.primary_key(table_name)
|
51
|
+
connection.primary_key(table_name)
|
52
|
+
end
|
53
|
+
|
54
|
+
def self.indexes(table_name)
|
55
|
+
connection.indexes(table_name)
|
56
|
+
end
|
57
|
+
|
39
58
|
private
|
40
59
|
|
41
60
|
def self.multiple_execute(sql, divider = ";\n")
|
@@ -9,6 +9,14 @@ module RailsDb
|
|
9
9
|
Time.now - t0
|
10
10
|
end
|
11
11
|
|
12
|
+
def self.exec_query(sql, log = true)
|
13
|
+
t0 = Time.now
|
14
|
+
results = connection.execute(sql, 'SQL') # used from RoR mysql adapter source
|
15
|
+
result = MysqlResult.new(results)
|
16
|
+
execution_time = Time.now - t0
|
17
|
+
[result, execution_time]
|
18
|
+
end
|
19
|
+
|
12
20
|
def self.adapter_name
|
13
21
|
'mysql'
|
14
22
|
end
|
data/lib/rails_db/database.rb
CHANGED
@@ -2,6 +2,18 @@ module RailsDb
|
|
2
2
|
class Database
|
3
3
|
extend Connection
|
4
4
|
|
5
|
+
class << self
|
6
|
+
delegate :count, to: :adapter
|
7
|
+
delegate :truncate, to: :adapter
|
8
|
+
delegate :delete, to: :adapter
|
9
|
+
delegate :execute, to: :adapter
|
10
|
+
delegate :select, to: :adapter
|
11
|
+
delegate :explain, to: :adapter
|
12
|
+
delegate :exec_query, to: :adapter
|
13
|
+
delegate :primary_key, to: :adapter
|
14
|
+
delegate :indexes, to: :adapter
|
15
|
+
end
|
16
|
+
|
5
17
|
def self.tables
|
6
18
|
connection.tables.sort - ['schema_migrations']
|
7
19
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module RailsDb
|
2
|
+
class MysqlResult
|
3
|
+
|
4
|
+
attr_reader :columns, :rows
|
5
|
+
|
6
|
+
delegate :each, :to => :rows
|
7
|
+
|
8
|
+
def initialize(result)
|
9
|
+
@columns = []
|
10
|
+
@rows = []
|
11
|
+
if result
|
12
|
+
@columns = result.fields
|
13
|
+
@rows = result.entries
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
data/lib/rails_db/table.rb
CHANGED
@@ -7,12 +7,12 @@ module RailsDb
|
|
7
7
|
|
8
8
|
attr_reader :name, :data
|
9
9
|
|
10
|
-
delegate :count,
|
11
|
-
delegate :paginate,
|
12
|
-
delegate :limit,
|
13
|
-
delegate :order,
|
14
|
-
delegate :asc,
|
15
|
-
delegate :desc,
|
10
|
+
delegate :count, to: :data
|
11
|
+
delegate :paginate, to: :data
|
12
|
+
delegate :limit, to: :data
|
13
|
+
delegate :order, to: :data
|
14
|
+
delegate :asc, to: :data
|
15
|
+
delegate :desc, to: :data
|
16
16
|
|
17
17
|
def initialize(table_name)
|
18
18
|
throw 'Access Denied' unless RailsDb::Database.accessible_tables.include?(table_name)
|
@@ -30,19 +30,19 @@ module RailsDb
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def indexes
|
33
|
-
|
33
|
+
RailsDb::Database.indexes(name)
|
34
34
|
end
|
35
35
|
|
36
36
|
def truncate
|
37
|
-
RailsDb::Database.
|
37
|
+
RailsDb::Database.truncate(name)
|
38
38
|
end
|
39
39
|
|
40
40
|
def primary_key
|
41
|
-
|
41
|
+
RailsDb::Database.primary_key(name)
|
42
42
|
end
|
43
43
|
|
44
44
|
def delete(id)
|
45
|
-
RailsDb::Database.
|
45
|
+
RailsDb::Database.delete(name, primary_key, id)
|
46
46
|
end
|
47
47
|
|
48
48
|
end # module
|
data/lib/rails_db/table_data.rb
CHANGED
@@ -6,8 +6,8 @@ module RailsDb
|
|
6
6
|
attr_reader :table, :time
|
7
7
|
attr_accessor :current_page, :offset, :per_page, :sort_column, :sort_order, :select_columns
|
8
8
|
|
9
|
-
delegate :each,
|
10
|
-
delegate :count, :
|
9
|
+
delegate :each, to: :data
|
10
|
+
delegate :count, to: :table
|
11
11
|
|
12
12
|
def initialize(table)
|
13
13
|
@table = table
|
@@ -27,7 +27,7 @@ module RailsDb
|
|
27
27
|
if per_page
|
28
28
|
commands.push("LIMIT #{per_page.to_i} OFFSET #{offset.to_i}")
|
29
29
|
end
|
30
|
-
results, @time = Database.
|
30
|
+
results, @time = Database.select(commands.join(' '))
|
31
31
|
results
|
32
32
|
end
|
33
33
|
end
|
@@ -71,7 +71,7 @@ module RailsDb
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def count
|
74
|
-
Database.
|
74
|
+
Database.count(table.name)
|
75
75
|
end
|
76
76
|
|
77
77
|
end
|