Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Is Record store unidirectional.  RSS feed

 
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,

The spec has made it clear that the Record Enumerations are bidirectional and it is further evidenced by providing methods that has such a traversal - nextRecordID() or previousRecordID()

IS the case same with record stores as well...

I doubt this as there is only a method for forward traversal - getNextRecordID() which doesnt advance the index position..
 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
getNextRecordId() just tells you the ID that will be used by the next record addition, not the id of an existing record. If you add a record after calling
getNextRecordId() addRecord() should return the same id.

There is no traverse functionality provided by RecordStore itself, RecordEnumeration must be used for that purpose.
 
Deepan Devadasan
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marques..

Your post clarified my things...

So we can only manipulate Recordstore directly, only if we no the Record ID directly or indirectly, if we are not getting the help of RecordEmuneration...

So if someone talks about any kind of traversal with RecordStores..it is gibberish?
 
I want my playground back. Here, I'll give you this tiny ad for it:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!