Re: [sqlite] vtable and usable constraint

2017-05-23 Thread Hick Gunter
It should be possible to use SQLite's own statistics tables to arrive at the 
"selectivity" of a given combination of constraints, but since I am using only 
virtual tables over external data I have not looked into the structure and 
meaning of the values stored there. You would also have to keep tabs on the 
number of rows contained in the backing store because calling "SELECT COUNT() 
FROM backing_table;" once for each call to xBestIndex is probably going to take 
a significant amount of time/effort. Maybe even more than what is saved between 
optimal and sub-optimal querry plans.

In my virtual tables, I am assuming that each key field contributes the same 
factor of selectivity. So for a given number of rows (n) the return value would 
be:

for an INTEGER PRIMARY KEY constraint: 1 if it is usable, n if not;

for a unique key of 2 fields: 1 if both are usable, sqrt(n) if only one is 
given and n if neither is usable;

for a non-unique key of 2 fields I pretend that there is a third field that 
would make it unique and go on from there: n^^1/3 if both are usable, n^^2/3 
for one and, predicatbly n for no fields.

The above is just a rule of thumb for the case that detailed statistics are not 
available. If you were know that a certain field is FALSE 90% of the time and 
all your queries select for TRUE, then it would be better to assume a 10-fold 
reduction in record count/effort; if your queries mix TRUE and FALSE, then on 
average 50% of rows will be visited.

HTH
Gunter

-Ursprüngliche Nachricht-
Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im 
Auftrag von petern
Gesendet: Montag, 22. Mai 2017 22:49
An: SQLite mailing list 
Betreff: Re: [sqlite] vtable and usable constraint

Gunter.  Thank you very much for the insightful and detailed answer.

May I ask the obvious and possibly oversimplified question?  This is directed 
to anyone especially those privy to the worked VTab examples DRH mentioned.

Suppose the virtual table is merely a light wrapper over backing_table.  Is 
there a practical formula using input(s) from EXPLAIN or EXPLAIN QUERY PLAN to 
at least approximate  "cost" as SQLite itself would ordinarily calculate
internally to plan the query?   Is DB page size or table rows per page a
factor?

Further to the OP's question, and a good example, what is an approximate 
formula/procedure for calculating cost given the current output of EXPLAIN 
QUERY PLAN SELECT * FROM  backing_table WHERE =?.
Could one simply add up all the table scans (multiplied by pages per row of
each) as first order approximation?

A follow up question.  Perhaps I missed something in the C API.  Is there 
something that can be done with the DB handle after calling one of the _prepare 
or _step functions which reveals the query cost already calculated by SQLite?


On Mon, May 22, 2017 at 1:35 AM, Hick Gunter  wrote:

