Search in sources :

Example 6 with Server

use of com.github.fabriciofx.cactoos.jdbc.Server in project cactoos-jdbc by fabriciofx.

the class ScriptSqlTest method mysqlServer.

@Test
public void mysqlServer() throws Exception {
    final Server server = new ServerMysql(new ScriptSql(new ResourceOf(new Joined("/", "com/github/fabriciofx/cactoos/jdbc/phonebook", "phonebook-mysql.sql"))));
    server.start();
    server.stop();
}
Also used : Server(com.github.fabriciofx.cactoos.jdbc.Server) ServerMysql(com.github.fabriciofx.cactoos.jdbc.server.ServerMysql) ResourceOf(org.cactoos.io.ResourceOf) Joined(org.cactoos.text.Joined) Test(org.junit.Test)

Aggregations

Server (com.github.fabriciofx.cactoos.jdbc.Server)6 Joined (org.cactoos.text.Joined)6 Test (org.junit.Test)6 Session (com.github.fabriciofx.cactoos.jdbc.Session)4 ParamText (com.github.fabriciofx.cactoos.jdbc.param.ParamText)4 QueryKeyed (com.github.fabriciofx.cactoos.jdbc.query.QueryKeyed)4 QuerySimple (com.github.fabriciofx.cactoos.jdbc.query.QuerySimple)4 ServerMysql (com.github.fabriciofx.cactoos.jdbc.server.ServerMysql)3 ServerH2 (com.github.fabriciofx.cactoos.jdbc.server.ServerH2)2 ResourceOf (org.cactoos.io.ResourceOf)2 ServerPgsql (com.github.fabriciofx.cactoos.jdbc.server.ServerPgsql)1 StatementInsertKeyed (com.github.fabriciofx.cactoos.jdbc.statement.StatementInsertKeyed)1 StatementUpdate (com.github.fabriciofx.cactoos.jdbc.statement.StatementUpdate)1