NAME

DBIO::Sybase::DDL - Generate Sybase ASE DDL from DBIO Result classes

VERSION

version 0.900000

DESCRIPTION

DBIO::Sybase::DDL generates Sybase ASE DDL from the DBIO schema class hierarchy. It is the desired-state side of the test-deploy-and-compare strategy used by DBIO::Sybase::Deploy.

my $ddl = DBIO::Sybase::DDL->install_ddl($schema);
# CREATE TABLE ...; CREATE INDEX ...;

NOTE: Sybase ASE does not support CHECK constraints in the same way as other databases. Unique constraints are emitted as unique indexes instead.

METHODS

install_ddl

my $ddl = DBIO::Sybase::DDL->install_ddl($schema);

Returns the full installation DDL as a single string. $schema may be a connected schema instance or a schema class name.

my $sql_type = sybase_column_type($data_type);

Maps a logical DBIO data_type to its Sybase ASE column type. Shared by the DDL emitter and DBIO::Sybase::Diff::Table so both sides of the test-deploy-and-compare agree on type rendering. Exportable on request.

my $clause = sybase_default_clause($default_value);

Renders the DEFAULT fragment for a column definition (with a leading space), or the empty string when there is no default. A SCALAR ref is emitted verbatim (SQL expression); the literal string 'null' yields no clause; anything else is single-quoted. Shared by the DDL emitter and the Diff table/column emitters so all three render defaults identically. Exportable on request.

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.

3 POD Errors

The following errors were encountered while parsing the POD:

Around line 179:

Unknown directive: =func

Around line 187:

Unknown directive: =func

Around line 198:

Unknown directive: =seealso