Kohana comes with a robust module for working with databases. By default, the database module supports drivers for PDO and MySQLi, but new drivers can be made for other database servers.
The database module needs to be enabled before you can use it. To enable, open your application/bootstrap.php
file and modify the call to Kohana::modules by including the database module like so:
Kohana::modules([
// ...
'database' => MODPATH . 'database',
// ...
]);
Next, you will then need to configure the database module to connect to your database.
Once that is done then you can make queries and use the results.
The database module also provides a config driver (for storing configuration in the database) and a session driver.