Liking cljdoc? Tell your friends :D

nd-db.core


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-readerclj

(index-reader db)

Returns a BufferedReader of the database index. Use this in a with-open block (or close it explicitly when done)!

Returns a BufferedReader of the database index.
Use this in a with-open block (or close it explicitly when done)!
sourceraw docstring

lazy-docscljmultimethod

source

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

warn-legacyclj

(warn-legacy)
source

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

× close