Rex::C...nds::DB(3pm)
β¨ NAME β¨
hi bestie, welcome to Rex::Commands::DB β aka Simple Database Access π (the manual page itself goes by Rex::C...nds::DB(3pm), which got absolutely demolished by the truncation gremlins, but we move π)
πΈ DESCRIPTION πΈ
okay so this module hands you simple access to a database, no drama, no overthinking. currently select, delete, insert and update are supported β that's the whole squad π
heads up bestie: Version <= 1.0: All these functions will not be reported. so if you're on something ancient, expect silence from the reporting side, no cap π
π¦ SYNOPSIS π¦
here's the vibe, copy-paste girlies:
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",
};
db insert => "table", {
field1 => "value1",
field2 => "value2",
field3 => 5,
};
db update => "table", {
set => {
field1 => "newvalue",
field2 => "newvalue2",
},
where => "id=5",
};
db delete => "table", {
where => "id < 5",
};
};
π EXPORTED FUNCTIONS π
π db
Do a database action. that's it, that's the function β it's giving main character, honestly π
watch it work:
my @data = db select => {
fields => "*",
from => "table",
where => "host='myhost'",
};
db insert => "table", {
field1 => "value1",
field2 => "value2",
field3 => 5,
};
db update => "table", {
set => {
field1 => "newvalue",
field2 => "newvalue2",
},
where => "id=5",
};
db delete => "table", {
where => "id < 5",
};
select, insert, update, delete β all four of them, slaying in one lil' verb π β¨
so yeah. that's the whole page, you're certified π this was User Contributed Perl Documentation for Rex::C...nds::DB(3pm), running on perl v5.40.1, dated 2025-10-03 β obsessed with her, fr fr ππ±π«Ά
π¦ where this page comes from
- ubuntu resolute: rex 1.16.1-1 Β· Apache-2.0
- ubuntu stonking: rex 1.16.1-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms