API Reference excellerate v#0.4.0

Copy Markdown View Source

Modules

ExCellerate is a high-performance expression evaluation engine for Elixir.

ETS-backed LRU cache for compiled expression functions.

Compilation strategy that evaluates expressions via an interpreted Code.eval_quoted/3 closure.

Compilation strategy that compiles each expression into a real, loaded BEAM module (via ExCellerate.NativeCompiler) and evaluates it as compiled code. Substantially faster on the warm path with far lower per-call allocation than the interpreter. Opt in with config :excellerate, compilation: __MODULE__ (the default strategy is ExCellerate.Compilation.Interpreted).

Behaviour for turning a compiled IR (Elixir AST) into a callable evaluation function — i.e. how an expression is executed.

Represents an error in the ExCellerate system.

Defines a behaviour for implementing custom ExCellerate functions.

Creates a Date from year, month, and day integers.

Creates a NaiveDateTime from year, month, day, and optional hour, minute, and second integers.

Shifts a date or datetime by the specified amount and unit.

Calculates the signed difference between two dates in the specified unit.

Extracts the day of the month (1-31) from a date or datetime.

Extracts the hour (0-23) from a datetime.

Extracts the minute (0-59) from a datetime.

Extracts the month (1-12) from a date or datetime.

Returns the current date and time as a NaiveDateTime.

Extracts the second (0-59) from a datetime.

Returns the current date as a Date.

Returns the day of the week as an integer (ISO 8601: Monday = 1, Sunday = 7).

Extracts the year from a date or datetime.

Returns true if all arguments are truthy, false otherwise.

Returns the first non-null value from the given arguments.

Concatenates all arguments into a single string.

Returns true if a string contains the given substring, false otherwise.

Filters a list using a parallel list of booleans.

Returns the 0-based position of the first occurrence of a search string within text, or -1 if not found.

Returns one value if a condition is true and another if it is false.

Returns the value if it is not null, otherwise returns the default.

Evaluates a series of condition/value pairs and returns the value for the first truthy condition.

Returns a value from a list or 2D array by position.

Returns true if a value is null, an empty string, or a string containing only whitespace.

Returns true if a value is null, false otherwise.

Returns the first n characters from a string.

Returns the length of a string or list.

Retrieves a value from a map by key or from a list by index.

Converts a string to lowercase.

Searches for a value in a list and returns its 0-based position.

Returns true if any argument is truthy, false otherwise.

Replaces all occurrences of a substring with a replacement string.

Returns the last n characters from a string.

Extracts a contiguous section of a list given a start index and optional length.

Converts a string to a slug by downcasing, replacing spaces and slashes with hyphens, and stripping other non-alphanumeric characters.

Sorts values in ascending order.

Extracts a portion of a string starting at a 0-based position.

Matches an expression against a series of case/value pairs and returns the value for the first match.

Builds a list of maps (rows) from column name/list pairs.

Extracts rows, columns, or both from a list or 2D array.

Joins values into a single string using a delimiter.

Removes leading and trailing whitespace from a string.

Converts a string to underscore case by downcasing, replacing spaces and slashes with underscores, and stripping other non-alphanumeric characters.

Returns the unique values from a list, preserving the order of first occurrence.

Converts a string to uppercase.

Argument validation helpers for ExCellerate.Function implementations.

Returns the absolute value of a number.

Returns the arithmetic mean (average) of the given values.

Rounds a number up to the nearest integer.

Returns e raised to the given power.

Rounds a number down to the nearest integer.

Returns the natural logarithm (base e) of a number.

Returns the logarithm of a value in the specified base.

Returns the base-10 logarithm of a number.

Returns the largest of the given values.

Returns the smallest of the given values.

Rounds a number to the nearest integer, or to a specified number of decimal places.

Returns the sign of a number: -1 for negative, 0 for zero, or 1 for positive.

Returns the square root of a non-negative number.

Returns the sum of the given values.

Truncates a number toward zero, removing any fractional part.

Provides functionality for creating custom function registries.