[sqlite] Filename encoding on Unix platforms

2018-06-05 Thread Christopher Head
Hello, I have a question regarding text encoding of filenames on Unix platforms. I’ve read the two related mailing list threads I could find in the archive, and

Re: [sqlite] Size of the SQLite library

2018-06-05 Thread Robert M. Münch
On 31 May 2018, at 19:15, Richard Hipp wrote: > But more recently, mobile phone designers are telling me things like > "try to keep the size under 5 megabytes, if you can, please." > > Based on those more recent conversations, I'm thinking that we have > more headroom that we have had

Re: [sqlite] Filename encoding on Unix platforms

2018-06-05 Thread Clemens Ladisch
Christopher Head wrote: > (1) SQLite developers believe that Unix filenames should be UTF-8 ... > (2) SQLite developers believe that Unix filenames should be locale-encoded ... This might sound like a truism, but one of the goals of the SQLite library is to actually work. Therefore, it does not

Re: [sqlite] R*Tree / In Memory Database / GUI Object Hit Testing

2018-06-05 Thread Robert M. Münch
On 20 May 2018, at 15:56, Clemens Ladisch wrote: > Robert M. Münch wrote: >> I’m wondering if the R*Tree index of Sqlite could be used to implement >> GUI object hit testing? > > Yes, that would be possible. Using this approach now for some time with a memory database and it works great! > In

Re: [sqlite] Reset the cursor

2018-06-05 Thread Igor Korot
Hi, Keith, On Mon, Jun 4, 2018 at 1:39 PM, Keith Medcalf wrote: > > Perhaps. In order for the sqlite3_errcode(db) to have any meaning then the > immediately preceding API call must have failed with an error (that is, > returned a result other than SQLITE_OK, SQLITE_ROW, or SQLITE_DONE). The

Re: [sqlite] Getting call backs on WRITEs?

2018-06-05 Thread Warren Young
On Jun 5, 2018, at 9:46 AM, Stephen Chrzanowski wrote: > > I'm *DREAMING* for a way to allow for an application level notification > system that when a write to the database is performed from anywhere It’s usually better to say what problem you’re trying to solve rather than specify the form

Re: [sqlite] Filename encoding on Unix platforms

2018-06-05 Thread Bob Friesenhahn
On Mon, 4 Jun 2018, Christopher Head wrote: Hello, I have a question regarding text encoding of filenames on Unix platforms. I’ve read the two related mailing list threads I could find A Unix platform! If it is Unix, it must be inituitively obvious and we should be able to close the gates

[sqlite] Getting call backs on WRITEs?

2018-06-05 Thread Stephen Chrzanowski
Using the Amalgamation DLL, I'd like to know if there is a function that is exposed when any WRITE function to the database happens on a per connection basis, a call back to my program (Delphi - Tokyo and Berlin) will happen and I can act on the results. I don't think I'll be concerned about the

Re: [sqlite] Getting call backs on WRITEs?

2018-06-05 Thread Dan Kennedy
On 06/05/2018 10:46 PM, Stephen Chrzanowski wrote: Using the Amalgamation DLL, I'd like to know if there is a function that is exposed when any WRITE function to the database happens on a per connection basis, a call back to my program (Delphi - Tokyo and Berlin) will happen and I can act on the

Re: [sqlite] Reset the cursor

2018-06-05 Thread Igor Korot
Hi, Keith, On Tue, Jun 5, 2018 at 11:04 AM, Keith Medcalf wrote: > > Hmmm. I replaced the :memory: database with an on-disk database and created > a table with nothing in it. The first run returned SQLITE_DONE immediately > and the resets worked normally. Are you using a virtual table or a

[sqlite] Remove me pleas

2018-06-05 Thread Diannesykes
Please please remove me from List I beg you Sent from my iPhone ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Reset the cursor

2018-06-05 Thread Igor Korot
Hi, Keith, I'm sorry for that but I just realized what is the difference between you program and mine. Can you modify the query to not return any rows and re-run your test program? Because when I run it first time the query doesn't return any rows and n the first iteration sqlite3_step() gives

Re: [sqlite] Filename encoding on Unix platforms

2018-06-05 Thread Scott Robison
On Mon, Jun 4, 2018 at 10:56 PM, Christopher Head wrote: > Hello, > I have a question regarding text encoding of filenames on Unix > platforms. I’ve read the two related mailing list threads I could find > in the archive, >

Re: [sqlite] Filename encoding on Unix platforms

2018-06-05 Thread Richard Hipp
(I just noticed that much of the sqlite-users mailing list traffic has been going into my spam folder for the past few days. I am trying to clear the backlog now...) On 6/5/18, Christopher Head wrote: > > My question is this: In those two mailing list posts, it was explained > that SQLite’s

Re: [sqlite] Reset the cursor

2018-06-05 Thread Keith Medcalf
Hmmm. I replaced the :memory: database with an on-disk database and created a table with nothing in it. The first run returned SQLITE_DONE immediately and the resets worked normally. Are you using a virtual table or a non-select statement? SQLite version 3.24.0 2018-06-04 19:24:41 Enter

Re: [sqlite] Filename encoding on Unix platforms

2018-06-05 Thread Chris Brody
On Tue, Jun 5, 2018 at 2:27 PM, Warren Young wrote: > > On Jun 5, 2018, at 11:39 AM, R Smith wrote: > > > > Any idea what might be the sudden spam activator? I'm using Thunderbird > > client and gmail service. Weird. > > Gmail seems to now consider an origin of mailinglists.sqlite.org to be a

