3
# Copyright (C) 2008-2009 Sun Microsystems, Inc. All rights reserved.
4
# Use is subject to license terms.
6
# This program is free software; you can redistribute it and/or modify
7
# it under the terms of the GNU General Public License as published by
8
# the Free Software Foundation; version 2 of the License.
10
# This program is distributed in the hope that it will be useful, but
11
# WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
# General Public License for more details.
15
# You should have received a copy of the GNU General Public License
16
# along with this program; if not, write to the Free Software
17
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
23
use lib "$ENV{RQG_HOME}/lib";
27
use GenTest::Constants;
28
use GenTest::App::GendataSimple;
30
my ($dsn, $engine, $help, $views, $notnull);
32
my @ARGV_saved = @ARGV;
34
my $opt_result = GetOptions(
36
'engine:s' => \$engine,
39
'notnull' => \$notnull
42
my $default_dsn = GenTest::App::GendataSimple->defaultDsn();
44
help() if !$opt_result || $help;
46
my $app = GenTest::App::GendataSimple->new(dsn => $dsn,
51
say("Starting \n# $0 \\ \n# ".join(" \\ \n# ", @ARGV_saved));
53
my $status = $app->run();
59
$0 - Simple data generator. Options:
61
--dsn : MySQL DBI resource to connect to (default $default_dsn)
62
--engine : Table engine to use when creating tables (default: no ENGINE in CREATE TABLE )
63
--views : Generate views
64
--notnull : Generate all fields with NOT NULL
65
--help : This help message