all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#58885: 29.0.50; Incorrect sqlite-select docstring
@ 2022-10-30  4:54 Andrew Hyatt
  2022-10-30  8:32 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Hyatt @ 2022-10-30  4:54 UTC (permalink / raw)
  To: 58885

[-- Attachment #1: Type: text/plain, Size: 468 bytes --]

 

The docstring for sqlite-select says "By default, the return value 
is a list where the first element is a list of column names, and 
the rest of the elements are the matching data." But this isn't 
true, by default, the value of RETURN-TYPE in that function is 
nil, which does not prepend the list of column names. I don't 
think anything more is necessary then removing this line, because 
the rest of the docstring has sufficient explanation.

Patch included.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: docstring fix --]
[-- Type: text/x-patch, Size: 691 bytes --]

diff --git a/src/sqlite.c b/src/sqlite.c
index d6cb38a29a..095ce73030 100644
--- a/src/sqlite.c
+++ b/src/sqlite.c
@@ -528,9 +528,6 @@ DEFUN ("sqlite-select", Fsqlite_select, Ssqlite_select, 2, 4, 0,
 If VALUES is non-nil, it should be a list or a vector specifying the
 values that will be interpolated into a parameterized statement.
 
-By default, the return value is a list where the first element is a
-list of column names, and the rest of the elements are the matching data.
-
 RETURN-TYPE can be either nil (which means that the matching data
 should be returned as a list of rows), or `full' (the same, but the
 first element in the return list will be the column names), or `set',

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#58885: 29.0.50; Incorrect sqlite-select docstring
  2022-10-30  4:54 bug#58885: 29.0.50; Incorrect sqlite-select docstring Andrew Hyatt
@ 2022-10-30  8:32 ` Eli Zaretskii
  2022-10-30 14:30   ` Andrew Hyatt
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2022-10-30  8:32 UTC (permalink / raw)
  To: Andrew Hyatt; +Cc: 58885

> From: Andrew Hyatt <ahyatt@gmail.com>
> Date: Sun, 30 Oct 2022 00:54:17 -0400
> 
> The docstring for sqlite-select says "By default, the return value 
> is a list where the first element is a list of column names, and 
> the rest of the elements are the matching data." But this isn't 
> true, by default, the value of RETURN-TYPE in that function is 
> nil, which does not prepend the list of column names. I don't 
> think anything more is necessary then removing this line, because 
> the rest of the docstring has sufficient explanation.
> 
> Patch included.

Thanks.  I think it does make sense to say that the default return
value is a list.  So I fixed this in a different way, please take a
look.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#58885: 29.0.50; Incorrect sqlite-select docstring
  2022-10-30  8:32 ` Eli Zaretskii
@ 2022-10-30 14:30   ` Andrew Hyatt
  2022-10-30 14:37     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Hyatt @ 2022-10-30 14:30 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 58885

[-- Attachment #1: Type: text/plain, Size: 845 bytes --]

On Sun, Oct 30, 2022 at 4:32 AM Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Andrew Hyatt <ahyatt@gmail.com>
> > Date: Sun, 30 Oct 2022 00:54:17 -0400
> >
> > The docstring for sqlite-select says "By default, the return value
> > is a list where the first element is a list of column names, and
> > the rest of the elements are the matching data." But this isn't
> > true, by default, the value of RETURN-TYPE in that function is
> > nil, which does not prepend the list of column names. I don't
> > think anything more is necessary then removing this line, because
> > the rest of the docstring has sufficient explanation.
> >
> > Patch included.
>
> Thanks.  I think it does make sense to say that the default return
> value is a list.  So I fixed this in a different way, please take a
> look.
>

The change you made looks good, thank you.

[-- Attachment #2: Type: text/html, Size: 1293 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#58885: 29.0.50; Incorrect sqlite-select docstring
  2022-10-30 14:30   ` Andrew Hyatt
@ 2022-10-30 14:37     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2022-10-30 14:37 UTC (permalink / raw)
  To: Andrew Hyatt; +Cc: 58885-done

> From: Andrew Hyatt <ahyatt@gmail.com>
> Date: Sun, 30 Oct 2022 10:30:26 -0400
> Cc: 58885@debbugs.gnu.org
> 
>  Thanks.  I think it does make sense to say that the default return
>  value is a list.  So I fixed this in a different way, please take a
>  look.
> 
> The change you made looks good, thank you.  

OK, closing.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-30 14:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-30  4:54 bug#58885: 29.0.50; Incorrect sqlite-select docstring Andrew Hyatt
2022-10-30  8:32 ` Eli Zaretskii
2022-10-30 14:30   ` Andrew Hyatt
2022-10-30 14:37     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.