> SQLite will determine the set of constraints that are possible against
> yout virtual table from the query you are preparing. It will then call
> your xBestIndex function a number of times with different subsets of
> the constraints marked aus "usable". Your xBestIndex function needs to
> return (among other things) the "cost" of performing a lookup with the
> usable constraints (generally as the number of disc accesses required
> to fetch all the matching rows, but in current versions also the
> number of rows expected to be returned from the usable constraints).
>
> Assume you are implementing a table like
>
> CREATE VIRTUAL TABLE mytable (id INTEGER PRIMARY KEY, name TEXT,
> description TEXT, value INTEGER);
>
> Consider some queries against the table:
>
> SELECT * FROM mytable WHERE id=4711;
>
> This should result in 2 calls to xBestIndex, both with a constraint on
> "id"; if id is "usable", xBestIndex should return a cost of 1 (id is
> unique); if not, the number of rows in the table == the cost of a full
> table scan.
>
> SELECT * FROM mytable WHERE name='hugo';  --- assuming there is an
> index on name
>
> Same calls as above, if name is "usable" the cost should be the sum of
> (cost of locating an entry) + (average number of duplicate rows) *
> (cost of stepping to the next entry); if not, the cost of a full table
> ascan as above
>
> SELECT * FROM mytable WHERE value = 4711; ---assuming valueis not
> contained in an index
>
> Always the cost of a full table scan.
>
>
> -Ursprüngliche Nachricht-
> Von: sqlite-users
> [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> Im Auftrag von graf0 post.pl
> Gesendet: Samstag, 20. Mai 2017 13:18
> An: sqlite-users@mailinglists.sqlite.org
> Betreff: [sqlite] vtable and usable constraint
>
> Hello,
>
> I'm trying to implement vtable, and I don't understand what is meaning
> of usable field in sqlite3_index_constraint struct?
>
> Can I assume it will be false when my vtable is joined by that field
> with some other table?
>
> If yes - in what other situations 

Re: [sqlite] Minor issue: compile error with 3.19 and MSVC 2005

2017-05-23 Thread Christian Schmitz

> Am 22.05.2017 um 23:52 schrieb Wolfgang Enzinger :
> 
> Hallo,
> 
> I don't think this is a big deal, but probably helpful for one or another:
> 
> I tried to compile SQLite 3.19 with MSVC 2005 and got a compile error C2143
> at line 143542 of sqlite3.c.

I run into the same issue with VS 2008.
Not a big problem and easy to fix.

I still wonder why it reports an error about an extra semicolon.

Sincerely
Christian

-- 
Read our blog about news on our plugins:

http://www.mbsplugins.de/


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


[sqlite] msvc.h

2017-05-23 Thread Marius Schamschula
Hi all,

As of sqlite3 version 3.19.0 it appears that there is a new header file called 
msvc.h. This file is rather generically named and might cause conflicts with 
other packages.

It would be useful to either rename it and/or put it into a subdirectory: e.g. 
exiv2 uses include/exiv2/exv_msvc.h

Marius
--
Marius Schamschula




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


Re: [sqlite] msvc.h

2017-05-23 Thread Richard Hipp
On 5/23/17, Marius Schamschula  wrote:
>
> As of sqlite3 version 3.19.0 it appears that there is a new header file
> called msvc.h. This file is rather generically named and might cause
> conflicts with other packages.
>

Yes.  I found the need for that file just prior to release and adding
it seemed the safest thing to do.  I plan to remove it again for the
next release.

-- 
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] msvc.h

2017-05-23 Thread Marius Schamschula
Richard,

Thanks for the explanation! I’ll leave the MacPorts Portfile as it is.

> On May 23, 2017, at 11:40 AM, Richard Hipp  wrote:
> 
> On 5/23/17, Marius Schamschula  wrote:
>> 
>> As of sqlite3 version 3.19.0 it appears that there is a new header file
>> called msvc.h. This file is rather generically named and might cause
>> conflicts with other packages.
>> 
> 
> Yes.  I found the need for that file just prior to release and adding
> it seemed the safest thing to do.  I plan to remove it again for the
> next release.
> 
> -- 
> 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

Marius
--
Marius Schamschula




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


Re: [sqlite] Is this a problem?

2017-05-23 Thread Virgilio Fornazin
The command prompt here means your CMD.EXE (Windows) or *nix shell... you
must use sqlite3.exe [dbfile] to get the sqlite shell to use PRAGMA
integrity_check;

*command prompt>* sqlite3 [database filename]
sqlite3> PRAGMA integrity_check;
sqlite3> .quit

On Tue, May 23, 2017 at 7:40 PM, Leona Struckhoff  wrote:

> Rootsmagic is a free geneology software, so you can not enter direct
> commands.  They have a integrity check option in their database tools.  And
> it comes back ok.  If there is a command line option, I have not found it
> yet.
> LOL..My monitor is not upside down and I could read it.
>
>
>   From: Keith Medcalf 
>  To: SQLite mailing list 
>  Sent: Tuesday, May 23, 2017 5:00 PM
>  Subject: Re: [sqlite] Is this a problem?
>
>
> I would suggest following up with RootMagic and see if they have
> overloaded one of the builtin collation sequences (NOCASE comes to mind)
> with something else -- perhaps something that knows how to do Case
> Insensitive and Accent Insensitive across the entire Unicode spectrum.
>
> Can you issue direct SQL Queries to RootMagic, or does it only use
> "pre-canned" queries (pre-canned includes anything where you cannot type an
> SQL statement to execute) such as QBE interfaces.
>
> --
> ˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı
>
>
> > -Original Message-
> > From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> > On Behalf Of moma...@yahoo.com
> > Sent: Tuesday, 23 May, 2017 11:08
> > To: sqlite-users@mailinglists.sqlite.org
> > Subject: [sqlite] Is this a problem?
> >
> > I am new to SQite.  I am not new to queries. I am a 28 year QA Tester. I
> > have been doing queries and macros for the past 25 years.
> >
> > I ran the following query over my RootMagic 7 (Version 7.22.3.0 – 24 Jan
> > 2017)database in SQLite Spy (Version 1.9.11 Win32):
> >
> > --integritycheck.sql
> > PRAGMA integrity_check;
> >
> > I expected to get an OK to be returned.
> >
> > I actually got the following results:
> > multiple rows of “row ??? missing from index idsSourceTemplateName”
> > multiple rows of “row ??? missing from index idxPlaceName”
> > multiple rows of “row ??? missing from index idxSurnameGiven”
> > “row ??? missing from idx Surname”
> > Multiple rows of “row ??? missing from index idxGiven”
> >
> > Yet when I do an integrity check in Rootsmagic 7, it comes back OK.
> > I am kinda confused. RootsMagic says it is ok but SQLite says there are
> > problems.
> >
> > OR, am I doing something wrong in SQLite?
> >
> > If I am not doing anything wrong in SQLite, how do I fix this?
> > If I fix this in SQLite, now I am afraid I won’t get an ok in RootsMagic
> > on their integrity check.
> >
> >
> > Sent from Mail for Windows 10
> >
> > ___
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Is this a problem?

2017-05-23 Thread Leona Struckhoff
Yah! when i did the .open leona.rmgc and then entered pragma 
integrity_check;I got OK 
thank you

  From: Jens Alfke 
 To: SQLite mailing list  
 Sent: Tuesday, May 23, 2017 5:55 PM
 Subject: Re: [sqlite] Is this a problem?
   

> On May 23, 2017, at 3:31 PM, Leona Struckhoff  wrote:
> 
> I placed the Leona.rmcg file in the same folder as the sqlite3.exeI double 
> clicked on sqlite3.exeI noticed my comand prompt had sqlite and not sqlite3.  
> Your examples below have sqlite3.
> I entered the following:sqlite> sqlite3 Leona.rmgc  ...> PRAGMA 
> integrity_check;Error: near "sqlite3": syntax errorsqlite> sqlite3 
> [Leona.rmgc]  ...> PRAGMA integrity_check;Error: near "sqlite3": syntax 
> errorsqlite>

It’s been a long time since I used Windows, but I think that if you 
double-click the EXE you will be running the SQLite command interpreter in the 
window that comes up. So you don’t need to use the “sqlite3” command. 

Instead, type “.open” (with a period!), then a space, and then the full path to 
the database file. That should open the database. Then you can type “pragma 
integrity_check;”.

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


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


Re: [sqlite] Is this a problem?

2017-05-23 Thread Leona Struckhoff
Rootsmagic is a free geneology software, so you can not enter direct commands.  
They have a integrity check option in their database tools.  And it comes back 
ok.  If there is a command line option, I have not found it yet.
LOL..My monitor is not upside down and I could read it.


  From: Keith Medcalf 
 To: SQLite mailing list  
 Sent: Tuesday, May 23, 2017 5:00 PM
 Subject: Re: [sqlite] Is this a problem?
   

I would suggest following up with RootMagic and see if they have overloaded one 
of the builtin collation sequences (NOCASE comes to mind) with something else 
-- perhaps something that knows how to do Case Insensitive and Accent 
Insensitive across the entire Unicode spectrum.

Can you issue direct SQL Queries to RootMagic, or does it only use "pre-canned" 
queries (pre-canned includes anything where you cannot type an SQL statement to 
execute) such as QBE interfaces.

-- 
˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı


