SkhcQuery.QuerySourceOperations on queries
diff q1 q2 builds a query that matches q1 minus elements matched by q2.
equal lhs rhs tests whether lhs and rhs are structurally equal, not semantically. In particular, two queries matching the same elements but are structurally different will return false.
to_string_f f query is a string representation of query using f.
to_sexp query is a s-expression representation of query using f.
to_sexp query is a s-expression representation of query. In particular, of_sexp (to_sexp query) = Some query.
of_string_keys s tries to parse s as whitespace separeted string of key string. Returns None if of_string_keys fails to parse s.
of_sexp sexp tries to parse sexp. Returns None if of_sexp fails to parse sexp.
of_sexp sexp tries to parse sexp as an S-expression of Field.t. Returns None if of_sexp fails to parse sexp.
of_strings args tries to parse args to create a query. Returns None if of_strings fails to parse sexp.
matches f query tests whether query matches according to the predicate f on a node.
val matches_musics :
Field.String.Key.t list ->
SkhcDb.MusicFile.t ->
SkhcDb.Album.t ->
(String.t * SkhcDb.Roles.t) SkhcDb.Ids.Map.t ->
SkhcMetadata.Metadata.Values.t SkhcMetadata.Metadata.Properties.t ->
Node.t t ->
boolmatches_musics substrings music album participants properties query populates fields with music, album, participants and properties and tests whether query matches.
val matches_albums :
Field.String.Key.t list ->
SkhcDb.Album.t ->
SkhcDb.Album.Stats.t ->
(string * SkhcDb.Roles.t) SkhcDb.Ids.Map.t ->
Node.t t ->
boolmatches_albums substrings album stats participants query populates fields with album, stats and participants and tests whether query matches.
matches_artists substrings artist query populates fields with artist and tests whether query matches.
val matches_metadata_subset :
SkhcMetadata.Metadata.t ->
SkhcMetadata.Metadata.t ->
(_, _, _, _, _) Field.t t ->
boolmatches_metadata_subset m1 m2 query compares fields between m1 and m2 according to query. For field returning multitple values such as artist, return true if m1 is a subset of m2.