Coder Social home page Coder Social logo

dbiish's Introduction

NAME

DBIish - a simple database interface for Raku

SYNOPSIS

use v6;
use DBIish;

my $dbh = DBIish.connect("SQLite", :database<example-db.sqlite3>);

$dbh.execute(q:to/STATEMENT/);
    DROP TABLE IF EXISTS nom
    STATEMENT

$dbh.execute(q:to/STATEMENT/);
    CREATE TABLE nom (
        name        varchar(4),
        description varchar(30),
        quantity    int,
        price       numeric(5,2)
    )
    STATEMENT

$dbh.execute(q:to/STATEMENT/);
    INSERT INTO nom (name, description, quantity, price)
    VALUES ( 'BUBH', 'Hot beef burrito', 1, 4.95 )
    STATEMENT

my $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);


# For one-off execution
$sth = $dbh.execute(q:to/STATEMENT/);
    SELECT name, description, quantity, price, quantity*price AS amount
    FROM nom
    STATEMENT
say $sth.rows; # 3

for $sth.allrows() -> $row {
    say $row[0];  # BUBH␤TAFM␤BEOM
}

$sth.dispose;

# For efficient multiple execution
$sth = $dbh.prepare('SELECT description FROM nom WHERE name = ?');
for <TAFM BEOM> -> $name {
    for $sth.execute($name).allrows(:array-of-hash) -> $row {
        say $row<description>;
    }
}

$dbh.dispose;

DESCRIPTION

The DBIish project provides a simple database interface for Raku.

It's not a port of the Perl 5 DBI and does not intend to become one. It is, however, a simple and useful database interface for Raku that works now. It looks like a DBI, and it talks like a DBI (although it only offers a subset of the functionality).

Connecting to, and disconnecting from, a database

You obtain a DataBaseHandler by calling the static DBIish.connect method, passing as the only positional argument the driver name followed by any required named arguments.

Those named arguments are driver specific, but commonly required ones are: database, user and password.

For the different syntactic forms of named arguments see the language documentation.

For example, for connect to a database 'hierarchy' on PostgreSQL, with the user in $user and using the function get-secret to obtain you password, you can:

my $dbh = DBIish.connect('Pg', :database<hierarchy>, :$user, password => get-secret());

See ahead more examples.

To disconnect from a database and free the allocated resources you should call the dispose method:

$dbh.dispose;

Executing queries

execute

For a single execution of a query you may use execute directly. This starts the query within the database and returns a StatementHandle which will be used for Retrieving Data.

$dbh.execute(q:to/SQL/);
  CREATE TABLE tab (
    id serial PRIMARY KEY
    col text
  );
  SQL

Errors occurring within the database for an SQL statement will typically throw an exception within Raku. The level of detail within the exception object depends on the database driver.

$dbh.execute('CREATE TABLE failtab ( id );');

CATCH {
   when X::DBDish::DBError {
      say .message;
   }
}

In order to build a query dynamically without risk of SQL injection you need to use parameter binding. The ? will be replaced by an escaped copy of the parameter provided after the query.

my $value-id = 19;
$dbh.execute('INSERT INTO tab (id) VALUES (?)', $value-id);

my $value-text = q{Complex text ' value " with quotes};
$dbh.execute('INSERT INTO tab (id, col) VALUES (?, ?)', $value-id, $value-text);

# Undefined or Nil values will be converted to NULL by parameter binding.
my $value-nil;
$dbh.execute('INSERT INTO tab (id, col) VALUES (?, ?), $value-id, $value-nil);

Parameter binding should be used where-ever possible, even if the number of parameters is dynamic. In this case the number of elements for IN is dynamic. The number of ?'s is scaled to fit the list of items, and the list is provided to execute as individual items.

my @value-list = 1 .. 6;
my $parameter-bind-marks = @value-list.map({'?'}).join(',')  # ?,?,?,?,?,?
my $query = 'SELECT id FROM tab WHERE id IN (%s)'.sprintf($parameter-bind-marks);
$dbh.execute($query, |@value-list);

All database drivers support basic Raku types like Int, Rat, Str, and Buf; some databases may support additional complex types such as an Array of Str or Array of Int which may simplify the above example significantly. Please see database specific documentation for additional type support.

prepare

Execute performs a couple of steps on the client side, and often the database side as well, which may be cached if a query is going to be executed several times. For simple queries, prepare() may increase performance by up to 50%

This is an inefficient example of running a query multiple times:

for 1 .. 100 -> $id {
  $dbh.execute('INSERT INTO tab (id) VALUES (?)', $id);
}

This example is more efficient as it uses prepare to decrease overhead on the client side; often on the server-side too as the database may only need to parse the SQL once.

my $sth = $dbh.prepare('INSERT INTO tab (id) VALUES (?)');
for 1 .. 100 -> $id {
  $sth.execute($id);
}

Retrieving data

DBIish provides the row and allrows methods to fetch values from a StatementHandle object returned by execute. These functions provide you typed values; for example an int4 field in the database will be provided as an Int scalar in Raku.

row

row take the hash adverb if you want to have the values in a Hash form instead of a plain Array

Example:

my $sth = $dbh.execute('SELECT id, col FROM tab WHERE id = ?', $value-id);

my @values = $sth.row();
my %values = $sth.row(:hash);

allrows

allrows lazily returns all the rows as a list of arrays. If you want to fetch the values in a hash form, use one of the two adverbs array-of-hash or hash-of-array

Example:

my $sth = $dbh.execute('SELECT id, col FROM tab');

my @data = $sth.allrows(); # [[1, 'val1'], [3, 'val2']]
my @data = $sth.allrows(:array-of-hash); # [ ( id => 1, col => 'val1'), ( id => 3, col => 'val2') ]
my %data = $sth.allrows(:hash-of-array); # id => [1, 3], col => ['val1', 'val2']

for $sth.allrows(:array-of-hash) -> $row {
  say $row<id>;  # 1␤3
}

# Or as a shorter example:
for $dbh.execute('SELECT id, col FROM tab').allrows(:array-of-hash) -> $row {
   say $row<id>  # 1␤3
}

dispose

After you have fetched all data using the statement handle, you can free its memory immediately using dispose.

$sth.dispose;

server-version

server-version returns a Version object for the version of the server you are connected to. Not all drivers support this function (some may not connect to a server at all) so it's best to wrap in a can.

my Version $version = $dbh.server-version() if $dbh.can('server-version');

Statement Exceptions

All exceptions for a query result are thrown as or inherit X::DBDish::DBError. Additional functionality may be provided by the database driver.

  • driver-name

    Database Driver name for the connection

  • native-message

    Unmodified message received from the database server.

  • code

    Int return code from the local client library for the call; typically -1. This is not an SQL state.

  • why

    A Str indicating why the exception was thrown. Typically 'Error'.

  • message

    Human friendly and more informative version of the database message.

  • is-temporary

    A Boolean flag which when true indicates that the transaction may succeed if retried. Connectivity issues, serialization issues and other temporary items may set this as True.

Advanced Query Building

In general you should use the ? parameter for substitution whenever possible. The database driver will ensure values are properly escaped prior to insertion into the database. However, if you need to create a query string by hand then you can use quote to help prevent an SQL injection attack from being successful.

quote($literal) and quote($identifier, :as-id)

Using parameter substitution is preferred:

my $val = 'literal';
$dbh.execute('INSERT INTO tab VALUES (?)', $val);

However, if you must build the query directly you can:

my $val = 'literal';
my $query = 'INSERT INTO tab VALUES (%s)'.sprintf( $dbh.quote($val) );
$dbh.execute($query);

To build a query with a dynamic identifier:

# Notice that C<?> is still used for the value being inserted; it is still recommended where possible.
my $id = 'table';
my $val = 'literal';
my $query = 'INSERT INTO %s VALUES (?)'.sprintf( $dbh.quote($id, :as-id) );
$dbh.execute($query, $val);

INSTALLATION

$ zef install DBIish

DBDish CLASSES

Some DBDish drivers install together with DBIish.pm6 and are maintained as a single project.

Search the Raku ecosystem for additional DBDish drivers such as ODBC.

Currently the following backends are included:

Pg (PostgreSQL)

Supports basic CRUD operations and prepared statements with placeholders

my $dbh = DBIish.connect('Pg', :host<db01.yourdomain.com>, :port(5432),
        :database<blerg>, :user<myuser>, password => get-secret());

Pg supports the following named arguments: host, hostaddr, port, database (or its alias dbname), user, password, connect-timeout, client-encoding, options, application-name, keepalives, keepalives-idle, keepalives-interval, sslmode, requiressl, sslcert, sslkey, sslrootcert, sslcrl, requirepeer, krbsrvname, gsslib, and service.

See your PostgreSQL documentation for details.

Parameter Substitution

In addition to the ? style of parameter substitution supported by all drivers, PostgreSQL also supports numbered parameter. The advantage is that a numbered parameter may be reused

$dbh.execute('INSERT INTO tab VALUES ($1, $2, $2 - $1)', $var1, $var2);

This is equivalent to the below statement except the subtraction operation is performed by PostgreSQL:

$dbh.execute('INSERT INTO tab VALUES (?, ?, ?)', $var1, $var2, $var2 - $var1);

pg arrays

Pg arrays are supported for both writing via execute and retrieval via row/allrows. You will get the properly typed array according to the field type.

Passing an array to execute is now implemented. But you can also use the pg-array-str method on your Pg StatementHandle to convert an Array to a string Pg can understand:

# Insert an array via an execute statement
my $sth = $dbh.execute('INSERT INTO tab (array_column) VALUES ($1);', @data);

# Prepare an insertion of an array field
my $sth = $dbh.prepare('INSERT INTO tab (array_column) VALUES ($1);');
$sth.execute(@data1);   # or $sth.execute($sth.pg-array-str(@data1));
$sth.execute(@data2);

# Retrieve the array values back again.
for $dbh.execute('SELECT array_column FROM tab').allrows() -> $row {
   my @array-column = $row[0];
}

# Check if "value" is in the dataset. This is similar to an IN statement.
my $sth = $dbh.prepare('SELECT * FROM tab WHERE value = ANY($1)');
$sth.execute(@data);

# If a datatype is needed you can cast the placeholder with the PostgreSQL datatype.
my $sth = $dbh.prepare('SELECT * FROM tab WHERE value = ANY($1::_cidr)');
$sth.execute(['127.0.0.1', '10.0.0.1']);

pg-consume-input

Consume available input from the server, buffering the read data if there is any. This is only necessary if you are planning on calling pg-notifies without having requested input by other means (such as an execute.)

pg-notifies

$ret = $dbh.pg-notifies;

Looks for any asynchronous notifications received and returns a pg-notify object that looks like this

    class pg-notify {
        has Str                           $.relname; # Channel Name
        has int32                         $.be_pid; # Backend pid
        has Str                           $.extra; # Payload
    }

or nothing if there are no pending notifications.

In order to receive the notifications you should execute the PostgreSQL command "LISTEN" prior to calling pg-notifies the first time; if you have not executed any other commands in the meantime you will also need to execute pg-consume-input first.

For example:

$dbh.execute("LISTEN foo");

loop {
    $dbh.pg-consume-input
    if $dbh.pg-notifies -> $not {
        say $not;
    }
}

The payload is optional and will always be an empty string for PostgreSQL servers less than version 9.0.

ping

Test to see if the connection is still considered live.

$dbh.ping

Statement Exceptions

Exceptions for a query result are thrown as X::DBDish::DBError::Pg objects (inherits X::DBDish::DBError) and have the following additional attributes (described with a PG_DIAG_* source name) as provided by the PostgreSQL client library libpq:

  • message

    PG_DIAG_MESSAGE_PRIMARY - The primary human-readable error message (typically one line). Always present.

  • message-detail

    PG_DIAG_MESSAGE_DETAIL - Detail: an optional secondary error message carrying more detail about the problem. Might run to multiple lines.

  • message-hint

    PG_DIAG_MESSAGE_HINT - Hint: an optional suggestion what to do about the problem. This is intended to differ from detail in that it offers advice (potentially inappropriate) rather than hard facts. Might run to multiple lines.

  • context

    PG_DIAG_CONTEXT - An indication of the context in which the error occurred. Presently this includes a call stack traceback of active procedural language functions and internally-generated queries. The trace is one entry per line, most recent first.

  • type

    PG_DIAG_SEVERITY_NONLOCALIZED - The severity; the field contents are ERROR, FATAL, or PANIC (in an error message), or WARNING, NOTICE, DEBUG, INFO, or LOG (in a notice message). This is identical to the PG_DIAG_SEVERITY field except that the contents are never localized. This is present only in reports generated by PostgreSQL versions 9.6 and later.

  • type-localized

    PG_DIAG_SEVERITY - The severity; the field contents are ERROR, FATAL, or PANIC (in an error message), or WARNING, NOTICE, DEBUG, INFO, or LOG (in a notice message), or a localized translation of one of these. Always present.

  • sqlstate

    PG_DIAG_SQLSTATE - The SQLSTATE code for the error. The SQLSTATE code identifies the type of error that has occurred; it can be used by front-end applications to perform specific operations (such as error handling) in response to a particular database error. For a list of the possible SQLSTATE codes, see Appendix A. This field is not localizable, and is always present.

  • statement

    Statement provided to prepare() or execute()

  • statement-name

    Statement Name provided to prepare() or created internally

  • statement-position

    PG_DIAG_STATEMENT_POSITION - A string containing a decimal integer indicating an error cursor position as an index into the original statement string. The first character has index 1, and positions are measured in characters not bytes.

  • internal-position

    PG_DIAG_INTERNAL_POSITION - This is defined the same as the PG_DIAG_STATEMENT_POSITION field, but it is used when the cursor position refers to an internally generated command rather than the one submitted by the client. The PG_DIAG_INTERNAL_QUERY field will always appear when this field appears.

  • internal-query

    PG_DIAG_INTERNAL_QUERY - The text of a failed internally-generated command. This could be, for example, a SQL query issued by a PL/pgSQL function.

  • dbname

    Database Name from libpq pg-db()

  • host

    Host from libpq pg-host()

  • user

    User from libpq pg-user()

  • port

    Port from libpq pg-port()

  • schema

    PG_DIAG_SCHEMA_NAME - If the error was associated with a specific database object, the name of the schema containing that object, if any.

  • table

    PG_DIAG_TABLE_NAME - If the error was associated with a specific table, the name of the table. (Refer to the schema name field for the name of the table's schema.)

  • column

    PG_DIAG_COLUMN_NAME - If the error was associated with a specific table column, the name of the column. (Refer to the schema and table name fields to identify the table.)

  • datatype

    PG_DIAG_DATATYPE_NAME - If the error was associated with a specific data type, the name of the data type. (Refer to the schema name field for the name of the data type's schema.)

  • constraint

    PG_DIAG_CONSTRAINT_NAME - If the error was associated with a specific constraint, the name of the constraint. Refer to fields listed above for the associated table or domain. (For this purpose, indexes are treated as constraints, even if they weren't created with constraint syntax.)

  • source-file

    PG_DIAG_SOURCE_FILE - The file name of the source-code location where the error was reported.

  • source-line

    PG_DIAG_SOURCE_LINE - The line number of the source-code location where the error was reported.

  • source-function

    PG_DIAG_SOURCE_FUNCTION - The name of the source-code function reporting the error.

Please see the PostgreSQL documentation for additional information.

A special is-temporary() method returns True if an immediate retry of the full transaction should be attempted:

It is set to true when the SQLState is any of the following codes:

  • SQLState Class 08XXX

    All connection exceptions (possible temporary network issues)

  • SQLState 40001

    serialization_failure - Two or more transactions conflicted in a manner which may succeed if executed later.

  • SQLState 40P01

    deadlock_detected - Two or more transactions had locking conflicts resulting in a deadlock and this transaction being rolled back.

  • SQLState Class 57XXX

    Operator Intervention (early/forced connection termination).

  • SQLState 72000

    snapshot_too_old - The transaction took too long to execute. It may succeed during a quieter period.

pg-socket

    my Int $socket = $dbh.pg-socket;

Returns the file description number of the connection socket to the server.

SQLite

Supports basic CRUD operations and prepared statements with placeholders

my $dbh = DBIish.connect('SQLite', :database<thefile>);

The :database parameter can be an absolute file path as well (or even an IO::Path object):

my $dbh = DBIish.connect('SQLite', database => '/path/to/sqlite.db' );

If the SQLite library was compiled to be threadsafe (which is usually the case), then it is possible to use SQLite from multiple threads. This can be introspected:

say DBIish.install-driver('SQLite').threadsafe;

SQLite does support using one connection object concurrently, however other databases may not; if portability is a concern, then only use a particular connection object from one thread at a time (and so have multiple connection objects).

When using a SQLite database concurrently (from multiple threads, or even multiple processes), operations may not be able to happen immediately due to the database being locked. DBIish sets a default timeout of 10000 milliseconds; this can be changed by passing the busy-timeout option to connect.

my $dbh = DBIish.connect('SQLite', :database<thefile>, :60000busy-timeout);

Passing a value less than or equal to zero will disable the timeout, resulting in any operation that cannot take place immediately producing a database locked error.

Function rows()

Since SQLite may retrieve records in the background, the rows() method will not be accurate until all records have been retrieved from the database. A warning is thrown when this may be the case.

This warning message may be suppressed using a CONTROL phaser:

CONTROL {
    when CX::Warn {
        when .message.starts-with('SQLite rows()') { .resume }
        default { .rethrow }
    }
}

Making rows() accurate for all calls would require the driver pre-retrieving and caching all records with a large performance and memory penalty, then providing the records as requested.

For best performance you are recommended to use:

while my $row = $sth.row {
    # Do something with all records as retrieved
}

if my $row = $sth.row {
    # Do something with a single record
}

MySQL

Supports basic CRUD operations and prepared statements with placeholders

my $dbh = DBIish.connect('mysql', :host<db02.yourdomain.com>, :port(3306),
        :database<blerg>, :user<myuser>, :$password);

# Or via socket:
my $dbh = DBIish.connect('mysql', :socket<mysql.sock>,
        :database<blerg>, :user<myuser>, :$password);

MySQL driver supports the following named arguments: connection-timeout, read-timeout, write-timeout

See your MySQL documentation for details.

Since MariaDB uses the same wire protocol as MySQL, the `mysql` backend also works for MariaDB.

Statement Exceptions

Exceptions for a query result are thrown as X::DBDish::DBError::mysql objects (inherits X::DBDish::DBError) and have the following additional attributes as provided by the MySQL client libraries.

  • message

    mysql_error - The primary human-readable error message (typically one line). Always present.

  • code

    mysql_errno - Integer code. Always present.

  • sqlstate

    mysql_sqlstate - The SQLSTATE code for the error. The SQLSTATE code identifies the type of error that has occurred; it can be used by front-end applications to perform specific operations (such as error handling) in response to a particular database error. For a list of the possible SQLSTATE codes, see Appendix A. This field is not localizable, and is always present.

Required Client-C libraries

DBDish::mysql by default searches for 'mysql' (libmysql.ddl) on Windows, and 'mariadb' (libmariadb.so.xx where xx in 0 .. 4) then 'mysqlclient' (libmysqlclient.so.xx where xx in 16..21) on POSIX systems.

Remember that Windows uses PATH to locate the library. On POSIX, unversionized *.so files installed by "dev" packages aren't needed nor used, you need the run-time versionized library.

On POSIX you can use the $DBIISH_MYSQL_LIB environment variable to request another client library to be searched and loaded.

Example using the unadorned name:

DBIISH_MYSQL_LIB=mariadb rakudo t/25-mysql-common.t

Using the absolute path in uninstalled DBIish:

DBIISH_MYSQL_LIB=/lib64/libmariadb.so.3 rakudo -t lib t/25-mysql-common.t

With MariaBD-Embedded:

DBIISH_MYSQL_LIB=mariadbd rakudo -I lib t/01-basic.t

insert-id

Returns the AUTO_INCREMENT value of the most recently inserted record.

my $sth = $dbh.execute( 'INSERT INTO tab (description) VALUES (?)', $description );

my $id = $sth.insert-id;

# or
my $id = $dbh.insert-id;

Oracle

Supports basic CRUD operations and prepared statements with placeholders

my $dbh = DBIish.connect('Oracle', database => 'XE', :user<sysadm>, :password('secret'));

By default connections to Oracle will apply this session alteration in an attempt to ensure the formatted "TIMESTAMP WITH TIME ZONE" field string will be compatible with DateTime and returned to the user as DateTime.new($ts_str).

ALTER SESSION SET nls_timestamp_tz_format = 'YYYY-MM-DD"T"HH24:MI:SS.FFTZR'

WARNING: This alteration does not include support for these field types. Also until now these types would have thrown an exception as an unknown TYPE.

TIMESTAMP
TIMESTAMP WITH LOCAL TIME ZONE

WARNING: Any form of TIMESTAMP(0) will produce a string not compatible with DateTime due to the ".FF" and the lack of fractional seconds to fulfill it.

You can choose to use this session alteration in an attempt to simplify the use of ISO-8601 timestamps; strictly speaking, formatted as "YYYY-MM-DDTHH:MI:SSZ"; no offsets etc shown but Oracle outo converts to GMT(00:00). This session management forces all client sessions to UTC and sets formats for all DATE and TIMESTAMP types; it does however sacrifice any fraction seconds TIMESTAMPS may be storing. It also insures TIMSTAMP(0) works without causing DateTime.new($ts) to fault.

DBIish.connect( 'Oracle', :alter-session-iso8601, ... );

ALTER SESSION SET time_zone               = '-00:00'
ALTER SESSION SET nls_date_format         = 'YYYY-MM-DD"T"HH24:MI:SS"Z"'
ALTER SESSION SET nls_timestamp_format    = 'YYYY-MM-DD"T"HH24:MI:SS"Z"'
ALTER SESSION SET nls_timestamp_tz_format = 'YYYY-MM-DD"T"HH24:MI:SS"Z"'

WARNING: Preexisting databases that used time zones other than UTC/GMT/-00:00 may need to convert current timestamps to -00:00 to ensure timestamp correctness. It will depend on the type of TIMESTAMP used and how Oracle was configured.

NOTICE: By default DBIish lower-cases FIELD names. This is noticed when data is returned as a hash.

For consumer purists that desire DBIish to leave session management alone, the above behaviors can be disabled using these options in the connect method. These options will allow DBIish to most closely behave like Perl5's DBI defaults. These are my personal favorite settings.

:no-alter-session      # don't alter session
:no-datetime-container # return the date/timestamps as stings
:no-lc-field-names     # return field names unaltered

Threads

I have a long history of using Threads, Oracle and Perl5. I have yet to read any useful online notes regarding successful usage of Raku, threads & DBIish; I thought I'd share recent experience.

Since early 2021 I've successfully implemented my Raku solution for using as many as Eight(8) threads all connected to Oracle performing simultaneous Reads and writes. As with Perl-5 the number one requirement is to ensure each thread creates is own connection handle with Oracle. In case you're interested; its implemented as a layer on top of DBIish that when .enable(N) is used determines the number of worker threads; each capable to handling reads or writes. The primary application delegates writes to the workers and reads are asynchronously delivered where requested. This solution allows the application to stay focused on it's primary purpose while dedicated writers handle the DB updates.

Regards, ancient-wizard

TESTING

The DBIish::CommonTesting module, now with over 100 tests, provides a common unit testing that allows a driver developer to test its driver capabilities and the minimum expected compatibility.

Set environment variable DBIISH_WRITE_TEST=YES to run tests which may leave permanent state changes in the database.

SEE ALSO

The Raku Pod in the doc:DBIish module and examples in the examples directory.

This README and the documentation of the DBIish and the DBDish modules are in the Pod6 format. It can be extracted by running

rakudo --doc <filename>

Or, if Pod::To::HTML is installed,

rakudo --doc=html <filename>

Additional modules of interest may include:

  • DBIish::Transaction

    A wrapper for managing transactions, including automatic retry for temporary failures.

  • DBIish::Pool

    Connection reuse for DBIish to reduce loads on high-volume or heavily encrypted database sessions.

HISTORY

DBIish is based on Martin Berends' MiniDBI project, but unlike MiniDBI, DBDish aims to provide an interface that takes advantage of Raku idioms.

There is/was an intention to integrate with the DBDI project once it has sufficient functionality.

So, while it is indirectly inspired by Perl 5 DBI, there are also many differences.

COPYRIGHT

Written by Moritz Lenz, based on the MiniDBI code by Martin Berends.

See the CREDITS file for a list of all contributors.

LICENSE

Copyright © 2009-2020, the DBIish contributors All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

dbiish's People

Contributors

abraxxa avatar alexdaniel avatar ancientwizard avatar azawawi avatar cxreg avatar danielgustafsson avatar fayland avatar froggs avatar hoelzro avatar jj avatar jnthn avatar jonathanstowe avatar kaare avatar kamilaborowska avatar lembark avatar lizmat avatar massa avatar moritz avatar niner avatar rbt avatar retupmoca avatar salortiz avatar samcv avatar skarsnik avatar su-shee avatar timo avatar titsuki avatar vrurg avatar xliff avatar zoffixznet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dbiish's Issues

DBIish is failing its pre-install tests.

$ panda install Task::Star
==> Task::Star depends on DBIish, Linenoise, LWP::Simple, JSON::RPC, Pod::To::HTML, p6doc, MIME::Base64
==> Linenoise depends on Native::Resources
==> Native::Resources depends on LibraryMake
URI provides the requested URI::Escape
==> LWP::Simple depends on MIME::Base64
==> JSON::RPC depends on LWP::Simple
URI provides the requested URI::Escape
==> LWP::Simple depends on MIME::Base64
panda provides the requested Panda
==> p6doc depends on File::Temp
==> File::Temp depends on File::Directory::Tree
==> Fetching DBIish
==> Building DBIish
==> Testing DBIish
# Using PGDATABASE: (none)
t/01-connectconfig-pg.t ... ok
Failed
  in method connect at /home/cschwenz/.panda-work/1455620847_1/lib/DBIish.pm6 line 7
  in block <unit> at t/05-mock.t line 6

Actually thrown at:
  in any  at gen/moar/m-Metamodel.nqp line 3041
  in method connect at /home/cschwenz/.panda-work/1455620847_1/lib/DBIish.pm6 line 9
  in block <unit> at t/05-mock.t line 6

t/05-mock.t ...............
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 9/9 subtests

# Failed test 'Install driver'
# at t/10-mysql.t line 66
Failed
  in block <unit> at t/10-mysql.t line 65

Actually thrown at:
  in any  at gen/moar/m-Metamodel.nqp line 3041
  in block <unit> at t/10-mysql.t line 68

# Looks like you planned 87 tests, but ran 1
# Looks like you failed 1 test of 1
t/10-mysql.t ..............
Dubious, test returned 1 (wstat 256, 0x100)
Failed 87/87 subtests

# Failed test 'Install driver'
# at EVAL_0 line 28
Failed
  in block <unit> at EVAL_0 line 27
  in block <unit> at t/25-mysql-common.t line 17

Actually thrown at:
  in any  at gen/moar/m-Metamodel.nqp line 3041
  in block <unit> at EVAL_0 line 30
  in block <unit> at t/25-mysql-common.t line 17

# Looks like you planned 58 tests, but ran 1
# Looks like you failed 1 test of 1
t/25-mysql-common.t .......
Dubious, test returned 1 (wstat 256, 0x100)
Failed 58/58 subtests
t/30-pg.t ................. ok

# Failed test 'Install driver'
# at EVAL_0 line 28
Failed
  in block <unit> at EVAL_0 line 27
  in block <unit> at t/35-pg-common.t line 25

Actually thrown at:
  in any  at gen/moar/m-Metamodel.nqp line 3041
  in block <unit> at EVAL_0 line 30
  in block <unit> at t/35-pg-common.t line 25

# Looks like you planned 58 tests, but ran 1
# Looks like you failed 1 test of 1
t/35-pg-common.t ..........
Dubious, test returned 1 (wstat 256, 0x100)
Failed 58/58 subtests

# Failed test 'Install driver'
# at EVAL_0 line 28
Failed
  in block <unit> at EVAL_0 line 27
  in block <unit> at t/40-sqlite-common.t line 12

Actually thrown at:
  in any  at gen/moar/m-Metamodel.nqp line 3041
  in block <unit> at EVAL_0 line 30
  in block <unit> at t/40-sqlite-common.t line 12

# Looks like you planned 58 tests, but ran 1
# Looks like you failed 1 test of 1
t/40-sqlite-common.t ......
Dubious, test returned 1 (wstat 256, 0x100)
Failed 58/58 subtests
t/41-sqlite-exec-error.t .. ok

Test Summary Report
-------------------
t/05-mock.t             (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 9 tests but ran 0.
t/10-mysql.t            (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
  Parse errors: Bad plan.  You planned 87 tests but ran 1.
t/25-mysql-common.t     (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
  Parse errors: Bad plan.  You planned 58 tests but ran 1.
t/35-pg-common.t        (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
  Parse errors: Bad plan.  You planned 58 tests but ran 1.
t/40-sqlite-common.t    (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
  Parse errors: Bad plan.  You planned 58 tests but ran 1.
Files=8, Tests=24, 54 wallclock secs ( 0.05 usr  0.01 sys + 50.99 cusr  2.43 csys = 53.48 CPU)
Result: FAIL
The spawned process exited unsuccessfully (exit code: 1)
  in sub run-and-gather-output at /home/cschwenz/.rakudobrew/moar-nom/install/share/perl6/site/sources/DAD29535955E677E319FDF0ACA9A926766180A75 line 85
  in block  at /home/cschwenz/.rakudobrew/moar-nom/install/share/perl6/site/sources/1DCE07CA986A927E98F9EEDC8B5DF87C995E3619 line 22
  in sub indir at /home/cschwenz/.rakudobrew/moar-nom/install/share/perl6/site/sources/DAD29535955E677E319FDF0ACA9A926766180A75 line 20
  in method test at /home/cschwenz/.rakudobrew/moar-nom/install/share/perl6/site/sources/1DCE07CA986A927E98F9EEDC8B5DF87C995E3619 line 5
  in method install at /home/cschwenz/.rakudobrew/moar-nom/install/share/perl6/site/sources/5538417AF9CC9DF68B79F613F1F4897C2AEC2F05 line 156
  in block  at /home/cschwenz/.rakudobrew/moar-nom/install/share/perl6/site/sources/5538417AF9CC9DF68B79F613F1F4897C2AEC2F05 line 229
  in method resolve at /home/cschwenz/.rakudobrew/moar-nom/install/share/perl6/site/sources/5538417AF9CC9DF68B79F613F1F4897C2AEC2F05 line 223
  in sub MAIN at /home/cschwenz/.rakudobrew/moar-nom/install/share/perl6/site/resources/76CD539C815A33F2891D2EF3D6D96B1081567AD1 line 18
  in block <unit> at /home/cschwenz/.rakudobrew/moar-nom/install/share/perl6/site/resources/76CD539C815A33F2891D2EF3D6D96B1081567AD1 line 150

$

This is on a fresh install of perl6 done via rakudobrew build moar && rakudobrew build panda.

$ which perl6
/home/cschwenz/.rakudobrew/bin/perl6
$ perl6 -v
This is Rakudo version 2015.12-362-g4cd2875 built on MoarVM version 2016.01-28-g2136293
implementing Perl 6.c.
$ which panda
/home/cschwenz/.rakudobrew/moar-nom/install/share/perl6/site/bin/panda
$

MySQL does not pass Num/Rat correctly

Proof is a bit tricky, because MySQL does not allow to explicitly get variable type that it got from driver. So I'll use a bit of nasty overflows and implicit casts to illustrate this.

my $sth = $dbh.prepare(q{SELECT 14655374668259132385 % ?});

Integer binding

mysql> SELECT 14655374668259132385 % 2;
+--------------------------+
| 14655374668259132385 % 2 |
+--------------------------+
|                        1 |
+--------------------------+
1 row in set (0.00 sec)
$sth.execute(2);
dd $sth.fetchall_arrayref();

# prints [["1"],]

So integers are OK.

String binding

mysql> SELECT 14655374668259132385 % '2';
+----------------------------+
| 14655374668259132385 % '2' |
+----------------------------+
|                          0 |
+----------------------------+
1 row in set (0.01 sec)
$sth.execute("2");
dd $sth.fetchall_arrayref();

# prints [["0"],]

And this is also OK, despite stupid result.
String was passed and implicitly casted by server to Double and overflows in consistent way with console.

Num binding

mysql> SELECT 14655374668259132385 % 2.0;
+----------------------------+
| 14655374668259132385 % 2.0 |
+----------------------------+
|                        1.0 |
+----------------------------+
1 row in set (0.00 sec)
$sth.execute(2.0.Num);
dd $sth.fetchall_arrayref();

# prints [["0"],]

Which is incorrect. That means Nums are stringified somewhere along the way?

Expected output is the one consistent with console.

MySQL "0" timestamps mishandled.

The following will give the error "Month out of range. Is: 0, should be in 1..12".

#!/usr/bin/env perl6

=begin doc

Have a database with a table having a timestamp column, and add a
record where that timestamp is zero:

create database test_db;
use test_db;
create table test_table (my_timestamp timestamp);
insert into test_table (my_timestamp) values (0);

=end doc

use DBIish;

sub MAIN {
my $user = 'whomever';
my $password = 'PaSsWoRd';
my $db-name = 'test_db';
my $table-name = 'test_table';

my $dbh = DBIish.connect('mysql', database => $db-name, :$user, :$password);
my $sth = $dbh.prepare('select * from test_table');
$sth.execute;
$sth.fetchall_arrayref;

}

DBIish and Text::CSV do not work together.

Hmm, probably not a CSV problem alone. However, I would like to use CSV and DBIish together in a script, but every time I include both and run it the following error is thrown:

Merging GLOBAL symbols failed: duplicate definition of symbol HLL

This happens in the DBIish.connect method.
I will this also post on the CSV repo.

$ perl6

use DBIish
use Text::CSV
my $dbh = DBIish.connect("SQLite", :database<new-database.sqlite3>)

installation via panda failed

/home/duff
➤ panda install DBIish
==> Fetching DBIish
==> Building DBIish
Compiling lib/DBIish.pm6 to mbc
Compiling lib/DBDish.pm6 to mbc
Compiling lib/DBDish/Pg.pm6 to mbc
Compiling lib/DBDish/TestMock.pm6 to mbc
Compiling lib/DBDish/SQLite.pm6 to mbc
Compiling lib/DBDish/mysql.pm6 to mbc
==> Testing DBIish
t/05-mock.t ............... ok
# Connect failed with error DBD::mysql connection failed: Access denied for user 'testuser'@'localhost' (using password: YES)
t/10-mysql.t .............. ok
# Connect failed with error DBD::mysql connection failed: Access denied for user 'testuser'@'localhost' (using password: YES)
# Looks like you planned 42 tests, but ran 40
t/25-mysql-common.t ....... 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 2/42 subtests 
    (less 38 skipped subtests: 2 okay)
t/30-Pg.t ................. ok
# Connect failed with error could not connect to server: Connection refused
#   Is the server running on host "localhost" (127.0.0.1) and accepting
#   TCP/IP connections on port 5432?
# Looks like you planned 42 tests, but ran 40
t/35-Pg-common.t .......... 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 2/42 subtests 
    (less 38 skipped subtests: 2 okay)
# Connect failed with error Cannot locate native library 'libsqlite3.so'
# Looks like you planned 42 tests, but ran 40
t/40-sqlite-common.t ...... 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 2/42 subtests 
    (less 38 skipped subtests: 2 okay)
t/41-sqlite-exec-error.t .. ok
Test Summary Report
-------------------
t/25-mysql-common.t     (Wstat: 65280 Tests: 40 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 42 tests but ran 40.
t/35-Pg-common.t        (Wstat: 65280 Tests: 40 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 42 tests but ran 40.
t/40-sqlite-common.t    (Wstat: 65280 Tests: 40 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 42 tests but ran 40.
Files=7, Tests=221,  8 wallclock secs ( 0.08 usr  0.00 sys +  8.06 cusr  0.46 csys =  8.60 CPU)
Result: FAIL
test stage failed for DBIish: Tests failed
  in method install at lib/Panda.pm:125
  in method resolve at lib/Panda.pm:195
  in sub MAIN at /home/duff/.rakudobrew/bin/../moar-nom/install/languages/perl6/site/bin/panda:20
  in sub MAIN at /home/duff/.rakudobrew/bin/../moar-nom/install/languages/perl6/site/bin/panda:18
  in block <unit> at /home/duff/.rakudobrew/bin/../moar-nom/install/languages/perl6/site/bin/panda:77


Failure Summary
----------------
DBIish
    *test stage failed for DBIish: Tests failed

Task::Star bailing out with failing DBIish

Trying to install Task::Star, and when it gets to DBIish, I get a huge wad of error messages. Pasting below. Rakudo and Panda built from the github repositories (as of commits a31ab3b84bd7852f42ab71fcf16ed787aa470efb

and

cb273cd55be0554796c801c72dfa3833e5270938

respectively. OS X 10.10.5)

Errors:

Failed test 'Can install driver for 'SQLite''

at t/01-Basic.t line 35

Use of uninitialized value $drv of type Any in string context
Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block at t/01-Basic.t line 38

Failed test 'Is an instance '''

at t/01-Basic.t line 38

Failed test 'Any indeed a driver'

at t/01-Basic.t line 39

Failed test 'version declared'

at t/01-Basic.t line 42

Method 'version' not found for invocant of class 'Any'
in block at t/01-Basic.t line 43

Looks like you planned 47 tests, but ran 30

Looks like you failed 4 tests of 30

t/01-Basic.t ..............
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 21/47 subtests
t/03-lib-util.t ........... ok
t/05-mock.t ............... ok

in block at /Users/dha/panda/.panda-work/1463002570_1/lib/DBIish.pm6 (DBIish) line 54
in any at /Users/dha/panda/.panda-work/1463002570_1/lib/.precomp/AC5B7F0AE411E6FBB0069E88D5318B962FDAD64C.1463000968.72001/7D/7D00A6C693B7DF515CAA5ECC6097F930493C50AA line 1
in method install-driver at /Users/dha/panda/.panda-work/1463002570_1/lib/DBIish.pm6 (DBIish) line 58
in block at t/10-mysql.t line 67

t/10-mysql.t ..............
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 87/87 subtests

in block at /Users/dha/panda/.panda-work/1463002570_1/lib/DBIish.pm6 (DBIish) line 54
in any at /Users/dha/panda/.panda-work/1463002570_1/lib/.precomp/AC5B7F0AE411E6FBB0069E88D5318B962FDAD64C.1463000968.72001/7D/7D00A6C693B7DF515CAA5ECC6097F930493C50AA line 1
in method install-driver at /Users/dha/panda/.panda-work/1463002570_1/lib/DBIish.pm6 (DBIish) line 58
in method run-tests at /Users/dha/panda/.panda-work/1463002570_1/lib/DBIish/CommonTesting.pm6 (DBIish::CommonTesting) line 33
in block at t/25-mysql-common.t line 5

t/25-mysql-common.t .......
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 107/107 subtests

in block at t/26-mysql-blob.t line 16
in any at /Users/dha/panda/.panda-work/1463002570_1/lib/.precomp/AC5B7F0AE411E6FBB0069E88D5318B962FDAD64C.1463000968.72001/7D/7D00A6C693B7DF515CAA5ECC6097F930493C50AA line 1
in block at /Users/dha/panda/.panda-work/1463002570_1/lib/DBIish.pm6 (DBIish) line 41
in any at /Users/dha/panda/.panda-work/1463002570_1/lib/.precomp/AC5B7F0AE411E6FBB0069E88D5318B962FDAD64C.1463000968.72001/7D/7D00A6C693B7DF515CAA5ECC6097F930493C50AA line 1
in any at /Users/dha/panda/.panda-work/1463002570_1/lib/.precomp/AC5B7F0AE411E6FBB0069E88D5318B962FDAD64C.1463000968.72001/7D/7D00A6C693B7DF515CAA5ECC6097F930493C50AA line 1
in block at /Users/dha/panda/.panda-work/1463002570_1/lib/DBIish.pm6 (DBIish) line 54
in any at /Users/dha/panda/.panda-work/1463002570_1/lib/.precomp/AC5B7F0AE411E6FBB0069E88D5318B962FDAD64C.1463000968.72001/7D/7D00A6C693B7DF515CAA5ECC6097F930493C50AA line 1
in method install-driver at /Users/dha/panda/.panda-work/1463002570_1/lib/DBIish.pm6 (DBIish) line 58
in method connect at /Users/dha/panda/.panda-work/1463002570_1/lib/DBIish.pm6 (DBIish) line 44
in block at t/26-mysql-blob.t line 11

t/26-mysql-blob.t .........
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 19/19 subtests

in block at t/27-mysql-datetime.t line 16
in any at /Users/dha/panda/.panda-work/1463002570_1/lib/.precomp/AC5B7F0AE411E6FBB0069E88D5318B962FDAD64C.1463000968.72001/7D/7D00A6C693B7DF515CAA5ECC6097F930493C50AA line 1
in block at /Users/dha/panda/.panda-work/1463002570_1/lib/DBIish.pm6 (DBIish) line 41
in any at /Users/dha/panda/.panda-work/1463002570_1/lib/.precomp/AC5B7F0AE411E6FBB0069E88D5318B962FDAD64C.1463000968.72001/7D/7D00A6C693B7DF515CAA5ECC6097F930493C50AA line 1
in any at /Users/dha/panda/.panda-work/1463002570_1/lib/.precomp/AC5B7F0AE411E6FBB0069E88D5318B962FDAD64C.1463000968.72001/7D/7D00A6C693B7DF515CAA5ECC6097F930493C50AA line 1
in block at /Users/dha/panda/.panda-work/1463002570_1/lib/DBIish.pm6 (DBIish) line 54
in any at /Users/dha/panda/.panda-work/1463002570_1/lib/.precomp/AC5B7F0AE411E6FBB0069E88D5318B962FDAD64C.1463000968.72001/7D/7D00A6C693B7DF515CAA5ECC6097F930493C50AA line 1
in method install-driver at /Users/dha/panda/.panda-work/1463002570_1/lib/DBIish.pm6 (DBIish) line 58
in method connect at /Users/dha/panda/.panda-work/1463002570_1/lib/DBIish.pm6 (DBIish) line 44
in block at t/27-mysql-datetime.t line 11

t/27-mysql-datetime.t .....
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 12/12 subtests
t/30-pg.t ................. ok

DBDish::Pg: Can't connect: could not connect to server: No such file or directory

Is the server running locally and accepting

connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

(1)

Can't continue.

t/35-pg-common.t .......... ok
t/36-pg-array.t ........... ok
t/36-pg-blob.t ............ ok
t/36-pg-native.t .......... ok
t/37-pg-datetime.t ........ ok

in block at /Users/dha/panda/.panda-work/1463002570_1/lib/DBIish.pm6 (DBIish) line 54
in any at /Users/dha/panda/.panda-work/1463002570_1/lib/.precomp/AC5B7F0AE411E6FBB0069E88D5318B962FDAD64C.1463000968.72001/7D/7D00A6C693B7DF515CAA5ECC6097F930493C50AA line 1
in method install-driver at /Users/dha/panda/.panda-work/1463002570_1/lib/DBIish.pm6 (DBIish) line 58
in method run-tests at /Users/dha/panda/.panda-work/1463002570_1/lib/DBIish/CommonTesting.pm6 (DBIish::CommonTesting) line 33
in block at t/40-sqlite-common.t line 6

t/40-sqlite-common.t ......
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 107/107 subtests

in block at /Users/dha/panda/.panda-work/1463002570_1/lib/DBIish.pm6 (DBIish) line 54
in any at /Users/dha/panda/.panda-work/1463002570_1/lib/.precomp/AC5B7F0AE411E6FBB0069E88D5318B962FDAD64C.1463000968.72001/7D/7D00A6C693B7DF515CAA5ECC6097F930493C50AA line 1
in method install-driver at /Users/dha/panda/.panda-work/1463002570_1/lib/DBIish.pm6 (DBIish) line 58
in block at t/41-sqlite-exec-error.t line 13

Looks like you planned 16 tests, but ran 2

t/41-sqlite-exec-error.t ..
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 14/16 subtests

in block at t/42-sqlite-blob.t line 18
in any at /Users/dha/panda/.panda-work/1463002570_1/lib/.precomp/AC5B7F0AE411E6FBB0069E88D5318B962FDAD64C.1463000968.72001/7D/7D00A6C693B7DF515CAA5ECC6097F930493C50AA line 1
in block at /Users/dha/panda/.panda-work/1463002570_1/lib/DBIish.pm6 (DBIish) line 41
in any at /Users/dha/panda/.panda-work/1463002570_1/lib/.precomp/AC5B7F0AE411E6FBB0069E88D5318B962FDAD64C.1463000968.72001/7D/7D00A6C693B7DF515CAA5ECC6097F930493C50AA line 1
in any at /Users/dha/panda/.panda-work/1463002570_1/lib/.precomp/AC5B7F0AE411E6FBB0069E88D5318B962FDAD64C.1463000968.72001/7D/7D00A6C693B7DF515CAA5ECC6097F930493C50AA line 1
in block at /Users/dha/panda/.panda-work/1463002570_1/lib/DBIish.pm6 (DBIish) line 54
in any at /Users/dha/panda/.panda-work/1463002570_1/lib/.precomp/AC5B7F0AE411E6FBB0069E88D5318B962FDAD64C.1463000968.72001/7D/7D00A6C693B7DF515CAA5ECC6097F930493C50AA line 1
in method install-driver at /Users/dha/panda/.panda-work/1463002570_1/lib/DBIish.pm6 (DBIish) line 58
in method connect at /Users/dha/panda/.panda-work/1463002570_1/lib/DBIish.pm6 (DBIish) line 44
in block at t/42-sqlite-blob.t line 13

t/42-sqlite-blob.t ........
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 18/18 subtests

DBIish: DBDish::Oracle needs 'libclntsh.12.1.dylib', not found

Can't continue.

t/45-oracle-common.t ...... ok
t/46-oracle-blob.t ........ ok
t/47-oracle-datetime.t .... ok

Test Summary Report

t/01-Basic.t (Wstat: 65280 Tests: 30 Failed: 4)
Failed tests: 27-30
Non-zero exit status: 255
Parse errors: Bad plan. You planned 47 tests but ran 30.
t/03-lib-util.t (Wstat: 0 Tests: 6 Failed: 0)
TODO passed: 5-6
t/10-mysql.t (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: Bad plan. You planned 87 tests but ran 0.
t/25-mysql-common.t (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: Bad plan. You planned 107 tests but ran 0.
t/26-mysql-blob.t (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: Bad plan. You planned 19 tests but ran 0.
t/27-mysql-datetime.t (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: Bad plan. You planned 12 tests but ran 0.
t/40-sqlite-common.t (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: Bad plan. You planned 107 tests but ran 0.
t/41-sqlite-exec-error.t (Wstat: 65280 Tests: 2 Failed: 0)
Non-zero exit status: 255
Parse errors: Bad plan. You planned 16 tests but ran 2.
t/42-sqlite-blob.t (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: Bad plan. You planned 18 tests but ran 0.
Files=19, Tests=362, 66 wallclock secs ( 0.12 usr 0.04 sys + 57.50 cusr 4.61 csys = 62.27 CPU)
Result: FAIL
The spawned process exited unsuccessfully (exit code: 1)
in sub run-and-gather-output at /Users/dha/rakudo/install/share/perl6/site/sources/24811C576EF8F85E7672B26955C802BB2FC94675 (Panda::Common) line 85
in block at /Users/dha/rakudo/install/share/perl6/site/sources/48E2EB9144E069353B240AD2D147B48C65F70152 (Panda::Tester) line 22
in sub indir at /Users/dha/rakudo/install/share/perl6/site/sources/24811C576EF8F85E7672B26955C802BB2FC94675 (Panda::Common) line 20
in method test at /Users/dha/rakudo/install/share/perl6/site/sources/48E2EB9144E069353B240AD2D147B48C65F70152 (Panda::Tester) line 5
in method install at /Users/dha/rakudo/install/share/perl6/site/sources/582CB7486602954A4601BDCE5A0EAC54B05DA58A (Panda) line 156
in block at /Users/dha/rakudo/install/share/perl6/site/sources/582CB7486602954A4601BDCE5A0EAC54B05DA58A (Panda) line 229
in method resolve at /Users/dha/rakudo/install/share/perl6/site/sources/582CB7486602954A4601BDCE5A0EAC54B05DA58A (Panda) line 223
in sub MAIN at /Users/dha/rakudo/install/share/perl6/site/resources/E0D978079BB5081DE986D058BB8AB08252F05CC8 line 18
in block at /Users/dha/rakudo/install/share/perl6/site/resources/E0D978079BB5081DE986D058BB8AB08252F05CC8 line 152

~/panda 17:37:17%

Unable to modify source for debugging

I'm getting an error, and I'd like to insert 'print' statements in the source to try to debug, but I don't understand which source to modify and have run.

This is what I get with the panda installed DBIish:

Month out of range. Is: 0, should be in 1..12
  in block  at /opt/prj/l/p6/perl6-rakudo.git/install/share/perl6/site/sources/B874A114F16EBFE5EA4815E5E20CA48A7810B32C (DBDish::mysql::StatementHandle) line 178
  in code  at /opt/prj/l/p6/perl6-rakudo.git/install/share/perl6/site/sources/B874A114F16EBFE5EA4815E5E20CA48A7810B32C (DBDish::mysql::StatementHandle) line 168
  in block  at /opt/prj/l/p6/perl6-rakudo.git/install/share/perl6/site/sources/B874A114F16EBFE5EA4815E5E20CA48A7810B32C (DBDish::mysql::StatementHandle) line 165
  in method _row at /opt/prj/l/p6/perl6-rakudo.git/install/share/perl6/site/sources/B874A114F16EBFE5EA4815E5E20CA48A7810B32C (DBDish::mysql::StatementHandle) line 161
  in method fetchrow at /opt/prj/l/p6/perl6-rakudo.git/install/share/perl6/site/sources/C790FDD5119FC8D71D36CB0BA92A32B7A0A6A77A (DBDish::StatementHandle) line 119
  in block  at /opt/prj/l/p6/perl6-rakudo.git/install/share/perl6/site/sources/C790FDD5119FC8D71D36CB0BA92A32B7A0A6A77A (DBDish::StatementHandle) line 159
  in method fetchall_arrayref at /opt/prj/l/p6/perl6-rakudo.git/install/share/perl6/site/sources/C790FDD5119FC8D71D36CB0BA92A32B7A0A6A77A (DBDish::StatementHandle) line 169
  in block <unit> at -e line 15

I opened the 'B874A11…' file, and typed some junk on line 178 ('sdfasdf'), then ran the program again, but I got the exact same result.

Then I cloned the DBIish repo, and ran my program with -I/path/to/the/cloned/repo/lib, and this is what I get:

===SORRY!=== Error while compiling /opt/prj/c/cirano/ciw/repo/dev/site#sources/B874A114F16EBFE5EA4815E5E20CA48A7810B32C (DBDish::mysql::StatementHandle)
Undeclared routine:
    sdfasdf used at line 178


  in block  at /opt/prj/l/p6/perl6-rakudo.git/install/share/perl6/site/sources/C7DE14D64CD73BC06BF8D3D436441E1B67A9F91F (DBIish) line 41
  in any  at /opt/prj/l/p6/perl6-rakudo.git/install/share/perl6/site/precomp/C3D71A4CAC2ECF2C70B50A1F4436228B32794CA7.1476211372.19594/C7/C7DE14D64CD73BC06BF8D3D436441E1B67A9F91F line 1
  in any  at /opt/prj/l/p6/perl6-rakudo.git/install/share/perl6/site/precomp/C3D71A4CAC2ECF2C70B50A1F4436228B32794CA7.1476211372.19594/C7/C7DE14D64CD73BC06BF8D3D436441E1B67A9F91F line 1
  in block  at /opt/prj/l/p6/perl6-rakudo.git/install/share/perl6/site/sources/C7DE14D64CD73BC06BF8D3D436441E1B67A9F91F (DBIish) line 54
  in any  at /opt/prj/l/p6/perl6-rakudo.git/install/share/perl6/site/precomp/C3D71A4CAC2ECF2C70B50A1F4436228B32794CA7.1476211372.19594/C7/C7DE14D64CD73BC06BF8D3D436441E1B67A9F91F line 1
  in method install-driver at /opt/prj/l/p6/perl6-rakudo.git/install/share/perl6/site/sources/C7DE14D64CD73BC06BF8D3D436441E1B67A9F91F (DBIish) line 58
  in method connect at /opt/prj/l/p6/perl6-rakudo.git/install/share/perl6/site/sources/C7DE14D64CD73BC06BF8D3D436441E1B67A9F91F (DBIish) line 44
  in block <unit> at -e line 3

"/opt/prj/c/cirano/ciw/repo/dev" is the working directory from which I'm running the program.

Which sources should receive my eventual 'print' debugging statements, and how do I run my program given precompilation and all that?

I built my Perl 6 from scratch yesterday:
perl6ver.txt

Postgres Money Type

I was getting constant warnings about data type 790 not being known. It's a money type in Postgres, and should be a string. (yes Rats are better to use now that rounding errors are dealt with). Anyway, here's a diff that puts in the type for oid's where the error was coming from:

diff --git a/lib/DBDish/Pg/Native.pm6 b/lib/DBDish/Pg/Native.pm6
index 860e2ea..87d173d 100644
--- a/lib/DBDish/Pg/Native.pm6
+++ b/lib/DBDish/Pg/Native.pm6
@@ -346,6 +346,7 @@ constant %oid-to-type is export = Map.new(
700 => Num, # float4
701 => Num, # float8
705 => Any, # unknown

  •   790  => Str,   # money
    
    1000 => Bool, # _bool
    1001 => Buf, # _bytea
    1005 => Array[Int], # Array(int2)

Add capability information to the drivers

We probably want to add a way to have information about what the driver can support or how he handle different thing. It will make writing Test better.

Example:

-Typed NULL result or not, SQLITE Null value are untyped (well, they are typed Null) when other drivers give you the type of the field
-Array support or not (it's in sql rfc), Pg support then, other not

It will probably replace the $sth.can('method') in the test suite too.

OSX libpq.so

DBDish/Pg.pm6

I had to change this line to:

my constant lib = 'libpq.dylib';

in order to use this in OSX (10.9.5)

Segmentation fault

On Rakudo March 2015 there is a segmentation fault during fetching MySQL query results:


!/usr/bin/env perl6

use v6;
use DBIish;

my $dbh = DBIish.connect('mysql', :host<db.host>, :port(3306),
:database, :user, :$password);

my $sth = $dbh.prepare(q:to/STATEMENT/);
SELECT text
FROM main
WHERE id = '20'
STATEMENT

$sth.execute();

my $arrayref = $sth.fetchall_arrayref(); # <-- Segfault here


The same fault happens also with other fetching functions ( fetchrow(), etc )

EDIT:
$sth.execute() returns '-1', which obviously means that no rows was selected? But the query in the test code executes OK in MySql. Also '-1' is returned on any other selection query. Is query executed incorrectly in the sample code?

Numeric types in DBIish

To facilitate the oracle branch merge, I let the "All float is Rat" change to survive, but only as an interim solution.

The SQL standard defines NUMERIC and/or DECIMAL, as an exact, arbitrary (user decided) precision number and FLOAT, REAL, and DOUBLE as inexact, variable-precision numbers, usually mapped to native IEEE-754 implementations.

All DBDish drivers should support both kinds of numbers: Rat or FatRat (depending of desired precision) is the natural option to represent the first and Num the second.

We need to agree on a minimum set of data-types to test for in the common test suite, the current set varchar, bigint and numeric(5, 2) is insufficient.

Bundle SQLite libs

It would be nice if DBIish bundled all the C libs required for SQLite backend; same as Perl 5's DBI DBD::SQLite driver does.

This way apps, Since SQLite does not need any servers or anything, using just SQLite backened would not need anything but installing this module using panda.

Add postgresql array

Could be cool to have pg_array support, meaning fetch* should return an array for the array field and execute be able to work on array value.

Basicly it probably converting array string pg give us, they look like that: {NonSpace, "With Space"} and can be nested {{value, value}, {value, value}}

[SQLlite] execute(... does not raise all errors (eg. unique constrain)

If you try to insert a row with the same primary key you should get a "unique constraint" error.

use v6;
use DBIish;

my $dbh = DBIish.connect("SQLite", :database<example-db.sqlite3> :RaiseError);

my $rv = $dbh.do('DROP TABLE IF EXISTS foo');
my $sth = $dbh.do('CREATE TABLE foo (id int PRIMARY KEY NOT NULL)');

$sth = $dbh.prepare('INSERT INTO foo (id) VALUES ( ? )');
my $res = $sth.execute(1);
$res = $sth.execute(1);
$dbh.disconnect;

The SQLlite lib raise that but, SQLite.pm6 does not get it. The following naive patch fix that for me, but i'm sure i missed something. (I'm new to this git, github, perl6, perl tests thing, so i choose this way...)

diff --git a/lib/DBDish/SQLite.pm6 b/lib/DBDish/SQLite.pm6
index 5bc70b0..86daf46 100644
--- a/lib/DBDish/SQLite.pm6
+++ b/lib/DBDish/SQLite.pm6
@@ -116,6 +116,9 @@ class DBDish::SQLite::StatementHandle does DBDish::StatementHandle {
             push @strings, $v;
         }
         $!row_status = sqlite3_step($!statement_handle);
+        if $!row_status != SQLITE_ROW and $!row_status != SQLITE_DONE {
+            self!handle-error($!row_status);
+        }
         self.rows;
     }

Of course a test needs to be added, but in the moment i don't know how to implement it.

Implement fetch*_typedhash in other drivers

For now only Pg can do it.

It consist mostly of adding a column_p6types method that return the list of perl6 type names for the column and a true_false method to handle Boolean value

Is smarter C library version detection possible?

The issue is that OS X brew for example already switched to libmysqlclient.20.dylib while code still tries to load v18. As the result tests are not executed during module installation. This can be solved by setting DBIISH_MYSQL_LIB but that method is:

  • not user-friendly
  • potential security issue, by modifying env variable to full path someone can load fake library from not trusted location without having write access to code

Is autodetection possible in latest NativeCall?

DBDish::mysql Empty Exception on ->execute / Failing Tests

Hey.

Tests fail and I get an exception, but no usefull message, when calling ->execute:

zoffix@z:/var/www/tmp$ echo 'SELECT name FROM test' | mysql -uroot test;
name
test
zoffix@z:/var/www/tmp$ cat test.pl 
#!/usr/bin/env perl6

use v6;
use DBIish;

my $dbh = DBIish.connect('mysql', :host('localhost'), :port(3306),
:database<test>, :user<root>, :password(''), PrintError => 1 );

my $sth = $dbh.prepare('SELECT name FROM test');
try { $sth.execute(); CATCH { say "ERROR! $! $_"} }
say $sth.fetchall_arrayref().perl;
zoffix@z:/var/www/tmp$ perl6 test.pl 
ERROR!  

  in method execute at lib/DBDish/mysql.pm6:170
  in block <unit> at test.pl:10

Here's the output of failing tests too:

zoffix@z:/var/www/tmp/.panda-work/1427915662_1$ perl6 --ll-exception t/10-mysql.t 
1..87
ok 1 - Install driver
ok 2 - DBDish::mysql version 0.01
ok 3 - Connected to database
ok 4 - disconnect returned true
ok 5 - Connected to database
ok 6 - making slate clean
ok 7 - creating t1
ok 8 - dropping created t1
not ok 9 - drop table if exists t1

# Failed test 'drop table if exists t1'
# at t/10-mysql.t line 1

ok 10 - create table t1
ok 11 - lock tables t1 write
ok 12 - Insert
ok 13 - Delete
ok 14 - Prepare of select

   at src/gen/m-CORE.setting:14141  (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:throw:88)
 from src/gen/m-CORE.setting:795  (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:die:35)
 from lib/DBDish.pm6:41  (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/96:set_errstr:74)
 from src/gen/m-CORE.setting:1358  (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:dispatch:<!>:90)
 from lib/DBDish/mysql.pm6:170  (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/104:execute:227)
 from t/10-mysql.t:158  (<ephemeral file>:<unit>:686)
 from t/10-mysql.t:1  (<ephemeral file>:<unit-outer>:10)
 from gen/moar/stage2/NQPHLL.nqp:1256  (/home/zoffix/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm:eval:181)
 from gen/moar/stage2/NQPHLL.nqp:1454  (/home/zoffix/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm:evalfiles:91)
 from gen/moar/stage2/NQPHLL.nqp:1352  (/home/zoffix/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm:command_eval:211)
 from src/Perl6/Compiler.nqp:17  (/home/zoffix/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/Compiler.moarvm:command_eval:93)
 from gen/moar/stage2/NQPHLL.nqp:1327  (/home/zoffix/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm:command_line:116)
 from src/gen/m-main.nqp:39  (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm:MAIN:18)
 from src/gen/m-main.nqp:35  (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm:<mainline>:197)
 from <unknown>:1  (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm:<main>:8)
 from <unknown>:1  (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm:<entry>:9)
zoffix@z:/var/www/tmp/.panda-work/1427915662_1$ perl6 --ll-exception t/25-mysql-common.t 
# Testing MiniDBD::mysql
1..42
ok 1 - Install driver
ok 2 - MiniDBD::mysql version 0.01
ok 3 - connect to zavolaj

   at src/gen/m-CORE.setting:14141  (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:throw:88)
 from src/gen/m-CORE.setting:795  (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:die:35)
 from src/gen/m-CORE.setting:793  (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:die:25)
 from lib/DBDish.pm6:41  (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/96:set_errstr:74)
 from src/gen/m-CORE.setting:1358  (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:dispatch:<!>:90)
 from lib/DBDish/mysql.pm6:170  (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/104:execute:227)
 from EVAL_0:52  (<ephemeral file>:<unit>:356)
 from EVAL_0:1  (<ephemeral file>:<unit-outer>:10)
 from src/gen/m-CORE.setting:819  (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:EVAL:164)
 from src/gen/m-CORE.setting:810  (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:EVAL:41)
 from t/25-mysql-common.t:16  (<ephemeral file>:<unit>:161)
 from t/25-mysql-common.t:1  (<ephemeral file>:<unit-outer>:10)
 from gen/moar/stage2/NQPHLL.nqp:1256  (/home/zoffix/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm:eval:181)
 from gen/moar/stage2/NQPHLL.nqp:1454  (/home/zoffix/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm:evalfiles:91)
 from gen/moar/stage2/NQPHLL.nqp:1352  (/home/zoffix/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm:command_eval:211)
 from src/Perl6/Compiler.nqp:17  (/home/zoffix/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/Compiler.moarvm:command_eval:93)
 from gen/moar/stage2/NQPHLL.nqp:1327  (/home/zoffix/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm:command_line:116)
 from src/gen/m-main.nqp:39  (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm:MAIN:18)
 from src/gen/m-main.nqp:35  (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm:<mainline>:197)
 from <unknown>:1  (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm:<main>:8)
 from <unknown>:1  (/home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/perl6.moarvm:<entry>:9)

Move DBIish to it's own Organization

This is for discussion, if there is agreement then the only changes will be to create a new organization in github, move DBIish to it, and change the META.list entry for DBIish to point to the new repository.

DBIish is a fairly important module, it's likely that many large applications in Perl 6 will want to use it and people will want to build other modules on top of it that provide higher level abstractions to users.

Whilst it's quite happily sitting in the perl6 organization right now, this has a couple of cultural and technical drawbacks.

Firstly, and this is both technical and cultural, there may be people who want to contribute to DBIish but may be daunted by the core implication of it being in the perl6 organization and also if they are to a core contributor to DBIish then there is a barrier to giving a commit as it is inconvenient to grant a commit to just the one repository in perl6 and also they may really not want to get bogged down in all of the other stuff that comes with the organization.

Secondly, and I think this is a positive enhancement to the current situation, is that a separate "organization" can act as an incubator for further work on both new database drivers and possibly higher level abstractions: for example I think it would be fairly easy to kickstart a bunch of drivers for Informix, Sybase, Firebird etc but I'm not convinced that I would like to commit myself to their long term maintenance, having the drivers in "common maintenance" will lower the barrier to entry and possibly cause more to be written.

Finally and purely culturally making the move will demonstrate that "Database support" is all grown up and can move from under the control of its parent project.

So I'd commend doing this, and just to put my time where my mouth is would be happy to do all the work required to perform the move.

fetchrow_hashref give a hash of str (with Pg)

fetchrow_hashref give a hash of str (not Str) typed value, preventing for using .perl on it for example.
Even when trying to copy the given hash into another hash it still retain the str type. I suspect it because the := operator is used when fecthing the row from Postgres.
Should it give just Str?

Installation failure due to P6M Merging GLOBAL symbols failed: duplicate definition of symbol TypeConverter

zoffix@leliana:~$ perl6 -v
This is Rakudo version 2016.12-352-g7d5bbef built on MoarVM version 2016.12-113-gd1da1ba
implementing Perl 6.c.
zoffix@leliana:~$ zef install DBIish
===> Searching for: DBIish
===> Found: DBIish:ver('0.5.9')
===> Dependencies: NativeHelpers::Blob
===> Filtering: DBIish:ver('0.5.9')
===> Filtering [OK] for DBIish:ver('0.5.9')
===> # SKIP: No Build.pm for DBIish:ver('0.5.9')
===> Testing: DBIish:ver('0.5.9')
Testing with plugin: Zef::Service::TAP+{<anon|94559856>}
t/01-Basic.t ..............1/38
# Failed test 'Can install driver for 'Pg''
# at t/01-Basic.t line 25
t/01-Basic.t ..............12/38# ===SORRY!===
# P6M Merging GLOBAL symbols failed: duplicate definition of symbol TypeConverter

Use of uninitialized value $drv of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
  in block  at t/01-Basic.t line 28

# Failed test 'Is an instance '''
# at t/01-Basic.t line 28

# Failed test 'Any indeed a driver'
# at t/01-Basic.t line 29

# Failed test 'version declared'
# at t/01-Basic.t line 32
No such method 'version' for invocant of type 'Any'
  in block <unit> at t/01-Basic.t line 33

# Looks like you planned 38 tests, but ran 15
# Looks like you failed 4 tests of 15
t/01-Basic.t .............. Failed 4/38 subtests 
t/03-lib-util.t ...........1/5Use of uninitialized value $lib of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
  in block <unit> at t/03-lib-util.t line 16
t/03-lib-util.t ........... ok 
t/05-mock.t ............... ok  
t/06-types.t .............. ok  
t/10-mysql.t ..............1/90# Connect failed with error DBDish::mysql: Can't connect: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
t/10-mysql.t .............. ok   
# Testing DBDish::mysql
t/25-mysql-common.t .......1/107# DBDish::mysql: Can't connect: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
# Can't continue.
t/25-mysql-common.t ....... ok   
# DBDish::mysql: Can't connect: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
# Can't continue.
t/26-mysql-blob.t ......... ok  
# DBDish::mysql: Can't connect: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
# Can't continue.
t/27-mysql-datetime.t ..... ok  
===SORRY!===
P6M Merging GLOBAL symbols failed: duplicate definition of symbol TypeConverter
t/30-pg.t ................. No subtests run
===SORRY!===
P6M Merging GLOBAL symbols failed: duplicate definition of symbol TypeConverter

  in block  at t/34-pg-types.t line 19
  in any  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/.precomp/E491C577D0182A1ED4E8C869EFFAC8335349E4BB.1484670381.58067/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish.pm6 (DBIish) line 41
  in any  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/.precomp/E491C577D0182A1ED4E8C869EFFAC8335349E4BB.1484670381.58067/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in any  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/.precomp/E491C577D0182A1ED4E8C869EFFAC8335349E4BB.1484670381.58067/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/.precomp/E491C577D0182A1ED4E8C869EFFAC8335349E4BB.1484670381.58067/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish.pm6 (DBIish) line 58
  in method connect at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish.pm6 (DBIish) line 44
  in block <unit> at t/34-pg-types.t line 14

t/34-pg-types.t ........... All 10 subtests passed 
# Testing DBDish::Pg
===SORRY!===
P6M Merging GLOBAL symbols failed: duplicate definition of symbol TypeConverter

  in block  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/.precomp/E491C577D0182A1ED4E8C869EFFAC8335349E4BB.1484670381.58067/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish.pm6 (DBIish) line 58
  in method run-tests at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish/CommonTesting.pm6 (DBIish::CommonTesting) line 33
  in block <unit> at t/35-pg-common.t line 10

t/35-pg-common.t .......... All 107 subtests passed 
===SORRY!===
P6M Merging GLOBAL symbols failed: duplicate definition of symbol TypeConverter

  in block  at t/36-pg-array.t line 20
  in any  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/.precomp/E491C577D0182A1ED4E8C869EFFAC8335349E4BB.1484670381.58067/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish.pm6 (DBIish) line 41
  in any  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/.precomp/E491C577D0182A1ED4E8C869EFFAC8335349E4BB.1484670381.58067/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in any  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/.precomp/E491C577D0182A1ED4E8C869EFFAC8335349E4BB.1484670381.58067/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/.precomp/E491C577D0182A1ED4E8C869EFFAC8335349E4BB.1484670381.58067/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish.pm6 (DBIish) line 58
  in method connect at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish.pm6 (DBIish) line 44
  in block <unit> at t/36-pg-array.t line 15

t/36-pg-array.t ........... All 7 subtests passed 
===SORRY!===
P6M Merging GLOBAL symbols failed: duplicate definition of symbol TypeConverter

  in block  at t/36-pg-blob.t line 19
  in any  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/.precomp/E491C577D0182A1ED4E8C869EFFAC8335349E4BB.1484670381.58067/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish.pm6 (DBIish) line 41
  in any  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/.precomp/E491C577D0182A1ED4E8C869EFFAC8335349E4BB.1484670381.58067/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in any  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/.precomp/E491C577D0182A1ED4E8C869EFFAC8335349E4BB.1484670381.58067/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/.precomp/E491C577D0182A1ED4E8C869EFFAC8335349E4BB.1484670381.58067/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish.pm6 (DBIish) line 58
  in method connect at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish.pm6 (DBIish) line 44
  in block <unit> at t/36-pg-blob.t line 14

t/36-pg-blob.t ............ All 18 subtests passed 
===SORRY!===
P6M Merging GLOBAL symbols failed: duplicate definition of symbol TypeConverter

  in block  at t/36-pg-native.t line 22
  in any  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/.precomp/E491C577D0182A1ED4E8C869EFFAC8335349E4BB.1484670381.58067/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish.pm6 (DBIish) line 41
  in any  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/.precomp/E491C577D0182A1ED4E8C869EFFAC8335349E4BB.1484670381.58067/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in any  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/.precomp/E491C577D0182A1ED4E8C869EFFAC8335349E4BB.1484670381.58067/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/.precomp/E491C577D0182A1ED4E8C869EFFAC8335349E4BB.1484670381.58067/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish.pm6 (DBIish) line 58
  in method connect at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish.pm6 (DBIish) line 44
  in block <unit> at t/36-pg-native.t line 17

t/36-pg-native.t .......... All 17 subtests passed 
===SORRY!===
P6M Merging GLOBAL symbols failed: duplicate definition of symbol TypeConverter

  in block  at t/37-pg-datetime.t line 19
  in any  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/.precomp/E491C577D0182A1ED4E8C869EFFAC8335349E4BB.1484670381.58067/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish.pm6 (DBIish) line 41
  in any  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/.precomp/E491C577D0182A1ED4E8C869EFFAC8335349E4BB.1484670381.58067/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in any  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/.precomp/E491C577D0182A1ED4E8C869EFFAC8335349E4BB.1484670381.58067/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/.precomp/E491C577D0182A1ED4E8C869EFFAC8335349E4BB.1484670381.58067/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish.pm6 (DBIish) line 58
  in method connect at /home/zoffix/.zef/store/DBIish.git/cbdf5b7bf73fceea3e26e500403c607bce97f9d0/lib/DBIish.pm6 (DBIish) line 44
  in block <unit> at t/37-pg-datetime.t line 14

t/37-pg-datetime.t ........ All 13 subtests passed 
# Testing DBDish::SQLite
t/40-sqlite-common.t ...... ok   
t/41-sqlite-exec-error.t ..1/16# DBDish::SQLite: Error: UNIQUE constraint failed: with_unique.a, with_unique.b (19)
t/41-sqlite-exec-error.t .. ok  
t/42-sqlite-blob.t ........ ok  
# Testing DBDish::Oracle
t/45-oracle-common.t ......1/107# DBIish: DBDish::Oracle needs 'libclntsh.so.12.1', not found
# Can't continue.
t/45-oracle-common.t ...... ok   
# DBIish: DBDish::Oracle needs 'libclntsh.so.12.1', not found
# Can't continue.
t/46-oracle-blob.t ........ ok  
# DBIish: DBDish::Oracle needs 'libclntsh.so.12.1', not found
# Can't continue.
t/47-oracle-datetime.t .... ok  

Test Summary Report
-------------------
t/01-Basic.t  (Wstat: 0 Tests: 15 Failed: 4)
  Failed tests:  12 13 14 15
  Parse errors: Bad plan.  You planned 38 tests but ran 15.
t/30-pg.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: No plan found in TAP output
t/34-pg-types.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 10 tests but ran 0.
t/35-pg-common.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 107 tests but ran 0.
t/36-pg-array.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 7 tests but ran 0.
t/36-pg-blob.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 18 tests but ran 0.
t/36-pg-native.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 17 tests but ran 0.
t/37-pg-datetime.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 13 tests but ran 0.
Files=21, Tests=564,  30 wallclock secs
Result: FAILED
===> Testing [FAIL]: DBIish:ver('0.5.9')
Aborting due to test failure: DBIish:ver('0.5.9') (use --force to override)
  in code  at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/1DC0BAA246D0774E7EB4F5119C6168E0D8266EFA (Zef::Client) line 306
  in method test at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/1DC0BAA246D0774E7EB4F5119C6168E0D8266EFA (Zef::Client) line 285
  in code  at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/1DC0BAA246D0774E7EB4F5119C6168E0D8266EFA (Zef::Client) line 456
  in sub  at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/1DC0BAA246D0774E7EB4F5119C6168E0D8266EFA (Zef::Client) line 453
  in method install at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/1DC0BAA246D0774E7EB4F5119C6168E0D8266EFA (Zef::Client) line 559
  in sub MAIN at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/A9948E7371E0EB9AFDF1EEEB07B52A1B75537C31 (Zef::CLI) line 122
  in block <unit> at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/resources/3DD33EF601FD300095284AE7C24B770BAADAF32E line 1

zoffix@leliana:~$ 

Check how to free data

Each backend does his own thing.
Pg will free the data returned when finish is called, for example.

In some case we probably want to have the GC take over (copying data?)

There is also something I remarked, it's maybe a NC bug, SQLite give me explicity managed Str wich will probably lead to leak, see https://gist.github.com/Skarsnik/7f2fee97d56c5acc1587 (I reverse expected/got)

It not that simple as "Always copy" in case a text field is big, we probably don't want to copy a 50Mb+ field. So etheir document for each backend what will happend or provide a way for the user to free the data.

PostgreSQL type handling

Would you consider a PR that moves pg type handling into its own class, e.g. DBDish::Pg::Types? The problem I'm aiming at is to decouple the types a bit and make it easier to override and extend them.

My itch is in two dimensions

  • In some situations, it would be nice to have your own class handling some of the base types.
  • PostgreSQL's types are rather dynamic. Each enum is for example a separate type.

That means that it should be possible to add new types and replace existing ones.

cannot find method 'find_symbol'

vytas-local@vytas-desktop:/tmp$ panda install DBIish
==> Fetching DBIish
==> Building DBIish
==> Testing DBIish
# Using PGDATABASE: (none)
t/01-connectconfig-pg.t ... ok
t/05-mock.t ............... ok
Cannot find method 'find_symbol'
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any load_module at /home/vytas-local/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/ModuleLoader.moarvm:1
  in method install_driver at /tmp/.panda-work/1449248142_1/lib/DBIish.pm6:14
  in block <unit> at t/10-mysql.t:64

t/10-mysql.t .............. 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 87/87 subtests 
Cannot find method 'find_symbol'
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any load_module at /home/vytas-local/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/ModuleLoader.moarvm:1
  in method install_driver at /tmp/.panda-work/1449248142_1/lib/DBIish.pm6:14
  in block <unit> at EVAL_0:27
  in block <unit> at t/25-mysql-common.t:16

t/25-mysql-common.t ....... 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 48/48 subtests 
t/30-pg.t ................. ok
# Connect failed with error Cannot locate native library 'libpq.so': libpq.so: cannot open shared object file: No such file or directory
t/35-pg-common.t .......... ok
Cannot find method 'find_symbol'
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in any load_module at /home/vytas-local/.rakudobrew/moar-nom/install/share/nqp/lib/Perl6/ModuleLoader.moarvm:1
  in method install_driver at /tmp/.panda-work/1449248142_1/lib/DBIish.pm6:14
  in block <unit> at EVAL_0:27
  in block <unit> at t/40-sqlite-common.t:12

t/40-sqlite-common.t ...... 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 48/48 subtests 
t/41-sqlite-exec-error.t .. ok

Test Summary Report
-------------------
t/10-mysql.t            (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 87 tests but ran 0.
t/25-mysql-common.t     (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 48 tests but ran 0.
t/40-sqlite-common.t    (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 48 tests but ran 0.
Files=8, Tests=77, 54 wallclock secs ( 0.03 usr  0.01 sys + 51.34 cusr  1.86 csys = 53.24 CPU)
Result: FAIL
The spawned process exited unsuccessfully (exit code: 1)
  in sub run-and-gather-output at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/site/sources/C9D3DBBE449293E29311B81ADF43623258DDC842:86
  in block  at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/site/sources/3FAB2FD978BAAE78FC2F158643C8B3AE40C9E35F:24
  in sub indir at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/site/sources/C9D3DBBE449293E29311B81ADF43623258DDC842:20
  in method test at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/site/sources/3FAB2FD978BAAE78FC2F158643C8B3AE40C9E35F:5
  in method install at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/site/sources/707F6C3B206AFCF381257FAD32BED8C7EDADB2E3:141
  in method resolve at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/site/sources/707F6C3B206AFCF381257FAD32BED8C7EDADB2E3:219
  in sub MAIN at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/site/resources/3E7064413C5B9F6C0E6D3017B0D3216CBEB1B8C6:18
  in block <unit> at /home/vytas-local/.rakudobrew/moar-nom/install/share/perl6/site/resources/3E7064413C5B9F6C0E6D3017B0D3216CBEB1B8C6:146
vytas-local@vytas-desktop:/tmp$ perl6 -v
This is rakudo version 2015.11-353-g734549a built on MoarVM version 2015.11-34-gc3eea17 implementing Perl v6.b.

the pod is not cool

  1. README.pod is p5 pod so invalid.
  2. The pod in the code files is malformatted by way of
    lacking space between pod directives and content.

Cannot locate native library 'libmysqlclient.so':

$ perl6 a.pl
Asked to remove 2 spaces, but the shortest indent is 0 spaces in any trim_heredoc at gen/moar/m-Perl6-Actions.nqp line 407
NativeCall: Consider adding the api version of the library you want to use, sub foo is native(mysqlclient, v1)
Cannot locate native library 'libmysqlclient.so': libmysqlclient.so: cannot open shared object file: No such file or directory
in method setup at /home/grc/.rakudobrew/moar-nom/install/share/perl6/sources/CACD5A7E20E331ECC972E25DE01416C706AEF2C4 line 230
in method CALL-ME at /home/grc/.rakudobrew/moar-nom/install/share/perl6/sources/CACD5A7E20E331ECC972E25DE01416C706AEF2C4 line 241
in method connect at /home/grc/.rakudobrew/moar-nom/install/share/perl6/site/sources/4C37BD08F0F30D1CBC49E3EA0A9EBFC77488FF78 line 19
in method connect at /home/grc/.rakudobrew/moar-nom/install/share/perl6/site/sources/ED75476A0A2EAFE784D44945DC029BB56264DEF1 line 9
in block at a.pl line 2

[RFC] remove RaiseError and PrintError

RaiseError false is a DBI relic which promotes bad coding style by swallowing errors and not requiring proper error handling.

PrintError true is its evil sibling that just complicates downstream code and is again only useful when not implementing proper error handling.

Please speak up if I'm missing something and also if you agree so we get a feeling if we can remove both attributes.

Install fails on Rakudo version 2017.02-95-g0be7247

Fails on Rakudo version 2017.02-95-g0be7247.

It's quite possible this is a Rakudo's issue, but I do not have a chance to investigate this deeper ATM.

zoffix@VirtualBox:~$ zef install DBIish                                                                                                                                                                                                                        
===> Searching for: DBIish
===> Found: DBIish:ver('0.5.9')
===> Dependencies: NativeHelpers::Blob
===> Filtering: DBIish:ver('0.5.9')
===> Filtering [OK] for DBIish:ver('0.5.9')
===> # SKIP: No Build.pm for DBIish:ver('0.5.9')
===> Testing: DBIish:ver('0.5.9')
Testing with plugin: Zef::Service::TAP+{<anon|66399984>}
t/01-Basic.t ..............1/38
# Failed test 'Can install driver for 'Oracle''
# at t/01-Basic.t line 25
# ===SORRY!=== Error while compiling /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Oracle/StatementHandle.pm6 (DBDish::Oracle::StatementHandle)
# MVMArray: atpos expected string register
# at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Oracle/StatementHandle.pm6 (DBDish::Oracle::StatementHandle):4
Use of uninitialized value $drv of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
  in block  at t/01-Basic.t line 28
# Failed test 'Is an instance '''
# at t/01-Basic.t line 28
# Failed test 'Any indeed a driver'
# at t/01-Basic.t line 29
# Failed test 'version declared'
# at t/01-Basic.t line 32
t/01-Basic.t ..............6/38No such method 'version' for invocant of type 'Any'
  in block <unit> at t/01-Basic.t line 33
# Looks like you planned 38 tests, but ran 9
# Looks like you failed 4 tests of 9
t/01-Basic.t .............. Failed 4/38 subtests 
t/03-lib-util.t ........... ok 
===SORRY!=== Error while compiling /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/TestMock/StatementHandle.pm6 (DBDish::TestMock::StatementHandle)
MVMArray: atpos expected string register
at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/TestMock/StatementHandle.pm6 (DBDish::TestMock::StatementHandle):4
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 41
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 58
  in method connect at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 44
  in block <unit> at t/05-mock.t line 6
t/05-mock.t ............... All 25 subtests passed 
t/06-types.t .............. ok  
===SORRY!=== Error while compiling /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/mysql/StatementHandle.pm6 (DBDish::mysql::StatementHandle)
MVMArray: atpos expected string register
at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/mysql/StatementHandle.pm6 (DBDish::mysql::StatementHandle):4
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 58
  in block <unit> at t/10-mysql.t line 67
t/10-mysql.t .............. All 90 subtests passed 
# Testing DBDish::mysql
===SORRY!=== Error while compiling /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/mysql/StatementHandle.pm6 (DBDish::mysql::StatementHandle)
MVMArray: atpos expected string register
at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/mysql/StatementHandle.pm6 (DBDish::mysql::StatementHandle):4
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 58
  in method run-tests at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish/CommonTesting.pm6 (DBIish::CommonTesting) line 33
  in block <unit> at t/25-mysql-common.t line 5
t/25-mysql-common.t ....... All 107 subtests passed 
===SORRY!=== Error while compiling /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/mysql/StatementHandle.pm6 (DBDish::mysql::StatementHandle)
MVMArray: atpos expected string register
at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/mysql/StatementHandle.pm6 (DBDish::mysql::StatementHandle):4
  in block  at t/26-mysql-blob.t line 16
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 41
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 58
  in method connect at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 44
  in block <unit> at t/26-mysql-blob.t line 11
t/26-mysql-blob.t ......... All 19 subtests passed 
===SORRY!=== Error while compiling /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/mysql/StatementHandle.pm6 (DBDish::mysql::StatementHandle)
MVMArray: atpos expected string register
at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/mysql/StatementHandle.pm6 (DBDish::mysql::StatementHandle):4
  in block  at t/27-mysql-datetime.t line 16
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 41
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 58
  in method connect at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 44
  in block <unit> at t/27-mysql-datetime.t line 11
t/27-mysql-datetime.t ..... All 12 subtests passed 
===SORRY!=== Error while compiling /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Pg/StatementHandle.pm6 (DBDish::Pg::StatementHandle)
MVMArray: atpos expected string register
at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Pg/StatementHandle.pm6 (DBDish::Pg::StatementHandle):4
t/30-pg.t ................. No subtests run
===SORRY!=== Error while compiling /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Pg/StatementHandle.pm6 (DBDish::Pg::StatementHandle)
MVMArray: atpos expected string register
at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Pg/StatementHandle.pm6 (DBDish::Pg::StatementHandle):4
  in block  at t/34-pg-types.t line 19
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 41
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 58
  in method connect at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 44
  in block <unit> at t/34-pg-types.t line 14
t/34-pg-types.t ........... All 10 subtests passed 
# Testing DBDish::Pg
===SORRY!=== Error while compiling /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Pg/StatementHandle.pm6 (DBDish::Pg::StatementHandle)
MVMArray: atpos expected string register
at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Pg/StatementHandle.pm6 (DBDish::Pg::StatementHandle):4
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 58
  in method run-tests at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish/CommonTesting.pm6 (DBIish::CommonTesting) line 33
  in block <unit> at t/35-pg-common.t line 10
t/35-pg-common.t .......... All 107 subtests passed 
===SORRY!=== Error while compiling /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Pg/StatementHandle.pm6 (DBDish::Pg::StatementHandle)
MVMArray: atpos expected string register
at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Pg/StatementHandle.pm6 (DBDish::Pg::StatementHandle):4
  in block  at t/36-pg-array.t line 20
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 41
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 58
  in method connect at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 44
  in block <unit> at t/36-pg-array.t line 15
t/36-pg-array.t ........... All 7 subtests passed 
===SORRY!=== Error while compiling /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Pg/StatementHandle.pm6 (DBDish::Pg::StatementHandle)
MVMArray: atpos expected string register
at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Pg/StatementHandle.pm6 (DBDish::Pg::StatementHandle):4
  in block  at t/36-pg-blob.t line 19
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 41
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 58
  in method connect at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 44
  in block <unit> at t/36-pg-blob.t line 14
t/36-pg-blob.t ............ All 18 subtests passed 
===SORRY!=== Error while compiling /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Pg/StatementHandle.pm6 (DBDish::Pg::StatementHandle)
MVMArray: atpos expected string register
at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Pg/StatementHandle.pm6 (DBDish::Pg::StatementHandle):4
  in block  at t/36-pg-enum.t line 19
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 41
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 58
  in method connect at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 44
  in block <unit> at t/36-pg-enum.t line 14
t/36-pg-enum.t ............ All 27 subtests passed 
===SORRY!=== Error while compiling /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Pg/StatementHandle.pm6 (DBDish::Pg::StatementHandle)
MVMArray: atpos expected string register
at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Pg/StatementHandle.pm6 (DBDish::Pg::StatementHandle):4
  in block  at t/36-pg-native.t line 22
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 41
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 58
  in method connect at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 44
  in block <unit> at t/36-pg-native.t line 17
t/36-pg-native.t .......... All 17 subtests passed 
===SORRY!=== Error while compiling /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Pg/StatementHandle.pm6 (DBDish::Pg::StatementHandle)
MVMArray: atpos expected string register
at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Pg/StatementHandle.pm6 (DBDish::Pg::StatementHandle):4
  in block  at t/37-pg-datetime.t line 19
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 41
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 58
  in method connect at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 44
  in block <unit> at t/37-pg-datetime.t line 14
t/37-pg-datetime.t ........ All 13 subtests passed 
# Testing DBDish::SQLite
===SORRY!=== Error while compiling /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/SQLite/StatementHandle.pm6 (DBDish::SQLite::StatementHandle)
MVMArray: atpos expected string register
at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/SQLite/StatementHandle.pm6 (DBDish::SQLite::StatementHandle):4
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 58
  in method run-tests at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish/CommonTesting.pm6 (DBIish::CommonTesting) line 33
  in block <unit> at t/40-sqlite-common.t line 6
t/40-sqlite-common.t ...... All 107 subtests passed 
t/41-sqlite-exec-error.t ..2/16===SORRY!=== Error while compiling /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/SQLite/StatementHandle.pm6 (DBDish::SQLite::StatementHandle)
MVMArray: atpos expected string register
at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/SQLite/StatementHandle.pm6 (DBDish::SQLite::StatementHandle):4
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 58
  in block <unit> at t/41-sqlite-exec-error.t line 13
# Looks like you planned 16 tests, but ran 2
t/41-sqlite-exec-error.t .. All 16 subtests passed 
===SORRY!=== Error while compiling /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/SQLite/StatementHandle.pm6 (DBDish::SQLite::StatementHandle)
MVMArray: atpos expected string register
at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/SQLite/StatementHandle.pm6 (DBDish::SQLite::StatementHandle):4
  in block  at t/42-sqlite-blob.t line 18
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 41
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 58
  in method connect at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 44
  in block <unit> at t/42-sqlite-blob.t line 13
t/42-sqlite-blob.t ........ All 18 subtests passed 
# Testing DBDish::Oracle
===SORRY!=== Error while compiling /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Oracle/StatementHandle.pm6 (DBDish::Oracle::StatementHandle)
MVMArray: atpos expected string register
at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Oracle/StatementHandle.pm6 (DBDish::Oracle::StatementHandle):4
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 58
  in method run-tests at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish/CommonTesting.pm6 (DBIish::CommonTesting) line 33
  in block <unit> at t/45-oracle-common.t line 5
t/45-oracle-common.t ...... All 107 subtests passed 
===SORRY!=== Error while compiling /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Oracle/StatementHandle.pm6 (DBDish::Oracle::StatementHandle)
MVMArray: atpos expected string register
at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Oracle/StatementHandle.pm6 (DBDish::Oracle::StatementHandle):4
  in block  at t/46-oracle-blob.t line 17
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 41
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 58
  in method connect at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 44
  in block <unit> at t/46-oracle-blob.t line 12
t/46-oracle-blob.t ........ All 18 subtests passed 
===SORRY!=== Error while compiling /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Oracle/StatementHandle.pm6 (DBDish::Oracle::StatementHandle)
MVMArray: atpos expected string register
at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBDish/Oracle/StatementHandle.pm6 (DBDish::Oracle::StatementHandle):4
  in block  at t/47-oracle-datetime.t line 16
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 41
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in block  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 54
  in any  at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/.precomp/B0A8FF1050D6BEC75F1B7B22BCCEC613DE4CC5F8.1488043338.1539/1C/1CA5208A6CF88323A3E082CE410A3C0FA838A19B line 1
  in method install-driver at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 58
  in method connect at /home/zoffix/.zef/store/DBIish.git/37d5c2079cf7148bad2796e64c73a7c661eef532/lib/DBIish.pm6 (DBIish) line 44
  in block <unit> at t/47-oracle-datetime.t line 11

t/47-oracle-datetime.t .... All 13 subtests passed 

Test Summary Report
-------------------
t/01-Basic.t  (Wstat: 0 Tests: 9 Failed: 4)
  Failed tests:  6 7 8 9
  Parse errors: Bad plan.  You planned 38 tests but ran 9.
t/05-mock.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 25 tests but ran 0.
t/10-mysql.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 90 tests but ran 0.
t/25-mysql-common.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 107 tests but ran 0.
t/26-mysql-blob.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 19 tests but ran 0.
t/27-mysql-datetime.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 12 tests but ran 0.
t/30-pg.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: No plan found in TAP output
t/34-pg-types.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 10 tests but ran 0.
t/35-pg-common.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 107 tests but ran 0.
t/36-pg-array.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 7 tests but ran 0.
t/36-pg-blob.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 18 tests but ran 0.
t/36-pg-enum.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 27 tests but ran 0.
t/36-pg-native.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 17 tests but ran 0.
t/37-pg-datetime.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 13 tests but ran 0.
t/40-sqlite-common.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 107 tests but ran 0.
t/41-sqlite-exec-error.t (Wstat: 0 Tests: 2 Failed: 0)
  Parse errors: Bad plan.  You planned 16 tests but ran 2.
t/42-sqlite-blob.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 18 tests but ran 0.
t/45-oracle-common.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 107 tests but ran 0.
t/46-oracle-blob.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 18 tests but ran 0.
t/47-oracle-datetime.t  (Wstat: 0 Tests: 0 Failed: 0)
  Parse errors: Bad plan.  You planned 13 tests but ran 0.
Files=22, Tests=28,  54 wallclock secs
Result: FAILED
===> Testing [FAIL]: DBIish:ver('0.5.9')
Aborting due to test failure: DBIish:ver('0.5.9') (use --force to override)
  in code  at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/E2B1735D03952704301B50AB90FB22815197A2A8 (Zef::Client) line 346
  in method test at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/E2B1735D03952704301B50AB90FB22815197A2A8 (Zef::Client) line 325
  in code  at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/E2B1735D03952704301B50AB90FB22815197A2A8 (Zef::Client) line 497
  in sub  at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/E2B1735D03952704301B50AB90FB22815197A2A8 (Zef::Client) line 494
  in method install at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/E2B1735D03952704301B50AB90FB22815197A2A8 (Zef::Client) line 600
  in sub MAIN at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/507CCF7FECC2CFB974EFA79D62BED21DCB408626 (Zef::CLI) line 123
  in block <unit> at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/resources/D53093B60580E86B211CB5B6E8C59860579EC726 line 1

zoffix@VirtualBox:~$ 

DBIish fails to install

DBIish fails during installation. It appears that perhaps panda isn't fetching the driver files.

autumn@veronica:~> panda install DBIish
==> Fetching DBIish
==> Building DBIish
==> Testing DBIish
Use of uninitialized value %ENV of type Any in string context  in block <unit> at t/01-ConnectConfig-PG.t:26
# Using PGDATABASE: 
t/01-ConnectConfig-PG.t ... ok
Could not find file 'DBDish::TestMock' for module DBDish::TestMock
  in method install_driver at /home/autumn/.panda-work/1442363598_1/lib/DBIish.pm6:14
  in method connect at /home/autumn/.panda-work/1442363598_1/lib/DBIish.pm6:7
  in block <unit> at t/05-mock.t:6

t/05-mock.t ............... 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 9/9 subtests 
Could not find file 'DBDish::mysql' for module DBDish::mysql
  in method install_driver at /home/autumn/.panda-work/1442363598_1/lib/DBIish.pm6:14
  in block <unit> at t/10-mysql.t:64

t/10-mysql.t .............. 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 87/87 subtests 
Could not find file 'DBDish::mysql' for module DBDish::mysql
  in method install_driver at /home/autumn/.panda-work/1442363598_1/lib/DBIish.pm6:14
  in block <unit> at EVAL_0:27
  in block <unit> at t/25-mysql-common.t:16

t/25-mysql-common.t ....... 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 48/48 subtests 
t/30-Pg.t ................. ok
Could not find file 'DBDish::Pg' for module DBDish::Pg
  in method install_driver at /home/autumn/.panda-work/1442363598_1/lib/DBIish.pm6:14
  in block <unit> at EVAL_0:27
  in block <unit> at t/35-Pg-common.t:25

t/35-Pg-common.t .......... 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 48/48 subtests 
Could not find file 'DBDish::SQLite' for module DBDish::SQLite
  in method install_driver at /home/autumn/.panda-work/1442363598_1/lib/DBIish.pm6:14
  in block <unit> at EVAL_0:27
  in block <unit> at t/40-sqlite-common.t:12

t/40-sqlite-common.t ...... 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 48/48 subtests 
t/41-sqlite-exec-error.t .. ok

Test Summary Report
-------------------
t/05-mock.t             (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 9 tests but ran 0.
t/10-mysql.t            (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 87 tests but ran 0.
t/25-mysql-common.t     (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 48 tests but ran 0.
t/35-Pg-common.t        (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 48 tests but ran 0.
t/40-sqlite-common.t    (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 48 tests but ran 0.
Files=8, Tests=20, 19 wallclock secs ( 0.06 usr  0.02 sys + 17.92 cusr  0.50 csys = 18.50 CPU)
Result: FAIL
test stage failed for DBIish: Tests failed
  in method throw at /home/autumn/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in method install at /home/autumn/.rakudobrew/moar-nom/install/share/perl6/site/lib/Panda.pm:142
  in method resolve at /home/autumn/.rakudobrew/moar-nom/install/share/perl6/site/lib/Panda.pm:219
  in sub MAIN at /home/autumn/.rakudobrew/bin/../moar-nom/install/share/perl6/site/bin/panda:18
  in block <unit> at /home/autumn/.rakudobrew/bin/../moar-nom/install/share/perl6/site/bin/panda:95


Failure Summary
----------------
DBIish(
        *test stage failed for DBIish: Tests failed)

Installing Rakudo's Task::Star fails with DBIish errors

==> Successfully installed Bailador
==> Fetching DBIish
==> Building DBIish
==> Testing DBIish
# Using PGDATABASE: (none)
t/01-ConnectConfig-PG.t ... ok
t/05-mock.t ............... ok
Method 'match' not found for invocant of class 'Any'
  in block <unit> at t/10-mysql.t:330

# Looks like you planned 87 tests, but ran 47
t/10-mysql.t .............. 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 40/87 subtests 
t/25-mysql-common.t ....... ok
t/30-Pg.t ................. ok
# Connect failed with error FATAL:  database "zoffix" does not exist

t/35-Pg-common.t .......... ok
# Connect failed with error Cannot locate native library 'libsqlite3.so': libsqlite3.so: cannot open shared object file: No such file or directory
t/40-sqlite-common.t ...... ok
t/41-sqlite-exec-error.t .. ok

Test Summary Report
-------------------
t/10-mysql.t            (Wstat: 65280 Tests: 47 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 87 tests but ran 47.
Files=8, Tests=220, 35 wallclock secs ( 0.05 usr  0.02 sys + 32.70 cusr  0.41 csys = 33.18 CPU)
Result: FAIL
test stage failed for DBIish: Tests failed
  in method throw at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in method install at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/lib/Panda.pm:142
  in block  at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/lib/Panda.pm:214
  in method resolve at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/lib/Panda.pm:208
  in sub MAIN at /home/zoffix/.rakudobrew/bin/../moar-nom/install/share/perl6/site/bin/panda:18
  in block <unit> at /home/zoffix/.rakudobrew/bin/../moar-nom/install/share/perl6/site/bin/panda:95


Failure Summary
----------------
Task::Star(
    *test stage failed for DBIish: Tests failed)
zoffix@ZofMain:~$

I'm on Bodhi Linux (fork of ubuntu):

zoffix@ZofMain:~$ uname -a
Linux ZofMain 3.5.0-11-generic #11 SMP Wed Aug 22 14:45:14 CDT 2012 i686 i686 i386 GNU/Linux

perl6 rakudo-star 2016-04 DBIish connect error - 'port number' to be enclosed in quotes?

#####################################################
UPDATE - the previous version of DBIish (version '*' that came with R*2016-01) allowed the -port to be specified either as a number (5432) or as a string ('5432)
#####################################################
[12:42] <bazzaar> has anyone found Pg connect problem with DBIish in Rakudo Star 2016-04 ?
[12:44] <bazzaar> getting a 'This type cannot unbox to a native string' error, in script that worked with R* 2016-01
[12:45] <timotimo> can you try running it with "perl6 --ll-exception blah.p6"?
[12:54] <bazzaar> timotimo: DBIish connect error backtrace
===========
barry@linux:~/Documents> perl6 --ll-exception DBIish_pgsql_script.p6
This type cannot unbox to a native string
   at gen/moar/m-CORE.setting:21103  (/home/barry/rakudo/rakudo-star-2016.04/install/share/perl6/runtime/CORE.setting.moarvm:throw)
 from site#sources/3EA876C6AC912AF3692CEF8EEF5E9033C03F7507 (DBIish):41  (/home/barry/.perl6/precomp/D7820A4EF6D97B780F45CAC4B50C4E6E59589690.1461753270.16039/3E/3EA876C6AC912AF3692CEF8EEF5E9033C03F7507:)
 from site#sources/3EA876C6AC912AF3692CEF8EEF5E9033C03F7507 (DBIish):40  (/home/barry/.perl6/precomp/D7820A4EF6D97B780F45CAC4B50C4E6E59589690.1461753270.16039/3E/3EA876C6AC912AF3692CEF8EEF5E9033C03F7507:)
 from <unknown>:1  (/home/barry/.perl6/precomp/D7820A4EF6D97B780F45CAC4B50C4E6E59589690.1461753270.16039/3E/3EA876C6AC912AF3692CEF8EEF5E9033C03F7507:)
 from <unknown>:1  (/home/barry/.perl6/precomp/D7820A4EF6D97B780F45CAC4B50C4E6E59589690.1461753270.16039/51/51E302443A2C8FF185ABC10CA1E5520EFEE885A1:ASSIGN-POS)
 from gen/moar/m-CORE.setting:1971  (/home/barry/rakudo/rakudo-star-2016.04/install/share/perl6/runtime/CORE.setting.moarvm:ASSIGN-POS)
 from gen/moar/m-CORE.setting:15558  (/home/barry/rakudo/rakudo-star-2016.04/install/share/perl6/runtime/CORE.setting.moarvm:postcircumfix:<[ ]>)
 from gen/moar/m-CORE.setting:15547  (/home/barry/rakudo/rakudo-star-2016.04/install/share/perl6/runtime/CORE.setting.moarvm:postcircumfix:<[ ]>)
 from sources/6CFA07D16A586CFEB335070EF66D1213DB9190ED (DBDish::Pg::Native):145  (/home/barry/.perl6/precomp/D7820A4EF6D97B780F45CAC4B50C4E6E59589690.1461753270.16039/6C/6CFA07D16A586CFEB335070EF66D1213DB9190ED:)
 from gen/moar/m-CORE.setting:4251  (/home/barry/rakudo/rakudo-star-2016.04/install/share/perl6/runtime/CORE.setting.moarvm:pull-one)
 from gen/moar/m-CORE.setting:2452  (/home/barry/rakudo/rakudo-star-2016.04/install/share/perl6/runtime/CORE.setting.moarvm:sink-all)
 from gen/moar/m-CORE.setting:12919  (/home/barry/rakudo/rakudo-star-2016.04/install/share/perl6/runtime/CORE.setting.moarvm:sink)  
 from sources/6CFA07D16A586CFEB335070EF66D1213DB9190ED (DBDish::Pg::Native):142  (/home/barry/.perl6/precomp/D7820A4EF6D97B780F45CAC4B50C4E6E59589690.1461753270.16039/6C/6CFA07D16A586CFEB335070EF66D1213DB9190ED:new)                                                          
 from gen/moar/m-CORE.setting:914  (/home/barry/rakudo/rakudo-star-2016.04/install/share/perl6/runtime/CORE.setting.moarvm:new)     
 from site#sources/C2BC378F86912AB748EF3CF51FBE6E3AE0CFE0EA (DBDish::Pg):69  (/home/barry/.perl6/precomp/D7820A4EF6D97B780F45CAC4B50C4E6E59589690.1461753270.16039/C2/C2BC378F86912AB748EF3CF51FBE6E3AE0CFE0EA:connect)                                                          
 from site#sources/3EA876C6AC912AF3692CEF8EEF5E9033C03F7507 (DBIish):45  (/home/barry/.perl6/precomp/D7820A4EF6D97B780F45CAC4B50C4E6E59589690.1461753270.16039/3E/3EA876C6AC912AF3692CEF8EEF5E9033C03F7507:connect)                                                              
 from DBIish_pgsql_script.p6:6  (<ephemeral file>:<unit>)                                                                            
 from DBIish_pgsql_script.p6:1  (<ephemeral file>:<unit-outer>)                                                                      
 from gen/moar/stage2/NQPHLL.nqp:1505  (/home/barry/rakudo/rakudo-star-2016.04/install/share/nqp/lib/NQPHLL.moarvm:eval)            
 from src/Perl6/Compiler.nqp:161  (/home/barry/rakudo/rakudo-star-2016.04/install/share/nqp/lib/Perl6/Compiler.moarvm:eval)          
 from gen/moar/stage2/NQPHLL.nqp:1708  (/home/barry/rakudo/rakudo-star-2016.04/install/share/nqp/lib/NQPHLL.moarvm:evalfiles)         
 from gen/moar/stage2/NQPHLL.nqp:1602  (/home/barry/rakudo/rakudo-star-2016.04/install/share/nqp/lib/NQPHLL.moarvm:command_eval)      
 from src/Perl6/Compiler.nqp:29  (/home/barry/rakudo/rakudo-star-2016.04/install/share/nqp/lib/Perl6/Compiler.moarvm:command_eval)      
 from gen/moar/stage2/NQPHLL.nqp:1576  (/home/barry/rakudo/rakudo-star-2016.04/install/share/nqp/lib/NQPHLL.moarvm:command_line)         
 from gen/moar/m-main.nqp:37  (/home/barry/rakudo/rakudo-star-2016.04/install/share/perl6/runtime/perl6.moarvm:MAIN)                        
 from gen/moar/m-main.nqp:33  (/home/barry/rakudo/rakudo-star-2016.04/install/share/perl6/runtime/perl6.moarvm:<mainline>)                   
 from <unknown>:1  (/home/barry/rakudo/rakudo-star-2016.04/install/share/perl6/runtime/perl6.moarvm:<main>)
 from <unknown>:1  (/home/barry/rakudo/rakudo-star-2016.04/install/share/perl6/runtime/perl6.moarvm:<entry>)
===========
[13:05] <bazzaar> timotimo: DBIish connect error backtrace - example code
===========
use v6;
use DBIish;

my $password = 'whatever';

my $dbh = DBIish.connect('Pg', :host<localhost>, :port(5432),
            :database<media_db>, :user<bazzaar>, :$password);

my $sth = $dbh.do(q:to/STATEMENT/);
    set search_path TO music
    STATEMENT

$sth.finish;
$dbh.disconnect;
===========
[13:11] <moritz> DBDish::Pg::Native):145 looks to be the actual source of the error
[13:12] <moritz> bazzaar: try specifying the port as a string
[13:12] <moritz> bazzaar: :port('5432')
[13:16] <moritz> that's a bug in DBIish
========
[13:20] <bazzaar> moritz: specifying the port as a string, that works :) ######
========
[13:20] <moritz> bazzaar: can you please open a bug at https://github.com/perl6/DBIish/issues/ for that?
[13:22] <bazzaar> moritz: yes, I'll give it a go ... also for interest, perl6 reported 'DBDish::Pg::Connection.disconnect is DEPRECATED, please use .dispose'

Merge oracle branch

In order to get @abraxxa's work in #49 merged, I've got it passing for postgresql and sqlite but it appears that the mysql type mappings differ from those of the other two.

If someone could determine what they are supposed to be and make the fix them in the 'oracle' branch then the branch can be merged and all will be good.

Can't install it via panda install DBIish: Cannot invoke null object

Hi,

I get following error when I try to install DBIish:

Cannot invoke null object
in sub strip-pod at lib/Panda/Builder.pm:15
in sub builder-order at lib/Panda/Builder.pm:56
in method build at lib/Panda/Builder.pm92
in method install at lib/Panda.pm:127
in method iresolve at lib/Panda.pm:214
in sub MAIN at panda:20
in block at panda:87

I guess I am missing a module, because installation works on my desktop but not on my fresh Fedora 22 installation.

What is missin?

THX

DBIish shall not create table in the database

Moved from RT#129951

When DBIish gets installed it created a table sal_emp or similar. I just guess
it was DBIish, as that was the last thing I installed before I have got
problem with the database.

Namely, the third party software has opened PostgreSQL and inserted table
without asking. It broke the web interface to that database. If there
are some testings to be done, that shall be asked prior to testing
being conducted.

Jean

The tests should not mess with user's stuff without permission. An env var should be added and avoid running any intrusive tests if it's not set.

Cannot locate native library 'libsqlite3.so'

While trying to connect to SQLite I got this error:

# Connect failed with error Cannot locate native library 'libsqlite3.so': libsqlite3.so: cannot open shared object file: No such file or directory

but

$ locate libsqlite3.so
/usr/lib/i386-linux-gnu/libsqlite3.so.0
/usr/lib/i386-linux-gnu/libsqlite3.so.0.8.6

How can I convince DBlish to find it?

mysql: quote-identifier quote character

Hello,

$dbh.quote-identifier(...) used with a myslq-db quotes the string with "-characters.

use DBIish;

my $dbh = DBIish.connect(``'mysql',
:database( 'mysql' ),
:user( 'my_name' ),
:password( '1234' ),
);

my $s = $dbh.quote-identifier( 'OOO' );

say $s; # "OOO"

Tests fail while installing on OSx

Good day,
I tried installing this with Task::Star and I got the following test failures

t/01-Basic.t .............. ok
t/03-lib-util.t ........... ok
This type cannot unbox to a native integer: P6opaque, Failure
  in sub _is_deeply at /Users/sbhadoria/.rakudobrew/moar-nom/install/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 579
  in sub is-deeply at /Users/sbhadoria/.rakudobrew/moar-nom/install/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 525
  in block <unit> at t/05-mock.t line 37

# Looks like you planned 25 tests, but ran 16
t/05-mock.t ...............
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 9/25 subtests
t/06-types.t .............. ok
# Connect failed with error DBIish: DBDish::mysql needs 'mysqlclient', not found
t/10-mysql.t .............. ok
# Testing DBDish::mysql
# DBIish: DBDish::mysql needs 'mysqlclient', not found
# Can't continue.
t/25-mysql-common.t ....... ok
# DBIish: DBDish::mysql needs 'mysqlclient', not found
# Can't continue.
t/26-mysql-blob.t ......... ok
# DBIish: DBDish::mysql needs 'mysqlclient', not found
# Can't continue.
t/27-mysql-datetime.t ..... ok
t/30-pg.t ................. ok
# DBDish::Pg: Can't connect: could not connect to server: No such file or directory
# 	Is the server running locally and accepting
# 	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
#  (1)
# Can't continue.
t/34-pg-types.t ........... ok
# Testing DBDish::Pg
# DBDish::Pg: Can't connect: could not connect to server: No such file or directory
# 	Is the server running locally and accepting
# 	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
#  (1)
# Can't continue.
t/35-pg-common.t .......... ok
# DBDish::Pg: Can't connect: could not connect to server: No such file or directory
# 	Is the server running locally and accepting
# 	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
#  (1)
# Can't continue.
t/36-pg-array.t ........... ok
# DBDish::Pg: Can't connect: could not connect to server: No such file or directory
# 	Is the server running locally and accepting
# 	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
#  (1)
# Can't continue.
t/36-pg-blob.t ............ ok
# DBDish::Pg: Can't connect: could not connect to server: No such file or directory
# 	Is the server running locally and accepting
# 	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
#  (1)
# Can't continue.
t/36-pg-enum.t ............ ok
# DBDish::Pg: Can't connect: could not connect to server: No such file or directory
# 	Is the server running locally and accepting
# 	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
#  (1)
# Can't continue.
t/36-pg-native.t .......... ok
# DBDish::Pg: Can't connect: could not connect to server: No such file or directory
# 	Is the server running locally and accepting
# 	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
#  (1)
# Can't continue.
t/37-pg-datetime.t ........ ok
# Testing DBDish::SQLite

# Failed test '$sth.rows after fetch-array should report all'
# at /Users/sbhadoria/.panda-work/1486705926_1/lib/DBIish/CommonTesting.pm6 (DBIish::CommonTesting) line 198
# expected: '6'
#      got: '0'

# Failed test 'And marked Finished'
# at /Users/sbhadoria/.panda-work/1486705926_1/lib/DBIish/CommonTesting.pm6 (DBIish::CommonTesting) line 199

# Failed test 'fetchall-array returns 6 rows'
# at /Users/sbhadoria/.panda-work/1486705926_1/lib/DBIish/CommonTesting.pm6 (DBIish::CommonTesting) line 200
# expected: '6'
#      got: (Failure)
# Looks like you failed 3 tests of 107
t/40-sqlite-common.t ......
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/107 subtests
# DBDish::SQLite: Error: UNIQUE constraint failed: with_unique.a, with_unique.b (19)
t/41-sqlite-exec-error.t .. ok
t/42-sqlite-blob.t ........ ok
# Testing DBDish::Oracle
# DBIish: DBDish::Oracle needs 'libclntsh.12.1.dylib', not found
# Can't continue.
t/45-oracle-common.t ...... ok
# DBIish: DBDish::Oracle needs 'libclntsh.12.1.dylib', not found
# Can't continue.
t/46-oracle-blob.t ........ ok
# DBIish: DBDish::Oracle needs 'libclntsh.12.1.dylib', not found
# Can't continue.
t/47-oracle-datetime.t .... ok

Test Summary Report
-------------------
t/03-lib-util.t         (Wstat: 0 Tests: 5 Failed: 0)
  TODO passed:   4-5
t/05-mock.t             (Wstat: 65280 Tests: 16 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 25 tests but ran 16.
t/40-sqlite-common.t    (Wstat: 768 Tests: 107 Failed: 3)
  Failed tests:  53-55
  Non-zero exit status: 3
Files=22, Tests=779, 37 wallclock secs ( 0.10 usr  0.04 sys + 32.06 cusr  3.30 csys = 35.50 CPU)
Result: FAIL
The spawned command 'prove' exited unsuccessfully (exit code: 1)

SQLite native library not found in windows 8.1

When I install DBIish in windows 8.1 it gives me an error:
Connect failed with error Cannot locate native library 'libsqlite3.dll'.
I've downloaded sqlite3 and I've the directory in my PATH variable but there's not libsqlite3.dll,
there's sqlite3.dll. I must download something else from sqlite website or the name in the module
is wrong?

Thanks

Not sure why the tests are failing. (Is it due to not having a MySQL server running?)

If this test failure really is due to not having MySQL server running, then I think the relevant tests should be changed to conditionally skip if they cannot connect (as I have limited resources and have chosen PostgreSQL as my database, I neither need nor want MySQL taking up resources as well).

$ panda install DBIish
==> Fetching DBIish
==> Building DBIish
==> Testing DBIish
Use of uninitialized value %ENV of type Any in string context  in block <unit> at t/01-ConnectConfig-PG.t:26
# Using PGDATABASE: 
t/01-ConnectConfig-PG.t ... 
All 15 subtests passed 
t/05-mock.t ............... ok
# Connect failed with error DBD::mysql connection failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
t/10-mysql.t .............. ok
# Connect failed with error DBD::mysql connection failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
t/25-mysql-common.t ....... ok
t/30-Pg.t ................. ok
Use of uninitialized value %*opts of type Any in string context  in block <unit> at EVAL_0:45
NOTICE:  table "nom" does not exist, skipping
t/35-Pg-common.t .......... ok
t/40-sqlite-common.t ...... ok
t/41-sqlite-exec-error.t .. ok

Test Summary Report
-------------------
t/01-ConnectConfig-PG.t (Wstat: 0 Tests: 15 Failed: 0)
  Parse errors: No plan found in TAP output
Files=8, Tests=260, 218 wallclock secs ( 0.44 usr  0.06 sys + 207.10 cusr  3.63 csys = 211.23 CPU)
Result: FAIL
test stage failed for DBIish: Tests failed
  in method throw at /home/cschwenz/.rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
  in method install at /home/cschwenz/.rakudobrew/moar-nom/install/share/perl6/site/lib/Panda.pm:142
  in method resolve at /home/cschwenz/.rakudobrew/moar-nom/install/share/perl6/site/lib/Panda.pm:219
  in sub MAIN at /home/cschwenz/.rakudobrew/bin/../moar-nom/install/share/perl6/site/bin/panda:18
  in block <unit> at /home/cschwenz/.rakudobrew/bin/../moar-nom/install/share/perl6/site/bin/panda:95


Failure Summary
----------------
DBIish(
  *test stage failed for DBIish: Tests failed)

The perl6 version is:

$ perl6 --version
This is perl6 version 2015.07.1-854-g8876f4d built on MoarVM version 2015.08-15-g4b427ed

perl6 rakudo-star 2016-04 DBIish v0.5.6 - very slow retrieval of data records

    perl6 rakudo-star 2016-04 DBIish v0.5.6 - very slow retrieval of data records
    Compared timings for simple retrieval of 6000 data records from Postgres DB using this code :

    my $sth = $dbh.do(q:to/STATEMENT/);
    set search_path TO music
    STATEMENT
    $sth = $dbh.prepare(q:to/STATEMENT/);
    SELECT artist, album, track, incorp
    FROM trackdata
    STATEMENT
    $sth.execute();
    my $arrayref = $sth.fetchall_arrayref();
    ( UPDATE based on johnathanstowe advice : ... or my @rows = $sth.allrows(); )

    ====================
    Installation 1A
    ====================
    rakudo-star-2016.01
    ====================
    bazzaar@linux:~> which perl6
    /home/bazzaar/rakudo/rakudo-star-2016.01/install/bin/perl6

    bazzaar@linux:~> panda info DBIish
    DBIish (version 0.5.6 available, "*" installed) <<< Note, installed DBIish (that came with R* 2016-01) didn't have a version number in the Meta.info file, just "*".
    Database connectivity for Perl 6
    Depends on: NativeHelpers::Blob
    State: installed

    bazzaar@linux:~/Documents> perl6 DBIish_pgsql_timing_test.p6
    -----------
    seconds
    -----------
    #start
    0.0005631
    0.3399387
    0.377477
    0.3879191
    Pow
    ....pulling records into $arrayref
    Wow
    2.4939554
    ... $arrayref.elems = 6220 records
    2.4966975
    2.5004059
    2.5035846
    #end

    ...
    ... ##### then installed latest DBIish into R* 2016-01 ####
    ...
    ====================
    Installation 1B
    ====================
    bazzaar@linux:~/Documents> which perl6                                                                                  
    /home/bazzaar/rakudo/rakudo-star-2016.01/install/bin/perl6

    bazzaar@linux:~/Documents> panda info DBIish
    DBIish (version 0.5.6 available, 0.5.6 installed)
    Database connectivity for Perl 6
    Depends on: NativeHelpers::Blob
    State: installed

    bazzaar@linux:~/Documents> perl6 DBIish_pgsql_timing_test.p6
    -----------
    seconds
    -----------
    #start
    0.0006852
    0.439804
    0.4622020
    0.517789
    Pow
    ....pulling records into $arrayref
    Wow
    193.6520393
    ... $arrayref.elems = 6220 records
    193.653642
    193.6546639
    193.660520
    #end

    ====================
    Installation 2
    ====================
    rakudo-star-2016.04
    ====================
    bazzaar@linux:~/Documents> which perl6
    /home/bazzaar/rakudo/rakudo-star-2016.04/install/bin/perl6

    bazzaar@linux:~/Documents> panda info DBIish
    DBIish (version 0.5.6 available, 0.5.6 installed)
    Database connectivity for Perl 6
    Depends on: NativeHelpers::Blob
    State: installed

    bazzaar@linux:~/Documents> perl6 DBIish_pgsql_timing_test.p6
    -----------
    seconds
    -----------
    #start
    0.000619
    0.3741873
    0.405408
    0.44036708
    Pow
    ....pulling records into $arrayref
    Wow
    146.9447798
    ... $arrayref.elems = 6220 records
    146.946464
    146.9473282
    146.95287678
    #end

kebab-case

There's some lower_case methods. I suggest to rename these methods before christmas.

TODO: handle binary data in the mysql backend

I cannot figure out how to add binary data to MySQL table with INSERT query. When I try to insert some data into a binary column:

my $q = "\x79\x80"; 
$st = $db.prepare("INSERT INTO main (hash) VALUES('$q')"); 
$st.execute(); 

I always get in the DB table 3 bytes: 0x79, 0xc2, 0x80.

As per MySQL site : "mysql_query() cannot be used for statements that contain binary data; you must use mysql_real_query() instead. ". And DBDish seems to use mysql_query() for queries.

MySQL connection tests fail on missing libraries / failing connection

When trying to install DBDish (through panda Task::Star) I first received the following errors:

panda install Task::Star

[...]

t/01-ConnectConfig-PG.t ... ok
t/05-mock.t ............... ok
# Connect failed with error Cannot locate native library 'libmysqlclient.so': libmysqlclient.so: cannot open shared object file: No such file or directory
t/10-mysql.t .............. ok
# Connect failed with error Cannot locate native library 'libmysqlclient.so': libmysqlclient.so: cannot open shared object file: No such file or directory
t/25-mysql-common.t ....... ok
# Connect failed with error Cannot locate native library 'libmysqlclient.so': libmysqlclient.so: cannot open shared object file: No such file or directory

# expected: ''a\.b''cd?', "\"?", $1'
#      got: (Any)
# Looks like you failed 1 test of 2
t/30-Pg.t .................
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests
# Connect failed with error Dynamic variable %*opts not found
t/35-Pg-common.t .......... ok
# Connect failed with error Cannot locate native library 'libsqlite3.so': libsqlite3.so: cannot open shared object file: No such file or directory
t/40-sqlite-common.t ...... ok
t/41-sqlite-exec-error.t .. ok

Test Summary Report
-------------------
t/30-Pg.t               (Wstat: 256 Tests: 2 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
Files=8, Tests=248, 49 wallclock secs ( 0.08 usr  0.02 sys + 48.76 cusr  0.87 csys = 49.73 CPU)
Result: FAIL
test stage failed for DBIish: Tests failed
  in method throw at /home/jkva/rakudo/install/share/perl6/runtime/CORE.setting.moarvm:1
  in method install at lib/Panda.pm:133
  in block  at lib/Panda.pm:214
  in method resolve at lib/Panda.pm:208
  in sub MAIN at ./bin/panda:20
  in block <unit> at ./bin/panda:87

the libsqlite3.so problem was sorted by installing libsqlite3-dev, but after installing libmysqlclient-dev, I got:

t/01-ConnectConfig-PG.t ... ok
t/05-mock.t ............... ok
# Connect failed with error DBD::mysql connection failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
t/10-mysql.t .............. ok

I ended up installing using -notests.

My environment:

Linux jkva-machine 2.6.32-5-amd64 #1 SMP Wed Feb 18 13:14:10 UTC 2015 x86_64 GNU/Linux
This is perl6 version 2015.07.2 built on MoarVM version 2015.07

My rakudo HEAD pointed to 06fc07e598d8e39fb13ba3f50c99d48236ab7f60 - I switched to this to deal with another DBDish problem when trying to install it on latest rakudo/nom at 6bbb56f4c598ba0fef49ba9b11671df675019366:

==> Building DBIish
Compiling lib/DBDish.pm6 to mbc
Compiling lib/DBIish.pm6 to mbc
Compiling lib/DBDish/Pg.pm6 to mbc
===SORRY!=== Error while compiling lib/DBDish/Pg.pm6
Operators '~~' and '..' are non-associative and require parentheses
at lib/DBDish/Pg.pm6:148
------> ub status-is-ok($status) { $status ~~ 0.⏏.4 }
build stage failed for DBIish: Failed building lib/DBDish/Pg.pm6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.