
Security News
TC39 Advances 11 Proposals for Math Precision, Binary APIs, and More
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
๐ฎ Powerful SQL toolkit for Node.js, built with flexibility and structure in mind. Easily manage SQLite3/PostgreSQL, advanced queries, smart tag systems, and full JSON-friendly filters.
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.
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.
npm install puddysql
To learn more about each module (Engine
, Instance
, Query
, Tags
) and how they work together:
๐ See: docs/README.md
Module | Description |
---|---|
PuddySqlEngine | Low-level query runner with DB abstraction |
PuddySqlInstance | Manages databases and table bindings |
PuddySqlQuery | High-level querying with filters and joins |
PuddySqlTags | Parses tag filters into safe SQL conditions |
Node.js 18+ recommended
Works with:
pg
adapter)Hereโs how to get started using PuddySQL:
import path from 'path';
import { fileURLToPath } from 'url';
import PuddySql from 'puddysql';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
// ๐ฎ Create a new SQL instance
const db = new PuddySql.Instance();
// ๐ก Run queries
(async () => {
await db.initSqlite3();
// Insert a new user
const table = await db.initTable({ name: 'tinytest', id: 'id' }, [
['id', 'TEXT', 'PRIMARY KEY'],
['prompt', 'TEXT'],
['yay', 'BOOLEAN']
]);
console.log('Set');
console.log(await table.set('1', { prompt: 'pudding', yay: true }));
console.log(await table.set('2', { prompt: 'cookie', yay: true }));
console.log(await table.set('3', { prompt: 'brigadeiro', yay: true }));
console.log(await table.set('4', { prompt: 'banana', yay: false }));
console.log(await table.set('5', { prompt: 'chocolate', yay: true }));
console.log('Get All');
console.log(await table.getAll());
// Find a user by ID
console.log('Get');
const user = await table.get(1);
console.log(user); // โ { id: 1, prompt: 'pudding', yay: true }
// Get a paginated list
console.log('Search');
const data1 = await db.getTable('tinytest').search({
q: {
group: 'AND',
conditions: [{ column: 'prompt', value: 'pudding' }],
},
});
const data2 = await table.search({
q: {
group: 'OR',
conditions: [
{ column: 'prompt', value: 'pudding' },
{ column: 'yay', value: false },
],
},
});
console.log(data1);
console.log(data2);
})();
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.
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
๐ง Note: This documentation was written by ChatGPT, an AI assistant developed by OpenAI, based on the project structure and descriptions provided by the repository author.
If you find any inaccuracies or need improvements, feel free to contribute or open an issue!
FAQs
๐ฎ Powerful SQL toolkit for Node.js, built with flexibility and structure in mind. Easily manage SQLite3/PostgreSQL, advanced queries, smart tag systems, and full JSON-friendly filters.
The npm package puddysql receives a total of 5 weekly downloads. As such, puddysql popularity was classified as not popular.
We found that puddysql demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socketโs new license overlays: gain control, reduce noise, and handle edge cases with precision.