Re: [sqlite] Typos in the documentation

2017-11-09 Thread nomad
On Thu Nov 09, 2017 at 09:53:45PM +0100, Philip Newton wrote:
> 
> https://www.sqlite.org/inmemorydb.html under "Testing Services" near
> the end has this as its final sentence:
> 
> "Hardware or system manufactures who want to have TH3 test run on
> their systems can negotiation a service agreement to have the SQLite
> Developers run those tests."

Possibly "manufacturers" above is also missing an extra "r."

-- 
Mark Lawrence
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Does wal-file support MMAP?

2017-11-09 Thread Simon Slavin


On 10 Nov 2017, at 5:35am, advancenOO  wrote:

> In multi-thread scenario, I guess that threads may not use MMAP correctly
> after one thread truncates wal-file. And that is the reason MMAP can not be
> used together with WAL mode.

Are the threads using the same connection ?

> So, I am wondering if I can simply make the size of Wal-file a fixed size to
> support MMAP for wal-file.

What makes you think you need to use memory mapping ?  It is purely for speed 
or do you have a hardware-based reason ?  Have you tried your program without 
memory mapping to see if it’s fast enough ?

Simon.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Does wal-file support MMAP?

2017-11-09 Thread advancenOO
In multi-thread scenario, I guess that threads may not use MMAP correctly
after one thread truncates wal-file. And that is the reason MMAP can not be
used together with WAL mode.

So, I am wondering if I can simply make the size of Wal-file a fixed size to
support MMAP for wal-file.



--
Sent from: http://sqlite.1065341.n5.nabble.com/
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Typos in the documentation

2017-11-09 Thread Richard Hipp
On 11/9/17, Peter Da Silva  wrote:
> Also perhaps “page cache” rather than “pager cache”?

The "pager cache" is the cache that belongs to the "pager" module.

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Typos in the documentation

2017-11-09 Thread Peter Da Silva
Also perhaps “page cache” rather than “pager cache”?
 

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Typos in the documentation

2017-11-09 Thread Richard Hipp
On 11/9/17, Philip Newton  wrote:
> Hello, I would like to report two typos in the documentation on the
> website - I hope this is the appropriate forum to do so.

It is.  Problems fixed now.  Thanks.

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Simple Search using LIKE or something else

2017-11-09 Thread Peter Da Silva
On 11/9/17, 2:51 PM, "sqlite-users on behalf of Stephen Chrzanowski" 
 
wrote:
> I've added a simple filter function that uses SQLites LIKE operator, but I'd 
> like something a little bit more advanced.  Right now, the SQL code is like:
> 
> select * from Events where Title like '%Abc%Def%'
> 
>  This works if the Title is AbcRfeDef, but would fail with FedRfeAbc.
> 
> I've thought about doing some kind of delimiter, then have the code generate 
> the SQL code by just looping through the keywords and generate the "or Title 
> like '%keyword%'" statement (With appropriate escaping), but that just smells 
> bad to me.

The best way to do it is not to use complex keys, but if you have to (say 
because the input is free form) then generating

SELECT * FROM EVENTS WHERE title LIKE ‘%Abc%’ AND title LIKE ‘%Def%’;

is probably the only option.
 

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Simple Search using LIKE or something else

2017-11-09 Thread Jens Alfke


> On Nov 9, 2017, at 12:50 PM, Stephen Chrzanowski  wrote:
> 
> Is there any trick I can use that'll return AbcRfeDef and FedRfeAbc if
> the two keywords are Abc and Def from a SQL call?

Use full-text search (FTS4 or FTS5). This is exactly what it’s for.

Or as a hacky workaround, change the query to “… Title like ‘%Abc%’ and Title 
like ‘%Def%’”.

—Jens
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Typos in the documentation

2017-11-09 Thread Philip Newton
Hello, I would like to report two typos in the documentation on the
website - I hope this is the appropriate forum to do so.


https://www.sqlite.org/inmemorydb.html under "Testing Services" near
the end has this as its final sentence:

"Hardware or system manufactures who want to have TH3 test run on
their systems can negotiation a service agreement to have the SQLite
Developers run those tests."

"can negotiation" --> "can negotiate", I think


https://www.sqlite.org/inmemorydb.html under "Temporary database" near
the end has this sentence in the middle paragraph:

"Even though a disk file is allocated for each temporary database, in
practice the temporary database usually resides in the in-memory pager
cache and hence is very little difference between a pure in-memory
database created by ":memory:" and a temporary database created by an
empty filename."

I think that "hence is very littler difference" should be "hence there
is very little difference" (i.e. add the word "there" between "hence"
and "is").


Cheers,
Philip
-- 
Philip Newton 
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Simple Search using LIKE or something else

2017-11-09 Thread Stephen Chrzanowski
I've written Win32 desktop alarm clock that can store unlimited number
of alarms (Pending drive space, of course).  The problem I'm having is
that right now, I've got about 20 alarms for things I need to do over
the next couple of weeks that its getting harder to find what I need
to update if needed (Changing schedules, text, etc).

I've added a simple filter function that uses SQLites LIKE operator,
but I'd like something a little bit more advanced.  Right now, the
SQL code is like:

select * from Events where Title like '%Abc%Def%'

This works if the Title is AbcRfeDef, but would fail with FedRfeAbc.

I've thought about doing some kind of delimiter, then have the code
generate the SQL code by just looping through the keywords and
generate the "or Title like '%keyword%'" statement (With appropriate
escaping), but that just smells bad to me.

I'm using the amalgamation by default, so I don't think FTS is in the
DLL.  I can recompile, but that now introduces complications on
machines that may not have this exact DLL.  (A couple people in my
company use this app)

Is there any trick I can use that'll return AbcRfeDef and FedRfeAbc if
the two keywords are Abc and Def from a SQL call?
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Using .testcase and .check in continuous integration test

2017-11-09 Thread Dominique Devienne
On Tue, Oct 17, 2017 at 3:52 PM Dominique Devienne 
wrote:

> On Tue, Oct 17, 2017 at 3:16 PM, Lodewijk Duymaer van Twist <
> lodew...@adesys.nl> wrote:
>
>> Thank you for investigating. You're fix works. Should I repost this as a
>> bug with your fix, or will this be picked up as is right now?
>>
>
> Glad it did. Just sit tight and again wait and see if Dr Hipp agrees the
> behavior should change or not.
> I'm hopeful he might, but if he doesn't, there's little you can do about
> it. I don't think reposting is necessary for now. --DD
>

FYI, Richard checked the change in the day of that post.
Only noticed it today, thus this late answer.  Thank you Richard.
http://www.sqlite.org/src/info/e2af0cc6ef5fafc7
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] tiny doc suggestion for FTS5

2017-11-09 Thread Mark Summerfield
Hi,

This page: https://www.sqlite.org/fts5.html has examples such as:

SELECT * FROM email WHERE email = 'fts5';

I find this really confusing. Basically _any_ other text to search for
would be better, e.g.:

SELECT * FROM email WHERE email = 'target'; -- or 'findme' or 'some text'

Best wishes,
-- 
Mark Summerfield, Qtrac Ltd.
DiffPDF for Windows - PDF comparison tool
http://www.qtrac.eu/diffpdf.html
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users