January 2018
Intermediate to advanced
336 pages
7h 56m
English
Persistence protocol OrderDB consists of upsert, entity, and delete functions, similar to the Provider service. Additionally, it defines an orders function that can list all the orders of the given authenticated consumer ID, as shown here:
(ns helping-hands.order.persistence "Persistence Port and Adapter for Order" (:require [datomic.api :as d]));; --------------------------------------------------;; Order Persistence Port for Adapters to Plug-in;; --------------------------------------------------(defprotocol OrderDB "Abstraction for order database" (upsert [this id service provider consumer cost start end rating status] "Adds/Updates an order entity") (entity [this id flds] "Gets the specified order with all ...
Read now
Unlock full access