[Squirrel-sql-develop] Re: [Squirrel-sql-users] sql history
Richard Vanhook wrote:
> Thanks for the response Rob, I really appreciate it. The history
> feature you mentioned will definitely help out. However, let me
> refine my question a little bit - the history I was referring to would
> be a history log that is maintained for the life of the install. For
> example, if I installed squirrel, ran query A, shut down and re-opened
> squirrel, is there a way to access query A? I previously used another
> sql editor called QueryMan (I think it was an NCR product) and it
> maintained a log of every single query that was ran including the
> time, connection params, rows returned, and time taken. If squirrel
> doesn't currently have this feature, what do you believe is the
> feasibility of something like this being implemented? If its low, is
> there any way I could contribute?
SQuirreL keeps the history of SQL statements that you have executed in a
located in <user.home>/.squirrel-sql/sql_history.sql. It's not exactly
have specified, nor is it intended to be (it shouldn't contain
should add a feature request for this "audit log" feature you need here :
I'm not sure when we'll be able to implement it, but patches are always
Take a look at the ISQLExecutionListener interface in the app module.
have to be modified to give more info when a statement is executed, such
as exec time,
session (It currently only gives the SQL statement). Also, I would lean
implementing this feature as a plugin which could allow a user to
the history log resides, when to rotate it, format, etc. In the plugin
you would register as a listener to the SQLPanelAPI, which you can get a
to from using the Session method getSQLPanelAPIOfActiveSessionWindow.
Take a look at the other plugins' initialization code for reference.
This is usually
contained in the plugin "main" class which is named <plugin
plugins focus on the ObjectTreeAPI, so there may not yet exist a
that you could use. The Example plugin is pretty small and easier to
understand than the others. If you need any other pointers to get
started or help
along the way, just send an email to the developers list.