Sha256: 99746c80897a74df318ebd15f453ca15b1255c71c2a3135de3600fb55eac4a28

Contents?: true

Size: 1.57 KB

Versions: 67

Compression:

Stored size: 1.57 KB

Contents

#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013  Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License version 2.1 as published by the Free Software Foundation.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

require "ostruct"
require "optparse"
require "pathname"

require "groonga"

options = Groonga::DatabaseInspector::Options.new

parser = OptionParser.new
parser.version = Groonga::BINDINGS_VERSION
parser.banner += " DB_PATH"
parser.on("--no-tables",
          "Don't show table information") do |boolean|
  options.show_tables = boolean
end
parser.on("--no-columns",
          "Don't show column information") do |boolean|
  options.show_columns = boolean
end
parser.on("--log-path=PATH",
          "Specify log path",
          "(#{Groonga::Logger.path})") do |path|
  Groonga::Logger.path = path
end
args = parser.parse!(ARGV)

if args.size != 1
  puts(parser.help)
  exit(false)
end
db_path = args[0]

Groonga::Database.open(db_path) do |database|
  inspector = Groonga::DatabaseInspector.new(database, options)
  inspector.report
end

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
rroonga-14.1.2 bin/groonga-database-inspect
rroonga-12.1.0 bin/groonga-database-inspect
rroonga-12.0.8 bin/groonga-database-inspect
rroonga-12.0.2 bin/groonga-database-inspect
rroonga-12.0.0 bin/groonga-database-inspect
rroonga-11.0.6 bin/groonga-database-inspect
rroonga-11.0.0 bin/groonga-database-inspect
rroonga-10.0.6 bin/groonga-database-inspect
rroonga-10.0.2 bin/groonga-database-inspect
rroonga-10.0.1 bin/groonga-database-inspect
rroonga-9.0.7-x64-mingw32 bin/groonga-database-inspect
rroonga-9.0.7-x86-mingw32 bin/groonga-database-inspect
rroonga-9.0.7 bin/groonga-database-inspect
rroonga-9.0.3-x64-mingw32 bin/groonga-database-inspect
rroonga-9.0.3-x86-mingw32 bin/groonga-database-inspect
rroonga-9.0.3 bin/groonga-database-inspect
rroonga-9.0.2-x64-mingw32 bin/groonga-database-inspect
rroonga-9.0.2-x86-mingw32 bin/groonga-database-inspect
rroonga-9.0.2 bin/groonga-database-inspect
rroonga-7.1.1-x64-mingw32 bin/groonga-database-inspect