mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 11:49:53 -05:00
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Refactoring ### 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 Move writer util to write int32 or double ---- #### AI description (iteration 1) #### PR Classification Code cleanup #### PR Summary Refactored code to move the utility for writing int32 or double values into a common function. - Removed `WriteStatsAsIntOrDouble` function from `src/commands/coll_stats.c` and replaced its usage with `PgbsonWriterAppendInt32OrDouble`. - Added `PgbsonWriterAppendInt32OrDouble` function to `src/io/pgbson.c`. - Updated `pgbson_writer.h` to include the declaration of `PgbsonWriterAppendInt32OrDouble`.