8. Key/value lookups

    8. Key/value lookups

    In addition to timeseries operations, QuasarDB also provides a key/value database under the hood. This chapter shows some examples on how to interact with key/value records directly.

    8.1. Examples

    Find all key/value entries that have the tag “stocks”:

    FIND(tag='stocks')
    

    Find all timeseries that have the tag “stocks”:

    FIND(tag='stocks' AND type=ts)
    

    Find all entries that have the tags “stocks”, “euro”, “industry”:

    FIND(tag='stocks' AND tag='euro' AND tag='industry')
    

    Find all entries that have the tags “stocks”, “euro”, “industry” but not “germany”:

    FIND(tag='stocks' AND tag='euro' AND tag='industry' AND NOT tag='germany')
    

    Find all entries that have the tags “stocks”, “euro”, “industry” but not “germany”, and are a time series:

    FIND(tag='stocks' AND tag='euro' AND tag='industry' AND NOT tag='germany' AND type=ts)
    

    Find all entries that have the tag “stocks”, then for each tag <Y> found add the results from FIND(tag='<Y>', RECURSIVE=TRUE):

    FIND(tag='stocks', RECURSIVE=TRUE)