首页 \ 问答 \ 执行不同任务的存储过程?(Stored procedure to perform different tasks?)

执行不同任务的存储过程?(Stored procedure to perform different tasks?)

我有一张客户表。

我创建了可用于将新数据插入表中的存储过程。 但是,如果我想使用相同的过程来更新或删除该表中的数据,该怎么办? 我可以轻松地做到这一点,还是我必须为每个功能使用单独的功能/程序?

create or replace procedure add_customer(custid in table.id%type,
name table.name%type) 
is
begin
insert into table(id, name)
values(id, name);
commit;
end;
/

I have a customer table.

I have created stored procedure I can use to insert new data into the table. But what if I wanted to use the same procedure to update OR delete data from that table. Could I do this easily or do I have to use a separate function/procedure for each function?

create or replace procedure add_customer(custid in table.id%type,
name table.name%type) 
is
begin
insert into table(id, name)
values(id, name);
commit;
end;
/

原文:https://stackoverflow.com/questions/29333379
更新时间:2024-03-26 08:03

最满意答案

不,这是不可能的。

MFMessageComposeViewController接口不提供任何属性或功能来影响其呈现消息的方式。 因为MFMessageComposeViewController不公开其任何视图组件,所以子类化是不可替代的。

(只要100%正确:你当然可以展示MFMessageComposeViewController ,然后一旦它可见,遍历它的整个视图层次结构,直到找到类UITextView的视图,其textattributedText text attributedText等于您提供的body文本,然后将该文本视图的我们完全不鼓励你这样做。封装是有原因的,如果MFMessageComposeViewController没有提供一个接口来选择它的文本视图中的文本,那么MFMessageComposeViewController可以工作(→未经测试)意味着你不应该那样做。)


No. This is not possible.

The interface for MFMessageComposeViewController does not provide any properties or functions to influence the way it presents the message. Subclassing is no alternative either as the MFMessageComposeViewController doesn't expose any of its view components.

(Just to be 100% correct: You could of course present the MFMessageComposeViewController, then once it's visible traverse its whole view hierarchy until you find a view of class UITextView whose text or attributedText property equals the body text you provided and then set that text view's selectedRange to the full range of the text. While this will probably work (→ untested) I totally discourage you to do that. Encapsulation is there for a reason and if the MFMessageComposeViewController doesn't provide an interface to select text inside its text view it means that you're not supposed to do that.)

相关问答

更多

相关文章

更多

最新问答

更多
  • Runnable上的NetworkOnMainThreadException(NetworkOnMainThreadException on Runnable)
  • C ++ 11 + SDL2 + Windows:多线程程序在任何输入事件后挂起(C++11 + SDL2 + Windows: Multithreaded program hangs after any input event)
  • AccessViolationException未处理[VB.Net] [Emgucv](AccessViolationException was unhandled [VB.Net] [Emgucv])
  • 计算时间和日期差异(Calculating Time and Date difference)
  • 以编程方式标签NSMutableAttributedString swift 4(Label NSMutableAttributedString programmatically swift 4)
  • C#对象和代码示例(C# objects and code examples)
  • 在python中是否有数学nCr函数?(Is there a math nCr function in python? [duplicate])
  • 检索R中列的最大值和第二个最大值的行名(Retrieve row names of maximum and second maximum values of a column in R)
  • 给定md5哈希时如何查找特定文件(How to find specific file when given md5 Hash)
  • Python字典因某些原因引发KeyError(Python Dictionary Throwing KeyError for Some Reason)
  • 如何让Joomla停止打开新标签中的每个链接?(How do I get Joomla to stop opening every link in a new tab?)
  • DNS服务器上的NS记录不匹配(Mismatched NS records at DNS server)
  • Python屏幕捕获错误(Python screen capture error)
  • 如何在帧集上放置div叠加?(How to put a div overlay over framesets?)
  • 页面刷新后是否可以保留表单(html)内容数据?(Is it possible to retain the form(html) content data after page refreshed?)
  • 使用iTeardownMyAppFrame和iStartMyAppInAFrame在OPA5测试中重新启动应用程序超时(Restart app within OPA5 test using iTeardownMyAppFrame and iStartMyAppInAFrame timed out)
  • 自动拆分文本内容到列(Automatically splitting text content into even columns)
  • 在r中的循环中将模型名称分配给gbm.step(assigning model names to gbm.step in loop in r)
  • 昆明哪里有电脑等级考试二级C培训?
  • C ++模板实例化,究竟是什么意思?(C++ template instantiation, what exactly does it mean?)
  • 帮助渲染来自fields_for的部分内容(Help to render a partial from fields_for)
  • 将url.action作为json对象返回mvc(return url.action as json object mvc)
  • 使用.BAT中的.application文件类型运行ac#Console App(Run a c# Console App with .application file type from a .BAT)
  • 将bindingRedirect添加到.Net标准库(Adding a bindingRedirect to a .Net Standard library)
  • Laravel版本升级会影响您的控制器吗?(Laravel version upgrade affects your controller?)
  • imaplib.error:命令SEARCH在状态AUTH中非法,只允许在SELECTED状态(imaplib.error: command SEARCH illegal in state AUTH, only allowed in states SELECTED)
  • 如何在eclipse debug impala前端
  • 如何通过Ajax API处理多个请求?(How to handle multiple requests through an Ajax API? [closed])
  • 使用Datetime索引来分析数据框数据(Using Datetime indexing to analyse dataframe data)
  • JS 实现一个菜单效果