Skip to Main Content

Oracle Developer Tools for VS Code

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Possible to include code by reference?

Ben WalterAug 5 2024

Is it possible to include code from another file by reference, similar to a PHP/server-side include?

We have a lot of reusable bits of code that we'd like to be able to maintain/QA in one place, and then insert them by reference into other files and have their contents dynamically inserted upon query execution.

I have looked into VS Code Snippets, but they don't fully fit the use case. Once you insert a snippet's value, it's no longer associated with the snippet, so if you edit the snippet, it doesn't update all the places where you might have inserted it.

I suspect that this is something a build tool like Gulp or Grunt could help with. But I’ve not used them before and I’m also unclear how the include would get evaluated at query execution unless there’s some sort of hook in the Oracle extension. If you think this approach could work, I’d be grateful if you’d explain it to me like a noob or point me to some good resources.

This post has been answered by Ben Walter on Aug 6 2024
Jump to Answer
Comments
Post Details
Added on Aug 5 2024
2 comments
78 views