On Sat, 2011-06-11 at 19:12 +0200, Jasmin Dizdarevic wrote:
> Attached a patch for searching objects in a database. I've added most
> of the objects, except operator-objects. I don't think that we need
> them.
I think we do. They are objects just like any others.
> non-pgsql object types (edb, slony,..) has to be added by somebody
> else - i don't have those products installed or in use.
Understandable. I face the same issues from time to time.
> I've also changed two methods in frmMain:
>
>
> 1. The node path is trimmed now.
> 2. SetCurrentNode is now more intelligent. during recursion every node
> is partially checked against the given path. if the path is wrong the
> recursion stops and the next child will be checked.objects are now
> expanded automatically as requested by the given path.
> 3. GetNodePath is public now.
>
>
> to search, right click on a database and select search object.
> clicking on a result will expand the given node.
Works with many objects' type, but doesn't work for FKey. I suppose this
is because your search the name of the fkey in the tree but fkey are
displayed in a special way.
> if the object type is not shown in tree (options) the result is grey
> and nothing happens when clicking on it.
>
>
> i will also add ability to search for a user, group, role and
> tablespace, but first i'd like to know what you think.
>
Would be good.
Your patch, at least from a user point of view (meaning I didn't check
the code), seems good. I found two issues:
* not able to find a fkey (see above)
* really bad UI (I see the combobox only partly, and the dialog is not
resizable... the latter is no big deal, I can take care of that
afterwards, but the first one makes it not commitable).
> you'll have to add the new files (frmSearchObject.h,
> frmSearchObject.cpp, frmSearchObject.xrc) to your solution, because
> I'm developing on VS 2010 and it doesn't make sense to send you the
> solution file. linux users will hopefully know, what they have to
> do ;-)
>
See patch attached for linux compatibility. Not really a hard work.
--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com