Skip to content

Commit

Permalink
Fix docs and publish
Browse files Browse the repository at this point in the history
  • Loading branch information
vereis committed Mar 6, 2024
1 parent c6b5ae8 commit 289054d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 6 deletions.
38 changes: 34 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# EctoModel

EctoModel is a library that aims to overhaul your Ecto.Schemas with additional functionality.

See the [official documentation for EctoModel](https://hexdocs.pm/ecto_model/).
EctoModel is a library that aims to overhaul your `Ecto.Schema`s with additional functionality such as easy, fluent querying of data as well as easy soft deletes!

## Installation

Expand All @@ -11,7 +9,39 @@ This package can be installed by adding `ecto_model` to your list of dependencie
```elixir
def deps do
[
{:ecto_model, "~> 0.1.0"}
{:ecto_model, "~> 0.0.1"}
]
end
```

## Features

Currently, EctoModel provides the following features:

- Easy and fluent API for querying your data with `EctoModel.Queryable`
- Easy and compile-time validated soft delete functionality with `EctoModel.SoftDelete`

All of the provided functionality is provided in an opt-in basis, so you can mix and match the functionality
you need as needed.

Please see the documentation for each feature for more information.

## License

EctoModel is released under the MIT License.

## Links

EctoModel is built on top of the following libraries, and as such, you may care about their documentation as well:

- [Ecto](https://hexdocs.pm/ecto/Ecto.html)
- [EctoMiddleware](https://hexdocs.pm/ecto_middleware/EctoMiddleware.html)
- [EctoHooks](https://hexdocs.pm/ecto_hooks/EctoHooks.html)

## Contributing

We don't currently have any contributing guidelines, but if you'd like to contribute, please feel free to open an issue or a pull request.

Please note that we do enforce 100% test coverage, so any changes will need to be accompanied by tests.

Additionally, we withhold the right to refuse any changes that we feel do not align with the goals of the project.
2 changes: 1 addition & 1 deletion lib/ecto_model.ex
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
defmodule EctoModel do
@moduledoc false
@moduledoc File.read!("README.md")
end
2 changes: 1 addition & 1 deletion lib/ecto_model/soft_delete.ex
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@ defmodule EctoModel.SoftDelete do
Will raise if given an entity that does not opt into soft deletes.
# TODO: we will need to implement something more fully fledged to support `delete_all/2` and the like
"""
# TODO: we will need to implement something more fully fledged to support `delete_all/2` and the like
@spec soft_delete(resource :: struct(), opts :: Keyword.t()) ::
{:ok, struct()} | {:error, term()}
def soft_delete(%schema{} = resource, opts \\ []) do
Expand Down

0 comments on commit 289054d

Please sign in to comment.