> -Original Message-
> From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> On Behalf Of moma...@yahoo.com
> Sent: Tuesday, 23 May, 2017 11:08
> To: sqlite-users@mailinglists.sqlite.org
> Subject: [sqlite] Is this a problem?
> 
> I am new to SQite.  I am not new to queries. I am a 28 year QA Tester. I
> have been doing queries and macros for the past 25 years.
> 
> I ran the following query over my RootMagic 7 (Version 7.22.3.0 – 24 Jan
> 2017)database in SQLite Spy (Version 1.9.11 Win32):
> 
> --integritycheck.sql
> PRAGMA integrity_check;
> 
> I expected to get an OK to be returned.
> 
> I actually got the following results:
> multiple rows of “row ??? missing from index idsSourceTemplateName”
> multiple rows of “row ??? missing from index idxPlaceName”
> multiple rows of “row ??? missing from index idxSurnameGiven”
> “row ??? missing from idx Surname”
> Multiple rows of “row ??? missing from index idxGiven”
> 
> Yet when I do an integrity check in Rootsmagic 7, it comes back OK.
> I am kinda confused. RootsMagic says it is ok but SQLite says there are
> problems.
> 
> OR, am I doing something wrong in SQLite?
> 
> If I am not doing anything wrong in SQLite, how do I fix this?
> If I fix this in SQLite, now I am afraid I won’t get an ok in RootsMagic
> on their integrity check.
> 
> 
> Sent from Mail for Windows 10
> 
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



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


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


Re: [sqlite] Is this a problem?

2017-05-23 Thread Jens Alfke

> On May 23, 2017, at 3:31 PM, Leona Struckhoff  wrote:
> 
> I placed the Leona.rmcg file in the same folder as the sqlite3.exeI double 
> clicked on sqlite3.exeI noticed my comand prompt had sqlite and not sqlite3.  
> Your examples below have sqlite3.
> I entered the following:sqlite> sqlite3 Leona.rmgc   ...> PRAGMA 
> integrity_check;Error: near "sqlite3": syntax errorsqlite> sqlite3 
> [Leona.rmgc]   ...> PRAGMA integrity_check;Error: near "sqlite3": syntax 
> errorsqlite>

It’s been a long time since I used Windows, but I think that if you 
double-click the EXE you will be running the SQLite command interpreter in the 
window that comes up. So you don’t need to use the “sqlite3” command. 

Instead, type “.open” (with a period!), then a space, and then the full path to 
the database file. That should open the database. Then you can type “pragma 
integrity_check;”.

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


[sqlite] UTF8 LIKE stranges

2017-05-23 Thread Vlczech - Tomáš Volf

Hello,
I have some strange behaviout in LIKE query in SQLite. Letš see some very 
simplified example:
 
Let's have a table
CREATE TABLE people (
  firstname  TEXT,
  surname TEXT
);
and in it following data:
INSERT INTO people('Tomáš', 'Surname');
created by sqlite3_exec() function.
 
 
Then I use sqlite3_prepare_v2() function with for example this SQL query string: 
"SELECT * FROM people WHERE firstname LIKE ?".
For binding I use: sqlite3_bind_text(stmt, 1, name.c_str(), -1, SQLITE_STATIC); where name is some 
string for bellow, with "%" char at the end (for example name = "Tom%").
 
Then I use sqlite3_exec() function with callback, where sql string is 
sqlite3_expanded_sql(stmt) from previous rows.
 
The problem is, that row with name "Tomáš" is selected also by following 
strings (with CZ national chars) in variable name used in sqlite3_bind_text:
"Tomě", but no longer with "Toměš""Tomč", but no longer with "Tomčš""Tomř" as well as "Tomřš""Tomý" as well as "Tomýš""Tomí", but no longer with "Tomíš""Tomé", but no longer with 
"Toméš""Tomů" as well as "Tomůš""Tomú", but no longer with "Tomúš""Tomď", but no longer with "Tomďš""Tomň", but no longer with "Tomňš""Tomáž""Tomáť " (without space - it is written purposely cause hook above t 
char is not so visible without the space)+ all of combination where "Tom*š" is successfull and "Tomá*" is successfull:
á = ř: Tomřž, Tomřťá = ý: Tomýž, Tomýťá = ů: Tomůž, Tomůťá = ï (see bellow): Tomïž, 
TomïťFollowing CZ national chars do not lead to select row with name "Tomáš", 
which is correct behavior:
"Tomš""Tomž""Tomť " (without space - it is written purposely cause hook above t char is 
not so visible without the space)For example the problem with other national chars from german language which also 
select row with name "Tomáš":
"Tomä", but no longer with "Tomäš""Tomë", but no longer with "Tomëš""Tomö", but no longer with 
"Tomöš""Tomü" as well as "Tomüš"Followingnational chars do not lead to select row name "Tomáš", which is correct behavior:
"Tomï" 
Or it is only some misuse of sqlite3_*() functions?
 
Thank you, with best regards Tomáš Volf.

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


