diff options
Diffstat (limited to 'src/clj/queue_api/db')
-rw-r--r-- | src/clj/queue_api/db/core.clj | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/clj/queue_api/db/core.clj b/src/clj/queue_api/db/core.clj index 0482feb..adbda25 100644 --- a/src/clj/queue_api/db/core.clj +++ b/src/clj/queue_api/db/core.clj @@ -16,12 +16,12 @@ (defn add-agent "Add an agent into the database" - [{:keys [id name primary-skillset secondary-skillset]}] + [{:keys [id name primary_skillset secondary_skillset]}] (d/transact! conn [{:agent/id id :agent/name name - :agent/primary-skillset primary-skillset - :agent/secondary-skillset secondary-skillset}])) + :agent/primary-skillset primary_skillset + :agent/secondary-skillset secondary_skillset}])) (defn add-job "Add a job into the database" @@ -107,6 +107,11 @@ [id] (d/entity @conn [:agent/id id])) +(defn job + "Get a job by id" + [id] + (d/entity @conn [:job/id id])) + (defn fittest-job "Get the fittest job for a agent `id`." [^String id] |