Skip to content

Commit

Permalink
Merge pull request #8 from maiste/feature/list-drivers
Browse files Browse the repository at this point in the history
Allow listing drivers available
  • Loading branch information
maiste committed Oct 21, 2022
2 parents f42ac8f + 8847d29 commit de6dc1e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
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

0 comments on commit de6dc1e

Please sign in to comment.