Module: lib/mongodb

Methods

(static) connectToDatabase()

Connects to the database and returns the database object.

Connects to the database and returns the database object. Uses exponential backoff to retry the connection if it fails.

Source:

(static) getAccountsCollection()

Connects to the database and gets the users collection.

Connects to the database and gets the users collection. This collection is automatically generated by next-auth

Source:

(static) getCommentsCollection()

Connects to the database and gets the comments collection.

Connects to the database and gets the comments collection.

Source:

(static) getCompletionsCollection()

Connects to the database and gets the completions collection.

Connects to the database and gets the completions collection.

Source:

(static) getCosineSimilarityCollection()

Connects to the database and gets the cosine_similarity collection.

Connects to the database and gets the cosine_similarity collection. This collections is never read from (on this codebase), only written to. It is used to store the results of the cosine similarity score between post texts, which help evolve the platform.

Source:

(static) getDreamsCollection()

Connects to the database and gets the dreams collection.

Connects to the database and gets the dreams collection.

Source:

(static) getInboxCollection()

Connects to the database and gets the inbox collection.

Connects to the database and gets the inbox collection.

Source:

(static) getMongoClient()

Gets and resolves the MongoDB client promise.

Gets and resolves the MongoDB client promise.

Source:

(static) getStarsCollection()

Connects to the database and gets the stars collection.

Connects to the database and gets the stars collection.

Source:

(static) getUsersCollection()

Connects to the database and gets the users collection.

Connects to the database and gets the users collection. This collection is automatically generated by next-auth

Source: