From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id kPbSFL2jY2ZCmAAAA41jLg (envelope-from ) for ; Sat, 08 Jun 2024 02:20:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 6GMZDr2jY2bS2AAA62LTzQ (envelope-from ) for ; Sat, 08 Jun 2024 02:20:13 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=XNchplVu; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1717806013; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=biSnWqUG1nwlsHuX5jENJ8CAiAP8C6cQWY5dRNjzS/Y=; b=lSz8sNIsnx0hJCD7p+yKL0QN/fNyqDa/mdG9rEK/Mh9kpAM8C4Xxgwyo9AuamOyCSHGzoU NF/xOLJbKr79j/Kmcf5hpfIAtHTm0i+LemXpZIyOjNKUKWT9sK7xoqe0aAwKSnxjiG6z3o UNA9e54o7othvWSooVrzb8uJyJIEqUyE0GkORtwB6s34aMn4Hbq21D4Cd3auy8bekuZQaz pqUNWh9o2674z2a3u2NsB3nLEiPtXq5Lc7zMN6l4csUJnpt9gD5X1OavXTK9NwwQ3O2KFt dUvtRiICqUPYW22RjnSKxZd+iDyZXibWRVn/yhwkzn4JVhyPm2Vkk4/c+BfJ4g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1717806013; a=rsa-sha256; cv=none; b=BbwgxzcOcx9soY79PSJdA4mp6FadU1Eo+2bhG/57y1vkR8LqStO20YgTCzBNXyNzjcP3Gm TjoG4rlV1FEsYcqJtUnCzcFD1d2fkQ6kEl2YtVI0viLBa3ixjnB32KQIKOpYndLQKZsdlA m+78qfvA8TjJUSfYfWEe+nwWzjHhGRo2GGc4VuQtVd9qPYrf7LLIuZDCkLmseZR0Re1k83 WDOW6JGxByeD6YnyIC826T48gK5734BiwugIWT0yOoAiVXuQ/Jo4140ZByQWB7+uO9geUm nFKP9GFe7bj+vT+7TjpmP4f/GjlkDgKig8LdQQafcaezP53U7Kgi9Zl/4X/MJQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=XNchplVu; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EE5523E9FC for ; Sat, 08 Jun 2024 02:20:12 +0200 (CEST) Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFb7m-0001lu-9p; Fri, 07 Jun 2024 11:03:28 -0400 Received: from [2001:470:142:3::10] (helo=eggs.gnu.org) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sFb7g-0001eD-0p for emacs-orgmode@gnu.org; Fri, 07 Jun 2024 11:03:20 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sFb7d-0008JU-Kk for emacs-orgmode@gnu.org; Fri, 07 Jun 2024 11:03:19 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 70F69240104 for ; Fri, 7 Jun 2024 17:03:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1717772594; bh=nPHtaDAcpO0pcsgsEUR3criY76JSEsA73FzKvi2z1LQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=XNchplVu6g5TpQUckkNGg37oxMXfelt+JZdQ3IjeJivPv3w5ikoCS7jsnjQyWXrIW wEal4EwPMsIlGKfjRESb8lOSaVpWdXs1JHlAQ7L3bHSGBxjvhRkSzCw81aLBp3tCwp jLGl/YV/Q4bwvFvHtyae/edf43xdUwmX4XesDNECB9IvdKtq6kjl0q9vgqZLK2pXHD xa7jHJoYBu8Pef7WcM5UiZS611bDJlSO8fSPT3etyv8NgTDnENwlUQuAuP/R7kLLyE K/o4FrIC+VMHlvZ2OXPmDg9mtx6e3TMvkQjGz+z4uACZN/PH67HiywkZlpiEsbHMMe WDrJRi/eWgB4Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VwkwK5pVBz6tvh; Fri, 7 Jun 2024 17:03:13 +0200 (CEST) From: Ihor Radchenko To: dmg@turingmachine.org Cc: emacs-orgmode@gnu.org Subject: Re: Add 'readonly' option to ob-sqlite In-Reply-To: References: Date: Fri, 07 Jun 2024 15:04:55 +0000 Message-ID: <87tti494ko.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=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-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.56 X-Spam-Score: -6.56 X-Migadu-Queue-Id: EE5523E9FC X-Migadu-Scanner: mx11.migadu.com X-TUID: EofYUhKqaO9B "Daniel M. German" writes: > Sometimes I think it is useful to open a DB in readonly mode > > eg. to avoid modifying by mistake > > This is a patch to ob-sqlite.el to accomplish that > > It adds support for opening a sqlite database in readonly only. > > It does it by adding a babel parameter readonly. If present, the > database will be opened in readonly mode. Example: > > #+begin_src sqlite :readonly :db /tmp/rip.db > insert into a values (1,2); > select * from a; > #+end_src Thanks for the patch! May you please change the patch to avoid header arguments without value? What ob-sqlite doing with "others" is not right because it prevents setting ":readonly yes" as default header argument and then selectively disabling it via ":readonly no". Also, since you are adding a new feature, please announce it in etc/ORG-NEWS and document it in https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-sqlite.html (the source code is in https://git.sr.ht/~bzg/worg/tree/master/item/org-contrib/babel/languages/ob-doc-sqlite.org) -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at