NAME

DBIx::Meld::Traits::SQLAbstract - Melds SQL::Abstract with DBIx::Meld.

ATTRIBUTES

abstract

The SQL::Abstract object that is being used.

METHODS

insert

$meld->insert(
    'users',                                            # table name
    { user_name=>'bob2003', email=>'bob@example.com' }, # fields to insert
);

This accepts the same arguments as SQL::Abstract's insert() method accepts.

update

$meld->update(
    'users',                 # table name
    { phone => '555-1234' }, # fields to update
    { user_id => $uid },     # where clause
);

This accepts the same arguments as SQL::Abstract's update() method accepts.

delete

$meld->delete(
    'users',             # table name
    { user_id => $uid }, # where clause
);

This accepts the same arguments as SQL::Abstract's delete() method accepts.

row_array

my $user = $sweeet->selectrow_array(
    'users',                                  # table name
    ['user_id', 'created', 'email', 'phone'], # fields to retrieve
    { user_name => $uname },                  # where clause
);

row_hash

my $user = $meld->row_hash(
    'users',                    # table name
    ['user_id', 'created'],     # fields to retrieve
    { user_name => 'bob2003' }, # where clause
);

array_of_row_arrays

my $disabled_users = $meld->selectall_arrayref(
    'users',                       # table name
    ['user_id', 'email', 'phone'], # fields to retrieve
    { status => 0 },               # where clause
    'status',                      # order by clause
);
print $disabled_users->[2]->[1];

Returns an array ref of array refs, one for each row returned.

array_of_row_hashes

hash_of_row_hashes

count

my $enabled_users_count = $meld->count(
    'users',        # table name
    { status => 1}, # where clause
);

column

AUTHOR

Aran Clary Deltac <bluefeet@gmail.com>

LICENSE

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