Open source enthusiast.
- Creator of Linguist - a browser extension for privacy focused translation (FOSS)
- Author of blog about programming
Open source enthusiast.
Transly - the CLI tool for incremental app translation (via LLM, GoogleTranslate, etc.)
Transly - the CLI tool for incremental app translation (via LLM, GoogleTranslate, etc.)
Transly - the CLI tool for incremental app translation (via LLM, GoogleTranslate, etc.)
Nano Queries, a state of the art Query Builder
Ordinality - framework-agnostic migrations tool for Browser, Node, Deno
Ordinality - framework-agnostic migrations tool for Browser, Node, Deno
Open source product is a marketing tool
Open source is a promotion tool
Open source is a promotion tool
Don't Guess My Language
Don't Guess My Language
plausible-client: Collect analytics in browser with no hassle
plausible-client: Collect analytics in browser with no hassle
plausible-client: Collect analytics in browser with no hassle
nano-queries - A universal and powerful database-agnostic query builder for Node and browser (works with SQLite, Postgres, GraphQL, Redis, PGlite, etc.)
nano-queries - A database-agnostic Query Builder (work with SQLite, Postgres, GraphQL, Redis, PGlite, etc)
nano-queries - Simple and powerful database-agnostic Query Builder for TypeScript (work with SQLite, Postgres, GraphQL, Redis, PGlite, etc)
Build Systems, Not Heroes
arrival-time, a simple and powerful progress time estimation (ETA) for JavaScript
arrival-time, a simple and powerful progress time estimation (ETA) for JavaScript
When you use query builder, you write a raw SQL code.
The benifit is you can insert user input right in string, and your query remain secure against injections. Additionally, a Nano Queries let you compose queries, and extend it, so you may build complex queries simply.
Let's say you develop a site to search something by its features, for example a movies. Your SQL query may easy takes 100-500 lines. Some part of this query will be a basic, some will be optional depends on provided filters.
With a query builder you may conditionally extend your query like that
if (userInput.rating > 0) { filter.and(sql`rating >= ${userInput.rating}`); }That's all Query Builder does. It let you avoid to write code like that
const values = []; const getPlaceholder = (value) => { values.push(value); return `$${values.length}`; }; const where = []; if (year) { where.push(`release_year = ${getPlaceholder(year)}`); } if (rating) { where.push(`rating >= ${getPlaceholder(rating)}`); } db.query( `SELECT title FROM movies ${where.length ? 'WHERE ' + where.join(' AND ') : ''} LIMIT 100`, values, );