NavMethodsForIndexedProperties


Follow
0
Star
0
Details
Version history
Issues
This application is not supported by InterSystems Corporation. Use it at your own risk.
Navigation methods for InterSystems Objects Indexed properties

Navigation methods for InterSystems Objects Indexed properties

The project creates auto-generated methods for non-unique indices.

Creates the following methods:

  • IndexNameOpen(val)
  • IndexNameFirst(val)
  • IndexNameLast(val)
  • IndexNameNext(val)
  • IndexNamePrevious(val)

Examples

  • set person = ##class(samples.Person).NameIndexOpen("Daniel")
  • SET person = person.NameIndexFirst("Daniel")
  • SET person = person.NameIndexLast("Daniel")
  • SET person = person.NameIndexNext("Daniel")
  • SET person = person.NameIndexPrevious("Daniel")
set person = ##class(samples.Person).PhoneIndexOpen("880-555-4323")
While $IsObject(person) {
    write !, person.Name
    set person = person.PhoneIndexNext("880-555-4323")
}

Install:

  1. USER> zpm
  2. zpm: USER>install bondar-nav
  3. Add to persistent classes Extends bondar.indexnav.IndexNav

Example:

Class samples.Person Extends (%Persistent, bondar.indexnav.IndexNav, %Populate)
  1. Compile the project
ZPM installation
zpm "install bondar-nav"
Category
Developer Environment
Works with
CachéEnsembleInterSystems IRISInterSystems IRIS for Health
Tags
Info
Author
Version
1.0.1
Last updated
2020-07-06
Repository
Open
Documentation
Open
License
Link