comment

open fun comment(comment: String)(source)

Specifies a user-defined message which will be associated with this information in the logs, etc.

This option exists to easily find the query in the database logs. It does not impact the behavior of the request.

Example

users.insertOne(
User("Bob", 25),
options = { comment("register user") },
)

open fun comment(comment: BsonValueWriteable)(source)

Specifies a user-defined message which will be associated with this information in the logs, etc.

This option exists to easily find the query in the database logs. It does not impact the behavior of the request.


open fun comment(comment: BsonValueWriter.() -> Unit)(source)

Specifies a user-defined message which will be associated with this information in the logs, etc.

This option exists to easily find the query in the database logs. It does not impact the behavior of the request.

Example

users.insertOne(
User("Bob", 25),
options = {
comment {
writeDocument {
writeString("request", "Register user")
writeString("name", "Bob")
}
}
},
)

open fun <T> comment(comment: T, type: KType)(source)
inline fun <T> comment(comment: T)(source)

Specifies a user-defined message which will be associated with this information in the logs, etc.

This option exists to easily find the query in the database logs. It does not impact the behavior of the request.

Example

users.insertOne(
User("Bob", 25),
options = { comment(TelemetryInformation.current) },
)