Parse:...t::DB2(3pm)

πŸ“¦
version 0.31 Β· 2 versions
  • 0.31 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.31 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ 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 undefined if 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 πŸŽ€βœ¨πŸ¦‹