ngokevin / expo-sqlite-plus-web

A demonstration of sqlite working on both React Native (expo-sqlite) and Web (absurd-sql).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

expo-sqlite-plus-web

Rough source code to get sqlite working on both React Native and Web with a single interface.

Expo / React Native

Uses expo-sqlite.

Web

Uses absurd-sql with sql.js (WASM) and IndexedDB backend purely for byte storage.

Querying

Uses a forked knex.js that strips everything out except for sqlite3 query building.

Usage

import db from './db';

const query = db.knex('user').where({id: 'foo'}).toString();
db.get(query);

About

A demonstration of sqlite working on both React Native (expo-sqlite) and Web (absurd-sql).


Languages

Language:TypeScript 72.4%Language:JavaScript 27.6%