mirror https://github.com/mysql-otp/mysql-otp

Viktor Söderqvist 9578e83c38 Test for password hash 10 years ago
include 3c9e335460 Prepared statements partially + various fixes 10 years ago
src 9578e83c38 Test for password hash 10 years ago
test 3c9e335460 Prepared statements partially + various fixes 10 years ago
.gitignore 41a2a5f4da Initial commit 10 years ago
LICENSE 41a2a5f4da Initial commit 10 years ago
README.md 7a767be4b5 Implement plain queries and the text protocol 10 years ago
rebar.config 7a767be4b5 Implement plain queries and the text protocol 10 years ago

README.md

MySQL/OTP

This is a MySQL driver for Erlang following the OTP principles.

Status: Pre-alpha. Connecting and queries using the text protocol work. The API and the value representation are subjects to change.

Background: We are starting this project with the aim at overcoming the problems with Emysql (the currently most popular driver) and erlang-mysql-driver (the even older driver).

Design choices (ideas):

  • A connection is a gen_server.
  • No connection pool. Poolboy or your own supervisor can be used for this.
  • No records in the public API.
  • API inspired by that of epgsql (the PostgreSQL driver).

Contributing

We welcome contributors and new members of the project. We are open for suggestions about the API, the internal design and almost anything else. Let's use the project's wiki for discussions and TODOs.

Problems with Emysql

From the Emysql README:

The driver has several technical shortcomings:

  • No clear protocol / connection pool separation
  • No clear protocol / socket separation
  • A very complicated connection pool management
  • Uses the textual protocol in a lot of places where it shouldthe binary protocol
  • The API could be better

However, this is probably the best MySQL driver out there for Erlang. The erlang-mysql-driver uses a problematic connection pool design for many use cases and is not suitable for general purpose use. This driver is.