Sha256: d685739aa85aca3b6cecb725c25f982cdf01e7440b452dba94799b2890351df0

Contents?: true

Size: 1.24 KB

Versions: 4

Compression:

Stored size: 1.24 KB

Contents

require 'notesgrip'

ns = Notesgrip::NotesSession.new
db = ns.database("technotes", "names.nsf")

view = db.view("People")
p view
p view.Aliases

# Column
view.each_column {|column|
  p column
}

# ViewEntry
view.each_entry {|entry|
  p entry
}

# ViewNavigator
viewNav = view.CreateViewNav()
p viewNav

# FTSearch
match_count = view.FTSearch("miwa_dankichi.tech-notes.dyndns.org")
puts "match_count = #{match_count}"
puts "After FTSearch, view.size = #{view.size}"
view.each_document {|doc|
  p doc
}
view.clear
puts "After clear, view.size = #{view.size}"

# GetAllDocumentsByKey
docList = view.GetAllDocumentsByKey(["Administrator"], false)
puts "docList.size = #{docList.size}"
docList.each {|doc|
  p doc
}

# GetAllEntriesByKey
entryList = view.GetAllEntriesByKey(["Administrator"], false)
puts "entryList.size = #{entryList.size}"
entryList.each {|entry|
  p entry
}

# GetAllReadEntries
entryList = view.GetAllReadEntries()
puts "GetAllReadEntries, entryList.size = #{entryList.size}"

# GetDocumentByKey
doc = view.GetDocumentByKey(["Administrator"])
p doc

# GetEntryByKey
entry = view.GetEntryByKey(["Administrator"])
p entry

# GetNthDocument
doc = view.GetNthDocument(2)
p doc['FullName']

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
notesgrip-0.0.8 Sample/sample_NotesView.rb
notesgrip-0.0.7 Sample/sample_NotesView.rb
notesgrip-0.0.5 Sample/sample_NotesView.rb
notesgrip-0.0.4 Sample/sample_NotesView.rb