Re: [sqlite] [EXTERNAL] Re: Last record

2019-10-15 Thread Hick Gunter
Then the first peanut may well be the last one, irrespective of the cardinality of the tin. -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Don V Nielsen Gesendet: Dienstag, 15. Oktober 2019 21:52 An: SQLite mailing list B

Re: [sqlite] [EXTERNAL] Last record

2019-10-15 Thread Hick Gunter
The order of rows returned by a query is undefined - i.e. from the point of view of the application, a random member of the result set will be returned last - unless you include an ORDER BY clause that uniquely defines the order of the records to be returned. Given the latter, it is easy to defi

Re: [sqlite] Network file system that support sqlite3 well

2019-10-15 Thread Roman Fleysher
I know for sure that IBM's GPFS guarantees locking. I think GPFS is "global parallel file system". It is a distributed file system. But it will be rather slow. If only few jobs run in parallel, all will be ok. Locking will always guarantee database integrity. With lots of jobs, you will see y

Re: [sqlite] Network file system that support sqlite3 well

2019-10-15 Thread Simon Slavin
On 15 Oct 2019, at 11:47pm, Peng Yu wrote: > Is there a solution that are known to fill in this niche? Thanks. Unfortunately, no. Multiuser SQLite depends on locking being implemented correctly. The developers haven't found any Network File Systems which do this. Unless one of the readers o

Re: [sqlite] Network file system that support sqlite3 well

2019-10-15 Thread Jens Alfke
> On Oct 15, 2019, at 3:47 PM, Peng Yu wrote: > > I'd like to use sqlite3 db files on many compute nodes. But they > should access the same storage device for the sqlite3 db files. Why not use an actual client-server database system like MySQL? It's optimized for this use case, so it incurs a

Re: [sqlite] Table was deleted on macOS

2019-10-15 Thread Jens Alfke
Was the database in a folder managed by Dropbox or Google Drive or iCloud Drive, i.e. where some background agent could replace it with a 'newer' copy from another computer? —Jens ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http:

[sqlite] Network file system that support sqlite3 well

2019-10-15 Thread Peng Yu
Hi, I'd like to use sqlite3 db files on many compute nodes. But they should access the same storage device for the sqlite3 db files. The directory storing the db files looks the same on any compute node logically---the storage is mounted at the same mount point on the compute nodes. To achieve th

Re: [sqlite] Last record

2019-10-15 Thread Wolfgang Enzinger
Am Tue, 15 Oct 2019 13:36:37 -0800 schrieb Adam Levy: > Although what Doug suggested could work, it doesn't make sense to me to add > an extra count or max query just to know how many results will be returned > when those results will be queried anyway. One typical use case I can think of is that

Re: [sqlite] Table was deleted on macOS

2019-10-15 Thread Peter da Silva
Check the local time machine backups? Even if you don't have a TM backup drive Mojave maintains on-drive backups. On Tue, 15 Oct 2019, 16:54 Simon Slavin, wrote: > Sorry, I have no other ideas. There is no reason for a table to disappear. > ___ > sqli

Re: [sqlite] Last record

2019-10-15 Thread Warren Young
On Oct 15, 2019, at 1:52 PM, Don V Nielsen wrote: > > what if one has a peanut allergy? You’re joking, but it gives us cause to extend the fable profitably: use the proper WHERE clause. SELECT * FROM food WHERE type != 'peanuts' The maid delivers whatever you ask for, within the limits sp

Re: [sqlite] Table was deleted on macOS

2019-10-15 Thread Simon Slavin
Sorry, I have no other ideas. There is no reason for a table to disappear. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Table was deleted on macOS

2019-10-15 Thread t...@qvgps.com
-- Originalnachricht -- Von: "Simon Slavin" mailto:slav...@bigfraud.org>> An: "SQLite mailing list" mailto:sqlite-users@mailinglists.sqlite.org>> Gesendet: 15.10.2019 23:24:17 Betreff: Re: [sqlite] Table was deleted on macOS On 15 Oct 2019, at 10:11pm, t...@qvgps.com

Re: [sqlite] Last record

2019-10-15 Thread Adam Levy
Why can't the knowledge of the "last row" be obtained and used by the application after _step returns SQLITE_DONE? Although what Doug suggested could work, it doesn't make sense to me to add an extra count or max query just to know how many results will be returned when those results will be queri

Re: [sqlite] Table was deleted on macOS

2019-10-15 Thread Simon Slavin
On 15 Oct 2019, at 10:11pm, t...@qvgps.com wrote: > "no such table: mytable" > > The client sent us the database and the table "mytable" was really gone. The > database also seems to be fine, no errors. Do you mean by that that you ran integrity_check() ? Is everything else there, or did anot

Re: [sqlite] Last record

2019-10-15 Thread Doug
How about something like this that costs more to run: Given a table T with columns A, B, C,.. BEGIN TRANSACTION SELECT Count(*) AS Count [filter spec]; SELECT A,B,C,... [filter spec]; ROLLBACK or COMMIT Doug > -Original Message- > From: sqlite-users > On Behalf Of Simon Slavin > Sent: T

[sqlite] Table was deleted on macOS

2019-10-15 Thread t...@qvgps.com
Hi Group, here is a very strange and rare fault which one of our users experienced on macOS . He was working in our app for a while creating a lot of new data. So over several hours many INSERT INTO mytable Without any errors. Then he did a query SELECT COUNT(*) FROM mytable WHERE (delete

Re: [sqlite] Last record

2019-10-15 Thread Keith Medcalf
On Tuesday, 15 October, 2019 13:52, Don V Nielsen wrote: >Keith, what if one has a peanut allergy? Well, if one were allergic to beans (colloquially called peanuts for some reason, even though they are not nuts) then I suppose real nuts would do. I have a big tin of mixed Honey Roasted Nuts (

Re: [sqlite] rationale for private archives of the SQLite mailing list and suppressed reply-to

2019-10-15 Thread Warren Young
On Oct 15, 2019, at 8:07 AM, Peter da Silva wrote: > A mail server speaks SMTP for both inbound and outbound That’s only useful if you’ve configured Fossil to integrate with a third-party bidirectional SMTP server, which is *not* the only way to configure Fossil’s email integration: https

Re: [sqlite] Last record

2019-10-15 Thread Don V Nielsen
Keith, what if one has a peanut allergy? On Tue, Oct 15, 2019 at 1:33 PM Jose Isaias Cabrera wrote: > > > Keith Medcalf, on Tuesday, October 15, 2019 02:26 PM, wrote... > > > > > > On Tuesday, 15 October, 2019 09:35, Philippe RIO, on > > > > >A short question : how could I know if I am reading t

Re: [sqlite] Last record

2019-10-15 Thread Jose Isaias Cabrera
Keith Medcalf, on Tuesday, October 15, 2019 02:26 PM, wrote... > > > On Tuesday, 15 October, 2019 09:35, Philippe RIO, on > > >A short question : how could I know if I am reading the last record with > >sqlite (sqlite3_step)? sqlite3_step only returns SQLITE_ROW. Is there a > >function for that

Re: [sqlite] Last record

2019-10-15 Thread Keith Medcalf
On Tuesday, 15 October, 2019 09:35, Philippe RIO <51...@protonmail.ch> wrote: >A short question : how could I know if I am reading the last record with >sqlite (sqlite3_step)? sqlite3_step only returns SQLITE_ROW. Is there a >function for that case which returns SQLITE_DONE? A function which is

Re: [sqlite] Last record

2019-10-15 Thread Chris Green
Philippe RIO <51...@protonmail.ch> wrote: > A short question : how could I know if I am reading the last record with > sqlite (sqlite3_step)? sqlite3_step only returns SQLITE_ROW. Is there a > function for that case which returns SQLITE_DONE? A function which is one > record in advance from sqlite

Re: [sqlite] Last record

2019-10-15 Thread Don V Nielsen
Pardon me for being thick. But the end of what? The end of the sqlite file? The end of a table? The end of a select? I always thought there was no such thing as "a start or an end" as the database is basically air until you request something from it. Even when you have something, it could change i

Re: [sqlite] Last record

2019-10-15 Thread Jens Alfke
> On Oct 15, 2019, at 9:44 AM, Simon Slavin wrote: > > You can then remember the value(s) of some column(s) of the row returned, and > watch for the same one(s) when you do your desired SELECT. As long as all the result rows are unique… All of these workaround seem more expensive/complex tha

Re: [sqlite] Last record

2019-10-15 Thread Jim Morris
In your application you can create a wrapping iterator that pre-reads the next value instead or directly accessing the low level step function. Then you can ask if it is the last. On 10/15/2019 9:44 AM, Simon Slavin wrote: > On 15 Oct 2019, at 5:38pm, Philippe RIO <51...@protonmail.ch> wrote: > >

Re: [sqlite] Last record

2019-10-15 Thread Simon Slavin
On 15 Oct 2019, at 5:38pm, Philippe RIO <51...@protonmail.ch> wrote: > The only way is to make a query for getting the number of records and in the > second query I have to count the number of records retrieved to know if it is > the last one. Assume your intended query specifies an order which

Re: [sqlite] Last record

2019-10-15 Thread Philippe RIO
The only way is to make a query for getting the number of records and in the second query I have to count the number of records retrieved to know if it is the last one. Thank you for the quick answer. - Kenavo https://md5finder.blogspot.com/ (Never be pleased, always improve) -- S

Re: [sqlite] Last record

2019-10-15 Thread Simon Slavin
On 15 Oct 2019, at 4:34pm, Philippe RIO <51...@protonmail.ch> wrote: > how could I know if I am reading the last record with > sqlite (sqlite3_step)? Sorry, there's no way to do that for some arbitrary SELECT. Because SQLite itself may not know. SQLite does not always process your query and s

[sqlite] Last record

2019-10-15 Thread Philippe RIO
A short question : how could I know if I am reading the last record with sqlite (sqlite3_step)? sqlite3_step only returns SQLITE_ROW. Is there a function for that case which returns SQLITE_DONE? A function which is one record in advance from sqlite3_step. Thank every one - Kenavo

Re: [sqlite] rationale for private archives of the SQLite mailing list and suppressed reply-to

2019-10-15 Thread Peter da Silva
I think you're conflating things. A mail server speaks SMTP for both inbound and outbound, IMAP/POP/webmail is all part of the user interface stack... as would be the webforum component in any mailing list/web forum scheme. On Mon, 14 Oct 2019, 20:45 Warren Young, wrote: > On Oct 14, 2019, at 3:

[sqlite] How to to use a custom FTS5 Tokenizer in .NET (C#)

2019-10-15 Thread Agaric Perdereau
Hi Everyone, I am trying to implement a custom .net Tokenizer for FTS5 in .Net but I have absolutely ni idea where to start. Is there any documentation somewhere on that subject? Thanks for your help. -- --- A. Perdereau http://www.neomobili.com

Re: [sqlite] Ensure a snapshot remains readable

2019-10-15 Thread Gwendal Roué
Hello Adam, You may enjoy reading this recent thread, which is exactly about the same topic: http://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-users/2019-September/086099.html The crux of your issue is that sqlite3_snapshot_get() is not involved in transaction management at all. It do