Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow listing drivers available #8

Merged
merged 2 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Unreleased

- Support driver listing (#8, @maiste)

# 0.3.0 - 2022-10-11

- Support partial migrations (#4, @maiste)
Expand Down
1 change: 1 addition & 0 deletions lib/omigrate/driver.ml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,4 @@ let load_from_uri s =
| Some scheme -> load scheme

let register scheme (module T : S) = Hashtbl.add drivers scheme (module T : S)
let list () = Hashtbl.to_seq_keys drivers |> List.of_seq
1 change: 1 addition & 0 deletions lib/omigrate/omigrate.ml
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,6 @@ module Driver : sig
val load : string -> ((module Driver.S), Error.t) Result.t
val load_from_uri : string -> ((module Driver.S), Error.t) Result.t
val register : string -> (module Driver.S) -> unit
val list : unit -> string list
end =
Driver