NAME
Telebot::Plugin::DB - Helpers for work with database.
SYNOPSIS
my $dbh = $app->connect->dbh;
$dbh->db->select('messages', '*');
my $db = $app->connect->db;
$db->select('messages', '*');
DESCRIPTION
Telebot::Plugin::DB - plugin with some helpers for work with database.
HELPERS
Telebot::Plugin::DB implements the following helpers.
connect->dbh
Connects to database and returns instance to Mojo::Pg
connect->db
Connects to database and returns instance to Mojo::Pg->db
METHODS
Telebot::Plugin::DB inherits all methods from Mojolicious::Plugin and implements the following new ones.
register
my $tg = $plugin->register(Mojolicious->new);
Register plugin in Mojolicious application and define helpers.
COPYRIGHT AND LICENSE
Copyright (C) 2022, Igor Lobanov. This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.
SEE ALSO
https://github.com/igorlobanov/telebot, Mojolicious::Guides, https://mojolicious.org, https://core.telegram.org/bots/api.