The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DBIx::Custom::SQLite - DBIx::Custom SQLite implementation

Version

Version 0.0201

Synopsys

    use DBIx::Custom::SQLite;
    
    # New
    my $dbi = DBIx::Custom::SQLite->new(user => 'taro', $password => 'kliej&@K',
                                       database => 'sample.db');
    
    # Insert 
    $dbi->insert('books', {title => 'perl', author => 'taro'});
    
    # Update 
    # same as 'update books set (title = 'aaa', author = 'ken') where id = 5;
    $dbi->update('books', {title => 'aaa', author => 'ken'}, {id => 5});
    
    # Delete
    $dbi->delete('books', {author => 'taro'});
    
    # select * from books;
    $dbi->select('books');
    
    # select * from books where ahthor = 'taro'; 
    $dbi->select('books', {author => 'taro'}); 
    
    # select author, title from books where author = 'taro'
    $dbi->select('books', [qw/author title/], {author => 'taro'});
    
    # select author, title from books where author = 'taro' order by id limit 1;
    $dbi->select('books', [qw/author title/], {author => 'taro'},
                 'order by id limit 1');

See DBIx::Custom and DBI::Custom::Basic documentation

This class is DBIx::Custom::Basic subclass. and DBIx::Custom::Basic is DBIx::Custom subclass

You can use all methods of DBIx::Custom::Basic and <DBIx::Custom> Please see DBIx::Custom::Basic and <DBIx::Custom> documentation

Object methods

connect

This override DBIx::Custom connect.

    # Connect to database
    $dbi->connect;

If database attribute is set, automatically data source is created and connect

connect_memory

    # Connect memory database
    $self = $dbi->connect_memory;

reconnect_memory

    # Reconnect memory database
    $self = $dbi->reconnect_memory;

Author

Yuki Kimoto, <kimoto.yuki at gmail.com>

Github http://github.com/yuki-kimoto

I develope this module http://github.com/yuki-kimoto/DBIx-Custom

Copyright & lisence

Copyright 2009 Yuki Kimoto, all rights reserved.

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