Skip to content

robinheghan/hugsql-postgres-async

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

postgres.async adapter for HugSQL

Setup

Add the following to your project.clj:

Clojars Project

Then you have to install the adapter:

(ns core
  (:require [hugsql.core :as hugsql]
            [hugsql.adapter.postgres-async :as ps-adapter]))

(hugsql/def-db-fns "fns.sql")
(hugsql/set-adapter! (ps-adapter/hugsql-adapter-postgres-async))

Usage

The HugSQL documentation is the definitive guide. The difference is that this adapter returns core.async channels with the result or an exception. This adapter uses postgres.async, so naturally it only works with postgres.

About

A hugsql adapter for the postgres-async library

Resources

License

Stars

Watchers

Forks

Packages

No packages published