connect to maria db with mauricio/postgresql-mysql driver in play2.5
is it possible to use mauricio/mysql-async driver in scala and play2.5 to connect to mariadb database? I am using jooq now with the mariadb-java-client currently.
Do you know of any async mariadb driver for scala/play, or oes any of you have maybe an example of config with the mysql-async driver from mauricio for mysql or mariadb?
Have you tried to use play-slick?
just by googling found successful examples:
- Slick 2.x examples with MariaDB Raw
- Play framework, Slick and MySQL Tutorial (it's mysql, but it should be easy do adapt to mariaDB)
If it's still relevant, have a look at jasync-sql (Disclaimer: I am working on it). It is a port of Mauricio lib that works with mysql so should work with MariaDB as well.
It is used like this:
// Connect to DB
Connection connection = new MySQLConnection(
new Configuration(
"username",
"host.com",
3306,
"password",
"schema"
)
);
CompletableFuture<?> connectFuture = connection.connect()
// Wait for connection to be ready
// ...
// Execute query
CompletableFuture<QueryResult> future =
connection.sendPreparedStatement("select * from table");
// Close the connection
connection.disconnect().get()
You can read more on the wiki: https://github.com/jasync-sql/jasync-sql/wiki
ReferenceURL : https://stackoverflow.com/questions/41515915/connect-to-maria-db-with-mauricio-postgresql-mysql-driver-in-play2-5
'programing' 카테고리의 다른 글
"ui-sref"는 링크를 두 번 클릭해도 "ui-view"(컨트롤러가 다시 실행되지 않음)를 새로 고치지 않습니다. (0) | 2023.11.04 |
---|---|
스프링 부트 탄성 검색 구성 (0) | 2023.11.04 |
오류: 언어 c에 대한 사용 권한이 거부되었습니다. (0) | 2023.11.04 |
상대 경로가 있는 다른 PowerShell 스크립트를 호출하려면 어떻게 해야 합니까? (0) | 2023.11.04 |
숨김 및 표시 설정에서 작동하지 않는 ng-애니메이트 (0) | 2023.11.04 |