@Databases

@Databases

  • Building SQL Queries
  • Documentation

Database libraries for Node.js that protect you from SQL Injection

Getting Started

Postgres

MySQL

SQLite

Expo/WebSQL

Safe From SQL Injection

Using tagged template literals for queries, e.g.

db.query(sql`SELECT * FROM users WHERE id=${userID}`);

makes it virtually impossible for SQL Injection attacks to slip in un-noticed. All the @databases libraries enforce the use of the sql tagged template literals, so you can't accidentally miss them.

The query is then passed to your database engine as a separate string and values:

{text: 'SELECT * FROM users WHERE id=?', values: [userID]}

Promises

All the @databases APIs are designed with promises in mind from the get go.

Type Safe

Written in TypeScript, so every module has type safety and type definitions built in.

Modular

Each database driver is published to npm as a separate module.

Who is Using This?

This project is used by all these people

Canoe Slalom EntriesSave WillpowerRolling VersionsMavenoidQuandooThreadsJepso
More @Databases Users
@Databases
Docs
PostgresMySQLSQLiteExpo/WebSQL
Community
User Showcase
More
BlogGitHubStar
Copyright © 2021 ForbesLindesay