DBIish

SYNOPSIS

use v6;
    use DBIish;
my $dbh = DBIish.connect("SQLite", :database<example-db.sqlite3>);
my $sth = $dbh.execute(q:to/STATEMENT/);
        DROP TABLE nom
        STATEMENT
$sth = $dbh.execute(q:to/STATEMENT/);
        CREATE TABLE nom (
            name        varchar(4),
            description varchar(30),
            quantity    int,
            price       numeric(5,2)
        )
        STATEMENT
$sth = $dbh.execute(q:to/STATEMENT/);
        INSERT INTO nom (name, description, quantity, price)
        VALUES ( 'BUBH', 'Hot beef burrito', 1, 4.95 )
        STATEMENT
$sth = $dbh.prepare(q:to/STATEMENT/);
        INSERT INTO nom (name, description, quantity, price)
        VALUES ( ?, ?, ?, ? )
        STATEMENT
$sth.execute('TAFM', 'Mild fish taco', 1, 4.85);
    $sth.execute('BEOM', 'Medium size orange juice', 2, 1.20);
$sth = $dbh.prepare(q:to/STATEMENT/);
        SELECT name, description, quantity, price, quantity*price AS amount
        FROM nom
        STATEMENT
$sth.execute();
my $arrayref = $sth.allrows();
    say $arrayref.elems; # 3
$sth.finish;
$dbh.dispose;

See also for more documentation.

DESCRIPTION The name DBIish has two meanings. In lowercase it indicates the github project being used for development. In mixed case it is the module name and class name that database client applications should use.

DBIish CLASSES and ROLES

DBIish The DBIish class exists mainly to provide the method, which acts as a constructor for database connections.

DBDish The DBDish role should only be used with 'does' to provide standard members for DBDish classes.

SEE ALSO http://dbi.perl.org

DBIish v0.6.4

Database connectivity for Raku

Authors

    License

    BSD-2-Clause

    Dependencies

    NativeHelpers::BlobNativeLibs

    Test Dependencies

    Provides

    • DBDish
    • DBDish::Connection
    • DBDish::ErrorHandling
    • DBDish::Oracle
    • DBDish::Oracle::Connection
    • DBDish::Oracle::Native
    • DBDish::Oracle::StatementHandle
    • DBDish::Pg
    • DBDish::Pg::Connection
    • DBDish::Pg::ErrorHandling
    • DBDish::Pg::Native
    • DBDish::Pg::StatementHandle
    • DBDish::SQLite
    • DBDish::SQLite::Connection
    • DBDish::SQLite::Native
    • DBDish::SQLite::StatementHandle
    • DBDish::StatementHandle
    • DBDish::TestMock
    • DBDish::TestMock::Connection
    • DBDish::TestMock::StatementHandle
    • DBDish::mysql
    • DBDish::mysql::Connection
    • DBDish::mysql::Native
    • DBDish::mysql::StatementHandle
    • DBIish
    • DBIish::Common
    • DBIish::CommonTesting

    The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.