Re: [sqlite] Filename encoding on Unix platforms

2018-06-05 Thread R Smith
On 2018/06/05 5:24 PM, Richard Hipp wrote: (I just noticed that much of the sqlite-users mailing list traffic has been going into my spam folder for the past few days. I am trying to clear the backlog now...) Same thing happened for me, I thought the list just went quiet suddenly - until I

Re: [sqlite] Filename encoding on Unix platforms

2018-06-05 Thread Warren Young
On Jun 5, 2018, at 11:39 AM, R Smith wrote: > > Any idea what might be the sudden spam activator? I'm using Thunderbird > client and gmail service. Weird. Gmail seems to now consider an origin of mailinglists.sqlite.org to be a high-quality signal of spam. I’ve forwarded a good email to

Re: [sqlite] Getting call backs on WRITEs?

2018-06-05 Thread Stephen Chrzanowski
Thanks Dan. Initial glance, looks to be something that I can tie into. On Tue, Jun 5, 2018 at 12:14 PM, Dan Kennedy wrote: > > It might be worth looking at the "sessions" module: > > https://www.sqlite.org/sessionintro.html > > Sessions uses this to get SQLite to make the required callbacks:

Re: [sqlite] Getting call backs on WRITEs?

2018-06-05 Thread Stephen Chrzanowski
The problem I have is that I was wondering what kind of hooks are available to get my application to do what I need it to do 'in a moment', so my app can hand off information to another service at a time that is convenient. None of these applications describe a hook for my Delphi code, but

Re: [sqlite] Size of the SQLite library

2018-06-05 Thread Roger Binns
On 01/06/18 13:46, Warren Young wrote: > Your jQuery example later on doesn’t much apply here, for several reasons: Note that I was showing how the site let you choose whatever features you want, and then gave you a download matching exactly that. > 1. JavaScript is a dynamic language, while C

Re: [sqlite] Reset the cursor

2018-06-05 Thread Igor Korot
Hi, Olivier, On Tue, Jun 5, 2018 at 3:15 PM, Olivier Mascia wrote: >> Le 5 juin 2018 à 18:19, Igor Korot a écrit : >> >> My query is: >> >> std::string query = "PRAGMA foreign_key_list( \"%w\" )"; >> >> Then I'm doing this: >> >> char *y = sqlite3_mprintf( query.c_str(), tableName ); >> res =

Re: [sqlite] Reset the cursor

2018-06-05 Thread Olivier Mascia
> Le 5 juin 2018 à 22:47, Igor Korot a écrit : > > As a side note: is it the case for all PRAGMA's command - they can be > rewritten this way? Full documentation for that is on page https://www.sqlite.org/pragma.html, see the second title ("PRAGMA functions"). Citing in short: // PRAGMAs that

Re: [sqlite] Reset the cursor

2018-06-05 Thread Olivier Mascia
> Le 5 juin 2018 à 18:19, Igor Korot a écrit : > > My query is: > > std::string query = "PRAGMA foreign_key_list( \"%w\" )"; > > Then I'm doing this: > > char *y = sqlite3_mprintf( query.c_str(), tableName ); > res = sqlite3_prepare_v2( m_db, y, -1, , 0 ); > > and then the code follows. > >

Re: [sqlite] Getting call backs on WRITEs?

2018-06-05 Thread Warren Young
On Jun 5, 2018, at 1:04 PM, Stephen Chrzanowski wrote: > > None of these applications describe a hook for my Delphi code This feels like an instance of the XY problem: https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem You’re focused on your predetermined solution and

Re: [sqlite] Reset the cursor

2018-06-05 Thread Keith Medcalf
Hmmm. I modified the data to CREATE TABLE test (id integer primary key); CREATE TABLE test2 (data integer not null references test); and using the statement "pragma foreign_key_list(\"test2\");" or "pragma foreign_key_list(\"test\");" both appear to work the same as a standard select, that

Re: [sqlite] Reset the cursor

2018-06-05 Thread Keith Medcalf
Most of them. In particular those that return (as in SELECT) data work either way. Those that set things can only be used as a pragma. Note that the table name is passed differently (in the case of pragma's expecting an identifier). It is an identifier in the case of a pragma statement,

[sqlite] Trigger behaviour on UPDATE after release 3.24.0

2018-06-05 Thread Stéphane Aulery
Hello, The changelog of the last release [1] say at the point 13 : UPDATE avoids writing database pages that do not actually change. For example, "UPDATE t1 SET x=25 WHERE y=?" becomes a no-op if the value in column x is already 25. Similarly, when doing UPDATE on records that span multiple

Re: [sqlite] Size of the SQLite library

2018-06-05 Thread Warren Young
On Jun 5, 2018, at 2:24 PM, Roger Binns wrote: > > For example to exclude virtual tables from SQLite, you can't just add a > compile time option and be done. You have to regenerate from the > grammar (so it is no longer valid SQL syntax and no longer has calls to > virtual table relevant

Re: [sqlite] Trigger behaviour on UPDATE after release 3.24.0

2018-06-05 Thread Richard Hipp
On 6/5/18, Stéphane Aulery wrote: > Hello, > > The changelog of the last release [1] say at the point 13 : > > UPDATE avoids writing database pages that do not actually change. For > example, "UPDATE t1 SET x=25 WHERE y=?" becomes a no-op if the value in > column x is already 25. Similarly, when