No description, website, or topics provided.
Latest commit edcf0de May 29, 2014 @kazeburo Checking in changes prior to tagging of version 0.22.
Changelog diff is:

diff --git a/Changes b/Changes
index 5319b26..ecbb7d1 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,11 @@ Revision history for Perl extension DBIx::Sunny


+0.22 2014-05-29T05:49:43Z
+        - re-packaging with Minilla
+        - requries DBIx::TransactionManager 0.13. for fork safe
 0.21    Wed Dec 5 15:04:58 2012
         - add schema txn test
         - switch to Module::Build


DBIx::Sunny - Simple DBI wrapper


use DBIx::Sunny;

my $dbh = DBIx::Sunny->connect(...);

# or 

use DBI;

my $dbh = DBI->connect(.., {
    RootClass => 'DBIx::Sunny',
    PrintError => 0,
    RaiseError => 1,


DBIx::Sunny is a simple DBI wrapper. It provides better usability for you. This module based on Amon2::DBI. DBIx::Sunny supports only SQLite and MySQL.


  • Set AutoInactiveDestroy to true.

    DBIx::Sunny sets AutoInactiveDestroy as true.

  • [SQLite/MySQL] Auto encode/decode utf-8

    DBIx::Sunny sets sqlite_unicode and mysql_enable_utf8 automatically.

  • [SQLite] Performance tuning

    DBIx::Sunny sets sqlite_use_immediate_transaction to true, and executes these PRAGMA statements

      PRAGMA journal_mode = WAL
      PRAGMA synchronous = NORMAL
  • Nested transaction management.

    DBIx::Sunny supports nested transaction management based on RAII like DBIx::Class or DBIx::Skinny. It uses DBIx::TransactionManager internally.

  • Error Handling

    DBIx::Sunny sets RaiseError and ShowErrorStatement as true. DBIx::Sunny raises exception and shows current statement if your $dbh occurred exception.

  • SQL comment

    DBIx::Sunny adds file name and line number as SQL comment that invokes SQL statement.

  • Easy access to last_insert_id

    DBIx::Sunny's last_insert_id needs no arguments. It's shortcut for mysql_insertid or last_insert_rowid.

  • Auto expanding arrayref bind parameters

    select_(one|row|all) and query methods support auto-expanding arrayref bind parameters.

      $dbh->select_all('SELECT * FROM id IN (?)', [1 2 3])
      #SQL: 'SELECT * FROM id IN (?,?,")'
      #@BIND: (1, 2, 3)


  • $col = $dbh->select_one($query, @bind);

    Shortcut for prepare, execute and fetchrow_arrayref->[0]

  • $row = $dbh->select_row($query, @bind);

    Shortcut for prepare, execute and fetchrow_hashref

  • $rows = $dbh->select_all($query, @bind);

    Shortcut for prepare, execute and selectall_arrayref(.., { Slice => {} }, ..)

  • $dbh->query($query, @bind);

    Shortcut for prepare, execute.


Masahiro Nagano <kazeburo KZBRKZBR@>


DBI, Amon2::DBI


Copyright (C) Masahiro Nagano

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.