From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.devel Subject: Re: sqlite3 Date: Mon, 14 Feb 2022 15:04:37 +0300 Message-ID: References: <87tufmjyai.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30021"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.2.0 (2022-02-12) Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Feb 14 13:08:15 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJa9O-0007aj-Tz for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Feb 2022 13:08:14 +0100 Original-Received: from localhost ([::1]:57134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJa9N-0002qD-Vy for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Feb 2022 07:08:14 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40354) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJa69-0000Qc-Sm for emacs-devel@gnu.org; Mon, 14 Feb 2022 07:04:54 -0500 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:38909) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJa5u-0006V5-F4 for emacs-devel@gnu.org; Mon, 14 Feb 2022 07:04:42 -0500 Original-Received: from localhost ([::ffff:41.75.189.127]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000055D61.00000000620A4553.00006D3B; Mon, 14 Feb 2022 05:04:34 -0700 Mail-Followup-To: Lars Ingebrigtsen , emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: <87tufmjyai.fsf@gnus.org> Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:286249 Archived-At: * Lars Ingebrigtsen [2021-12-06 04:52]: > I've brought this up before, but I didn't really have a solution then, > but I think I do now: sqlite3. That is great idea to have that built-in into Emacs or as build option to include it. Another pending project that wants to enter into ELPA is this module for PostgreSQL, though developer may be delayed, we discussed it months ago and they agreed. I am using PostgreSQL all the time. emacs-libpq @ Github https://github.com/anse1/emacs-libpq > sqlite3 is supported on more platforms than Emacs is, the interface is > small and stable, and (best of all) somebody has already created > interface functions for Emacs (via a module): > > https://github.com/syohex/emacs-sqlite3 Not just sqlite3, I would prefer to have the gdbm as well, and Emacs lisp interface to create, delete, databases and keys and values. > I think it'd be good to bring that into core, and then write a small > wrapper library (well, a trivial ORM) for the rest of Emacs to use, so > that we don't have to write SQL all over the place. I hope you will leave the option to write SQL as well. > (setf (persistent-data :namespace "emoji" :key "favorites") > emoji--favorites) Excellent idea! Though consider also including various other databases, such as lmdb, qdbm, gdbm, bdb, tokyocabinet, kyotocabinet and similar. As if you only target remembering specific information thatn SQL may be overkill, and gbdm can be good enough. > I.e., what Emacs needs is a persistent key/value store, and this would > give us that. Great idea! > In addition, if somebody really wants to write SQL stuff (it can be > very handy for some things), having sqlite3 in there gives us that > in addition for free. Great! Please include possibilities to bind to any kind of databases. I am using heavily PostgreSQL, though GDBM and other databases are welcome. > This comes with questions about how the users are supposed be able to > clear out the data, for instance, but we could have a `M-x > list-persistent-data' where the users could blow out whatever they want > to. I hope that database included may be useful for users in any other form, freely, not only for the specific persistent data you proposed. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/