GNU bug report logs - #70145
[PATCH] Add sqlite-execute-batch command

Previous Next

Package: emacs;

Reported by: Javier Olaechea <pirata <at> gmail.com>

Date: Tue, 2 Apr 2024 15:05:01 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Javier Olaechea <pirata <at> gmail.com>
Cc: 70145 <at> debbugs.gnu.org, jp <at> neverwas.me
Subject: bug#70145: [PATCH] Add sqlite-execute-batch command
Date: Sat, 13 Apr 2024 11:03:53 +0300
> From: Javier Olaechea <pirata <at> gmail.com>
> Date: Tue, 2 Apr 2024 21:42:06 -0500
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 70145 <at> debbugs.gnu.org
> 
>  Thanks for working on this. I think Emacs applications will find it
>  handy for things like initializing a new database. Just a couple things
>  I spotted in passing. (I don't really know anything, though, so feel
>  free to ignore.)
> 
> Feedback is always welcome. It's not like I know anything either ^_^'.
>  
>  I think there's also a test/src/sqlite-tests.el file, which seems to
>  contain tests for those primitives defined in src/sqlite.c. Perhaps this
>  test should go there instead?
> 
> Thanks for pointing that out, I hadn't seen that file. It does seem like a better home for the test.
>  
>  > diff --git a/test/lisp/sqlite-tests.el b/test/lisp/sqlite-tests.el
>  > index d4892a27efc..7053026eb82 100644
>  > --- a/test/lisp/sqlite-tests.el
>  > +++ b/test/lisp/sqlite-tests.el
>  > @@ -48,4 +48,29 @@ with-sqlite-transaction/rollback
>  >      ;; First insertion (a=1) rolled back.
>  >      (should-not (sqlite-select db "select * from test"))))
>  >  
>  > +(ert-deftest with-sqlite-execute-batch-test ()
> 
>  Maybe I'm mistaken, but I don't think you need the "with-" part (or the
>  "-test" part), no?
> 
> I did find it contrary to the foo-test- prefix I've seen in the elisp code in the wild, but on matters of naming
> conventions I try to follow the motto: "When in Rome, do as Romans do". So I named the test according to the
> other tests in the file. Now that I placed it under test/src/sqlite-tests.el I've changed the name to align with the
> names of the test in that file.
> 
> I've attached a new patch incorporating your feedback

Thanks.  This should have a NEWS entry announcing the new command.

Also, to accept this contribution, we'd need a copyright assignment
from you.  Would you like to start the paperwork for that at this
time?  If yes, I will send you the form to fill and the instructions
to go with it.




This bug report was last modified 350 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.