talek / vorax4

A simple yet powerful IDE for Oracle databases, built on top of the widely known Vim editor and Oracle SqlPLUS.
http://talek.github.io/vorax4
MIT License
53 stars 11 forks source link

Add optional lock indicator for output statusline #41

Closed frastr closed 10 years ago

frastr commented 10 years ago

When g:vorax_output_lock_indicator is 1 (default is 0) then show the status of TM and TX locks on statusline. So you known whether you need to perform still rollback or commit. When status show in lowercase then no locks for this type exists for own session. But when uppercase then exists locks of this type.

You must have permission to select on oracle system view v$lock.

talek commented 10 years ago

Hi Frank,

Thanks for contributing to this project. I like the idea of having a status of whether Vorax is in an open transaction or not. However, there are some things which need clarification:

  1. I like the KISS approach and I wouldn't go that far and distinguish between TX and TM locks. What about the other lock types? A "mark" in the status-line (e.g. TXN) telling if you're in an open transaction should be enough.
  2. In my opinion, the uppercase vs lowercase to indicate the transaction status is counter intuitive. We should simply put the transaction mark on the status-line if the transaction is open and display nothing otherwise.
  3. The dependency on V$LOCK is something I'd like to avoid. How about dbms_transaction.local_transaction_id which doesn't require any special privileges?
  4. I would rather put the query in vorax#output#PostSpit(), update the transaction status in a new property of the dictionary variable returned by vorax#sqlplus#Properties() and use that value in the vorax#output#StatusLine(). That's because we want to query for the transaction status after something is executed only, not on every status-line refresh.

Looking forward for your feedback!

frastr commented 10 years ago

Hello Alexandru,

thank you for your answer with the comments. I have seen my implementation as a prototype and can understand their comments. I wanted to see in general, whether it is at all possible so.

to 1) Yes, no problem. One general mark is sufficiently. to 2) Yes, because pt.3 solved problem when no access right to v$lock. Is no longer necessary to 3) Wow, i have the function dbms_transaction.local_transaction_id not yet known. to 4) This is perfect. The number of calls is reduced to a minimum.

Who should implement this? You or i?

I have 2-3 other minor questions. Should I create single issue for this?

Thanks Frank

talek commented 10 years ago

Hi Frank,

It would be great if you could take care of implementing this feature, of course if you willing to do it and have the needed spare time. If you have any questions we can discuss on a new issue thread or via email.

Many thanks!

frastr commented 10 years ago

Hello Alexandru,

yes, I would like to implement this feature. Note: It may take a while, since I have no experience with Ruby. But this is a good reason to start. Thank you for the trust.

Best regards, Frank

On 9. Juni 2014 17:41:40 MESZ, Alexandru Tica notifications@github.com wrote:

Hi Frank,

It would be great if you could take care of implementing this feature, of course if you willing to do it and have the needed spare time. If you have any questions we can discuss on a new issue thread or via email.

Many thanks!


Reply to this email directly or view it on GitHub: https://github.com/talek/vorax4/pull/41#issuecomment-45505396