Liking cljdoc? Tell your friends :D

ndjson-db.core


clear-all-indexes!!clj

(clear-all-indexes!!)

This should be used with care; it does as advertized!

This should be used with care; it does as advertized!
sourceraw docstring

clear-index!clj

(clear-index! {:keys [filename]})

Clear an index based on ID function and database filename

Clear an index based on ID function and database filename
sourceraw docstring

dbclj

(db {:keys [id-fn id-name id-type doc-type filename]
     :or {id-type :string}
     :as params})

Creates a database var which can be used to perform queries

Creates a database var which can be used to perform queries
sourceraw docstring

db?clj

(db? candidate)
source

get-id-fnclj

(get-id-fn {:keys [id-name id-type source-type]})
source

indexclj

source

index*clj

(index* filename idx-id)

Builds up an index of Entity IDs as keys (IDs extracted with id-fn), and as value a vector with 2 values: the start index in the text file to start read EDN for the JSON doc., and secondly the length in bytes JSON doc.

Builds up an index of Entity IDs as keys (IDs extracted with id-fn),
and as value a vector with 2 values:
the start index in the text file to start read EDN for the JSON doc.,
and secondly the length in bytes JSON doc.
sourceraw docstring

index-fnsclj

In the form {"filename1" {"9298cvoa" {index-w-first-few-ids-as-str-=-9298cvoa} "filename2" {"ao3oijf8" {index-w-first-few-ids-as-str-=-ao3oijf8}}}

In the form {"filename1"
   {"9298cvoa" {index-w-first-few-ids-as-str-=-9298cvoa}
"filename2"
   {"ao3oijf8" {index-w-first-few-ids-as-str-=-ao3oijf8}}}
sourceraw docstring

index-idclj

(index-id {:keys [id-fn filename id-name id-type] :as params})

This function generates a pseudo unique index ID for the combination of the ID function and the filename.

This function generates a pseudo unique index ID for the combination
of the ID function and the filename.
sourceraw docstring

parse-docclj

(parse-doc db doc-str)
source

qcljmultimethod

Queries a single or multiple JSON docs from the database by a single or multiple IDs matching those from the .ndjson database by id-fn.

  • returns EDN for the matching JSON document.
Queries a single or multiple JSON docs from the database by a single or
multiple IDs matching those from the `.ndjson` database by `id-fn`.
-  returns EDN for the matching JSON document.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close