Custom Cross Reference file SQLite Trigger

Discussion on theWord modules and other resources
psalm119
Posts: 1
Joined: Sun Jun 04, 2017 9:24 am

Custom Cross Reference file SQLite Trigger

Post by psalm119 »

Hello, I'm using a custom.xrefs.twm cross reference file with theWord for pc and MySword for Android and when I browsed the file with SQLite Expert Personal, I noticed a trigger called "xrefs_bcv". The http://theword.net/docs/tw3-book-module-spec.doc file has the following explanation on page 13:
f stand for from, t for to, b for book, c for chapter, v for verse, i for index. So:
fbi is the book index (1 through 66)
fci is the starting chapter of the book
tci is the ending chapter of the book
fvi is the starting verse of the book+starting chapter
tvi is the ending verse of the book+ending chapter
Does anyone know what the symbols "<<" mean in the trigger and what the digits "24", "16", or "8" mean? Does this trigger basically help create a faster cross reference search index?

Code: Select all

INSERT INTO [xrefs]
    ( [id], [vi1], [vi2] )
    VALUES (
	[new].[id], 
	([new].[fbi] << 24) + ([new].[fci] << 16) + ([new].[fvi] << 8) + ([new].[fspan]), 
	([new].[tbi] << 24) + ([new].[tci] << 16) + ([new].[tvi] << 8) + ([new].[tspan])
	);
Thanks in advance.
Ben
Attachments
2017-06-04 01_41_52-SQLite Expert Personal 4.2 (x64)_LI.jpg
2017-06-04 01_41_52-SQLite Expert Personal 4.2 (x64)_LI.jpg (363.33 KiB) Viewed 1565 times
RubioTerra
Posts: 732
Joined: Wed Sep 23, 2009 5:13 pm
Location: Brasília, Brazil

Re: Custom Cross Reference file SQLite Trigger

Post by RubioTerra »

Rúbio R. C. Terra
Brasília/DF - Brasil
Post Reply