Git Product home page Git Product logo

async-sqlite3's Introduction

deno_sqlite3

Non-blocking, asynchronous FFI bindings to SQlite3.

Usage

import { Connection } from "./mod.ts";
const conn = new Connection();

await conn.open("test.db");

await conn.execute("CREATE TABLE User (username TEXT NOT NULL)");
await conn.execute("INSERT INTO User VALUES (?)", ["littledivy"]);

const rows = await conn.query("SELECT * FROM User WHERE username = ?", [
  "littledivy",
]);

assertEquals(rows[0 /* First row */][0 /* First column */], "littledivy");

Performance

deno_sqlite3
  insert 10_000 rows in bench.db: 1114.5801ms
  query 10_000 rows in bench.db: 30.3004ms

x/sqlite3
  insert 10_000 rows in bench.db: 1306.1578ms
  query 10_000 rows in bench.db: 163.2021ms

node-sqlite3
  insert 10_000 rows in bench.db: 1165.0645ms
  query 10_000 rows in bench.db: 8.1728ms

better-sqlite3
  insert 10_000 rows in bench.db: 592.1117ms
  query 10_000 rows in bench.db: 11.3483ms

python-sqlite3
  insert 10_000 rows in bench.db: 546.4092ms
  query 10_000 rows in bench.db: 0.4868ms

x/sqlite
  insert 10_000 rows in bench.db: 28672.3261ms
  query 10_000 rows in bench.db: 16.8747ms

Measured on an Intel i7-4510U (4) @ 3.1 SSD

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.