mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 19:59:54 -05:00
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Docs ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) No ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md)) ### Description This PR includes updates to add base Doxygen comments within SQL files, setting up initial documentation structure for functions. Additionally, it includes Doxygen configuration files (Doxyfile, etc.) tailored to support SQL file parsing and documentation generation. ---- #### AI description (iteration 1) #### PR Classification Documentation #### PR Summary This pull request adds Doxygen comments to various `helio_api` functions to improve code documentation. - Added Doxygen comments to functions in `sql/udfs/commands_crud/query_cursors_single_page--latest.sql` - Added Doxygen comments to functions in `sql/udfs/utils/extension_version_utils--latest.sql` - Added Doxygen comments to functions in `sql/udfs/auth/auth_scram--latest.sql` - Added Doxygen comments to functions in `sql/udfs/commands_crud/delete--latest.sql` - Added Doxygen comments to functions in `sql/udfs/schema_mgmt/create_collection_view--latest.sql`
32 lines
1.2 KiB
SQL
32 lines
1.2 KiB
SQL
/*
|
|
* __API_SCHEMA_V2__.update_user processes a Mongo wire protocol updateUser command.
|
|
*/
|
|
/**
|
|
* @ingroup users
|
|
* @brief Updates an existing user in the DocumentDB system.
|
|
*
|
|
* @details This function modifies a user's details based on the provided BSON specification.
|
|
* The specification should include the user identifier and the fields to update,
|
|
* such as roles, permissions, or profile information.
|
|
*
|
|
* **Usage Examples:**
|
|
* - Update a user:
|
|
* ```sql
|
|
* SELECT documentdb_api.update_user('{"updateUser":"test_user"}');
|
|
* -- Returns:
|
|
* -- { "ok" : { "$numberDouble" : "1.0" } }
|
|
* ```
|
|
*
|
|
|
|
* @param[in] p_spec BSON object containing the user update specification. Must include the "updateUser" field specifying the username and at least one field to update such as "roles", "pwd", or "customData".
|
|
*
|
|
* @return A BSON object representing the result of the user update operation, including fields such as:
|
|
* - `ok`: Indicates the success status of the operation.
|
|
*/
|
|
CREATE OR REPLACE FUNCTION __API_SCHEMA_V2__.update_user(
|
|
p_spec __CORE_SCHEMA_V2__.bson)
|
|
RETURNS __CORE_SCHEMA_V2__.bson
|
|
LANGUAGE C
|
|
VOLATILE
|
|
AS 'MODULE_PATHNAME', __CONCAT_NAME_FUNCTION__($$, __EXTENSION_OBJECT_PREFIX_V2__, _extension_update_user$$);
|