NAME

dbiogen - Dump a database schema to DBIO Result classes

VERSION

version 0.900000

SYNOPSIS

dbiogen <schema_class> <dsn> <user> <password> [options]

# Classic style (default)
dbiogen My::Schema dbi:Pg:dbname=foo myuser mypassword

# Cake style (most concise)
dbiogen --style=cake My::Schema dbi:Pg:dbname=foo myuser mypassword

# Candy style
dbiogen --style=candy My::Schema dbi:Pg:dbname=foo myuser mypassword

# With extra options
dbiogen --style=cake \
         -o dump_directory=./lib \
         -o debug=1 \
         My::Schema \
         dbi:Pg:dbname=foo \
         myuser mypassword

DESCRIPTION

dbiogen connects to a database, introspects the schema, and generates DBIO Result class files using DBIO::Generate.

Styles

vanilla (default)

Traditional use base 'DBIO::Core' with __PACKAGE__-add_columns(...)> method calls.

cake

Uses use DBIO::Cake with DDL-like DSL: col name => varchar(100);

candy

Uses use DBIO::Candy with has_column name => 'varchar' => { size => 100 };

moose

Uses use Moose with extends instead of use base.

Options are given as -o key=value pairs. Any option valid for DBIO::Generate can be passed this way.

OPTIONS

--style=STYLE

Generated code style. One of vanilla (default), cake, candy, or moose. See "DESCRIPTION" above for a description of each style.

-o key=value

Pass an option directly to DBIO::Generate. May be given multiple times. Values that look like JSON objects or arrays are decoded automatically. Numeric values are coerced to numbers. Examples:

-o dump_directory=./lib
-o debug=1
-o components=["DBIO::InflateColumn::DateTime"]

Any option accepted by DBIO::Generate may be set this way.

SEE ALSO

DBIO::Generate, DBIO::Introspect::Base, dbioadmin

AUTHOR

DBIO & DBIx::Class Authors

COPYRIGHT AND LICENSE

Copyright (C) 2026 DBIO Authors Portions Copyright (C) 2005-2025 DBIx::Class Authors Based on DBIx::Class, heavily modified.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.