package io.trygvis.persistence.sql; import java.sql.Connection; import java.sql.SQLException; import java.util.List; public interface SqlExecutor { int executeUpdate(UpdateCommand command); List executeQuery(QueryCommand command); static interface UpdateCommand { int run(Connection c) throws SQLException; } static interface QueryCommand { List run(Connection c) throws SQLException; } }