-
-
Notifications
You must be signed in to change notification settings - Fork 9
feat(pg-tle-mode): deploy the functions from a provided output folder as a pg_tle extension #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… as a pg_tle extension
|
@samwillis Thanks for suggesting this feature in #23, if you get a moment, please give me a review on this one. This implements the first version of For now, it removes and updates the same extension name/version instead of using the versions concept from What do you think? P.S. I made a deploy feature via #19, this PR adds |
| } | ||
| } | ||
| await match(CLI.config.deployMode) | ||
| .with('functions', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added two modes, 'functions' mode gets the existing code that was there.
| } | ||
| ) | ||
| }) | ||
| .with('pg_tle', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added two modes, 'pg_tle' mode gets the new code that instead of executing each individual SQL function file, collects them as a single string and executes SELECT pgtle.install_extension with appropriate parameters on it.
|
Look awesome @divyenduz! The deploy command is really good for working on extensions for internal use. My main thought is that the combining the "building" of the tle extension with the deploy command (if I understand correctly) limits the ability to further distribute the extension. It would be good if there was a way to build the tle extension as a single .sql that can be distributed, either via database.dev or any other means. I was imagining maybe Superbase are working on a command line tool to enable uploading extensions to database.dev, and so having a way to build, then call that (when they finish it) to upload it would be perfect. |
Fix #23
Demo:
plv8ify-pg_tle.mp4