bson.cr

LibBSON wrappers for crystal

bson

LibBSON wrapper for Crystal

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      bson:
        github: washu/bson.cr
    
  2. Run shards install

Usage

require "bson"

example creation of a bson document


query = [
    {"$match" => {"status" => "A"}},
    {"$group" => {"_id" => "$cust_id", "total" => {"$sum" => "$amount"}}}]
bson_query = query.to_bson

.... you now have a valid bson object to use.

Development

Contributing

  1. Fork it (https://github.com/washu/bson.cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Repository

bson.cr

Owner
Statistic
  • 2
  • 0
  • 0
  • 0
  • 0
  • over 4 years ago
  • October 8, 2019
License

MIT License

Links
Synced at

Sun, 24 Nov 2024 15:24:23 GMT

Languages