Skip to content
This repository has been archived by the owner on Feb 23, 2020. It is now read-only.

behos/diesel-derive-more

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deprecation notice

Other packages are providing the same functionality now

It's been a while since I started this package and it appears that other packages have come up which offer the same functionality and more.

diesel-derive-more

Build Status

This package provides some helpers for working with diesel models.

Provides

  • DefaultInsertable: Creates a default struct to use as an insertable model
  • DBEnum: Allows serializing and deserializing enums for DB storage
  • Deserialization for default insertable through the 'serialization' feature

This is work in progress (created to support one of my projects) so it will continue to evolve.

Testing

Create a postgres test db and add a .env file to the root of the project pointing to that db

DATABASE_URL=postgres:https://dev:[email protected]/dev

Initialize the db by running:

pushd tests && diesel migration run && popd

You can run this when you make changes to the test schemas as well

Releases

No releases published

Packages

No packages published

Languages