View Source Adbc.Database (adbc v0.2.2)
Documentation for Adbc.Database.
Databases are modelled as processes. They required a driver to be started.
Summary
Functions
Returns a specification to start this module under a supervisor.
Starts a database process.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Starts a database process.
Options
:driver(required) - the driver to use for this database. It must be an atom (seeAdbcmodule documentation for all built-in drivers) or a string representing the path to a driver:process_options- the options to be given to the underlying process. SeeGenServer.start_link/3for all options
All other options are given as database options to the underlying driver.
Examples
Adbc.Database.start_link(
driver: :sqlite,
process_options: [name: MyApp.DB]
)In your supervision tree it would be started like this:
children = [
{Adbc.Database,
driver: :sqlite,
process_options: [name: MyApp.DB]},
]