Parse:...t::DB2(3pm)
β¨ NAME β¨
Parse::Dia::SQL::Output::DB2 β bestie, this one makes SQL for DB2 π
πΈ SYNOPSIS πΈ
use Parse::Dia::SQL;
my $dia = Parse::Dia::SQL->new(...);
print $dia->get_sql();
π DESCRIPTION π
Okay so this class creates SQL for the IBM DB2 database. That's the whole vibe. IBM DB2. SQL. She's a specialist, she's booked, she's busy. π
π new π
The constructor. Like, the main character of this whole file. Arguments:
- She creates the primary key clause, and it looks a lil something like this:
constraint pk_<tablename> primary key (<column1>,..,<columnN>)
- Heads up for DB2 specifically: the PK must be 18 characters or less π«
- She returns
undefinedif the list of primary key is empty β i.e. if there are no primary keys on the given table. No keys, no clause, no nothing. π - Also for DB2: a constraint name must be 18 characters or less. Eighteen. Not nineteen. Do not test her. π
- She returns a shortened tablename. Cute, concise, efficient. Periodt.
π¦ _get_drop_schema_sql π¦
Lowkey important fact: DB2 do not support keyword 'if exists' in 'drop table' statement. So likeβ¦ don't try it. She said no. π
π the whole point
Subclass for outputting SQL for the DB2 database. That's her. That's the job. Slay. π
Sign-off time, my love: this page is served up by perl v5.36.0, dated 2022-11-19 β mwah, take care, go write some iconic SQL πβ¨π¦
π¦ where this page comes from
- debian bookworm: libparse-dia-sql-perl 0.31-2 Β· GPL-2.0-or-later
- debian trixie: libparse-dia-sql-perl 0.31-2 Β· GPL-2.0-or-later
- ubuntu noble: libparse-dia-sql-perl 0.31-2 Β· GPL-2.0-or-later
- ubuntu resolute: libparse-dia-sql-perl 0.31-2 Β· GPL-2.0-or-later
- ubuntu stonking: libparse-dia-sql-perl 0.31-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms