MCPcopy Index your code
hub / github.com/totaljs/framework / offsetDocument

Function offsetDocument

graphdb.js:1047–1051  ·  view source on GitHub ↗
(self, index)

Source from the content-addressed store, hash-verified

1045}
1046
1047function offsetDocument(self, index) {
1048 var page = Math.ceil(index / self.header.pagelimit);
1049 var offset = page * self.header.pagesize;
1050 return HEADERSIZE + offset + ((index - 1) * self.header.documentsize);
1051}
1052
1053function getIndexPage(self, offset) {
1054 return ((offset - HEADERSIZE) / (self.header.pagesize + (self.header.pagelimit * self.header.documentsize)));

Callers 10

addNodeFreeFunction · 0.85
remRelationLinkFunction · 0.85
remRelationAllFunction · 0.85
findRelationDocumentFunction · 0.85
pushRelationDocumentFunction · 0.85
updDocumentRelationFunction · 0.85
updDocumentParentFunction · 0.85
remDocumentAllFunction · 0.85
updDocumentFunction · 0.85
graphdb.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected