Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a script to update sql function doc pages based on the output of
duckdb_functions()
.Page
docs/sql/functions/blob.md
was created to show its functionality, and uses the category labels introduced in duckdb PR 15654Dependencies
generate_sql_function_docs.py
requires a duckdb version that includes PR 15654, which introduces the 'categories' label to the output ofduckdb_functions()
. (not yet merged as of now)Settings
script
generate_sql_function_docs.py
has a number of hard coded settings that will probably change or move to a config file in the future:DOC_CATEGORY_MAP
- lists which doc pages will be generated, and which category from duckdb_functions() appliesBINARY_OPERATORS
- lists 'functions' that are binary operators, which are listed between the argumentsOVERRIDES_MAP
- hardcoded overrides and additions relative to the duckdb_functions() outputs:duckdb_functions()
||
) that useparameter_types = ANY
. (Ideally these functions should be implemented as aScalarFunctionSet
, so the supported function overloads can be explicitly outputted byduckdb_functions()
URL_CONVERSIONS
- adds url links to the function descriptions, as they are not present in theduckdb_functions()
outputFIXED_EXAMPLES
- contains fixed example results, for examples that can not be run independently (e.g. because they are dependent on an input file or the existence of specific data tables)Limitations
duckdb_functions()
, so is currently missing from generated doc pagesOVERRIDES_MAP
, since they are not properly listed byduckdb_functions()
duckdb_functions()