Skip to content

feat(database/gdb): Add the function of obtaining all configurations to facilitate business operations such as verification after addition.#4389

Merged
hailaz merged 12 commits intogogf:masterfrom
sxp20008:master
Sep 18, 2025

Conversation

@sxp20008
Copy link
Contributor

@sxp20008 sxp20008 commented Aug 27, 2025

…ss operations such as verification after addition.

sxp20008 and others added 2 commits August 27, 2025 21:13
…ss operations such as verification after addition.

Signed-off-by: sxp20008 <81209245@qq.com>
@houseme houseme requested review from Copilot and hailaz August 29, 2025 02:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new function GetAllConfig() to the GDB database package that allows retrieval of all configuration nodes. This facilitates business operations such as verification after adding configurations through AddConfigNode().

  • Adds GetAllConfig() function to return all database configurations
  • Includes example code demonstrating the new function's usage
  • Provides thread-safe access to the global configuration map

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
database/gdb/gdb_core_config.go Implements the new GetAllConfig() function with proper locking
database/gdb/gdb_z_example_test.go Adds example demonstrating GetAllConfig() usage and imports fmt package

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@houseme houseme requested a review from Copilot September 18, 2025 00:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@houseme houseme requested review from Copilot and gqcn September 18, 2025 03:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

houseme and others added 3 commits September 18, 2025 12:55
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…le function

- Created a new test file `gdb_z_core_config_test.go` to implement unit tests for various methods in the Core struct, including GetDebug, SetDebug, GetDryRun, SetDryRun, GetLogger, SetLogger, SetMaxConnections, GetCache, GetGroup, and GetPrefix.
- Removed the unused example function `ExampleGetAllConfig` from `gdb_z_example_test.go` to clean up the codebase.
@hailaz hailaz changed the title Add the function of obtaining all configurations to facilitate business operations such as verification after addition. feat(database/gdb): Add the function of obtaining all configurations to facilitate business operations such as verification after addition. Sep 18, 2025
@hailaz hailaz merged commit edc96a8 into gogf:master Sep 18, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants