DataSource(3pm)

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

πŸ’– DataSource β€” the manual page, but make it cute πŸ’–

okay so bestie, you found a Perl doc page: DataSource(3pm), straight out of the User Contributed Perl Documentation corner of the universe. sit down, grab a strawberry πŸ“, and let's get into it.


✨ NAME ✨

DBIx::DataSource β€” database-independant create and drop functions 🫢

like, it does the thing where you make databases and unmake databases, and it does NOT care which database you're on. iconic behaviour honestly.


🌸 SYNOPSIS 🌸

use DBIx::DataSource qw( create_database drop_database );

create_database( $data_source, $username, $password )
  or warn $DBIx::DataSource::errstr;

drop_database( $data_source, $username, $password )
  or warn $DBIx::DataSource::errstr;

see how both of them do the or warn $DBIx::DataSource::errstr thing?? that's the vibe check. if it works, slay. if it doesn't, you get the error string instead of silence. no cap. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so this module implements the create_database and drop_database functions for databases. its whole main character energy is giving you a common interface to database creation and deletion, no matter which actual database is underneath. one interface, many databases, we love a unifier ✨

right now the supported databases are MySQL and PostgreSQL. that's the roster.

and listen β€” if you wanna add support for other databases? assistance is welcomed and it's relatively simple, fr fr. just go look at DBIx::DataSource::Driver. the door is open, bestie, come in πŸŽ€


πŸ‘‘ FUNCTIONS πŸ‘‘

  • create_database DATA_SOURCE USERNAME PASSWORD β€” creates the database specified by the given DBI data source. new database just dropped πŸ”₯
  • drop_database DATA_SOURCE β€” drops the database specified by the given DBI data source. it's giving closure, it's giving letting go πŸ’€

🌈 AUTHOR 🌈

Ivan Kohler <ivan-dbix-datasource@420.am> β€” the legend themselves 🫢


Copyright (c) 2000 Ivan Kohler Copyright (c) 2000 Mail Abuse Prevention System LLC All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. so like, go off, but respectfully ✨


πŸ’€ BUGS πŸ’€

okay so the noted bug is genuinely a whole philosophical situation:

If DBI data sources were objects, these functions would be methods.

that's it. that's the bug. it's not even broken, it's just aesthetically annoyed about it 😭 not me thinking about this at 2am.


🧚 SEE ALSO 🧚

  • DBIx::DataSource::Driver
  • DBIx::DataSource::mysql
  • DBIx::DataSource::Pg
  • DBI

go read those too, iykyk πŸ“š


and that's the whole page, bestie β€” no crumbs left behind πŸ“ this little doc came from perl v5.34.0, dated 2022-06-13, and it's filed under DataSource(3pm). mwah, bye πŸ’–

πŸ“¦ where this page comes from