Query SQL Databases using Node.js and TypeScript

Web Name: Query SQL Databases using Node.js and TypeScript

WebSite: http://www.atdatabases.org

ID:330301

Keywords:

Databases,using,Query,SQL

Description:


Building SQL QueriesDocumentation

Query SQL Databases using Node.js and TypeScript

@databases lets you read and write data to Postgres, MySQL, SQLite and other databases in Node.js using ordinary SQL, with parameters automatically escaped to prevent SQL injection.

Get started

100% free and open source

Used in production at these companies, and more

Type safe API for simple operations

await tables.users(db).insert({  email: `janet@example.com`,  active: true,});
emailactiveadam@example.comtrueforbes@example.comtruedee@example.comtrue+janet@example.comtrue
await tables.users(db).update(  {email: `dee@example.com`},  {active: false},);
emailactiveadam@example.comtrueforbes@example.comtrue⇄dee@example.comfalsejanet@example.comtrue
await tables.users(db).delete({  email: `forbes@example.com`,});
emailactiveadam@example.comtrue-forbes@example.comtruedee@example.comfalsejanet@example.comtrue

Type safe single-table queries

await tables.users(db)  .find({    email: anyOf([      `adam@example.com`,      `janet@example.com`,    ]),  })  .all();
emailactive·adam@example.comtruedee@example.comfalse·janet@example.comtrue

Use the full power of SQL to write complex queries

await db.query(sql`  SELECT    users.email,    count(*) AS posts  FROM users  INNER JOIN posts  ON (users.email = posts.author)  GROUP BY users.email  WHERE users.active = true`);
emailpostsadam@example.com4janet@example.com16

Wrap any operations into an atomic transaction

await db.tx(async (db) => {  await tables.users(db).update(    {email: `dee@example.com`},    {active: true},  );  return await db.query(sql`    SELECT      users.email,      count(*) AS posts    FROM users    INNER JOIN posts    ON (users.email = posts.author)    GROUP BY users.email    WHERE users.active = true  `);});
emailpostsadam@example.com4dee@example.com3janet@example.com16

We support your database

Each supported database engine has a separate driver. This means that @databases can take advantage of the features unique to each database. Core elements are shared. This makes it quick to add support for a new database engine.

PostgresMySQLSQLiteExpoBigQueryMore Soon...

Key features

Type Safe

@databases is written in TypeScript, so every module has type safety and type definitions built in. In addition to that, we also have CLIs that let you generate types for your database tables.

Modular

Each database driver is published as a separate module. Each problem we solve get its own reusable package. This means that even if you don't want to use @databases to connect to your SQL database, you can still use our locking implementation, or our queue implementation.

Promises

All the @databases APIs are designed with promises in mind from the get go. You won't need to mess around with old callback styles. This keeps your code clean and simple.Get started

Footer

Documentation

PostgresMySQLSQLiteExpo

Community

Existing UsersBlogGitHubTwitterGitHub

© 2022 Forbes Lindesay

TAGS:Databases using Query SQL

<<< Thank you for your visit >>>

Websites to related :
HTML, Typo3, Oracle, MySQL, PHP,

  HomeSimatic CommunicationDatabase CommunicationSimatic AdministrationScanner AdministrationStation MonitoringMonitoring by Mobile DeviceServicesSimati

Real Estate Website Design using

  Skip to primary navigation Skip to main content Skip to footer WebsiteUpgradeSpecial!RaisetheBarin2022. Details

LeaseQuery | Rated #1 for ASC 84

  Customer Center   LoginSoftwareLease Accounting SoftwareLeaseQueryLeaseQuery EssentialLeaseQuery for NetSuiteLeaseGuruGASB 96 SoftwareLease Manageme

Domain name whois information qu

  English 中文 JNAME.COM Its brands Search Support more than 1200 domain name suffix

Housing Design Awards

   A' Housing Design Award A' Housing Design Award is an international, juried design accolade established to reco

Serverless SQL &#8211; Azure Syn

  Skip to the content Toggle navigation

Changing our world, one corner a

  2022 Howard T. Collins Memorial Scholarship Program Award EventRe-watch Here!Resident PortalCurrent ResidentsPay Rent OnlineRequest Maintenance Servic

Home - Hillcrest Transitional Ho

   Reach us at: (816) 994-6934DONATE TODAY Hillcrest Transitional

DroneLab - Drone Software for Ae

  PricingSign UpLoginView orthomosaics in your browser & share them with your clients.Store your data in the Cloud, share and view your maps online, ana

Anna Minton | Writer & Journalis

   :root{--color_0:255,255,255;--color_27:233,159,134;--color_1:255,255,255;--color_2:0,0,0;--color_3:237,28,36;--color_4:0,136,203;--col

ads

Hot Websites