Skip to content

Commit

Permalink
4.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
tolomea committed Jul 2, 2023
1 parent b643712 commit d83e27b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,6 @@ However note that because of how the normal CSS is injected any custom CSS will
Custom functions and aggregations
---------------------------------

*This functionality is provisional and not subject to normal backward compatible guarantees.*

It is possible to register additional functions and aggregations with the Data Browser, including custom ones.

Types
Expand All @@ -344,6 +342,8 @@ Functions and Aggregations are attached to the Data Browsers core types, these a
Functions
^^^^^^^^^

*This functionality is provisional and not subject to normal backward compatible guarantees.*

The function registry is in ``data_browser.orm_functions.TYPE_FUNCTIONS`` this has type ``dict[BaseType, dict[str, data_browser.orm_functions.Func]]``. It is safe to insert new entries into this at runtime.

For example to add the MD5 function to string fields you could do the following:
Expand All @@ -359,6 +359,8 @@ For example to add the MD5 function to string fields you could do the following:
Aggregates
^^^^^^^^^^

*This functionality is provisional and not subject to normal backward compatible guarantees.*

The aggregate registry is in ``data_browser.orm_aggregates.TYPE_AGGREGATES`` this has type ``dict[BaseType, dict[str, data_browser.orm_aggregates.Agg]]``. It is safe to insert new entries into this at runtime.

For example to add a count that does not apply distinct to number fields you could do the following:
Expand Down Expand Up @@ -433,7 +435,7 @@ Release History
+---------+------------+----------------------------------------------------------------------------------------------------------+
| Version | Date | Summary |
+=========+============+==========================================================================================================+
| | | Provisional support for adding custom functions and aggregations. |
| 4.2.4 | 2023-07-02 | Provisional support for adding custom functions and aggregations. |
| | | Fix ``all`` aggregate on booleans and durations. (Postgres only) |
+---------+------------+----------------------------------------------------------------------------------------------------------+
| 4.2.3 | 2023-06-15 | Fix ASGI compatibility issue. |
Expand Down
2 changes: 1 addition & 1 deletion data_browser/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "4.2.3"
version = "4.2.4"

0 comments on commit d83e27b

Please sign in to comment.