package sihl

  1. Overview
  2. Docs
The modular functional web framework

Install

Dune Dependency

Authors

Maintainers

Sources

sihl-queue-0.1.8.tbz
sha256=e77ffae26dac04e446ff07854de68a03edfd05031b5cb0dbcb6dc4a96e2d1c8e
sha512=7682c55136dbb8c68517ccd2c157a3556d966cb8565d15cf21ab270f92ea7e9ee5d3ac1479ba2e34a80f3052ca5dd1a74e964a8764c2164e3e71e9048fcdf51b

doc/sihl.repository/Sihl_repository/index.html

Module Sihl_repositorySource

The repository service deals with cleaning repositories. This is useful for integration tests.

Installation

Use the provided Sihl.Repository.Service.Make to instantiate a repo service.

 module Repo = Sihl.Repository.Service.Make () 

Usage

You typically want to use the repo service in your own repositories in order to register repository cleaners. This allows Sihl to reset the state of your system after integration tests.

{ let cleaner = ... in Repo.register_cleaer cleaner; }

In order to clean all repositories that have registered cleaners you can call clean_all:

{ open Lwt.Syntax let* () = Repo.clean_all ctx in .. }

Sourcemodule Meta : sig ... end

Repositories can return meta data containing information like total rows affected. This can be useful for pagination.

Sourcemodule Dynparam : sig ... end

This module can be used to assemble dynamic repository queries. This is typically used if you don't know the number of parameters at compile time because they are provided by the user, for instance as a filter or sort. http://paurkedal.github.io/ocaml-caqti/caqti/Caqti_request/index.html#how-to-dynamically-assemble-queries-and-parameters

module Sig : sig ... end
OCaml

Innovation. Community. Security.