|
1 | | -# PuddySql |
| 1 | +<div align="center"> |
| 2 | +<p> |
| 3 | + <a href="https://discord.gg/TgHdvJd"><img src="https://img.shields.io/discord/413193536188579841?color=7289da&logo=discord&logoColor=white" alt="Discord server" /></a> |
| 4 | + <a href="https://www.npmjs.com/package/puddysql"><img src="https://img.shields.io/npm/v/puddysql.svg?maxAge=3600" alt="NPM version" /></a> |
| 5 | + <a href="https://www.npmjs.com/package/puddysql"><img src="https://img.shields.io/npm/dt/puddysql.svg?maxAge=3600" alt="NPM downloads" /></a> |
| 6 | + <a href="https://www.patreon.com/JasminDreasond"><img src="https://img.shields.io/badge/donate-patreon-F96854.svg?logo=patreon" alt="Patreon" /></a> |
| 7 | + <a href="https://ko-fi.com/jasmindreasond"><img src="https://img.shields.io/badge/donate-ko%20fi-29ABE0.svg?logo=ko-fi" alt="Ko-Fi" /></a> |
| 8 | +</p> |
| 9 | +<p> |
| 10 | + <a href="https://nodei.co/npm/puddysql/"><img src="https://nodei.co/npm/puddysql.png?downloads=true&stars=true" alt="npm installnfo" /></a> |
| 11 | +</p> |
| 12 | +</div> |
| 13 | + |
| 14 | +# 🐾 PuddySQL |
| 15 | + |
| 16 | +**PuddySQL** is a modular and extensible SQL toolkit for Node.js — designed to make dynamic queries, filters, pagination, and tag-based searches easy, safe, and powerful. |
| 17 | + |
| 18 | +Built with composability in mind, each part of PuddySQL focuses on one job while integrating smoothly with the others. Whether you're working with SQLite or PostgreSQL, this package helps you build robust, readable, and scalable query logic. |
| 19 | + |
| 20 | +--- |
| 21 | + |
| 22 | +## 📦 Installation |
| 23 | + |
| 24 | +```bash |
| 25 | +npm install puddysql |
| 26 | +``` |
| 27 | + |
| 28 | +--- |
| 29 | + |
| 30 | +## 🧱 Main Features |
| 31 | + |
| 32 | +* ✅ Safe, composable SQL queries with named methods |
| 33 | +* 🔍 Powerful nested filters using JSON logic (AND/OR, operators, etc.) |
| 34 | +* 🏷️ Built-in tag filtering engine for JSON/array-based fields |
| 35 | +* 🔗 Dynamic JOIN builder with alias support |
| 36 | +* 📃 Smart pagination with automatic counters |
| 37 | +* 🧪 Strong input validation and type safety |
| 38 | + |
| 39 | +--- |
| 40 | + |
| 41 | +## 📚 Documentation |
| 42 | + |
| 43 | +To learn more about each module (`Engine`, `Instance`, `Query`, `Tags`) and how they work together: |
| 44 | + |
| 45 | +👉 **See:** [`docs/README.md`](./docs/README.md) |
| 46 | + |
| 47 | +--- |
| 48 | + |
| 49 | +## 🔧 Module Overview |
| 50 | + |
| 51 | +| Module | Description | |
| 52 | +| ------------------ | ------------------------------------------- | |
| 53 | +| `PuddySqlEngine` | Low-level query runner with DB abstraction | |
| 54 | +| `PuddySqlInstance` | Manages databases and table bindings | |
| 55 | +| `PuddySqlQuery` | High-level querying with filters and joins | |
| 56 | +| `PuddySqlTags` | Parses tag filters into safe SQL conditions | |
| 57 | + |
| 58 | +--- |
| 59 | + |
| 60 | +## 🧪 Requirements |
| 61 | + |
| 62 | +* Node.js 18+ recommended |
| 63 | +* Works with: |
| 64 | + |
| 65 | + * ✅ SQLite3 |
| 66 | + * ✅ PostgreSQL (via `pg` adapter) |
| 67 | + |
| 68 | +--- |
| 69 | + |
| 70 | +## 🤝 Contributions |
| 71 | + |
| 72 | +Feel free to fork, contribute, and create pull requests for improvements! Whether it's a bug fix or an additional feature, contributions are always welcome. |
| 73 | + |
| 74 | +## 📝 License |
| 75 | + |
| 76 | +This project is licensed under the GPL-3.0 License - see the [LICENSE](LICENSE) file for details. |
| 77 | + |
| 78 | +> 🧠 **Note**: This documentation was written by [ChatGPT](https://openai.com/chatgpt), an AI assistant developed by OpenAI, based on the project structure and descriptions provided by the repository author. |
| 79 | +> If you find any inaccuracies or need improvements, feel free to contribute or open an issue! |
0 commit comments