Re: [sqlite] UTF8 LIKE stranges

2017-05-23 Thread Vlczech - Tomáš Volf

Sorry for "spam", I hope that previous HTML form of mail (with bullet lists) 
will be readable. There is, for sure and better readability for non-HTML clients, plain 
text version of previous mail:
 
Hello,
I have some strange behaviout in LIKE query in SQLite. Letš see some very 
simplified example:
 
Let's have a table
CREATE TABLE people (
  firstname  TEXT,
  surname TEXT
);
and in it following data:
INSERT INTO people('Tomáš', 'Surname');
created by sqlite3_exec() function.
 
 
Then I use sqlite3_prepare_v2() function with for example this SQL query string: 
"SELECT * FROM people WHERE firstname LIKE ?".
For binding I use: sqlite3_bind_text(stmt, 1, name.c_str(), -1, SQLITE_STATIC); where name is some 
string for bellow, with "%" char at the end (for example name = "Tom%").
 
Then I use sqlite3_exec() function with callback, where sql string is 
sqlite3_expanded_sql(stmt) from previous rows.
 
The problem is, that row with name "Tomáš" is selected also by following 
strings (with CZ national chars) in variable name used in sqlite3_bind_text:
* "Tomě", but no longer with "Toměš"
* "Tomč", but no longer with "Tomčš"
* "Tomř" as well as "Tomřš"
* "Tomý" as well as "Tomýš"
* "Tomí", but no longer with "Tomíš"
* "Tomé", but no longer with "Toméš"
* "Tomů" as well as "Tomůš"
* "Tomú", but no longer with "Tomúš"
* "Tomď", but no longer with "Tomďš"
* "Tomň", but no longer with "Tomňš"
* "Tomáž"
* "Tomáť " (without space - it is written purposely cause hook above t char is 
not so visible without the space)
 
+ all of combination where "Tom*š" is successfull and "Tomá*" is successfull:
* á = ř: Tomřž, Tomřť
* á = ý: Tomýž, Tomýť
* á = ů: Tomůž, Tomůť
* á = ï (see bellow): Tomïž, Tomïť 
Following CZ national chars do not lead to select row with name "Tomáš", which 
is correct behavior:
* "Tomš"
* "Tomž"
* "Tomť " (without space - it is written purposely cause hook above t char is 
not so visible without the space) 
 
For example the problem with other national chars from german language which also select 
row with name "Tomáš":
* "Tomä", but no longer with "Tomäš"
* "Tomë", but no longer with "Tomëš"
* "Tomö", but no longer with "Tomöš"
* "Tomü" as well as "Tomüš" 
Following national chars do not lead to select row name "Tomáš", which is 
correct behavior:
* "Tomï"
 
 
Or it is only some misuse of sqlite3_*() functions?
 
Thank you, with best regards Tomáš Volf.
 
 
__

Od: Vlczech - Tomáš Volf 
Komu: 
Datum: 23.05.2017 21:28
Předmět: UTF8 LIKE stranges


Hello,
I have some strange behaviout in LIKE query in SQLite. Letš see some very 
simplified example:
 
Let's have a table
CREATE TABLE people (
  firstname  TEXT,
  surname TEXT
);
and in it following data:
INSERT INTO people('Tomáš', 'Surname');
created by sqlite3_exec() function.
 
 
Then I use sqlite3_prepare_v2() function with for example this SQL query string: 
"SELECT * FROM people WHERE firstname LIKE ?".
For binding I use: sqlite3_bind_text(stmt, 1, name.c_str(), -1, SQLITE_STATIC); where name is some 
string for bellow, with "%" char at the end (for example name = "Tom%").
 
Then I use sqlite3_exec() function with callback, where sql string is 
sqlite3_expanded_sql(stmt) from previous rows.
 
