Giter VIP home page Giter VIP logo

Comments (5)

PhilippSalvisberg avatar PhilippSalvisberg commented on July 17, 2024

The Compile with PL/Scope... context menu is available on the connection node

image

and the PL/Scope node

image

The idea is to provide a PL/Scope quick start for the current schema. You compile the current schema with PL/Scope and then you are able to explore the additional metadata (e.g. under the PL/Scope node). If you decide to use PL/Scope on a regular basis in your development environment you should adjust your deployment process to ensure the deployed code is compiled with PL/Scope.

It's certainly not the idea to compile the whole database with PL/Scope or several chosen schemas on a regular bases via this action.

If you want to compile code by default with PL/Scope you can configure SQL Developer accordingly as the following screenshot shows:

image

From that point on every compile operation issued from SQL Developer will include by default PL/Scope. In the editor or the oder in other actions such as Compile All... on the Packages node. So there is no need to add the action Compile with PL/Scope on additional nodes.

Of course one could use #OBJECT_NAME# instead of the pseudo column USER in the code of the action. However, with the current scope of the action this has no impact. The USER pseudo columns works also with proxy connections. So, I do not see a reason to change that.

Regarding the scope of the synonym recompilation in the action. It is limited to the current schema. For private synonyms with a predicate on owner and for public synonyms with a predicate on table_owner. That's intended. Especially for public synonyms. The current schema is responsible for those public synonyms and if you want to get the full PL/Scope picture you have to compile them.

To be clear. I do not plan to extend the scope of this extension to cover DBA functionalities or extend the scope to multiple schemas. The scope is just the current connect. Nothing more and nothing less. Therefore I flagged this enhancement request as "wontfix".

from plscope-utils.

rvo-cs avatar rvo-cs commented on July 17, 2024

So there is no need to add the action Compile with PL/Scope on additional nodes.

The problem is, as of v1.0.0 the action is also made available on PL/Scope nodes of other schemas, by having it on plscope-utils-root nodes in addition to CONNECTION nodes.

	<!-- first item based on title is considered independent of minversion/maxversion -->
	<item connType="Oracle" type="CONNECTION" reload="true" minversion="11.1">
		<title>Compile with PL/Scope...</title>

And:

	<!-- Copy of the previous item. Changed type only. A menu cannot be assigned to multiple nodes. -->
	<item connType="Oracle" type="plscope-utils-root" reload="true" minversion="11.1">
		<title>Compile with PL/Scope...</title>

And that is misleading,

If the intent is to have the scope of the "Compile with PL/Scope" action limited to the schema of the session user 1, then it should not be available on plscope-utils-root nodes, as those nodes are also present in the subtrees of other schemas.

Footnotes

  1. The user function (that's how it's named in the SQL Reference manual) is equal to sys_context('USERENV', 'SESSION_USER'); this is not to be confused with sys_context('USERENV', 'CURRENT_SCHEMA').

from plscope-utils.

PhilippSalvisberg avatar PhilippSalvisberg commented on July 17, 2024

You are right. Under the Other Users node the PL/Scope node is visible for every other user.

image

This was not my intention, I think.

I see basically two options:

a) Amend the extension to ensure it is not shown under the Other Users node
b) Ensure the the editors and actions work also under Other Users, e.g. by using #OBJECT_NAME# as you suggested

from plscope-utils.

rvo-cs avatar rvo-cs commented on July 17, 2024

Enabling it for other users (except Oracle-maintained users, see issue #60) would be convenient for users working with DBA rights and tasked with maintaining multi-schemas applications. That's why I could never imagine that this was not the original intent.

from plscope-utils.

PhilippSalvisberg avatar PhilippSalvisberg commented on July 17, 2024

I think implementing b) would be sensible.

from plscope-utils.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.