如何定义自己在使对象可用于这些函数的功能时必须使用功能(在规格末尾使用我的对象)?
在此问题,我已经提供了示例包/对象:
- 实现一些功能。
- 仅通过使这些功能可用来定义其他功能。这意味着。我不编写功能主体,而只能使用“使用package_name”或“使用package_body”的规格。
我想,使用我的pakcage/对象实现另一个功能的方法是在某个地方定义的。
我想知道是否有办法定义自己如何使用软件包/对象。我想要一种无需每次编写身体而无需编写身体的方法,而只能在规格中写出该功能使用我的软件包。
我所要求的类似于Java接口或C#中的扩展方法中已经实现的功能。
PS:我认为标题不太明确。如果有人提出另一个标题,我会很高兴。
In this question, I've given examples of package/object that :
- implement some functions.
- are used to define other functions by only making them availaible to those functions. It means. I don't write a function body but only a spec with "using package_name" or "using package_body" in the end.
I suppose that the way to use my pakcage/object to implement another function is defined somewhere.
I would like to know if there a way to define myself how to use a package/object. I want a way to implement a functions without writing the body everytime but only by writing in the spec that the function is using my package.
What I'm asking for is similar to already implemented function in a interface in java or an extention method in c#.
P.S. : I don't think that title is very clear. I would be glad if someone would propose another title.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法定义一个函数/过程,该功能/过程引用SQL存储的函数/过程。如果您声明功能或过程,则必须包括签名和身体。
来自:
src = “ 代码>身体是必需的。
对于呼叫规范,您可以引用一个函数,但它将是外部Java方法或C函数,而不是 SQL中定义的另一个函数。
You cannot define a function/procedure that references an SQL stored function/procedure like that. If you declare a function or procedure then it must include the signature and the body.
From the documentation:
For a standalone function the
body
is required.For a call specification, you can reference a function but it will be an external Java method or a C function and NOT another function defined in SQL.