Liking cljdoc? Tell your friends :D

nd-db.core


combinrclj

(combinr)
(combinr _)
(combinr acc more)
source

create-indexclj

(create-index filename id-fn)

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 input doc
  • the length in bytes input 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 input doc
- the length in bytes input doc
sourceraw docstring

dbclj

(db & _params)

Tries to read the specified pre-parsed database from filesystem. If this cannot be found, creates and persists a new one.

Params: :id-rx-str - Regular expression STRING REPRESENTATION to retrieve unique ID from the data. The second match is used as the ID. The string is used to name the serialized index. NB: Regular expressions is often much faster than parsing and inspecting data! :id-fn - For more complex parsing/indexing, you can supply a function instead of a regular expression. Only do this, if you are certain it's faster than regex! NB: Only the content of the database will be used to name the persisted index. This using different ID functions will overwrite previously persisted indices where :id-fn is also used! :id-name - Convenience parameter - if you just want to supply the name of the ID in the text based data to search for - creates a regex under the hood. Should be used with the next parameter for optimal speed. :id-type - The type of data to store as ID (key) in the index :source-type - If the source-type is different from the ID type to store in the index :index-folder - Folder to persist index in, defaults to system temp folder :index-persist? - Set to false to inhibit storing the index on disk, defaults to true. Will also inhibit the use of previously persisted indices! :filename - .ndnippy input filename (full path) :index-path - Use with .ndnippy file, docs can be index directly by path vector

Tries to read the specified pre-parsed database from filesystem.
If this cannot be found, creates and persists a new one.

Params:
:id-rx-str      - Regular expression STRING REPRESENTATION to retrieve unique ID from the data.
                  The second match is used as the ID. The string is used to name the serialized index.
                  NB: Regular expressions is often much faster than parsing and inspecting data!
:id-fn          - For more complex parsing/indexing, you can supply a function instead of
                  a regular expression. Only do this, if you are certain it's faster than regex!
                  NB: Only the content of the database will be used to name the persisted index.
                  This using different ID functions will overwrite previously persisted indices
                  where :id-fn is also used!
:id-name        - Convenience parameter - if you just want to supply the name of the ID in the text
                  based data to search for - creates a regex under the hood. Should be used with
                  the next parameter for optimal speed.
:id-type        - The type of data to store as ID (key) in the index
:source-type    - If the source-type is different from the ID type to store in the index
:index-folder   - Folder to persist index in, defaults to system temp folder
:index-persist? - Set to false to inhibit storing the index on disk, defaults to true. Will also
                  inhibit the use of previously persisted indices!
:filename       - .ndnippy input filename (full path)
:index-path     - Use with .ndnippy file, docs can be index directly by path vector
sourceraw docstring

index-idclj

(index-id & {:keys [filename id-fn]})

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 docs from the database by a single or multiple IDs matching those from the .nd* database by id-fn.

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

raw-dbclj

(raw-db {:keys [id-fn filename doc-type] :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

reducrclj

(reducr id-fn)
source

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

× close