The problem is, that row with name "Tomáš" is selected also by following 
strings (with CZ national chars) in variable name used in sqlite3_bind_text:
"Tomě", but no longer with "Toměš""Tomč", but no longer with "Tomčš""Tomř" as well as "Tomřš""Tomý" as well as "Tomýš""Tomí", but no longer with "Tomíš""Tomé", but no longer with 
"Toméš""Tomů" as well as "Tomůš""Tomú", but no longer with "Tomúš""Tomď", but no longer with "Tomďš""Tomň", but no longer with "Tomňš""Tomáž""Tomáť " (without space - it is written purposely cause hook above t 
char is not so visible without the space)+ all of combination where "Tom*š" is successfull and "Tomá*" is successfull:
á = ř: Tomřž, Tomřťá = ý: Tomýž, Tomýťá = ů: Tomůž, Tomůťá = ï (see bellow): Tomïž, 
TomïťFollowing CZ national chars do not lead to select row with name "Tomáš", 
which is correct behavior:
"Tomš""Tomž""Tomť " (without space - it is written purposely cause hook above t char is 
not so visible without the space)For example the problem with other national chars from german language which also 
select row with name "Tomáš":
"Tomä", but no longer with "Tomäš""Tomë", but no longer with "Tomëš""Tomö", but no longer with 
"Tomöš""Tomü" as well as "Tomüš"Followingnational chars do not lead to select row name "Tomáš", which is correct behavior:
"Tomï" 
Or it is only some misuse of sqlite3_*() functions?
 
Thank you, with best regards Tomáš Volf.

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


[sqlite] Is this a problem?

2017-05-23 Thread momakid
I am new to SQite.  I am not new to queries. I am a 28 year QA Tester. I have 
been doing queries and macros for the past 25 years.

I ran the following query over my RootMagic 7 (Version 7.22.3.0 – 24 Jan 
2017)database in SQLite Spy (Version 1.9.11 Win32):

--integritycheck.sql
PRAGMA integrity_check;

I expected to get an OK to be returned.

I actually got the following results:
multiple rows of “row ??? missing from index idsSourceTemplateName”
multiple rows of “row ??? missing from index idxPlaceName”
multiple rows of “row ??? missing from index idxSurnameGiven”
“row ??? missing from idx Surname”
Multiple rows of “row ??? missing from index idxGiven”

Yet when I do an integrity check in Rootsmagic 7, it comes back OK.
I am kinda confused. RootsMagic says it is ok but SQLite says there are 
problems.

OR, am I doing something wrong in SQLite?

If I am not doing anything wrong in SQLite, how do I fix this?
If I fix this in SQLite, now I am afraid I won’t get an ok in RootsMagic on 
their integrity check.


Sent from Mail for Windows 10

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


Re: [sqlite] Is this a problem?

2017-05-23 Thread Simon Slavin

On 23 May 2017, at 6:07pm, moma...@yahoo.com wrote:
> 
> I ran the following query over my RootMagic 7 (Version 7.22.3.0 – 24 Jan 
> 2017)database in SQLite Spy (Version 1.9.11 Win32):

Neither of these matter.  Neither of these tell you which version of SQLite 
they’re running.  However, the fact that one of them reports corruption does 
suggest there’s something worth investigating.

Please download the SQLite shell tool from "Precompiled Binaries" for your 
platform on the SQLite download page:



Instructions for use here:



But basically …

command prompt> sqlite3 [database filename]
sqlite3> PRAGMA integrity_check;
sqlite3> .quit

Use this tool to execute the pragma you were using: "PRAGMA integrity_check;".  
If it reports your database as corrupt it is definitely corrupt.  If not, 
you’re okay.

At that point you had better contact RootMagic for support.  SQLite can make an 
uncorrupt database from yours, but it might lose data because you don’t know 
what data was lost or overwritten.  RootMagic support are best placed to 
investigate what went wrong and tell you what to do about it.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Is this a problem?

2017-05-23 Thread Keith Medcalf

I would suggest following up with RootMagic and see if they have overloaded one 
of the builtin collation sequences (NOCASE comes to mind) with something else 
-- perhaps something that knows how to do Case Insensitive and Accent 
Insensitive across the entire Unicode spectrum.

Can you issue direct SQL Queries to RootMagic, or does it only use "pre-canned" 
queries (pre-canned includes anything where you cannot type an SQL statement to 
execute) such as QBE interfaces.

-- 
˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı


