Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.

Prefix Yaml tags with !bson_ #43

Merged
merged 3 commits into from
Jan 22, 2024
Merged

Prefix Yaml tags with !bson_ #43

merged 3 commits into from
Jan 22, 2024

Conversation

GromNaN
Copy link
Member

@GromNaN GromNaN commented Jan 22, 2024

After @jmikola's comment: #37 (comment)

'binary' => new Binary(base64_decode($value)),
'bson_regex' => new Regex(...(array) $value),
'bson_long' => new Int64($value),
'bson_double' => new Decimal128($value),
Copy link
Member

Choose a reason for hiding this comment

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

If we're prefixing these with bson_, can we use the actual names for clarity?

That would be bson_int64 above, bson_decimal128 here, and bson_utcdatetime below.

Copy link
Member Author

@GromNaN GromNaN Jan 22, 2024

Choose a reason for hiding this comment

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

Are this names shared with other drivers ? The idea is also that this config files could be extracted and used by other languages to create agg builders.

Copy link
Member

Choose a reason for hiding this comment

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

These names are consistent with the BSON spec, which pre-dates any driver specs. That's the reason we chose the names when implementing ext-mongodb (vs. keeping what we originally had in ext-mongo).

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, renamed.

@GromNaN GromNaN requested a review from jmikola January 22, 2024 17:54
@GromNaN GromNaN merged commit 33dfd41 into mongodb:0.1 Jan 22, 2024
@GromNaN GromNaN deleted the yaml-tag branch January 22, 2024 18:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants