DynFork::QCommons::One
Requests like find one.
Instance methods
Deletes one document. NOTE: For more details, please check the official documentation. NOTE: For more details, please check the cryomongo documentation.
Finds a single document and deletes it, returning the original. The document to return may be nil. NOTE: For more details, please check the official documentation. NOTE: For more details, please check the cryomongo documentation.
Example:
model_name : ModelName? = ModelName.find_one_and_delete({_id: id})
Find the document and convert it to a Hash object. NOTE: For more details, please check the official documentation. NOTE: For more details, please check the cryomongo documentation.
Example:
doc_hash : Hash(String, DynFork::Globals::FieldValueTypes)? = ModelName.find_one_to_hash({_id: id})
Finds the document and converts it to a Model instance. NOTE: For more details, please check the official documentation. NOTE: For more details, please check the cryomongo documentation.
Example:
model_name : ModelName? = ModelName.find_one_to_instance({_id: id})
Finds the document and converts it to a json string. NOTE: For more details, please check the official documentation. NOTE: For more details, please check the cryomongo documentation.
Example:
json_str : String? = ModelName.find_one_to_json({_id: id})