#dominoforever | Product Ideas Portal

 

Welcome to the #dominoforever Product Ideas Forum! The place where you can submit product ideas and enhancement request. We encourage you to participate by voting on, commenting on, and creating new ideas. All new ideas will be evaluated by HCL Product Management & Engineering teams, and the next steps will be communicated. While not all submitted ideas will be executed upon, community feedback will play a key role in influencing which ideas are and when they will be implemented.

For more information and upcoming events around #dominoforever, please visit our Destination Domino Page

Add namespace property to (Notes)DominoQuery class

When working with DQL, best practice is to create/update/remove indexes programmatically using their according methods.

To avoid conflicts with existing views of the same name, all indexes created should have a prefix.


This can be achieved by using a static string.


Const prefix = "dql1_"

call dql.createIndex(prefix & "idxBySubject", arrFields)


For the sake of object oriented programming, (Notes)DominoQuery should be enhanced by a new property - "namespace"


This makes it easier to keep the maintenance of indexes consistant. Especially, if you have more than one DQL object.


Dim dql As NotesDominoQuery

Set dqlOne = db.Createdominoquery()

Set dqlTwo = db.Createdominoquery()


Set dqlOne.namespace = "dql1_"

Call dqlOne.Createindex("idxBySubject", arrFields)


Set dqlTwo.namespace = "dql2_"

Call dqlTwo.Createindex("idxBySubject", arrFields)


This would automatically create indexes

(dql1_idxbySubject)

(dql2_idxbySubject)


dqlOne.removeIndex("idxbySubject") would automatically find the correct view/index by the namespace


by Ulrich Krause

  • Guest
  • May 18 2021
  • Needs review
  • Attach files