Sorry for all the posting lately, but I’ve been trying to coordinate a few 1.0 releases, so bear with me
This is the first official announcement of the new DBInterface.jl package, aiming to provide a standard API for database packages. The API aims to be pretty minimal to start out, to encourage adoption and avoid “over-engineering” things at the start, and new features can be added over time as more packages implement and usage grows. Currently, usage is:
-
DBInterface.connect(T, args...; kw...)
: open aT
kind of database connection -
DBInterface.prepare(conn, sql)
: prepare a SQL statement for execution -
DBInterface.execute(stmt, params)
: Execute a statement, optionally binding parameters; returns a “cursor”, which is an iterator of rows
Along with this announcement is the official announcement of the 1.0 releases of the MySQL.jl and SQLite.jl packages. Highlights include:
- The first implementations of the DBInterface interfaces
- Fixing of a bunch of bugs/long-standing issues
- Improved documentations
For SQLite.jl, there were two breaking changes introduced, including:
-
SQLite.execute!
is now justSQLite.execute
-
SQLite.Query
is nowDBInterface.execute
: for executing and returning query results
For MySQL.jl, the package was overhauled quite extensively:
- Full support for prepared statements, with parameter binding, and returning binary results through bound buffers
-
DBInterface.connect
for opening connections, with keyword argument support for the many many configuration options for connections - Ability to use a
.ini
file for specifying configuration options - Full C API function wrappers in case you need additional functionality
- Usage of the new MariaDB_jll.jl BinaryBuilder solution for the client library (thanks @giordano!)
Please open issues if you run into things in the respective repos, or drop by the #databases slack channel to discuss as well.
Cheers!
-Jacob