colrev.env.local_index_sqlite.SQLiteIndexTOC

class colrev.env.local_index_sqlite.SQLiteIndexTOC(*, reinitialize=False)[source]

Bases: SQLiteIndex

The SQLiteIndexTOC class implements indexing and retrieval of TOC items locally.

Initialize the instance.

Methods

add

Add TOC items to the index.

commit

Commit changes to the SQLITE database.

exists

Check if TOC item exists in the index.

get_toc_items

Get TOC items from the index.

Attributes

CREATE_TABLE_QUERY

INDEX_NAME

INSERT_MANY_QUERY

KEYS

SELECT_ALL_QUERY

SELECT_KEY_QUERY

connection

add(toc_to_index)[source]

Add TOC items to the index.

Return type:

None

commit()

Commit changes to the SQLITE database.

Return type:

None

exists(toc_item)[source]

Check if TOC item exists in the index.

Return type:

bool

get_toc_items(toc_key='', partial_toc_key='')[source]

Get TOC items from the index.

Return type:

list