Closed joeljuca closed 11 months ago
After struggling to replicate Ecto.Repo docs in SwissSchema, I don't believe it's reasonable to keep them paired anymore. The reason? Well, Ecto docs are really big, and the effort to keep them in sync will be much bigger than what I'm able to do. It's not gonna happen.
What I'll be doing is to keep docs very simple, and point to Ecto's respective callbacks and/or functions. Good enough to start with, and definitely better than no docs at all.
Most functions that SwissSchema defines in Ecto schemas are very similar to the equivalent function in Ecto.Repo. So, I believe the documentation must be as close as possible.
We should also add some clear notices stating functions that have different shapes or return types, etc. (see #1).
SwissSchema functions
aggregate(type, opts)
aggregate(type, field, opts)
all(opts)
create(params, opts)
create!(params, opts)
delete(schema, opts)
delete!(schema, opts)
delete_all(opts)
get(id, opts)
get!(id, opts)
get_by(clauses, opts)
get_by!(clauses, opts)
insert(params, opts)
insert!(params, opts)
insert_all(entries, opts)
insert_or_update(changeset, opts)
insert_or_update!(changeset, opts)
stream(opts)
update(schema, params, opts)
update!(schema, params, opts)
update_all(updates, opts)