Help language development. Donate to The Perl Foundation

Red cpan:FCO last updated on 2020-11-22

lib/Red/DB.pm6
use X::Red::Exceptions;

=head2 Red::DB

#| Returns the database connection
sub get-RED-DB is export {
    with $*RED-DB {
        .return
    }
    if %*RED-DEFULT-DRIVERS.defined and %*RED-DEFULT-DRIVERS<default>:exists {
        return %*RED-DEFULT-DRIVERS<default>
    }
    X::Red::RedDbNotDefined.new.throw
}