{"repo":"beekeeper-studio/queryleaf","free":true,"listed":false,"github":"https://github.com/beekeeper-studio/queryleaf","clone":"git clone https://github.com/beekeeper-studio/queryleaf.git","description":"SQL for Mongo (in Node JS)","language":"TypeScript","stars":50,"topics":["compiler","mongodb","nodejs","sql","typescript"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"QueryLeaf SQL to MongoDB query translator for NodeJS Overview QueryLeaf is a library that translates SQL queries into MongoDB commands. It parses SQL using node-sql-parser, transforms it into an abstract command set, and then executes those commands against the MongoDB Node.js driver. Features - Parse SQL statements into an abstract syntax tree using node-sql-parser - Compile SQL AST into MongoDB commands - Execute MongoDB commands using the official driver - Support for basic SQL operations: - SELECT - INSERT - UPDATE - DELETE - Advanced querying features: - Nested field access (e.g., address.zip ) - Array element access (e.g., items[0].name ) - GROUP BY with aggregation functions (COUNT, SUM, AVG, MIN, MAX) - JOINs between collections - Multiple interfaces: - Library for direct integration in your code - CLI for command-line SQL queries - Web Server for REST API access - PostgreSQL Wire Protocol Server for connecting with standard PostgreSQL clients SQL to MongoDB Translation Examples QueryLeaf translates SQL queries into MongoDB commands. Here are some examples of the translation: Basic SELECT with WHERE SQL: MongoDB: Nested Field Access SQL: MongoDB: Array Element Access SQL: MongoDB: GROUP BY with Aggregation SQL: MongoDB: JOIN Between Collections SQL: MongoDB: Installation Usage QueryLeaf takes your existing MongoDB client. It never creates or manages MongoDB connections on its own. Testing with DummyQueryLeaf For testing or debugging without a real database, use DummyQ","default_branch":null,"files":null,"tree":[],"storefront":"/r/beekeeper-studio","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/beekeeper-studio/queryleaf/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}