From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: sqlite library Date: Sat, 10 Dec 2022 09:42:29 +0200 Message-ID: <83tu23yaai.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20846"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Ag Ibragimov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 10 08:43:31 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 1p3uWA-0005EV-TE for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Dec 2022 08:43:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3uVY-0002r4-RJ; Sat, 10 Dec 2022 02:42:53 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p3uVH-0002nd-FV for emacs-devel@gnu.org; Sat, 10 Dec 2022 02:42:36 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p3uVH-0006Hy-4o; Sat, 10 Dec 2022 02:42:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=gEzKwEDnfIssEciYYEK7O75LmahoIlOUTBu6Utu+4VI=; b=nbjeSvmf9co0 CAOxdQu4RYNMNwF2Bc3jSMoP9Y9MBVd1yRguR15GVdVkUuBxEJLe27QhISbySV1e/96iIpNWTLaTR xVvOi2RmjjsYZ6dU6qiB/VS0+xAaXf9AYTIefDIgtMuW8ocbyAAgwddEc/vn2nM/QH2IGx5uGsO6q OijcgKlq1QhsNBZJcOZf0L3FTOD76x2mE8gZm53Lg6KvFJiLajqVP70GUOyCuuZdJQxiw3D4msUey aOeFQt46i6gzeU0R574nSmngaBH3RDoeJWLQ3k++i/rSbuwYX1v/NiyS449EOqlEuXrWC2WzwFPZQ KLoQOV8RXvbo5sSSEqC4jQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p3uVG-0004jG-1W; Sat, 10 Dec 2022 02:42:34 -0500 In-Reply-To: (message from Ag Ibragimov on Fri, 09 Dec 2022 18:35:07 -0600) 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:301099 Archived-At: > From: Ag Ibragimov > Date: Fri, 09 Dec 2022 18:35:07 -0600 > > I wrote a prototype of a package that queries a sqlite DB, but only > later realized that built-in support for it was added in Emacs 29 (the version > I use). > I want to make the package compatible with older versions of Emacs (at > least down to 27). I checked package repositories, it seems there are a > few packages out there (and I don't know which one to use). > > What's the best and most straightforward option here for me? Use the function sqlite-available-p to find out whether the current Emacs session has built-in support for SQLite. If sqlite-available-p is not fboundp, you know it's an Emacs version older than 29; otherwise call it to see if it returns non-nil to see if SQLite support was compiled in.