Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RCPP-61 Add BSON support #151

Merged
merged 16 commits into from
Mar 25, 2024
Merged

RCPP-61 Add BSON support #151

merged 16 commits into from
Mar 25, 2024

Conversation

leemaguire
Copy link
Contributor

@leemaguire leemaguire commented Jan 18, 2024

This PR adds back BSON functionality by bridging the BSON classes found in RealmCore.
usage:

        auto bson = realm::bsoncxx();

        bson = realm::bsoncxx((int32_t) 123);

        bson = realm::bsoncxx((int64_t) 123);

        bson = realm::bsoncxx(true);

        bson = realm::bsoncxx(123.456);

        bson = realm::bsoncxx(std::string("foo"));

        bson = realm::bsoncxx(std::vector<uint8_t>({0, 0, 0, 0}));

        bson = realm::bsoncxx(realm::bsoncxx::timestamp(100, 0));

        auto d = std::chrono::system_clock::now();
        bson = realm::bsoncxx(realm::bsoncxx::date(d));

        auto oid = realm::object_id::generate();
        bson = realm::bsoncxx(oid);

        bson = realm::bsoncxx(realm::decimal128(123.456));

        bson = realm::bsoncxx(realm::bsoncxx::regular_expression("[0-9]", "i"));

        bson = realm::bsoncxx(realm::bsoncxx::max_key());

        bson = realm::bsoncxx(realm::bsoncxx::min_key());

        bson = realm::bsoncxx(realm::bsoncxx::document({{"name", "foo"}}));

        bson = realm::bsoncxx(std::vector<realm::bsoncxx>({{"one", 123, true}}));

        bson = realm::bsoncxx(realm::uuid());    

@leemaguire leemaguire self-assigned this Jan 18, 2024
@leemaguire leemaguire marked this pull request as ready for review January 22, 2024 10:53
@leemaguire leemaguire force-pushed the lm/bson branch 2 times, most recently from 3ae49e6 to ff5e1d9 Compare March 22, 2024 15:40
@leemaguire leemaguire changed the title Add BSON support RCPP-61 Add BSON support Mar 25, 2024
@leemaguire leemaguire merged commit 7f91ab8 into main Mar 25, 2024
49 of 59 checks passed
@leemaguire leemaguire deleted the lm/bson branch March 25, 2024 13:46
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 24, 2024
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