NAME
Rex::Commands::DB - Simple Database Access
DESCRIPTION
This module gives you simple access to a database. Currently only select is supported.
SYNOPSIS
use Rex::Commands::DB {
dsn => "DBI:mysql:database=test;host=dbhost",
user => "username",
password => "password",
};
task "list", sub {
my @data = db select => {
fields => "*",
from => "table",
where => "enabled=1",
};
};
EXPORTED FUNCTIONS
- db
-
Do a database action. Currently only select is supported.
my @data = db select => { fields => "*", from => "table", where => "host='myhost'", };