Skip to content

Comments

Feature: Support multiple function examples#410

Open
hatamiarash7 wants to merge 2 commits intoduckdb:mainfrom
hatamiarash7:feature/multiple-function-examples
Open

Feature: Support multiple function examples#410
hatamiarash7 wants to merge 2 commits intoduckdb:mainfrom
hatamiarash7:feature/multiple-function-examples

Conversation

@hatamiarash7
Copy link
Contributor

With the current configuration:

  1. We can only have one function example for extensions
  2. The output will be an array with one element because of direct export to markdown using the -markdown flag and varchar[] type

In this PR, the procedure of function extraction is changed to produce a multiline example of functions in the final cell. Also, show all examples as a <code> block to look better.

Before:

image

After:

image

Users can add multiple examples for their functions using a \n delimiter:

function,description,comment,example
"extract_domain","Extracting the main domain from a URL","","SELECT extract_domain('a.example.com') as domain;\nSELECT extract_domain('b.example.com') as domain;"

@carlopi
Copy link
Collaborator

carlopi commented May 22, 2025

Thanks, this makes sense, I would need to test this and come back.

@hatamiarash7
Copy link
Contributor Author

@carlopi, did you have a chance to test it?

I saw that new changes had been applied, and there was a conflict. This was fixed, and I updated again.

@taniabogatsch taniabogatsch added merge conflict / merge with main There is a merge conflict that has to be resolved, or the PR needs changes on main to pass CI stale No activity in more than 3 months labels Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge conflict / merge with main There is a merge conflict that has to be resolved, or the PR needs changes on main to pass CI stale No activity in more than 3 months

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants