AtDatabases
TypeScript clients for databases that prevent SQL Injection
README
Safe From HTML Injection
Using tagged template literals for queries, e.g.
- ```ts
- 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:
- ``` js
- {text: 'SELECT * FROM users WHERE id=?', values: [userID]}
- ```
Promises
All the @databases APIs are designed with promises in mind from the get go.
TypeScript
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, so you don't need to install the ones you don't need.
Package Name | Version | Docs
@databases/bigquery | | https://www.atdatabases.org/docs/bigquery
@databases/connection-pool | | https://www.atdatabases.org/docs/connection-pool
@databases/escape-identifier | | https://www.atdatabases.org/docs/escape-identifier
@databases/expo | | https://www.atdatabases.org/docs/websql
@databases/lock | | https://www.atdatabases.org/docs/lock
@databases/mysql | | https://www.atdatabases.org/docs/mysql
@databases/mysql-test | | https://www.atdatabases.org/docs/mysql-test
@databases/mysql-typed | | https://www.atdatabases.org/docs/mysql-typed
@databases/pg | | https://www.atdatabases.org/docs/pg
@databases/pg-bulk | | https://www.atdatabases.org/docs/pg-bulk
@databases/pg-cluster | | https://www.atdatabases.org/docs/pg-cluster
@databases/pg-migrations | | https://www.atdatabases.org/docs/pg-migrations
@databases/pg-test | | https://www.atdatabases.org/docs/pg-test
@databases/pg-typed | | https://www.atdatabases.org/docs/pg-typed
@databases/queue | | https://www.atdatabases.org/docs/queue
@databases/split-sql-query | | https://www.atdatabases.org/docs/split-sql-query
@databases/sql | | https://www.atdatabases.org/docs/sql
@databases/sqlite | | https://www.atdatabases.org/docs/sqlite
@databases/validate-unicode | | https://www.atdatabases.org/docs/validate-unicode
@databases/websql | | https://www.atdatabases.org/docs/websql
Check out the website to learn more: https://www.atdatabases.org/