> -Original Message-
> From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> On Behalf Of moma...@yahoo.com
> Sent: Tuesday, 23 May, 2017 11:08
> To: sqlite-users@mailinglists.sqlite.org
> Subject: [sqlite] Is this a problem?
> 
> I am new to SQite.  I am not new to queries. I am a 28 year QA Tester. I
> have been doing queries and macros for the past 25 years.
> 
> I ran the following query over my RootMagic 7 (Version 7.22.3.0 – 24 Jan
> 2017)database in SQLite Spy (Version 1.9.11 Win32):
> 
> --integritycheck.sql
> PRAGMA integrity_check;
> 
> I expected to get an OK to be returned.
> 
> I actually got the following results:
> multiple rows of “row ??? missing from index idsSourceTemplateName”
> multiple rows of “row ??? missing from index idxPlaceName”
> multiple rows of “row ??? missing from index idxSurnameGiven”
> “row ??? missing from idx Surname”
> Multiple rows of “row ??? missing from index idxGiven”
> 
> Yet when I do an integrity check in Rootsmagic 7, it comes back OK.
> I am kinda confused. RootsMagic says it is ok but SQLite says there are
> problems.
> 
> OR, am I doing something wrong in SQLite?
> 
> If I am not doing anything wrong in SQLite, how do I fix this?
> If I fix this in SQLite, now I am afraid I won’t get an ok in RootsMagic
> on their integrity check.
> 
> 
> Sent from Mail for Windows 10
> 
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



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


Re: [sqlite] Is this a problem?

2017-05-23 Thread Leona Struckhoff
I downloaded sqlite-tools-win32-x86-319.zip from this site: 
https://sqlite.org/download.html
I unzipped it.sqldiff.exe, sqlite3.exe and sqlite3_analyzer.exe were placed in 
the folder
I placed the Leona.rmcg file in the same folder as the sqlite3.exeI double 
clicked on sqlite3.exeI noticed my comand prompt had sqlite and not sqlite3.  
Your examples below have sqlite3.
I entered the following:sqlite> sqlite3 Leona.rmgc   ...> PRAGMA 
integrity_check;Error: near "sqlite3": syntax errorsqlite> sqlite3 [Leona.rmgc] 
  ...> PRAGMA integrity_check;Error: near "sqlite3": syntax errorsqlite>
I wasn't sure if i needed the [ ] around the file name so it did it with and 
without.  I got the same results.


  From: Simon Slavin 
 To: SQLite mailing list  
 Sent: Tuesday, May 23, 2017 4:32 PM
 Subject: Re: [sqlite] Is this a problem?
   

On 23 May 2017, at 6:07pm, moma...@yahoo.com wrote:
> 
> I ran the following query over my RootMagic 7 (Version 7.22.3.0 – 24 Jan 
> 2017)database in SQLite Spy (Version 1.9.11 Win32):

Neither of these matter.  Neither of these tell you which version of SQLite 
they’re running.  However, the fact that one of them reports corruption does 
suggest there’s something worth investigating.

Please download the SQLite shell tool from "Precompiled Binaries" for your 
platform on the SQLite download page:



Instructions for use here:



But basically …

command prompt> sqlite3 [database filename]
sqlite3> PRAGMA integrity_check;
sqlite3> .quit

Use this tool to execute the pragma you were using: "PRAGMA integrity_check;".  
If it reports your database as corrupt it is definitely corrupt.  If not, 
you’re okay.

At that point you had better contact RootMagic for support.  SQLite can make an 
uncorrupt database from yours, but it might lose data because you don’t know 
what data was lost or overwritten.  RootMagic support are best placed to 
investigate what went wrong and tell you what to do about it.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


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


Re: [sqlite] SQLite on .NET Standard

2017-05-23 Thread Damien
Hi,

For DotNet core, there is an implementation of sqlite for entity framework.
maybe you can dig the dependencies to find the sqlite packages.
I remember to have done this some time ago, worked well, but some features
missing.

Damien

Le 23 mai 2017 21:04, "Mark Raymond"  a écrit :

> System.Data.SQLite is available for .NET Framework 2.0+, but as far as I
> can tell it does not support .NET Core or .NET Standard. Are there any
> plans to bring System.Data.SQLite to .NET Standard, or failing that .NET
> Core, so that I can write cross-platform .NET code using SQLite?
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQLite on .NET Standard

2017-05-23 Thread Mark Raymond
System.Data.SQLite is available for .NET Framework 2.0+, but as far as I can 
tell it does not support .NET Core or .NET Standard. Are there any plans to 
bring System.Data.SQLite to .NET Standard, or failing that .NET Core, so that I 
can write cross-platform .NET code using SQLite?
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users