1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
# Created 2020-01-18 Sat 03:21
#+TITLE: Yet another EmacSQL backend for SQLite
#+AUTHOR: Zhu Zihao
[[https://melpa.org/#/emacsql-sqlite3][file:https://melpa.org/packages/emacsql-sqlite3-badge.svg]]
[[https://travis-ci.org/cireu/emacsql-sqlite3][file:https://travis-ci.org/cireu/emacsql-sqlite3.svg?branch=master]]
* IMPORTANT NOTE
*Package developers should not totally rely on this package, emacs-sqlite is
highly recommended* (maybe you should support this package as an option) since
SQLite CLI is not designed for Inter-Process Communication. This package
requires a hack to make it work.
For more information, please read the "SQLite Implementation Difficulties"
section of the [[https://nullprogram.com/blog/2014/02/06/][article]] written by original developer of emacs-sqlite. It
explains the weird behaviour of =sqlite3= CLI and why it sucks.
* Introduction
This is yet another [[https://github.com/skeeto/emacsql][EmacSQL]] backend for SQLite, which use official =sqlite3=
executable to access SQL database.
* Installation
=emacsql-sqlite3= is available on melpa.
* Usage
For Emacs users, please notice that this package won't provide any feature for
convenience. *If you aren't sure you need this, you probably don't need this.*
For package developers, this package can be a replacement of [[https://github.com/skeeto/emacsql][emacsql-sqlite]] and
it doesn't require user to have a C compiler, but please read following
precautions.
- You need to install =sqlite3= official CLI tool, 3.8.2 version or above were
tested, =emacsql-sqlite3= may won't work if you using lower version.
- This package should be compatible with =emacsql-sqlite3= for most cases. But
foreign key support was disabled by default. To enable this feature, use
~(emacsql <db> [:pragma (= foreign_keys ON)])~
The only entry point to a EmacSQL interface is =emacsql-sqlite3=, for more
information, please check [[https://github.com/skeeto/emacsql/blob/master/README.md][EmacSQL's README]].
* Known issue
The tests don't pass under Emacs 25.1 for unknown reason, so we don't support
Emacs 25.1 currently like [[https://github.com/skeeto/emacsql][emacsql-sqlite]]. But any PR to improve this are
welcomed.
|