SQL::Tr...::Sybase(3)
π SQL::Tr...::Sybase(3) β a lil' manual page, bestie
okay so this is a page from the User Contributed Perl Documentation, and it's literally all about SQL::Tr...::Sybase(3). yes the title is abbreviated, no I didn't do that, that's just how it's printed. we move π
β¨ NAME β¨
SQL::Tr...::Sybase β the Sybase producer for SQL::Translator. that's it, that's the vibe. π«Ά
π SYNOPSIS π
like, here's how you actually use it:
use SQL::Translator;
my $t = SQL::Translator->new( parser => '...', producer => 'Sybase' );
$t->translate;
that's the whole thing. you build the translator, hand it a parser ('...' β your choice, bestie, that's a placeholder not a real module name, don't come for me), set producer to 'Sybase', and call ->translate. slay. β
π¦ DESCRIPTION π¦
so what does this module do? it produces text output of the schema suitable for Sybase. that's the entire job. it takes your schema and spits out Sybase-flavoured text. no cap, that's the description, we're not padding it out π
π Sybase Create Table Syntax π
here's the create-table syntax, in all its glory. copy it, read it, frame it, whatever:
CREATE [ [ LOCAL ] { TEMPORARY | TEMP } ] TABLE table_name (
{ column_name data_type [ DEFAULT default_expr ] [ column_constraint [, ... ] ]
| table_constraint } [, ... ]
)
[ INHERITS ( parent_table [, ... ] ) ]
[ WITH OIDS | WITHOUT OIDS ]
and where column_constraint is:
[ CONSTRAINT constraint_name ]
{ NOT NULL | NULL | UNIQUE | PRIMARY KEY |
CHECK (expression) |
REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL ]
[ ON DELETE action ] [ ON UPDATE action ] }
[ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
and where table_constraint is:
[ CONSTRAINT constraint_name ]
{ UNIQUE ( column_name [, ... ] ) |
PRIMARY KEY ( column_name [, ... ] ) |
CHECK ( expression ) |
FOREIGN KEY ( column_name [, ... ] ) REFERENCES reftable [ ( refcolumn [, ... ] ) ]
[ MATCH FULL | MATCH PARTIAL ] [ ON DELETE action ] [ ON UPDATE action ] }
[ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
okay that's a lot of brackets but it's giving very structured, very organized, main character energy. πΈ
π Create Index Syntax π
indexes, bestie! two whole forms, both iconic:
CREATE [ UNIQUE ] INDEX index_name ON table
[ USING acc_method ] ( column [ ops_name ] [, ...] )
[ WHERE predicate ]
CREATE [ UNIQUE ] INDEX index_name ON table
[ USING acc_method ] ( func_name( column [, ... ]) [ ops_name ] )
[ WHERE predicate ]
note the second one wraps your column in a func_name(...) β functional index realness π₯
π SEE ALSO π
SQL::Translator. β go read that one too, it's the whole parent situation, iykyk π§
π AUTHORS π
these legends made it happen:
- Sam Angiuoli
<angiuoli@users.sourceforge.net> - Paul Harrington
<harringp@deshaw.com> - Ken Youens-Clark
<kclark@cpan.org>
put some respect on their names π
okay that's the page!! no notes, ate and left no crumbs β¨
and finally, the cute lil sign-off that was chillin' at the bottom of the original: this is perl v5.42.0, dated 2024-12-12, filed under SQL::Tr...::Sybase(3). periodt π
π
π¦ where this page comes from
- opensuse-leap 16.0: perl-SQL-Translator 1.660.0-bp160.1.11 Β· (Artistic-1.0 OR GPL-1.0-or-later) AND GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms