Popularity
5.5
Declining
Activity
0.0
Stable
33
3
19
Monthly Downloads: 223
Programming language: Elixir
License: Apache License 2.0
Tags:
ORM And Datamapping
Latest version: v0.2.0
ecto_ordered alternatives and similar packages
Based on the "ORM and Datamapping" category.
Alternatively, view ecto_ordered alternatives based on common mentions on social networks and blogs.
-
extreme
An Elixir library using Eventstore for persistance of events generated by aggregates (CQRS). -
couchdb_connector
A connector for CouchDB, the Erlang-based, JSON document database.
Get performance insights in less than 4 minutes
Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.
Sponsored
scoutapm.com
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of ecto_ordered or a related project?
README
EctoOrdered
Ecto extension to support ordered list items. Similar to acts_as_list, but for Ecto
Examples
# Global positioning
defmodule MyModel do
use Ecto.Schema
import EctoOrdered
schema "models" do
field :position, :integer, virtual: true
field, :rank, :integer
end
def changeset(model, params) do
model
|> cast(params, [], [:position])
|> set_order(:position)
end
end
# Scoped positioning
defmodule MyModel do
use Ecto.Model
use EctoOrdered, scope: :reference_id
schema "models" do
field :reference_id, :integer
field :position, :integer, virtual: true
end
def changeset(model, params) do
model
|> cast(params, [], [:position, :reference_id])
|> set_order(:position, :reference_id)
end
end