PgMoney v0.4.20 PgMoney View Source

Contains the all the basic types and guards to work with the money data type.

Link to this section Summary

Functions

Returns true if value is an integer and falls between the minimum/0 and maximum/0 (inclusive) range of the money data type.

Returns true if value is a valid precision/0, false otherwise.

Returns true if value is a valid telemetry/0, false otherwise.

Returns the maximum Decimal.t() value for the given precision.

The maximum integer value possible for the money data type.

Returns the minimum Decimal.t() value for the given precision.

The minimum integer value possible for the money data type.

The storage size the money data type takes up in the database.

Link to this section Types

Link to this type

config()

View Source
config() :: %{precision: precision(), telemetry: telemetry()}
Link to this type

money()

View Source
money() :: -9_223_372_036_854_775_808..9_223_372_036_854_775_807
Link to this type

telemetry()

View Source
telemetry() :: false | [atom(), ...]

Link to this section Functions

Link to this macro

is_money(value)

View Source (macro)

Returns true if value is an integer and falls between the minimum/0 and maximum/0 (inclusive) range of the money data type.

Link to this macro

is_precision(value)

View Source (macro)

Returns true if value is a valid precision/0, false otherwise.

Link to this macro

is_telemetry(value)

View Source (macro)

Returns true if value is a valid telemetry/0, false otherwise.

Returns the maximum Decimal.t() value for the given precision.

The maximum integer value possible for the money data type.

Returns the minimum Decimal.t() value for the given precision.

The minimum integer value possible for the money data type.

Link to this function

storage_size()

View Source
storage_size() :: non_neg_integer()

The storage size the money data type takes up in the database.