use of com.github.fabriciofx.cactoos.jdbc.statement.StatementInsert in project cactoos-jdbc by fabriciofx.
the class PhonebookSql method contact.
@Override
public Contact contact(final Map<String, String> properties) throws Exception {
final UUID id = UUID.randomUUID();
new StatementInsert(this.session, new QuerySimple("INSERT INTO contact (id, name) VALUES (:id, :name)", new ParamUuid("id", id), new ParamText("name", properties.get("name")))).result();
return new ContactSql(this.session, id);
}
Aggregations