Liking cljdoc? Tell your friends :D

com.timezynk.mongo.files


delete!cljmacro

(delete! <database-file>)
(delete! <bucket> <database-file>)

Delete file in database.

ParameterDescription
bucketkeyword/string/nil The bucket name. If not set or nil use the default database bucket.
database-filestring File name to store in database.

Returns

nil.

Delete file in database.

| Parameter       | Description
| ---             | ---
| `bucket`        | `keyword/string/nil` The bucket name. If not set or `nil` use the default database bucket.
| `database-file` | `string` File name to store in database.

**Returns**

`nil`.
sourceraw docstring

download!cljmacro

(download! <database-file> <output-file>)
(download! <bucket> <database-file> <output-file> & :revision <integer>)

Download file to disk.

ParameterDescription
bucketkeyword/string/nil The bucket name. If not set or nil use the default database bucket.
database-filestring File name in database.
output-filestring/nil Disk file name. If not set or nil use database file name.
:revisionoptional integer File revision.

Returns

nil.

Download file to disk.

| Parameter       | Description
| ---             | ---
| `bucket`        | `keyword/string/nil` The bucket name. If not set or `nil` use the default database bucket.
| `database-file` | `string` File name in database.
| `output-file`   | `string/nil` Disk file name. If not set or `nil` use database file name.
| `:revision`     | `optional integer` File revision.

**Returns**

`nil`.
sourceraw docstring

drop-bucket!clj

(drop-bucket!)
(drop-bucket! bucket)
source

fetchcljmacro

(fetch <database-file>)
(fetch <bucket> <database-file> & :revision <integer>)

Fetch file to memory.

ParameterDescription
bucketkeyword/string/nil The bucket name. If not set or nil use the default database bucket.
database-filestring File name in database.
:revisionoptional integer File revision.

Returns

A byte[] with the file contents.

Fetch file to memory.

| Parameter       | Description
| ---             | ---
| `bucket`        | `keyword/string/nil` The bucket name. If not set or `nil` use the default database bucket.
| `database-file` | `string` File name in database.
| `:revision`     | `optional integer` File revision.

**Returns**

A `byte[]` with the file contents.
sourceraw docstring

infocljmacro

(info)
(info <query>)
(info <bucket>
      <query>
      &
      :collation
      <collation
      object>
      :limit <count>
      :skip <count>
      :sort {})

Fetch files information.

ParameterDescription
bucketkeyword/string/nil The bucket name. If not set or nil use the default database bucket.
querymap A standard MongoDB query.
:collationoptional collation object Collation used.
:limitoptional integer Number of documents to fetch.
:skipoptional integer Number of documents to skip before fetching.
:sortoptional map/list A map/list of sorting criteria.

Returns

A lazy sequence of matching documents.

Fetch files information.

| Parameter    | Description
| ---          | ---
| `bucket`     | `keyword/string/nil` The bucket name. If not set or `nil` use the default database bucket.
| `query`      | `map` A standard MongoDB query.
| `:collation` | `optional collation object` Collation used.
| `:limit`     | `optional integer` Number of documents to fetch.
| `:skip`      | `optional integer` Number of documents to skip before fetching.
| `:sort`      | `optional map/list` A map/list of sorting criteria.

**Returns**

A lazy sequence of matching documents.
sourceraw docstring

info-onecljmacro

(info-one)
(info-one <query>)
(info-one <bucket>
          <query>
          &
          :collation
          <collation
          object>
          :skip <count>
          :sort {})

Fetch information for a single file.

ParameterDescription
bucketkeyword/string/nil The bucket name. If not set or nil use the default database bucket.
querymap A standard MongoDB query.
:collationoptional collation object Collation used.
:skipoptional integer Number of documents to skip before fetching.
:sortoptional map/list A map/list of sorting criteria.

Returns

A lazy sequence of matching documents.

Fetch information for a single file.

| Parameter    | Description
| ---          | ---
| `bucket`     | `keyword/string/nil` The bucket name. If not set or `nil` use the default database bucket.
| `query`      | `map` A standard MongoDB query.
| `:collation` | `optional collation object` Collation used.
| `:skip`      | `optional integer` Number of documents to skip before fetching.
| `:sort`      | `optional map/list` A map/list of sorting criteria.

**Returns**

A lazy sequence of matching documents.
sourceraw docstring

insert!cljmacro

(insert! <input> <database-file>)
(insert! <bucket> <input> <database-file> & :metadata {})

Insert byte array as file.

ParameterDescription
bucketkeyword/string/nil The bucket name. If not set or nil use the default database bucket.
inputbyte[] Byte array to store.
database-filestring File name to store in database.
:metadataoptional map File metadata.

Returns

nil.

Insert byte array as file.

| Parameter       | Description
| ---             | ---
| `bucket`        | `keyword/string/nil` The bucket name. If not set or `nil` use the default database bucket.
| `input`         | `byte[]` Byte array to store.
| `database-file` | `string` File name to store in database.
| `:metadata`     | `optional map` File metadata.

**Returns**

`nil`.
sourceraw docstring

list-bucketsclj

(list-buckets)
source

modify-bucket!clj

(modify-bucket!)
source

random-filenameclj

(random-filename)

Create a random file name.

Create a random file name.
sourceraw docstring

upload!cljmacro

(upload! <input-file> <database-file>)
(upload! <bucket> <input-file> <database-file> & :metadata {})

Upload file from disk.

ParameterDescription
bucketkeyword/string/nil The bucket name. If not set or nil use the default database bucket.
input-filestring File name.
database-filestring/nil File name to store in database. If not set or nil use input file name.
:metadataoptional map File metadata.

Returns

nil.

Upload file from disk.

| Parameter       | Description
| ---             | ---
| `bucket`        | `keyword/string/nil` The bucket name. If not set or `nil` use the default database bucket.
| `input-file`    | `string` File name.
| `database-file` | `string/nil` File name to store in database. If not set or `nil` use input file name.
| `:metadata`     | `optional map` File metadata.

**Returns**

`nil`.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close