- doobie uses
ConnectionIO
instead ofDBIO
in Slick. Both are composable using for-comprehension. - In Slick, you write
connection.run(someDBIO)
while in doobiesomeConnectionIO.transact(connection)
- Slick:
conn.run(sqlu"INSERT INTO FileData (fileId, data) VALUES (${s.fileId}, ${s.data})"
- doobie:
sql"INSERT INTO FileData (fileId, data) VALUES (${s.fileId}, ${s.data})".update.run.transact(conn)
- Slick:
- In Slick, you have to explicitly say that the statements will run in the same transaction. In doobie, the
transact
method always runs all the statements in one transaction. - To distinguish between queries and non-queries, you use
sql
andsqlu
interpolators in Slick. In doobie, you always usesql
interpolator but the suffix differs:- Query:
sql"SELECT data FROM FileData WHERE fileId = ${fileId}".query[FileData].to[Seq].transact(conn)
- Streaming query:
sql"SELECT data FROM FileData WHERE fileId = ${fileId}".query[FileData].stream.transact(conn)
- Non-query: `sql"INSERT INTO File
- Query:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM openjdk:8u111-jdk | |
ARG ANDROID_SDK_VERSION=24.4.1 | |
ARG ANDROID_BUILD_TOOLS_VERSION=23.0.3 | |
ARG ANDROID_API_LEVELS=android-23 | |
ENV ANDROID_SDK_FILENAME android-sdk_r${ANDROID_SDK_VERSION}-linux.tgz | |
ENV ANDROID_SDK_URL http://dl.google.com/android/${ANDROID_SDK_FILENAME} | |
ENV ANDROID_HOME /opt/android-sdk-linux | |
ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/build-tools/${ANDROID_BUILD_TOOLS_VERSION} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
SET VM_NAME=default | |
SET MOUNT_SRC=E:\Work | |
SET MOUNT_DST=/e/work | |
SET MOUNT_NAME=work | |
ECHO Creating VirtualBox machine '%VM_NAME%'... | |
docker-machine create --driver virtualbox --virtualbox-host-dns-resolver %VM_NAME% |