Whole DB code search

I’d like to know if someone knows a program (or maybe a Notes’ features) that let you search a string, like a function name, to find it everywhere it has been used, regardless the type of code used (@formula, lotusscript…)

Right now, they’ve been a mistake done several times in the DB I’m working on and I must find every call to a certain function. This would really accelerate the job.

Thank you for the responses!

Subject: Whole DB code search

http://code.google.com/p/inspect-nsf/

Subject: Whole DB code search

Teamstudio Configurator. (Or you could export all design notes as DXL and do a simple text search on the resulting file.)

Subject: RE: Whole DB code search

Or you can use the Design Synopsis and search the result page, or copy it as a new document and search it programmatically.

Subject: RE: Whole DB code search

With the DXL, though, you can make the changes in situ and re-import, then you’re done. Same deal with Configurator (unfortunately costs money) – you can do a simple search & replace or edit during the search. Not that Synopsis is bad or anything, but it’s not a single procedure to find and fix the problem code.

Subject: RE: Whole DB code search

Thank you for the help! I think the synopsis should do the job. I work for a big company and they don’t really like cracked software, so the free solution will be perfect for me =).

Subject: RE: Whole DB code search

Do you need to make some DXL export agent in LS for that, or is there some built-in functionality which I have overlooked completely?I admit that I haven’t looked much into Notes’ XML features, because I don’t agree with the current XML standard - it should also support dynamic and missing tags, like Notes does with documents’ fields, like IE does with html code, and like humans do with partial information to survive in life in the name of evolution! :slight_smile:

Subject: RE: Whole DB code search

??? XML document structure is defined in a DTD or Schema, and the only requirements are:

  1. The <?xml version=....?> header must appear as the first line;

  2. Any tagged element be closed, either as a container (e.g. data goes here) or standalone (e.g. ); and

  3. Nesting order be maintained (e.g. data is allowed, data is not allowed).

Apart from that, it’s the DTD/Schema that determines which elements are required and which are optional. When you import documents into Notes, you only need to use the fields (items) you need to use – just like creating a document and setting field values in the back-end in LotusScript or Java. If you want to throw fields onto a document that don’t appear on the form, then go for it. No restrictions, as long as you use a well-formed tag.

As for the export – yes, it takes an agent. To export the entire design of a database, the agent looks like this:

Dim s As New NotesSession

Dim thisDb As NotesDatabase

Set thisDb = s.CurrentDatabase

Dim nc As NotesNoteCollection

Set nc = thisDb.CreateNoteCollection(False)

Call nc.SelectAllDesignElements(True)

Call nc.BuildCollection

Dim exporter As NotesDXLExporter

Set exporter = s.CreateDXLExporter

Dim stream As NotesStream

Set exporter = s.CreateStream

Call stream.Open(“C:\temp\filename.dxl”)

Call exporter.SetInput(nc)

Call exporter.SetOutput(stream)

Call exporter.Process

The import is similarly simple. Create the stream and opn the file, create a dxl importer and set the stream as input and the database as output. You just need to remember to set the design import options to DXLIMPORTOPTION_REPLACE_ELSE_CREATE.

Subject: RE: Whole DB code search

Ah, so DXL is an improved XML according to Domino standards, or something like that:http://searchdomino.techtarget.com/sDefinition/0,,sid4_gci523529,00.html

That’s pretty cool, I always thought I was stuck with the stiffy XML standard, which was designed for 1960 style database servers like Oracle, DB/2, dBase, MySQL, etc… :slight_smile:

Your LS agent seems pretty effective, and the good thing you can do the full export of a database design automatically, I like that.

Subject: RE: Whole DB code search

Watch it, Mika – once you start using DXL, it’s like a drug. It’s not always the right answer, but it can start to seem that way once you’ve seen what you can do with it.

Subject: RE: Whole DB code search

I agree with Stan - it’s pretty powerful stuff and fairly addictive.

Just be certain you test everything you want to use… not everything that’s exportable is importable, and even though some stuff is supposed to be importable according to the DTD, it may not actually work in-practice.

Subject: RE: Whole DB code search

Mika, I think you’re seriously confused on what XML is all about. It’s eXtensible Markup Language, so it’s really just a way to express anything you want in a common syntax, with the ability to transform it according to a set of rules.

Think of it as a way to turn ANY data structure into something that can be expressed in text.

And if you get into working with it at all, it becomes apparent pretty quickly why close tags are enforced.

Subject: RE: Whole DB code search

Yes it’s “Extensible”, but is it also “Collapsible” ? :slight_smile:

For example, I have an XML file which contains only this:

JohnBlue</>34.2</></>

JaneGreen</>158</></>

</>

I think most XML parsers would complain that the header and DTD is missing and also named closing tags, but if you make your own XML parser it could easily import that file as a 2 notes documents. Or maybe that’s not XML at all, but just my crazy idea how to make a more effective structured text file than flat files or CSV files, with fields and field names.

Subject: RE: Whole DB code search

The entire point of XML is that, because the syntax is consistent and universal, ANY parser can deal with it.

I suppose you could make your own version of HTML, too, but it may or may not work with all browsers. What would be the point?

Subject: RE: Whole DB code search

The point is to have an formatted text file which is as compact as possible, and as easy as possible for humans to read/write too.The next step would be to make an database engine which can directly use that format as a database, so there would be no need to import or export anything anymore. There could be also an converter which converts this format as verified XML or vice versa.

Subject: RE: Whole DB code search

RIIIIIIGHT.

Well, good luck with that. I think I’ll continue using the remarkably flexible and widely accepted standard.

(Interestingly, all you did was describe some arbitrary way of storing data that you’d also write a custom database engine to handle, which would then import/export to XML. In other words, that’s not a data interchange standard. That’s just a new application.)

Subject: DDSearch for IBM Lotus Domino Designer 6

DDSearch 2.10 for IBM Lotus Domino Designer 6 http://www-10.lotus.com/ldd/sandbox.nsf/ecc552f1ab6e46e4852568a90055c4cd/f090b24ea76b1c0100256c45003e6396?OpenDocument