sql atk4 orm dal query-builder mysql mongodb php agile Reactive MongoDB Driver for Scala and Java 8 filter arrays using mongodb queries. In MongoDB, we can manually insert a document into a collection in the selected database using db. In this chapter, we will learn how to query document from MongoDB collection. Writing Complex MongoDB Queries Using QueryBuilder MongoDB provides a lot of query selectors for filtering documents from a collection. In this blog I will demonstrate how to get start with MongoDB Java Driver with examples on how to execute some common queries to the database. MongoCollection. Earlier we learned how to install MongoDB in Unix machines and executed some commands from terminal. Aggregation Editor - Studio 3T's aggregation pipeline builder. If we understand the basics, we can build up simple to complex queries. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Mongodb JDBC Driver from DbSchema About JDBC Drivers. Let's look at some more complicated queries now. We’ve added Query Code – the Studio 3T feature that lets you automatically translate MongoDB and SQL queries to JavaScript, Python, Java, C#, PHP and the mongo shell language – to Aggregation Editor, which means you can now do the same with MongoDB aggregate queries. MongoDB stores data in flexible, JSON-like documents, meaning fields can vary from document to document and data structure can be changed over time The document model maps to the objects in your application code, making data easy to work with Ad hoc queries, indexing, and real time aggregation provide powerful ways to access and analyze your data. There could be multiple elements in the Events (array) whose action equals to updated. Rapidly create and deploy powerful Java applications that integrate with MongoDB document databases. The aggregation mechanism in MongoDb provides not only search functions such as FindOne, FindAll etc. MongoDB, data is stored in JSON-like documents that can have varied structures. Previously, we saw how mongodb insert query can be used for inserting documents. Features integrated visual query builder, query editor, relational data browse, random data generator, HTML5 documentation and more. The find() Method. MongoDB Manual - How to query an array: query on the array field as a whole, check if element in array, query for array element, query if field in array, query by array size. With MongoDB 3. This query can be also be constructed with an implicit AND operation by combining the operator expressions for the price field. Each of these approaches is described in following. A record in MongoDB is a document, which is a data structure composed of field and value pairs. insert() method. springframework. Free version is available. In this guide, you will: read data from the inventory collection with MongoDB's comparison operators. 2 comes with query code generator that allows users to translate MongoDB queries (find, aggregate or SQL query) to various target languages: MongoDB Shell, JavaScript (Node. Consider below data present in student_marks collection. 2, use the 2. Match All Query; Full text. This is intuitive approach, but queries defined in such a way are quite hard to read and maintain. It is generally used for getting quick results from multiple dimensions and fact tables. Connect to MongoDB from Java - In this MongoDB Tutorial, we shall learn to connect to MongoDB from Java Application. This allows a hybridization of JPQL and SQL, giving the advantages of both in the same query. The following java examples will help you to understand the usage of com. You can read more about LINQ support in the driver here. getName(), which returns the package qualified name of the class. Lucene Core, our flagship sub-project, provides Java-based indexing and search technology, as well as spellchecking, hit highlighting and advanced analysis/tokenization capabilities. DBHawk is an intuitive web-based MongoDB IDE, which allows browsing, query full databases, and documents using a web browser. It reuses Hibernate ORM’s object life cycle management and (de)hydration engine but persists entities into a NoSQL store (key/value, document, column-oriented, etc) instead of a relational database. It allows for in-place data editing, and features a drag and drop search query builder. Following up solutions to Querying Mongo Collection using QueryBuilder in Mongo 3. Author: MongoDB Documentation Team. You can use it to create queries without writing even a single line of code!. , read concern); however, if you are currently on a version 2. The following is a screen shot of the MongoDB query builder tool. Indexes in the MongoDb driver. In this blog I will demonstrate how to get start with MongoDB Java Driver with examples on how to execute some common queries to the database. You will notice similarities to the JDBC support in the Spring Framework. The SQL operator allows for any SQL to be embedded in the JPQL query. MongoDB, data is stored in JSON-like documents that can have varied structures. There are drivers available for practically all the major programming languages including C#, Java, NodeJS, Go. Hibernate provide option to execute native SQL queries through the use of SQLQuery object. Azure Cosmos DB provides five APIs: Core (SQL) and MongoDB for document data, Gremlin for graph data, Azure Table, and Cassandra. TheMongoDB Atlas Data Lakeextends the power and. MongoVUE - MongoVUE is an innovative MongoDB desktop application for Windows OS that gives you an elegant and highly usable GUI interface to work with MongoDB. Mongodb java Query Builder. The inbuilt visual query builder helps create tp statements, even if you don't have knowledge about shell commands and its syntaxes. Hello guys, While playing around with MongoDB in Java I sort of created a QueryBuilder class that might be useful to somebody out there. Ask Question 1. Spring is a popular open source framework and container for Java applications. x driver API), Python, C#, and the mongo shell language. […] Vote Up 0 Vote Down Reply. I want to implement a query builder for new lookup stage in 3. Java MongoDB Tutorials […] Java MongoDB : Query document Example to use collection. Deep query-ability. It also supports in place editing. Includes PreparedStatement Editor, Query Builder, SQL Code Generator, CSV Export, Database Navigator w/ regex filtering, Sql Diff & more. It allows users to execute JavaScript commands. In this tutorial, I am listing 4 ways you can utilize to insert or add document(s) into a collection in MongoDB. Mongodb java Query Builder. Currently, you must create a separate account for each API. Once you do this, navigate to the database tables and views on the left hand pane and use the Query Builder to create queries. Executing a Query. The list of alternatives was updated Mar 2019. Hello , I recently installed hdp-2. The new kid on the block, called MongoDB is a scalable, high-performance, open source, schema free and document oriented database that focuses on the ideas of NoSQL Approach. Maven is not required but simplifies some of the steps. Create Service method with map as arguments having keyvalue pair for search engine parameters. The Doctrine Project is an open-source PHP project that is home to home to several PHP libraries primarily focused on database storage and object mapping. findAll(Object. The inbuilt visual query builder helps create tp statements, even if you don't have knowledge about shell commands and its syntaxes. This article explores the Java NoSQL relation from the perspective of MongoDB and tries to provide some ground up information in a concise manner before going hands on in Java. Next, you may wish to take a look at the MongoDB Manual for a language independent look at how to use MongoDB. Is WebFlowConversation in the default package? If not, the package name being in the query would cause a problem. In this blog we show how you can use MongoDB with ASP. You can vote up the examples you like. Before you start using MongoDB in your Java programs, you need to make sure that you have MongoDB JDBC driver and Java set up on the machine. Because one of our community members asked me on the Hibernate forum about this topic, I decided it is a good. If you are familiar with the core MongoDB console find() command, just put the “raw” query inside the BasicQuery. The API determines the type of account to create. Your votes will be used in our system to get more good examples. Comes with a visual query builder; Allows you to create new SQL queries through drag and drop. The pretty. For new users, it's important to provide an overview of how to work with the MongoDB Java driver and how to use MongoDB as a Java developer. You will also learn how to use simple and prepared statements, stored procedures and perform transactions. […] Vote Up 0 Vote Down Reply. Select the desired MongoDB deployment. The queries in this article use the following sample document. _id is the name of the field as stored in the database (normally the name of the field in the database is exactly the same as the name of the field or property in your domain class, but Id is an exception and is mapped to _id in the database). The old query builder will be removed in 2. /**Use the given primary to read the oplog. groovy) and place the Java driver in the same directory. Pull requests 9. Contribute to itfsw/QueryBuilder development by creating an account on GitHub. Queries are Not Promises Mongoose queries are not promises. Yes, Changes made to data in MongoDB shell are permanent but for configuration parameters, they will last only till next restart of instance if they are not specified in config file. MongoDB returns a query result in batches, and the batch size will not exceed the maximum size of a BSON document. The MongoDB palette is added to TIBCO Business Studio™ for BusinessWorks™ after installing TIBCO ActiveMatrix BusinessWorks Plug-in for MongoDB. At the present time, the internet is loaded with big data, big users, big complexity etc. Is WebFlowConversation in the default package? If not, the package name being in the query would cause a problem. combine query criteria to make compound queries; Time required: 30 minutes. response time 288828 ms or more [mongodb-user] [Java Driver] Very slow response from Slave with network partition [mongodb-user] And query document based on the. This is why you always have to convert a querybuilder instance into a Query object:. springframework. As such, applications running with 3. You can build parameterized queries or browse data from linked tables through a foreign key. find method in the MongoDB Java Reactive Streams Driver. Percona TokuMX is an open source, drop-in replacement for MongoDB that improves performance and operational efficiency. An intro to Studio 3T, a MongoDB IDE The growing third-party market is a key indication that MongoDB has moved from mere maturity to one of the dominant players in this market. So – why a query language? Because. queryBuilder ('getMongo');. QueryBuilder. We provide a "template" as a high-level abstraction for storing and querying documents. In the first two articles of this series, we built the same search/filtering functionality using JPA Criteria and Spring Data JPA Specifications. The queries in this article use the following sample document. The solution is a blend of DataTables and MongoDB driver, DataTables is used on client side, it handle's display grid data and provider searching and ordering UI feature and send user search query to the server. Parameters: x - the x coordinate of the first box corner. Let's try here. In this blog we show how you can use MongoDB with ASP. Spring Data JPA provides three different approaches for creating custom queries with query methods. MySQL Database Query Tool Features. Let’s look at some more complicated queries now. Each builder has a generic type parameter of TDocument which represents the type of document with which you are working with. Tapestry is a powerful, open-source, all-Java framework for creating leading edge web applications in Java. The following code examples are extracted from open source projects. The MongoDB JDBC Driver enables users to connect with live MongoDB data, directly from any applications that support JDBC connectivity. THE unique Spring Security education if you’re working with Java today. getName(), which returns the package qualified name of the class. Usually they are provided by the same company which implemented the Mongodb software. The API determines the type of account to create. For example, this query can be written as:. For example query hints or the CONNECT keyword in Oracle Database. The Spring Data MongoDB project applies core Spring concepts to the development of solutions that use the MongoDB document style data store. Today, I'm happy to say that jOOQ is the product that I was wishing for when I started to really understand SQL. Builder applicationName(java. Find published spring tutorials, REST API tutorials, Build, Logging and Unit test tutorials. Structure of a single object is clear. The MJORM project is an annotation free MongoDB Java ORM library. Continuous Query With Spring Data Reactive MongoDB On this blog post, we will take a look how to implement Continuous Queries in MongoDB. We talk about the problems it solves, the tradeoffs it makes, and its architecture under the hood. MongoDB returns a query result in batches, and the batch size will not exceed the maximum size of a BSON document. Use the third-party devextreme-query-mongodb extension to query data from MongoDB. 6 sandbox in vmawre ! I runned some job with spark to transform csv data and I saved them in mongodb Now I want to visualise some charts dashboard from my Mongodb data base so I added mongodb interpreter to zeeplin but it seems mongodb not good since I have a collection that contain 2 GB so I decide to work with spark ! how can I read data from. The pretty. NoSQLBooster for MongoDB 4. Parameters: x - the x coordinate of the first box corner. 2 comes with query code generator that allows users to translate MongoDB queries (find, aggregate or SQL query) to various target languages: MongoDB Shell, JavaScript (Node. In the first two articles of this series, we built the same search/filtering functionality using JPA Criteria and Spring Data JPA Specifications. Join GitHub today. Download java sql query builder Free Java Code Description. package com. /**Use the given primary to read the oplog. If you are familiar with any relational databases, such as an RDBMS package, what a record is to relational database, a document is to MongoDB. Right-click on the connection node and select New Query Builder as shown in Figure 17. Mongodb JAVA Driver: QueryBuilder class Nov 11 by dpancs I was recently assigned a task where I had to convert a SQL like where clause query into Mongo query on the fly. QueryBuilder. New Query Builder. Consider below code. Currently, you must create a separate account for each API. Writing Complex MongoDB Queries Using QueryBuilder MongoDB provides a lot of query selectors for filtering documents from a collection. The MongoDB JDBC Driver enables users to connect with live MongoDB data, directly from any applications that support JDBC connectivity. * * @param primary the connection to the replica set's primary node; may not be null */ protected void readOplog(MongoClient primary. Feed Builder What's new If you need to analyze MongoDB, MarkLogic and CouchDB queries in Java caller object or even the entire Java file: com. Java JDBC FAQ: Can you share an example of a SQL SELECT query using the standard JDBC syntax? In my JDBC connection article I showed how to connect your Java applications to standard SQL databases like MySQL, SQL Server, Oracle, SQLite, and others using JDBC. Rapidly create and deploy powerful Java applications that integrate with MongoDB document databases. Aggregation Editor - Studio 3T's aggregation pipeline builder. Classes, Interfaces and Annotations Builders Constuctor methods With-copy methods equals, toString, hashCode methods Default attributes Derived attributes Lazy attributes Optional attributes Array, List, Set and Map attributes Singleton values Instance interning hashCode precomputing JSON serialization JAX-RS integration MongoDB integration Query DSL. So basically every time I want to query on the same field with different criteria I have to use the builder right? good to know! Where did you find this? is there any documentation I'm not aware of? (since the mongodb official java tutorial is quite poor!) – Guillaume Jul 27 '11 at 22:27 1 @Guillaume Not exactly. The API determines the type of account to create. You can vote up the examples you like. For example, this query can be written as:. Unified Queries for Java. Your votes will be used in our system to get more good examples. A record in MongoDB is a document, which is a data structure composed of field and value pairs. MongoDB is the most popular and open source NoSQL database. The result is displayed as a nested table structure. x2 - the x coordinate of the second box corner. Java Code Examples for org. Builder modifiedAlertConditions = ImmutableSet. Programmatically MongoDB data is accessed via an extensive list of MongoDB drivers. Include query-builder. Tapestry is a powerful, open-source, all-Java framework for creating leading edge web applications in Java. Here's a list of some of the best MongoDB GUIs: 1. Java JDBC FAQ: Can you share an example of a SQL SELECT query using the standard JDBC syntax? In my JDBC connection article I showed how to connect your Java applications to standard SQL databases like MySQL, SQL Server, Oracle, SQLite, and others using JDBC. Writing complex queries for MongoDB in Java can be tricky sometimes. It's possible to update the information on DbSchema or report it as discontinued, duplicated or spam. Use Java Persistence Query Language Query Parameterization in order to prevent injection. The maximum document size helps ensure that a single document cannot use excessive amount of RAM or, during transmission, excessive amount of bandwidth. You can vote up the examples you like. Java: safe character handling and URL building This post discusses HTTP URLs in Java and how to avoid data loss due to encoding/escaping issues. emptyMap() Search for entities using the given query: static java. The right way to connect to MongoDB from a Java EE App. THE unique Spring Security education if you're working with Java today. The examples on this page use these. The MySQL database query tool features provided by RazorSQL include a custom MySQL database browser tailored to MySQL, a MySQL SQL editor with MySQL specific features and syntax highlighting, custom MySQL visual tools, MySQL specific database administration tools, import and export tools, a query builder, a table editor, and more. Posts about Java written by marcioalexandre. A Java SQL query builder based loosely on the query builder included with the CodeIgniter framework. The pipeline builder provides an easy way to export your pipeline to execute in a driver. One of the more common. For developer from SQL background, we. This article shows how to connect to MongoDB data and execute queries from the Database Painter and controls such as the DataWindow. x2 - the x coordinate of the second box corner. 1 and found none but Stackoverflow threads and API helps me to come up with small example to cover both Twitter and MongoDB to store these tweets and I decided to share with my circle and readers of this blog. Using installed MongoDB. Consider below code. MongoDB keeps all of the most recently used data in RAM. It can solve problems that are considered difficult, if not impossible, for aging RDBMS technologies. The Spring Data MongoDB project applies core Spring concepts to the development of solutions that use the MongoDB document style data store. We learned aggregation queries and its bit easier while writing in to the mongo shell because initially we learned it via shell. css in your page head and query-builder. The solution is a blend of DataTables and MongoDB driver, DataTables is used on client side, it handle's display grid data and provider searching and ordering UI feature and send user search query to the server. 2, which provides update-in-place, fluent query builder, ES6 syntax support and true Intellisense experience. DBHawk is an intuitive web-based MongoDB IDE, which allows browsing, query full databases, and documents using a web browser. That is good for looking at a single field of a document but what about nested fields? Consider a document in the next code block's comments. What is better Active Query Builder or Heroku Enterprise? To ensure that you find the most effective and productive IT Management Software for your business, you need to compare products available on the market. With [NoSQLBooster for MongoDB](MongoDB Admin GUI Tool), you can run SQL SELECT Query against MongoDB. Tapestry is an alternative to scripting environments such as JavaServer Pages or Velocity. The article gives you a glance at the practical aspects of NoSQL when implemented in MongoDB and Java. It is intended for analytics and related work, but can be used in any context where the user wishes to quickly load one or more fields into arrays. Filters helper methods to facilitate the creation of filter documents. 2 comes with query code generator that allows users to translate MongoDB queries (find, aggregate or SQL query) to various target languages: MongoDB Shell, JavaScript (Node. MongoCollection. The Atlas aggregation pipeline builder is primarily designed for building pipelines, rather than executing them. In this section we shall query the MongoDB collection catalo g with the Query Builder. Select the desired MongoDB deployment. Mongodb JAVA Driver: QueryBuilder class Nov 11 by dpancs I was recently assigned a task where I had to convert a SQL like where clause query into Mongo query on the fly. How can I build this mongo query in java. Programmatically MongoDB data is accessed via an extensive list of MongoDB drivers. If you are familiar with the core MongoDB console find() command, just put the “raw” query inside the BasicQuery. You can vote up the examples you like and your votes will be used in our system to generate more good examples. In this post, we will show you how to ensure that aggregation pipelines are executed on the secondary both from the mongo shell and Java. public MongoClientOptions. package com. var mongo = $ ('#builder'). There are drivers available for practically all the major programming languages including C#, Java, NodeJS, Go. /**Use the given primary to read the oplog. The following are top voted examples for showing how to use com. MongoBooster 4. 6 in the driver compatibility matrices) are tested against MongoDB 4. You can vote up the examples you like. Caching a MongoDB Database with Redis. MongoDB vs SQL: Day 14 - Queries. In order to access all of the comment "text" field I would need to write something to pull out the comments, iterate over the sub document to pull out each text field and then save those in a list. When you work with a database, the question is that how you can query, insert, update and delete data. x driver and would like to run against MongoDB 3. The basic syntax of find() method is as follows − >db. x2 - the x coordinate of the second box corner. String query, int limit = 5, java. In a typical Java application, you write a class that implements CustomerRepository and craft the queries yourself. We provide a "template" as a high-level abstraction for storing and querying documents. In this article, we will explore the support for Projections and Aggregation framework. Create a groovy file (mongo. JDBC Database Query Tool Features. Iddo Gino teaches you how to improve the performance of your Node. Includes PreparedStatement Editor, Query Builder, SQL Code Generator, CSV Export, Database Navigator w/ regex filtering, Sql Diff & more. This tutorial has now covered two of the three methods which we can use to create query methods with Spring Data JPA. MongoDB drivers provide several options for Mongo clients to handle different network timeout errors that may occur during usage. Below is my custom processor which selects data from mongoDB and write it in flowFile stream. A Bareword query operator is one which doesn't need to be anchored by anything on the left side - you can start your MongoDB Query with it. In-memory MongoDB for unit and integration tests a simple aggregation query wasn't returning the expected results spring which is a nice builder to initialise. At the present time, the internet is loaded with big data, big users, big complexity etc. The two-way query builder could help you construct and display complex MongoDB find statements even without the knowledge of the MongoDB shell commands syntax. Injection of this type occur when the application use untrusted user input to build a JPA query using a String and execute it. QueryBuilder class. JAVA-2712 Add support for new lookup Powered by a free Atlassian Jira open source license for. springframework. 2, we answered our users with MongoDB Compass v1. To access the server from the client, configure the CustomStore as described in the Custom Sources article or use the createStore method. So – why a query language? Because – for any complex-enough API – searching. Your votes will be used in our system to get more good examples. Builder modifiedAlertConditions = ImmutableSet. The collection, cursor and write result interfaces are very similar to the standard Java MongoDB driver. Query faster with Studio 3T, the leading IDE for MongoDB, and get your free 30-day trial. com is created, written by, and maintained by Yong Mook Kim, aka Mkyong. An intro to Studio 3T, a MongoDB IDE The growing third-party market is a key indication that MongoDB has moved from mere maturity to one of the dominant players in this market. 1) are End of Life and no longer officially sold by Adobe. You can use the CData ODBC Driver for MongoDB to integrate live data into your statistical analysis. They have a. You will notice similarities to the JDBC support in the Spring Framework. Author: MongoDB Documentation Team. Both MongoDB vs SQL are popular choices in the market; let us discuss some of the major Difference Between MongoDB and SQL: In MongoDB data is represented as a collection of JSON documents while in MySQL, data is in tables and rows. In this quickstart, you'll use the Azure Cosmos DB API for Mongo DB and Java SDK to create a console web app. You can get started by using the examples in this document and watch the Query Azure Cosmos DB with MongoDB shell video. Hibernate SQL Query is very handy when we have to execute database vendor specific queries that are not supported by Hibernate API. The following are Jave code examples for showing how to use lessThan() of the com. This query can be also be constructed with an implicit AND operation by combining the operator expressions for the price field. Supports SELECT, DISTINCT, GROUP BY, ORDER BY, JOINS, HAVING & much more. Query and Update documents nested multiple levels in an array The $ positional operator is used to project elements in an array based on a condition. Prior to MongoDB 4. What is better Active Query Builder or Heroku Enterprise? To ensure that you find the most effective and productive IT Management Software for your business, you need to compare products available on the market. The list of alternatives was updated Mar 2019. find() to get / query document from collection. The pretty. You can vote up the examples you like. I want to write a Mongo query to get eventValue in Java where action equals to updated and name is AsiaEurope. You can use native tools such as the MongoDB Shell command line and MongoDB Compass a GUI-based query tool. Unified Queries for Java. In the first two articles of this series, we built the same search/filtering functionality using JPA Criteria and Spring Data JPA Specifications. QueryAssist for MongoDB - professional GUI tool with smart code completion (IntelliSense), SQL query to MongoDB, advanced shell, themes and modern-looking GUI. How can I build this mongo query in java. data-browse derby er-diagram mysql postgres query-builder sql-editor sql-tool sqlserver. QueryBuilder uses an undocumented form of $near where maxDistance is the 3rd element of a 3-element array. ClusterJ is part of the MySQL Cluster Connector for Java which is currently in beta as part of MySQL Cluster 7. The Filters class provides static factory methods for all the MongoDB query operators. Writing Complex MongoDB Queries Using QueryBuilder MongoDB provides a lot of query selectors for filtering documents from a collection. You can vote up the examples you like. Writing Complex MongoDB Queries Using QueryBuilder MongoDB provides a lot of query selectors for filtering documents from a collection. So i will show step by step. Mongodb Bulk Insert: For inserting multiple records at once, we need a Bulk builder for the collection. Structuring aggregations; Metrics aggregations; Bucket aggregations; Query DSL. Below is the generic form for the query. MongoDB support for VS Code is provided by the Azure Cosmos DB extension. We provide a "template" as a high-level abstraction for storing and querying documents. com is created, written by, and maintained by Yong Mook Kim, aka Mkyong. Provide application name and set master to local with two threads. In the last few posts, we saw how to connect Apache Drill with MongoDB and also how we can connect it to Kafka to query data using simple SQL queries. We’ve already laid the foundation — freeing you to create without sweating the small things. Overview of mongoClient MongoDB support internal connection pooling in different ways, one of the way is using MongoClient. This tutorial covers the support for LINQ queries added in the 1. NET Web API to build an ApiController with support for HTTP GET, PUT, POST, and DELETE. Number of fields, content and size of the document can differ from one document to another. Queries are Not Promises Mongoose queries are not promises. Studio 3T is the professional #GUI for MongoDB. To connect to MongoDB from Java Application, follow the below step by step guide : Download MongoDB Java Driver. QueryBuilder uses an undocumented form of $near where maxDistance is the 3rd element of a 3-element array. You can use native tools such as the MongoDB Shell command line and MongoDB Compass a GUI-based query tool. Java is one of the most popular programming languages in the MongoDB Community. 0, I tried implementing the suggested methods to implement collection. They have a. QueryBuilder. Next, you may wish to take a look at the MongoDB Manual for a language independent look at how to use MongoDB. js), Java, C# and Python. THE unique Spring Security education if you’re working with Java today. Mongodb JAVA Driver: QueryBuilder class Nov 11 by dpancs I was recently assigned a task where I had to convert a SQL like where clause query into Mongo query on the fly. Learn more about the SQL API. Parameterization of the provided jsonQuery is allowed via ? placeholders where the indicates the index of the parameterValue to substitute. Unified Queries for Java. Each method returns an instance of the Bson type, which can in turn be passed to any method that expects a query filter.