docs: Spelling fix (wether -> whether). (#764)

Wether: noun
  1. A castrated male sheep or goat.

Whether: conjuction
  1. Used to indirect questions to introduce one alternative.
  2. Used to introduce alternative possibilities.
  3. Either.
This commit is contained in:
James Harton 2023-11-09 15:52:13 +13:00 committed by GitHub
parent 050af513fd
commit 173f4ae5ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 44 additions and 44 deletions

View file

@ -1246,7 +1246,7 @@ create :create_post, MyApp.Post, :create
<code class="inline">false</code>
</td>
<td style="text-align: left" colspan=2>
Wether or not this action is always an upsert.
Whether or not this action is always an upsert.
</td>
</tr>

View file

@ -4265,7 +4265,7 @@ end
<code class="inline">false</code>
</td>
<td style="text-align: left" colspan=2>
Wether or not the action can return nil. Unlike attributes & arguments, this defaults to `false`.
Whether or not the action can return nil. Unlike attributes & arguments, this defaults to `false`.
</td>
</tr>
@ -10248,7 +10248,7 @@ end
<code class="inline">false</code>
</td>
<td style="text-align: left" colspan=2>
Wether or not to count unique values only
Whether or not to count unique values only
</td>
</tr>
@ -10409,7 +10409,7 @@ end
<code class="inline">true</code>
</td>
<td style="text-align: left" colspan=2>
Wether or not the aggregate query should authorize based on the target action, if the parent query is authorized. Requires filter checks on the target action.
Whether or not the aggregate query should authorize based on the target action, if the parent query is authorized. Requires filter checks on the target action.
</td>
</tr>
@ -10674,7 +10674,7 @@ exists :has_ticket, :assigned_tickets
<code class="inline">true</code>
</td>
<td style="text-align: left" colspan=2>
Wether or not the aggregate query should authorize based on the target action, if the parent query is authorized. Requires filter checks on the target action.
Whether or not the aggregate query should authorize based on the target action, if the parent query is authorized. Requires filter checks on the target action.
</td>
</tr>
@ -10983,7 +10983,7 @@ end
<code class="inline">true</code>
</td>
<td style="text-align: left" colspan=2>
Wether or not the aggregate query should authorize based on the target action, if the parent query is authorized. Requires filter checks on the target action.
Whether or not the aggregate query should authorize based on the target action, if the parent query is authorized. Requires filter checks on the target action.
</td>
</tr>
@ -11270,7 +11270,7 @@ end
<code class="inline">true</code>
</td>
<td style="text-align: left" colspan=2>
Wether or not the aggregate query should authorize based on the target action, if the parent query is authorized. Requires filter checks on the target action.
Whether or not the aggregate query should authorize based on the target action, if the parent query is authorized. Requires filter checks on the target action.
</td>
</tr>
@ -11437,7 +11437,7 @@ end
<code class="inline">false</code>
</td>
<td style="text-align: left" colspan=2>
Wether or not to count unique values only
Whether or not to count unique values only
</td>
</tr>
@ -11598,7 +11598,7 @@ end
<code class="inline">true</code>
</td>
<td style="text-align: left" colspan=2>
Wether or not the aggregate query should authorize based on the target action, if the parent query is authorized. Requires filter checks on the target action.
Whether or not the aggregate query should authorize based on the target action, if the parent query is authorized. Requires filter checks on the target action.
</td>
</tr>
@ -11885,7 +11885,7 @@ end
<code class="inline">true</code>
</td>
<td style="text-align: left" colspan=2>
Wether or not the aggregate query should authorize based on the target action, if the parent query is authorized. Requires filter checks on the target action.
Whether or not the aggregate query should authorize based on the target action, if the parent query is authorized. Requires filter checks on the target action.
</td>
</tr>
@ -12172,7 +12172,7 @@ end
<code class="inline">true</code>
</td>
<td style="text-align: left" colspan=2>
Wether or not the aggregate query should authorize based on the target action, if the parent query is authorized. Requires filter checks on the target action.
Whether or not the aggregate query should authorize based on the target action, if the parent query is authorized. Requires filter checks on the target action.
</td>
</tr>
@ -12459,7 +12459,7 @@ end
<code class="inline">true</code>
</td>
<td style="text-align: left" colspan=2>
Wether or not the aggregate query should authorize based on the target action, if the parent query is authorized. Requires filter checks on the target action.
Whether or not the aggregate query should authorize based on the target action, if the parent query is authorized. Requires filter checks on the target action.
</td>
</tr>
@ -12810,7 +12810,7 @@ end
<code class="inline">true</code>
</td>
<td style="text-align: left" colspan=2>
Wether or not the aggregate query should authorize based on the target action, if the parent query is authorized. Requires filter checks on the target action.
Whether or not the aggregate query should authorize based on the target action, if the parent query is authorized. Requires filter checks on the target action.
</td>
</tr>

View file

@ -16,12 +16,12 @@ Tools like `AshPostgres` will create unique constraints in the database automati
## Eager Checking
Setting `eager_check_with: ApiName` on an identity will allow that identity to be checked when building a create changeset over the resource. This allows for showing quick up-front validations about wether some value is taken, for example.
Setting `eager_check_with: ApiName` on an identity will allow that identity to be checked when building a create changeset over the resource. This allows for showing quick up-front validations about whether some value is taken, for example.
If you are using `AshPhoenix.Form`, for example, this looks for a conflicting record on each call to `Form.validate/2`.
For updates, it is only checked if one of the involved fields is being changed.
For creates, The identity is checked unless your are performing an `upsert`, and the `upsert_identity` is this identity. Keep in mind that for this to work properly, you will need to pass the `upsert?: true, upsert_identity: :identity_name` *when creating the changeset* instead of passing it to the Api when creating. The `primary?` read action is used to search for a record. This will error if you have not configured one.
For creates, The identity is checked unless your are performing an `upsert`, and the `upsert_identity` is this identity. Keep in mind that for this to work properly, you will need to pass the `upsert?: true, upsert_identity: :identity_name` _when creating the changeset_ instead of passing it to the Api when creating. The `primary?` read action is used to search for a record. This will error if you have not configured one.
## Pre Checking

View file

@ -258,7 +258,7 @@ defmodule Ash.Actions.Sort do
Opts
* `:api` - The api to use if data needs to be loaded
* `:lazy?` - Wether to use already loaded values or to re-load them when necessary. Defaults to `false`
* `:lazy?` - Whether to use already loaded values or to re-load them when necessary. Defaults to `false`
"""
def runtime_sort(results, sort, opts \\ [])
def runtime_sort([], _empty, _), do: []

View file

@ -145,7 +145,7 @@ defmodule Ash.Api do
type: :boolean,
default: false,
doc: """
Wether or not to reselect all attributes depended on by loads.
Whether or not to reselect all attributes depended on by loads.
By default, we only reselect fields that weren't already selected.
"""
]
@ -248,7 +248,7 @@ defmodule Ash.Api do
type: :boolean,
default: false,
doc: """
Wether or not to reselect all attributes depended on by loads.
Whether or not to reselect all attributes depended on by loads.
By default, we only reselect fields that weren't already selected.
"""
]
@ -288,7 +288,7 @@ defmodule Ash.Api do
type: :boolean,
default: false,
doc: """
Wether or not to reselect all attributes depended on by loads.
Whether or not to reselect all attributes depended on by loads.
By default, we only reselect fields that weren't already selected.
"""
]
@ -397,7 +397,7 @@ defmodule Ash.Api do
type: :boolean,
default: false,
doc:
"Wether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting"
"Whether or not to cast attributes and arguments as input. This is an optimization for cases where the input is already casted and/or not in need of casting"
],
upsert_identity: [
type: :atom,
@ -417,19 +417,19 @@ defmodule Ash.Api do
type: :boolean,
default: false,
doc:
"Wether or not to sort results by their input position, in cases where `return_records?: true` was provided."
"Whether or not to sort results by their input position, in cases where `return_records?: true` was provided."
],
return_records?: [
type: :boolean,
default: false,
doc:
"Wether or not to return all of the records that were inserted. Defaults to false to account for large inserts."
"Whether or not to return all of the records that were inserted. Defaults to false to account for large inserts."
],
return_errors?: [
type: :boolean,
default: false,
doc:
"Wether or not to return all of the errors that occur. Defaults to false to account for large inserts."
"Whether or not to return all of the errors that occur. Defaults to false to account for large inserts."
],
batch_size: [
type: :pos_integer,
@ -463,7 +463,7 @@ defmodule Ash.Api do
type: :boolean,
default: false,
doc: """
Wether or not to send notifications out. If this is set to `true` then the data layer must return
Whether or not to send notifications out. If this is set to `true` then the data layer must return
the results from each batch. This may be intensive for large bulk actions.
"""
],
@ -471,7 +471,7 @@ defmodule Ash.Api do
type: {:one_of, [:all, :batch, false]},
default: :batch,
doc: """
Wether or not to wrap the entire execution in a transaction, each batch, or not at all.
Whether or not to wrap the entire execution in a transaction, each batch, or not at all.
Keep in mind:
@ -903,7 +903,7 @@ defmodule Ash.Api do
type: :boolean,
default: true,
doc: """
Wether or not the request is being authorized, provided to calculation context.
Whether or not the request is being authorized, provided to calculation context.
"""
],
tracer: [
@ -936,7 +936,7 @@ defmodule Ash.Api do
authorize?: [
type: :boolean,
doc: """
Wether or not the request should be authorized.
Whether or not the request should be authorized.
"""
],
tracer: [
@ -1129,10 +1129,10 @@ defmodule Ash.Api do
{:ok, term} | {:error, Ash.Error.t()}
@doc "Get the avg of a given field from the given query, raising any errors"
@callback avg!(Ash.Query.t(), field :: atom, opts :: Keyword.t()) :: term | no_return
@doc "Wether or not the given query would return any results"
@doc "Whether or not the given query would return any results"
@callback exists(Ash.Query.t(), opts :: Keyword.t()) ::
{:ok, boolean} | {:error, Ash.Error.t()}
@doc "Wether or not the given query would return any results, raising any errors"
@doc "Whether or not the given query would return any results, raising any errors"
@callback exists?(Ash.Query.t(), opts :: Keyword.t()) ::
boolean | no_return
@doc "Get list of a given field from the given query"
@ -1143,7 +1143,7 @@ defmodule Ash.Api do
@callback list!(Ash.Query.t(), field :: atom, opts :: Keyword.t()) :: list(term) | no_return
@doc """
Returns wether or not the user can perform the action, or raises on errors.
Returns whether or not the user can perform the action, or raises on errors.
See `can/3` for more info.
"""
@ -1166,7 +1166,7 @@ defmodule Ash.Api do
) ::
boolean | no_return
@doc """
Returns wether or not the user can perform the action, or `:maybe`, returning any errors.
Returns whether or not the user can perform the action, or `:maybe`, returning any errors.
In cases with "runtime" checks (checks after the action), we may not be able to determine
an answer, and so the value `:maybe` will be returned from `can/2`. The `can?` function assumes that

View file

@ -263,7 +263,7 @@ defmodule Ash.DataLayer do
Extension.get_persisted(resource, :data_layer)
end
@doc "Wether or not lateral joins should be used for many to many relationships by default"
@doc "Whether or not lateral joins should be used for many to many relationships by default"
@spec prefer_lateral_join_for_many_to_many?(Ash.DataLayer.t()) :: boolean
def prefer_lateral_join_for_many_to_many?(data_layer) do
if function_exported?(data_layer, :prefer_lateral_join_for_many_to_many?, 0) do

View file

@ -18,7 +18,7 @@ defmodule Ash.Flow.Step.Create do
[
upsert?: [
type: :boolean,
doc: "Wether or not this action is always an upsert.",
doc: "Whether or not this action is always an upsert.",
default: false
],
upsert_identity: [

View file

@ -63,7 +63,7 @@ defmodule Ash.Query.Aggregate do
],
filterable?: [
type: :boolean,
doc: "Wether or not this aggregate may be used in filters."
doc: "Whether or not this aggregate may be used in filters."
],
type: [
type: :any,
@ -85,13 +85,13 @@ defmodule Ash.Query.Aggregate do
type: :boolean,
default: false,
doc:
"Wether or not to only consider unique values. Only relevant for `count` and `list` aggregates."
"Whether or not to only consider unique values. Only relevant for `count` and `list` aggregates."
],
authorize?: [
type: :boolean,
default: true,
doc: """
Wether or not the aggregate query should authorize based on the target action.
Whether or not the aggregate query should authorize based on the target action.
See `d:Ash.Resource.Dsl.aggregates|count` for more information.
"""

View file

@ -4,7 +4,7 @@ defmodule Ash.Query.Function.StringSplit do
type: :boolean,
default: false,
doc:
"Wether or not to trim empty strings from the beginning or end of the result. Equivalent to the `trim` option to `String.split/3`"
"Whether or not to trim empty strings from the beginning or end of the result. Equivalent to the `trim` option to `String.split/3`"
]
]

View file

@ -1885,12 +1885,12 @@ defmodule Ash.Query do
* query: The query over the destination resource to use as a base for aggregation
* default: The default value to use if the aggregate returns nil
* filterable?: Wether or not this aggregate may be referenced in filters
* filterable?: Whether or not this aggregate may be referenced in filters
* type: The type of the aggregate
* constraints: Type constraints for the aggregate's type
* implementation: An implementation used when the aggregate kind is custom
* read_action: The read action to use on the destination resource
* authorize?: Wether or not to authorize access to this aggregate
* authorize?: Whether or not to authorize access to this aggregate
"""
def aggregate(query, name, kind, relationship) do
aggregate(query, name, kind, relationship, [])

View file

@ -78,7 +78,7 @@ defmodule Ash.Resource.Actions.Action do
type: :boolean,
default: false,
doc: """
Wether or not the action can return nil. Unlike attributes & arguments, this defaults to `false`.
Whether or not the action can return nil. Unlike attributes & arguments, this defaults to `false`.
"""
],
run: [

View file

@ -84,7 +84,7 @@ defmodule Ash.Resource.Aggregate do
type: :boolean,
default: true,
doc: """
Wether or not the aggregate query should authorize based on the target action, if the parent query is authorized. Requires filter checks on the target action.
Whether or not the aggregate query should authorize based on the target action, if the parent query is authorized. Requires filter checks on the target action.
"""
]
]

View file

@ -931,7 +931,7 @@ defmodule Ash.Resource.Dsl do
schema:
Keyword.put(Keyword.delete(Ash.Resource.Aggregate.schema(), :sort), :uniq?,
type: :boolean,
doc: "Wether or not to count unique values only",
doc: "Whether or not to count unique values only",
default: false
),
auto_set_fields: [kind: :count]
@ -1126,7 +1126,7 @@ defmodule Ash.Resource.Dsl do
schema:
Keyword.put(Ash.Resource.Aggregate.schema(), :uniq?,
type: :boolean,
doc: "Wether or not to count unique values only",
doc: "Whether or not to count unique values only",
default: false
),
auto_set_fields: [kind: :list]

View file

@ -270,7 +270,7 @@ defmodule Ash.Resource.Info do
Spark.Dsl.Extension.get_persisted(resource, :primary_key, [])
end
@doc "Wether or not all primary key attributes can be compared with simple_equality"
@doc "Whether or not all primary key attributes can be compared with simple_equality"
@spec primary_key_simple_equality?(Spark.Dsl.t() | Ash.Resource.t()) :: boolean()
def primary_key_simple_equality?(resource) do
Spark.Dsl.Extension.get_persisted(resource, :primary_key_simple_equality?, [])