Skip to content

d2a4u/scooby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scooby

License: MIT Build Status

Doobie's helpers micro library

Getting Started

This micro library's purpose is to achieve better syntax when working with Doobie. Sometimes when using Doobie, we can end up with lots of raw SQL, I want to be able to write code and worry about SQL later.

Examples

Using mixins

for {
  _ <- Customer.insert(customer1)
  _ <- Customer.insert(customer2)
  result <- Customer.find[Customer.FindByAge, List](query)
} yield result

Using type classes

for {
  _ <- Insert[Customer](customer1, Customer.insert).run
  _ <- Insert[Customer](customer2, Customer.insert).run
  result <- Find[Customer.FindByAge, Customer, List](query, Customer.fba).run
} yield result

TODO

  • Support multiple queries in 1 transaction
  • Support more CRUD ops

License

This project is licensed under the MIT License

About

doobie's helpers micro library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages