dotConnect for MongoDB Documentation
On this page
    Select Statement Execution
    On this page

    In SQL mode, every SELECT statement is executed by the built-in SQLite engine, so dotConnect for MongoDB supports most of the SQLite SELECT syntax, including joins and SQLite functions. MongoDB collections are represented as tables. For more information, see Collections as Tables.

    To reduce the amount of data transferred from the server, dotConnect for MongoDB reads documents from MongoDB in the following way:

    1. A condition from the WHERE clause is also passed to MongoDB as a filter if this filter can't exclude any document that SQLite would select. SQLite then applies the whole WHERE clause to the returned documents.
    2. Only the fields that correspond to the columns used in the statement are read from the server.

    Simple conditions, such as comparisons of a column with a constant or a parameter, are usually passed to MongoDB. Thus, SELECT statements with such conditions transfer less data and are executed faster.