All Projects → patrickmoffitt → Local Sqlite Example

patrickmoffitt / Local Sqlite Example

Licence: mit
Demonstrates database-driven Electron using local SQLite with SQL.js.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Local Sqlite Example

Sql.js
A javascript library to run SQLite on the web.
Stars: ✭ 9,594 (+6382.43%)
Mutual labels:  emscripten, sqlite
Android Debugport
A Read-Eval-Print-Loop server for Android and SQLite
Stars: ✭ 147 (-0.68%)
Mutual labels:  sqlite
Myutils
🙏 提供时间轴转星座|生肖工具、系统存储空间获取工具、文件大小格式化工具、获取指定文件大小工具、AES加密解码工具(支持android端平台加密解密,java端和android端相互加密解密)、SharePreference操作工具、 File文件操作工具、日期获取和计算工具、界面跳转Intent操作工具、字符串验证和数值转换操作工具、手机震动工具、系统资源操作工具、网络检测工具、 wifi操作工具、单位换算工具、zip压缩和解压操作工具、XML解析操作工具(只支持几种指定格式)、图片加载和处理工具,数据库操作(增删改查)工具、Base64编码解码工具、MD5加密工具。
Stars: ✭ 130 (-12.16%)
Mutual labels:  sqlite
Sqlite Jdbc
SQLite JDBC Driver
Stars: ✭ 1,961 (+1225%)
Mutual labels:  sqlite
Sqlite Dialect
Hibernate dialect for SQLite
Stars: ✭ 133 (-10.14%)
Mutual labels:  sqlite
Dapper.linq
Dapper.Linq
Stars: ✭ 143 (-3.38%)
Mutual labels:  sqlite
Rrinlog
Replacing Elasticsearch with Rust and SQLite
Stars: ✭ 129 (-12.84%)
Mutual labels:  sqlite
Cachego
Golang Cache component - Multiple drivers
Stars: ✭ 148 (+0%)
Mutual labels:  sqlite
Nbind
✨ Magical headers that make your C++ library accessible from JavaScript 🚀
Stars: ✭ 1,829 (+1135.81%)
Mutual labels:  emscripten
Sql Fundamentals
👨‍🏫 Mike's SQL Fundamentals and Professional SQL Courses
Stars: ✭ 140 (-5.41%)
Mutual labels:  sqlite
Roomasset
A helper library to help using Room with existing pre-populated database [DEPRECATED].
Stars: ✭ 138 (-6.76%)
Mutual labels:  sqlite
Oreilly intermediate sql for data
Resources for the O'Reilly Online Training "Intermediate SQL For Data Analysis"
Stars: ✭ 136 (-8.11%)
Mutual labels:  sqlite
Modern Wasm Starter
🛸 Run C++ code on web and create blazingly fast websites! A starter template to easily create WebAssembly packages using type-safe C++ bindings with automatic TypeScript declarations.
Stars: ✭ 140 (-5.41%)
Mutual labels:  emscripten
Chyrp Lite
An ultra-lightweight blogging engine, written in PHP.
Stars: ✭ 131 (-11.49%)
Mutual labels:  sqlite
Indigo
Universal cheminformatics libraries, utilities and database search tools
Stars: ✭ 146 (-1.35%)
Mutual labels:  emscripten
Goose
A database migration tool. Supports SQL migrations and Go functions.
Stars: ✭ 2,112 (+1327.03%)
Mutual labels:  sqlite
Quiet Js
Transmit data with sound using Web Audio -- Javascript binding for libquiet
Stars: ✭ 1,725 (+1065.54%)
Mutual labels:  emscripten
Godot Sqlite
GDNative wrapper for SQLite (Godot 3.2+)
Stars: ✭ 142 (-4.05%)
Mutual labels:  sqlite
Sqlitestudio
A free, open source, multi-platform SQLite database manager.
Stars: ✭ 2,337 (+1479.05%)
Mutual labels:  sqlite
Efcore.bulkextensions
Entity Framework Core Bulk Batch Extensions for Insert Update Delete Read (CRUD), Truncate and SaveChanges operations on SQL Server, PostgreSQL, SQLite
Stars: ✭ 2,295 (+1450.68%)
Mutual labels:  sqlite

Logo

How to Build an Electron App with a Local SQLite3 Database That's Portable.

This project demonstrates how to install and use a local SQLite3 database in Electron using SQL.js. SQL.js is a port of SQLite to JavaScript, by compiling the SQLite C code with Emscripten. Using only JavaScript means there are no C bindings or node-gyp compilations to deal with.

Updates

September 2020

January 2018

  • Updated SQL.js to 0.4.0
  • Updated Bootstrap to 4.0.0-beta.3. Form validation was revised to agree with current documentation. Improved responsive layout and UTF-8 support.
  • Dropped all non-functional UI features.

Quick Code Tour

  • The code entry point is in package.json under the key "main". The value is "main.js"
  • main.js calls model.initDb() from model.js which creates a new SQLite3 database from schema.sql. A callback creates a BrowserWindow and loads index.html.
  • index.html loads Bootstrap's CSS in the <head> tag and renderer.js after the closing <body> tag.
  • renderer.js loads Cheerio, jQuery, Bootstrap and it's dependency; Tether.
  • A composed HTML pattern is used to load the markup.
  • The application's database work is all done in model.js. Here you'll find functions to open and close the database as well as functions to select, insert, update, and delete records. Prepared statements are used throughout.
  • The application opens with a list of people. Click a red X to delete a person's record.

People

  • Click a pencil (shown above) to edit a person:

Edit

  • Click Add in the left rail to add a new person record:

Add

Uninstalling

Please note that running this application will install a tiny SQLite database in the folder returned by electron.app.getPath('userData'). To uninstall simply delete this folder.

Project Status

This project has been archived and is no longer being maintained by the author.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].