Liking cljdoc? Tell your friends :D

nd-db.core


appendclj

(append {:keys [doc-emitter log-limit] :as db} doc-or-docs)
source

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-path - Use with nippy databases. Docs can be indexed directly by path vector :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) :log-limit - Read the documents log until and including this index (for versioning)

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-path        - Use with nippy databases. Docs can be indexed directly by path vector
: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)
:log-limit      - Read the documents log until and including this index (for versioning)
sourceraw docstring

lazy-docsclj

(lazy-docs db)
(lazy-docs a b)
source

lazy-idsclj

(lazy-ids i)

Returns a lazy seq of the IDs in the index. When using index-reader, the order is guaranteed to be the same as the order in the database.

Returns a lazy seq of the IDs in the index.
When using index-reader, the order is guaranteed to be the same as the
order in the database.
sourceraw docstring

or-qclj

(or-q dbs id-or-ids)
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

zip-dbclj

(zip-db & {:as p})
source

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

× close