Learn R Programming

MetamapsDB (version 0.0.2)

index: Indexes the database for faster retrieval

Description

`index` indexes nodes based on the given property. Lets you do fast search for a node using a property field.

Usage

index(label, property = "contig", cacheEnv)

Arguments

label

label of the nodes you want to index

property

the property key on which you would like to index on

cacheEnv

stores details

Examples

Run this code
# NOT RUN {
f = future({
    dbquery(query="CREATE INDEX ON :contigs(contig)", justPost = TRUE)
    dbquery(query="CREATE INDEX ON :contigs(bin)", justPost = TRUE)
    dbquery(query="CREATE INDEX ON :Taxon(taxid)", justPost = TRUE)
    dbquery(query="CREATE INDEX ON :cpd(cpd)", justPost = TRUE)
    message
}) %plan% multiprocess
# }

Run the code above in your browser using DataLab