You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update README
* Support nested query
* Update dependency
* Add more time for timeout
* Nomalize bracket for array in the query
* Add subquery support
* Clean up the code
* Fix pagnation issue
* Fix pagination issue
* Refactor builder class
* Remove subquery support
* Remove unused logging
* Superset implementation with QueryDB
---------
Co-authored-by: Peng Ren <ia250@cummins.com>
PyMongoSQL is a Python [DB API 2.0 (PEP 249)](https://www.python.org/dev/peps/pep-0249/) client for [MongoDB](https://www.mongodb.com/). It provides a familiar SQL interface to MongoDB, allowing developers to use SQL to interact with MongoDB collections.
13
14
@@ -40,6 +41,9 @@ PyMongoSQL implements the DB API 2.0 interfaces to provide SQL-like access to Mo
40
41
-**ANTLR4** (SQL Parser Runtime)
41
42
- antlr4-python3-runtime >= 4.13.0
42
43
44
+
-**JMESPath** (JSON/Dict Path Query)
45
+
- jmespath >= 1.0.0
46
+
43
47
### Optional Dependencies
44
48
45
49
-**SQLAlchemy** (for ORM/Core support)
@@ -136,37 +140,41 @@ while users:
136
140
### SELECT Statements
137
141
- Field selection: `SELECT name, age FROM users`
138
142
- Wildcards: `SELECT * FROM products`
143
+
-**Nested fields**: `SELECT profile.name, profile.age FROM users`
144
+
-**Array access**: `SELECT items[0], items[1].name FROM orders`
139
145
140
146
### WHERE Clauses
141
147
- Equality: `WHERE name = 'John'`
142
148
- Comparisons: `WHERE age > 25`, `WHERE price <= 100.0`
143
149
- Logical operators: `WHERE age > 18 AND status = 'active'`
150
+
-**Nested field filtering**: `WHERE profile.status = 'active'`
-**Complex queries**: `WHERE customer.profile.age > 18 AND orders[0].status = 'paid'`
158
+
159
+
> **Note**: Avoid SQL reserved words (`user`, `data`, `value`, `count`, etc.) as unquoted field names. Use alternatives or bracket notation for arrays.
144
160
145
161
### Sorting and Limiting
146
162
- ORDER BY: `ORDER BY name ASC, age DESC`
147
163
- LIMIT: `LIMIT 10`
148
164
- Combined: `ORDER BY created_at DESC LIMIT 5`
149
165
150
-
## Connection Options
166
+
## Limitations & Roadmap
151
167
152
-
```python
153
-
from pymongosql.connection import Connection
168
+
**Note**: Currently PyMongoSQL focuses on Data Query Language (DQL) operations. The following SQL features are **not yet supported** but are planned for future releases:
0 commit comments