Re: [sqlite] Documentation improvement request

2020-02-08 Thread Warren Young
On Feb 8, 2020, at 11:56 AM, Simon Slavin  wrote:
> 
> ?  I don't know whether this can be done automatically.  Possibly for any 
> page which has section headers.

Yes, it can be done, and I’ve lined out several options for doing so here:

https://www.fossil-scm.org/forum/forumpost/a5e1391eb3

Someone now needs to decide this is their itch and teach Fossil how to do one 
of these things.

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


Re: [sqlite] Documentation bug: CREATE TABLE diagram misplaces comma

2019-09-18 Thread Tim McCormack
On Wed, 18 Sep 2019 17:59:46 +, David Raymond wrote:
> It is comma then table-constraint. Check the direction of the arrow
> on that loop.

Ah! Sorry for the noise, I missed the direction.

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


Re: [sqlite] Documentation bug: CREATE TABLE diagram misplaces comma

2019-09-18 Thread David Raymond
It is comma then table-constraint. Check the direction of the arrow on that 
loop. You go past it on the main line, go down into the ,-circle, then follow 
the arrow left into the table-constraint box, then continue the loop clockwise 
to meet back up with the main line.


-Original Message-
From: sqlite-users  On Behalf Of 
Tim McCormack
Sent: Wednesday, September 18, 2019 9:14 AM
To: sqlite-users@mailinglists.sqlite.org
Subject: [sqlite] Documentation bug: CREATE TABLE diagram misplaces comma

In https://www.sqlite.org/lang_createtable.html the diagram for
create-table-stmt contains a parenthesized list of column-def and
table-constraint, which I'll represent in a pseudo-grammar here:

"("  ("," )* ( ",")* ")"

However, that would forbid (foo, bar, PRIMARY_KEY foo) and require
instead something like (foo, bar PRIMARY_KEY foo,).

The fix is to change the  "," loop to instead be
"," .

 - Tim McCormack
___
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] Documentation misunderstanding or bug (FTS3 and "^" character)?

2019-08-30 Thread mailing lists
Hi,

yes, but unfortunately I have still a project using FTS3 tables to which I have 
to add new features..

Regards,
Hardy

> Am 2019-08-30 um 13:00 schrieb Dan Kennedy :
> 
> 
> On 30/8/62 17:39, mailing lists wrote:
>> Hi,
>> 
>> but there is no token '^beta'! Even if in FTS3 '^' is not regarded as a 
>> special character. Is the '^' removed by the tokenizer?
> 
> Right. It's removed by the tokenizer.
> 
> FTS3/4 is focused on backwards compatibility. New work should really use FTS5 
> - it's faster, has more features, is better tested and the query syntax is 
> properly defined.
> 
> https://sqlite.org/fts5.html
> 
> Dan.
> 
> 
> 
>> Because it is regarded as a diacritical character?
>> 
>> PS: I have to admit that I have overlooked the comment that '^' works only 
>> for FTS4 tables.
>> 
>> Regards,
>> Hardy
>> 
>>> Am 2019-08-30 um 12:24 schrieb Dan Kennedy :
>>> 
>>> 
>>> 
>>> The fts3/4 documentation says:
>>> 
>>> "If the FTS table is an FTS4 table (not FTS3), a token may also be prefixed 
>>> with a "^" character. In this case, in order to match the token must appear 
>>> as the very first token in any column of the matching row."
>>> 
>>> So change "FTS3" to "FTS4" and it will likely work.
>>> 
>>> Dan.
>>> 
>>> 
>>> On 30/8/62 16:31, mailing lists wrote:
 Hi,
 
 I could not find an example showing a result in the documentation, 
 therefore I created one by myself:
 
 CREATE VIRTUAL TABLE myData USING FTS3(content);
 INSERT INTO myData 'alpha beta';
 
 1)
 SELECT * FROM myData WHERE myData MATCH 'beta';
 
 Result:
 
 content
 alpha beta
 
 This is what I expected.
 
 2)
 SELECT * FROM myData WHERE myData MATCH '^beta';
 
 Result:
 
 content
 alpha beta
 
 This is what I did not expect. According to the documentation I expected 
 to get no rows because the column begins with alpha and not with beta.
 
 What's the issue here? I tested these examples using version 3.24.0.
 
 Regards,
 Hardy
 
 ___
 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

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


Re: [sqlite] Documentation misunderstanding or bug (FTS3 and "^" character)?

2019-08-30 Thread Dan Kennedy


On 30/8/62 17:39, mailing lists wrote:

Hi,

but there is no token '^beta'! Even if in FTS3 '^' is not regarded as a special 
character. Is the '^' removed by the tokenizer?


Right. It's removed by the tokenizer.

FTS3/4 is focused on backwards compatibility. New work should really use 
FTS5 - it's faster, has more features, is better tested and the query 
syntax is properly defined.


https://sqlite.org/fts5.html

Dan.




Because it is regarded as a diacritical character?

PS: I have to admit that I have overlooked the comment that '^' works only for 
FTS4 tables.

Regards,
Hardy


Am 2019-08-30 um 12:24 schrieb Dan Kennedy :



The fts3/4 documentation says:

"If the FTS table is an FTS4 table (not FTS3), a token may also be prefixed with a 
"^" character. In this case, in order to match the token must appear as the very first 
token in any column of the matching row."

So change "FTS3" to "FTS4" and it will likely work.

Dan.


On 30/8/62 16:31, mailing lists wrote:

Hi,

I could not find an example showing a result in the documentation, therefore I 
created one by myself:

CREATE VIRTUAL TABLE myData USING FTS3(content);
INSERT INTO myData 'alpha beta';

1)
SELECT * FROM myData WHERE myData MATCH 'beta';

Result:

content
alpha beta

This is what I expected.

2)
SELECT * FROM myData WHERE myData MATCH '^beta';

Result:

content
alpha beta

This is what I did not expect. According to the documentation I expected to get 
no rows because the column begins with alpha and not with beta.

What's the issue here? I tested these examples using version 3.24.0.

Regards,
Hardy

___
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] Documentation misunderstanding or bug (FTS3 and "^" character)?

2019-08-30 Thread mailing lists
Hi,

but there is no token '^beta'! Even if in FTS3 '^' is not regarded as a special 
character. Is the '^' removed by the tokenizer? Because it is regarded as a 
diacritical character?

PS: I have to admit that I have overlooked the comment that '^' works only for 
FTS4 tables.

Regards,
Hardy

> Am 2019-08-30 um 12:24 schrieb Dan Kennedy :
> 
> 
> 
> The fts3/4 documentation says:
> 
> "If the FTS table is an FTS4 table (not FTS3), a token may also be prefixed 
> with a "^" character. In this case, in order to match the token must appear 
> as the very first token in any column of the matching row."
> 
> So change "FTS3" to "FTS4" and it will likely work.
> 
> Dan.
> 
> 
> On 30/8/62 16:31, mailing lists wrote:
>> Hi,
>> 
>> I could not find an example showing a result in the documentation, therefore 
>> I created one by myself:
>> 
>> CREATE VIRTUAL TABLE myData USING FTS3(content);
>> INSERT INTO myData 'alpha beta';
>> 
>> 1)
>> SELECT * FROM myData WHERE myData MATCH 'beta';
>> 
>> Result:
>> 
>> content
>> alpha beta
>> 
>> This is what I expected.
>> 
>> 2)
>> SELECT * FROM myData WHERE myData MATCH '^beta';
>> 
>> Result:
>> 
>> content
>> alpha beta
>> 
>> This is what I did not expect. According to the documentation I expected to 
>> get no rows because the column begins with alpha and not with beta.
>> 
>> What's the issue here? I tested these examples using version 3.24.0.
>> 
>> Regards,
>> Hardy
>> 
>> ___
>> 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] Documentation misunderstanding or bug (FTS3 and "^" character)?

2019-08-30 Thread Dan Kennedy



The fts3/4 documentation says:

"If the FTS table is an FTS4 table (not FTS3), a token may also be 
prefixed with a "^" character. In this case, in order to match the token 
must appear as the very first token in any column of the matching row."


So change "FTS3" to "FTS4" and it will likely work.

Dan.


On 30/8/62 16:31, mailing lists wrote:

Hi,

I could not find an example showing a result in the documentation, therefore I 
created one by myself:

CREATE VIRTUAL TABLE myData USING FTS3(content);
INSERT INTO myData 'alpha beta';

1)
SELECT * FROM myData WHERE myData MATCH 'beta';

Result:

content
alpha beta

This is what I expected.

2)
SELECT * FROM myData WHERE myData MATCH '^beta';

Result:

content
alpha beta

This is what I did not expect. According to the documentation I expected to get 
no rows because the column begins with alpha and not with beta.

What's the issue here? I tested these examples using version 3.24.0.

Regards,
Hardy

___
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] Documentation update request

2019-08-15 Thread Jose Isaias Cabrera

Kevin Benson, on Thursday, August 15, 2019 02:40 PM, wrote...
>
> On Thu, Aug 15, 2019 at 2:33 PM Jose Isaias Cabrera, on
> wrote:

> > Oh! Trickery!
> >
> >
> Dickery (sometimes a nickname for RICHARD ;-)
> Doc (...umentation; the something Richard "Dick" Hipp was doing ;-)

I could never use those words for Dr. Hipp, nor anyone in this list. ;-)

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


Re: [sqlite] Documentation update request

2019-08-15 Thread Kevin Benson
On Thu, Aug 15, 2019 at 2:33 PM Jose Isaias Cabrera 
wrote:

> Richard Hipp, on Thursday, August 15, 2019 01:32 PM, wrote...
> >
> > On 8/15/19, Simon Slavin, on
> > > On 15 Aug 2019, at 5:20pm, Richard Damon, on
> > >
> > >> You under quote, the faq says it “can not be changed (except under
> > >> extra-ordinary conditions).”, and those extra-ordinary conditions are
> a
> > >> link to the second section you mention.
> > >
> > > I didn't notice that, for some reason.  Thanks for the correction.
> >
> > You didn't notice it because I only added it moments ago, in response
> > to your documentation update request.
>
> Oh! Trickery!
>
>
Dickery (sometimes a nickname for RICHARD ;-)
Doc (...umentation; the something Richard "Dick" Hipp was doing ;-)
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Documentation update request

2019-08-15 Thread Jose Isaias Cabrera
Richard Hipp, on Thursday, August 15, 2019 01:32 PM, wrote...
>
> On 8/15/19, Simon Slavin, on
> > On 15 Aug 2019, at 5:20pm, Richard Damon, on
> >
> >> You under quote, the faq says it “can not be changed (except under
> >> extra-ordinary conditions).”, and those extra-ordinary conditions are a
> >> link to the second section you mention.
> >
> > I didn't notice that, for some reason.  Thanks for the correction.
>
> You didn't notice it because I only added it moments ago, in response
> to your documentation update request.

Oh! Trickery!

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


Re: [sqlite] Documentation update request

2019-08-15 Thread Richard Hipp
On 8/15/19, Simon Slavin  wrote:
> On 15 Aug 2019, at 5:20pm, Richard Damon  wrote:
>
>> You under quote, the faq says it “can not be changed (except under
>> extra-ordinary conditions).”, and those extra-ordinary conditions are a
>> link to the second section you mention.
>
> I didn't notice that, for some reason.  Thanks for the correction.

You didn't notice it because I only added it moments ago, in response
to your documentation update request.


-- 
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] Documentation update request

2019-08-15 Thread Simon Slavin
On 15 Aug 2019, at 5:20pm, Richard Damon  wrote:

> You under quote, the faq says it “can not be changed (except under 
> extra-ordinary conditions).”, and those extra-ordinary conditions are a link 
> to the second section you mention.

I didn't notice that, for some reason.  Thanks for the correction.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Documentation update request

2019-08-15 Thread Richard Damon

> On Aug 15, 2019, at 10:37 AM, Simon Slavin  wrote:
> 
> 
> 
> says that sqlite_master cannot be changed.
> 
> 
> 
> tells you how to change it.
> 

You under quote, the faq says it “can not be changed (except under 
extra-ordinary conditions).”, and those extra-ordinary conditions are a link to 
the second section you mention.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Documentation correction

2019-04-16 Thread Don V Nielsen
On the heel of Tom's input is the fragment " then that name always refers
the explicitly declared column". Should that be " then that name always
refers *to* the explicitly declared column"?

On Mon, Apr 15, 2019 at 3:32 PM  wrote:

> Hi, I just wanted to point out a minor discrepancy in the docs below.
>
> https://www.sqlite.org/lang_createtable.html#rowid
>
> where it says:
>
> If a table contains a user defined column named "rowid", "oid" or
> "_rowid_", then that name always refers the explicitly declared column and
> cannot be used to retrieve the integer rowid value.
>
> Shouldn't it say at the end "unless that user defined column is an alias
> for the rowid."
>
> For example, you can retrieve the integer rowid value from a user defined
> column named "rowid" if it defined as the integer primary key:
>
> CREATE TABLE t(rowid integer primary key);
> insert into t values(15);
> select rowid, oid from t;
>
> Results:
> 15|15
>
> Thanks,
> Tom
> ___
> 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] Documentation is lying to me

2019-02-27 Thread Joshua Thomas Wise
I’ve updated SQLite3 to version 3.27.2, and the previous error has gone away. 
However, the docs are still lying, because information_schema.tables cannot be 
implemented (evidence below). It seems that we need a pragma_table_list() 
function, which takes a schema as a parameter (similar to pragma_table_info(), 
pragma_index_list(), etc.)

Joshuas-MBP:sqldark josh$ sqlite3
SQLite version 3.27.2 2019-02-25 16:06:06
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> ATTACH ':memory:' AS 'information_schema';
sqlite> CREATE VIEW information_schema.tables(table_name) AS
   ...> SELECT name FROM main.sqlite_master
   ...> WHERE type = 'table';
Error: view tables cannot reference objects in database main



> On Feb 27, 2019, at 2:48 PM, Joshua Wise  wrote:
> 
> Ahh that’s very interesting. I suspect this is the relevant entry in the 
> release notes:
> 
> SQLite Release 3.26.0 On 2018-12-01
> Enhanced triggers so that they can use table-valued functions that exist in 
> schemas other than the schema where the trigger is defined.
> 
> Although, we’re talking about views here, not triggers.
> 
> 
>> On Feb 27, 2019, at 2:43 PM, David Raymond > <mailto:david.raym...@tomtom.com>> wrote:
>> 
>> For me it gives an error up through 3.25.3 and starts working at 3.26.0
>> 
>> 
>> 
>> -Original Message-
>> From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org 
>> <mailto:sqlite-users-boun...@mailinglists.sqlite.org>] On Behalf Of Joshua 
>> Wise
>> Sent: Wednesday, February 27, 2019 2:13 PM
>> To: SQLite mailing list
>> Subject: Re: [sqlite] Documentation is lying to me
>> 
>> I can confirm that it also doesn’t work with SQLite version 3.24.0 on a 
>> completely different machine.
>> 
>>> On Feb 27, 2019, at 9:23 AM, Joshua Thomas Wise >> <mailto:joshuathomasw...@gmail.com>> wrote:
>>> 
>>> Joshuas-MBP:sqldark josh$ sqlite3
>>> SQLite version 3.25.0 2018-09-15 04:01:47
>>> Enter ".help" for usage hints.
>>> Connected to a transient in-memory database.
>>> Use ".open FILENAME" to reopen on a persistent database.
>>> sqlite> SELECT sqlite_version();
>>> 3.25.0
>>> sqlite> ATTACH ':memory:' AS 'information_schema';
>>> sqlite> CREATE VIEW information_schema.schemata(schema_name) AS
>>>   ...> SELECT name FROM pragma_database_list();
>>> sqlite> select * from schemata;
>>> Error: no such table: information_schema.pragma_database_list
>>> sqlite> select * from pragma_database_list();
>>> 0|main|
>>> 2|information_schema|
>>> 
>>> It worked when using `pragma_database_list()` directly, but not from inside 
>>> the view.
>>> 
>>> 
>>> 
>>>> On Feb 26, 2019, at 9:26 PM, Keith Medcalf >>> <mailto:kmedc...@dessus.com> <mailto:kmedc...@dessus.com 
>>>> <mailto:kmedc...@dessus.com>>> wrote:
>>>> 
>>>> 
>>>> Unable to reproduce:
>>>> 
>>>>> sqlite
>>>> SQLite version 3.28.0 2019-02-25 18:43:54
>>>> Enter ".help" for usage hints.
>>>> Connected to a transient in-memory database.
>>>> Use ".open FILENAME" to reopen on a persistent database.
>>>> sqlite> ATTACH ':memory:' AS 'information_schema';
>>>> sqlite> CREATE VIEW information_schema.schemata(schema_name) AS
>>>>  ...> SELECT name FROM pragma_database_list();
>>>> sqlite>
>>>> sqlite> select * from schemata;
>>>> main
>>>> information_schema
>>>> sqlite> .exit
>>>> 
>>>> What version of SQLite are you using?
>>>> What do the following commands do?
>>>> 
>>>> pragma database_list;
>>>> 
>>>> select * from pragma_database_list();
>>>> 
>>>> 
>>>> ---
>>>> The fact that there's a Highway to Hell but only a Stairway to Heaven says 
>>>> a lot about anticipated traffic volume.
>>>> 
>>>>> -Original Message-
>>>>> From: sqlite-users [mailto:sqlite-users-
>>>>> boun...@mailinglists.sqlite.org <mailto:boun...@mailinglists.sqlite.org> 
>>>>> <mailto:boun...@mailinglists.sqlite.org 
>>>>> <mailto:boun...@mailinglists.sqlit

Re: [sqlite] Documentation is lying to me

2019-02-27 Thread Joshua Wise
Ahh that’s very interesting. I suspect this is the relevant entry in the 
release notes:

SQLite Release 3.26.0 On 2018-12-01
Enhanced triggers so that they can use table-valued functions that exist in 
schemas other than the schema where the trigger is defined.

Although, we’re talking about views here, not triggers.


> On Feb 27, 2019, at 2:43 PM, David Raymond  wrote:
> 
> For me it gives an error up through 3.25.3 and starts working at 3.26.0
> 
> 
> 
> -Original Message-
> From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org 
> <mailto:sqlite-users-boun...@mailinglists.sqlite.org>] On Behalf Of Joshua 
> Wise
> Sent: Wednesday, February 27, 2019 2:13 PM
> To: SQLite mailing list
> Subject: Re: [sqlite] Documentation is lying to me
> 
> I can confirm that it also doesn’t work with SQLite version 3.24.0 on a 
> completely different machine.
> 
>> On Feb 27, 2019, at 9:23 AM, Joshua Thomas Wise  
>> wrote:
>> 
>> Joshuas-MBP:sqldark josh$ sqlite3
>> SQLite version 3.25.0 2018-09-15 04:01:47
>> Enter ".help" for usage hints.
>> Connected to a transient in-memory database.
>> Use ".open FILENAME" to reopen on a persistent database.
>> sqlite> SELECT sqlite_version();
>> 3.25.0
>> sqlite> ATTACH ':memory:' AS 'information_schema';
>> sqlite> CREATE VIEW information_schema.schemata(schema_name) AS
>>   ...> SELECT name FROM pragma_database_list();
>> sqlite> select * from schemata;
>> Error: no such table: information_schema.pragma_database_list
>> sqlite> select * from pragma_database_list();
>> 0|main|
>> 2|information_schema|
>> 
>> It worked when using `pragma_database_list()` directly, but not from inside 
>> the view.
>> 
>> 
>> 
>>> On Feb 26, 2019, at 9:26 PM, Keith Medcalf >> <mailto:kmedc...@dessus.com> <mailto:kmedc...@dessus.com 
>>> <mailto:kmedc...@dessus.com>>> wrote:
>>> 
>>> 
>>> Unable to reproduce:
>>> 
>>>> sqlite
>>> SQLite version 3.28.0 2019-02-25 18:43:54
>>> Enter ".help" for usage hints.
>>> Connected to a transient in-memory database.
>>> Use ".open FILENAME" to reopen on a persistent database.
>>> sqlite> ATTACH ':memory:' AS 'information_schema';
>>> sqlite> CREATE VIEW information_schema.schemata(schema_name) AS
>>>  ...> SELECT name FROM pragma_database_list();
>>> sqlite>
>>> sqlite> select * from schemata;
>>> main
>>> information_schema
>>> sqlite> .exit
>>> 
>>> What version of SQLite are you using?
>>> What do the following commands do?
>>> 
>>> pragma database_list;
>>> 
>>> select * from pragma_database_list();
>>> 
>>> 
>>> ---
>>> The fact that there's a Highway to Hell but only a Stairway to Heaven says 
>>> a lot about anticipated traffic volume.
>>> 
>>>> -Original Message-
>>>> From: sqlite-users [mailto:sqlite-users-
>>>> boun...@mailinglists.sqlite.org <mailto:boun...@mailinglists.sqlite.org> 
>>>> <mailto:boun...@mailinglists.sqlite.org 
>>>> <mailto:boun...@mailinglists.sqlite.org>>] On Behalf Of Joshua Thomas Wise
>>>> Sent: Tuesday, 26 February, 2019 19:06
>>>> To: sqlite-users@mailinglists.sqlite.org 
>>>> <mailto:sqlite-users@mailinglists.sqlite.org> 
>>>> <mailto:sqlite-users@mailinglists.sqlite.org 
>>>> <mailto:sqlite-users@mailinglists.sqlite.org>>
>>>> Subject: [sqlite] Documentation is lying to me
>>>> 
>>>> In this SQLite3 documentation
>>>> (https://www.sqlite.org/pragma.html#pragfunc 
>>>> <https://www.sqlite.org/pragma.html#pragfunc> 
>>>> <https://www.sqlite.org/pragma.html#pragfunc 
>>>> <https://www.sqlite.org/pragma.html#pragfunc>>), it says that
>>>> information_schema could be implemented by doing something like this:
>>>> 
>>>> ATTACH ':memory:' AS 'information_schema';
>>>> CREATE VIEW information_schema.schemata(schema_name) AS
>>>> SELECT name FROM pragma_database_list();
>>>> 
>>>> However, when attempting to do this, we get an error: "no such table:
>>>> information_schema.pragma_database_list”.
>>>> ___

Re: [sqlite] Documentation is lying to me

2019-02-27 Thread David Raymond
For me it gives an error up through 3.25.3 and starts working at 3.26.0



-Original Message-
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On 
Behalf Of Joshua Wise
Sent: Wednesday, February 27, 2019 2:13 PM
To: SQLite mailing list
Subject: Re: [sqlite] Documentation is lying to me

I can confirm that it also doesn’t work with SQLite version 3.24.0 on a 
completely different machine.

> On Feb 27, 2019, at 9:23 AM, Joshua Thomas Wise  
> wrote:
> 
> Joshuas-MBP:sqldark josh$ sqlite3
> SQLite version 3.25.0 2018-09-15 04:01:47
> Enter ".help" for usage hints.
> Connected to a transient in-memory database.
> Use ".open FILENAME" to reopen on a persistent database.
> sqlite> SELECT sqlite_version();
> 3.25.0
> sqlite> ATTACH ':memory:' AS 'information_schema';
> sqlite> CREATE VIEW information_schema.schemata(schema_name) AS
>...> SELECT name FROM pragma_database_list();
> sqlite> select * from schemata;
> Error: no such table: information_schema.pragma_database_list
> sqlite> select * from pragma_database_list();
> 0|main|
> 2|information_schema|
> 
> It worked when using `pragma_database_list()` directly, but not from inside 
> the view.
> 
> 
> 
>> On Feb 26, 2019, at 9:26 PM, Keith Medcalf > <mailto:kmedc...@dessus.com>> wrote:
>> 
>> 
>> Unable to reproduce:
>> 
>>> sqlite
>> SQLite version 3.28.0 2019-02-25 18:43:54
>> Enter ".help" for usage hints.
>> Connected to a transient in-memory database.
>> Use ".open FILENAME" to reopen on a persistent database.
>> sqlite> ATTACH ':memory:' AS 'information_schema';
>> sqlite> CREATE VIEW information_schema.schemata(schema_name) AS
>>   ...> SELECT name FROM pragma_database_list();
>> sqlite>
>> sqlite> select * from schemata;
>> main
>> information_schema
>> sqlite> .exit
>> 
>> What version of SQLite are you using?
>> What do the following commands do?
>> 
>> pragma database_list;
>> 
>> select * from pragma_database_list();
>> 
>> 
>> ---
>> The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
>> lot about anticipated traffic volume.
>> 
>>> -Original Message-
>>> From: sqlite-users [mailto:sqlite-users-
>>> boun...@mailinglists.sqlite.org <mailto:boun...@mailinglists.sqlite.org>] 
>>> On Behalf Of Joshua Thomas Wise
>>> Sent: Tuesday, 26 February, 2019 19:06
>>> To: sqlite-users@mailinglists.sqlite.org 
>>> <mailto:sqlite-users@mailinglists.sqlite.org>
>>> Subject: [sqlite] Documentation is lying to me
>>> 
>>> In this SQLite3 documentation
>>> (https://www.sqlite.org/pragma.html#pragfunc 
>>> <https://www.sqlite.org/pragma.html#pragfunc>), it says that
>>> information_schema could be implemented by doing something like this:
>>> 
>>> ATTACH ':memory:' AS 'information_schema';
>>> CREATE VIEW information_schema.schemata(schema_name) AS
>>> SELECT name FROM pragma_database_list();
>>> 
>>> However, when attempting to do this, we get an error: "no such table:
>>> information_schema.pragma_database_list”.
>>> ___
>>> sqlite-users mailing list
>>> sqlite-users@mailinglists.sqlite.org 
>>> <mailto:sqlite-users@mailinglists.sqlite.org>
>>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>> 
>> 
>> 
>> ___
>> sqlite-users mailing list
>> sqlite-users@mailinglists.sqlite.org 
>> <mailto: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] Documentation is lying to me

2019-02-27 Thread Joshua Wise
I can confirm that it also doesn’t work with SQLite version 3.24.0 on a 
completely different machine.

> On Feb 27, 2019, at 9:23 AM, Joshua Thomas Wise  
> wrote:
> 
> Joshuas-MBP:sqldark josh$ sqlite3
> SQLite version 3.25.0 2018-09-15 04:01:47
> Enter ".help" for usage hints.
> Connected to a transient in-memory database.
> Use ".open FILENAME" to reopen on a persistent database.
> sqlite> SELECT sqlite_version();
> 3.25.0
> sqlite> ATTACH ':memory:' AS 'information_schema';
> sqlite> CREATE VIEW information_schema.schemata(schema_name) AS
>...> SELECT name FROM pragma_database_list();
> sqlite> select * from schemata;
> Error: no such table: information_schema.pragma_database_list
> sqlite> select * from pragma_database_list();
> 0|main|
> 2|information_schema|
> 
> It worked when using `pragma_database_list()` directly, but not from inside 
> the view.
> 
> 
> 
>> On Feb 26, 2019, at 9:26 PM, Keith Medcalf > > wrote:
>> 
>> 
>> Unable to reproduce:
>> 
>>> sqlite
>> SQLite version 3.28.0 2019-02-25 18:43:54
>> Enter ".help" for usage hints.
>> Connected to a transient in-memory database.
>> Use ".open FILENAME" to reopen on a persistent database.
>> sqlite> ATTACH ':memory:' AS 'information_schema';
>> sqlite> CREATE VIEW information_schema.schemata(schema_name) AS
>>   ...> SELECT name FROM pragma_database_list();
>> sqlite>
>> sqlite> select * from schemata;
>> main
>> information_schema
>> sqlite> .exit
>> 
>> What version of SQLite are you using?
>> What do the following commands do?
>> 
>> pragma database_list;
>> 
>> select * from pragma_database_list();
>> 
>> 
>> ---
>> The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
>> lot about anticipated traffic volume.
>> 
>>> -Original Message-
>>> From: sqlite-users [mailto:sqlite-users-
>>> boun...@mailinglists.sqlite.org ] 
>>> On Behalf Of Joshua Thomas Wise
>>> Sent: Tuesday, 26 February, 2019 19:06
>>> To: sqlite-users@mailinglists.sqlite.org 
>>> 
>>> Subject: [sqlite] Documentation is lying to me
>>> 
>>> In this SQLite3 documentation
>>> (https://www.sqlite.org/pragma.html#pragfunc 
>>> ), it says that
>>> information_schema could be implemented by doing something like this:
>>> 
>>> ATTACH ':memory:' AS 'information_schema';
>>> CREATE VIEW information_schema.schemata(schema_name) AS
>>> SELECT name FROM pragma_database_list();
>>> 
>>> However, when attempting to do this, we get an error: "no such table:
>>> information_schema.pragma_database_list”.
>>> ___
>>> 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] Documentation is lying to me

2019-02-27 Thread Joshua Thomas Wise
Joshuas-MBP:sqldark josh$ sqlite3
SQLite version 3.25.0 2018-09-15 04:01:47
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> SELECT sqlite_version();
3.25.0
sqlite> ATTACH ':memory:' AS 'information_schema';
sqlite> CREATE VIEW information_schema.schemata(schema_name) AS
   ...> SELECT name FROM pragma_database_list();
sqlite> select * from schemata;
Error: no such table: information_schema.pragma_database_list
sqlite> select * from pragma_database_list();
0|main|
2|information_schema|

It worked when using `pragma_database_list()` directly, but not from inside the 
view.



> On Feb 26, 2019, at 9:26 PM, Keith Medcalf  wrote:
> 
> 
> Unable to reproduce:
> 
>> sqlite
> SQLite version 3.28.0 2019-02-25 18:43:54
> Enter ".help" for usage hints.
> Connected to a transient in-memory database.
> Use ".open FILENAME" to reopen on a persistent database.
> sqlite> ATTACH ':memory:' AS 'information_schema';
> sqlite> CREATE VIEW information_schema.schemata(schema_name) AS
>   ...> SELECT name FROM pragma_database_list();
> sqlite>
> sqlite> select * from schemata;
> main
> information_schema
> sqlite> .exit
> 
> What version of SQLite are you using?
> What do the following commands do?
> 
> pragma database_list;
> 
> select * from pragma_database_list();
> 
> 
> ---
> The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
> lot about anticipated traffic volume.
> 
>> -Original Message-
>> From: sqlite-users [mailto:sqlite-users-
>> boun...@mailinglists.sqlite.org] On Behalf Of Joshua Thomas Wise
>> Sent: Tuesday, 26 February, 2019 19:06
>> To: sqlite-users@mailinglists.sqlite.org
>> Subject: [sqlite] Documentation is lying to me
>> 
>> In this SQLite3 documentation
>> (https://www.sqlite.org/pragma.html#pragfunc), it says that
>> information_schema could be implemented by doing something like this:
>> 
>> ATTACH ':memory:' AS 'information_schema';
>> CREATE VIEW information_schema.schemata(schema_name) AS
>> SELECT name FROM pragma_database_list();
>> 
>> However, when attempting to do this, we get an error: "no such table:
>> information_schema.pragma_database_list”.
>> ___
>> 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] Documentation is lying to me

2019-02-26 Thread Adrian Ho
On 27/2/19 10:06 AM, Joshua Thomas Wise wrote:
> In this SQLite3 documentation (https://www.sqlite.org/pragma.html#pragfunc), 
> it says that information_schema could be implemented by doing something like 
> this:
>
> ATTACH ':memory:' AS 'information_schema';
> CREATE VIEW information_schema.schemata(schema_name) AS
> SELECT name FROM pragma_database_list();
>
> However, when attempting to do this, we get an error: "no such table: 
> information_schema.pragma_database_list”.

What does:

SELECT sqlite_version();

return? From the link you posted:

> The table-valued functions for PRAGMA feature was added in SQLite version 
> 3.16.0 (2017-01-02). Prior
versions of SQLite cannot use this feature.

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


Re: [sqlite] Documentation is lying to me

2019-02-26 Thread Keith Medcalf

Unable to reproduce:

>sqlite
SQLite version 3.28.0 2019-02-25 18:43:54
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> ATTACH ':memory:' AS 'information_schema';
sqlite> CREATE VIEW information_schema.schemata(schema_name) AS
   ...> SELECT name FROM pragma_database_list();
sqlite>
sqlite> select * from schemata;
main
information_schema
sqlite> .exit

What version of SQLite are you using?
What do the following commands do?

pragma database_list;

select * from pragma_database_list();


---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.

>-Original Message-
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of Joshua Thomas Wise
>Sent: Tuesday, 26 February, 2019 19:06
>To: sqlite-users@mailinglists.sqlite.org
>Subject: [sqlite] Documentation is lying to me
>
>In this SQLite3 documentation
>(https://www.sqlite.org/pragma.html#pragfunc), it says that
>information_schema could be implemented by doing something like this:
>
>ATTACH ':memory:' AS 'information_schema';
>CREATE VIEW information_schema.schemata(schema_name) AS
>SELECT name FROM pragma_database_list();
>
>However, when attempting to do this, we get an error: "no such table:
>information_schema.pragma_database_list”.
>___
>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] Documentation error

2019-01-02 Thread Richard Hipp
On 1/2/19, Joe Jacobs  wrote:

>
> Long story short is that this may be i'm using an old version of sqlite
> lite and the command has changed.
>

Yes.  Since 2013-05-20, there have been 73 releases and 10167 distinct
changes.  One of those 10167 changes was this:
https://www.sqlite.org/src/timeline?c=0f65a7e2e09f8


-- 
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] Documentation wording problem

2018-11-26 Thread Richard Hipp
Fixed now.  Thanks.

On 11/24/18, Project Nayuki  wrote:
> In the SQLite online documentation, there seems to be a problem in the
> wording of a sentence, which I highlighted in angle brackets.
>
> https://www.sqlite.org/wal.html
> Write-Ahead Logging
> 5. Read-Only Databases
>
> "Even though it is possible to open a read-only WAL-mode database,  is good practice is to converted> to PRAGMA journal_mode=DELETE prior to
> burning an SQLite database image onto read-only media."
>
>
> Thank you for making this versatile and reliable database software.
>
> Nayuki
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
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] Documentation of SQLite

2018-11-10 Thread Dan Kennedy

On 11/10/2018 05:44 PM, Patrik Nilsson wrote:

Dear All,

Where can I find the downloadable HTML documentation? Not so long ago I
could download it on the download page.


It was forgotten for the 3.25.3 release. It's back up now.

Dan.

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


Re: [sqlite] Documentation Typo : https://sqlite.org/optoverview.html section 15

2018-04-12 Thread Richard Hipp
Fixed now.  Tnx.

On 4/12/18, Keith Medcalf  wrote:
>
> https://sqlite.org/optoverview.html
>
> 15, the push down optimization.  The BETWEEN clause is in error?
>
> SELECT x, y, b
>   FROM t2
>   JOIN (SELECT DISTINCT a, b FROM t1 WHERE b BETWEEN 10 AND 20)
>  WHERE b BETWEEN 10 AND 10;
>
> should probably be BETWEEN 10 AND 20;
>
> ---
> The fact that there's a Highway to Hell but only a Stairway to Heaven says a
> lot about anticipated traffic volume.
>
>
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
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] Documentation update

2018-04-09 Thread Simon Slavin


On 9 Apr 2018, at 11:02am, R Smith  wrote:

> If you prefer "different from" to "different to", it is simply likely that 
> you are American rather than English, in which language the preference (I 
> should say "habit" really) is "different to" rather than "different from", 
> but I gather from sources that "different from" is the preference/habit in 
> American English, plus they have been using the newer variant: "different 
> than" - which got criticized a lot by the old guard, but with no real grounds.

I agree.  This is a UK English vs. US English matter.  And since the document 
maintainers are USAsian, I am quite happy for "different from".

And now I have the Monkees song _Valerie_ running around my head.

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


Re: [sqlite] Documentation update

2018-04-09 Thread Don V Nielsen
I'm adding to my bucket list meeting some of you in person.

On Mon, Apr 9, 2018 at 5:58 AM, Niall O'Reilly  wrote:

> On 9 Apr 2018, at 11:02, R Smith wrote:
>
> > Gentlemen - shall we call pistols at dawn to settle this?
> > Or my favourite duel:  Face-pulling at midnight.  :)
>
> 8-)
>
> /Niall
>
> ___
> 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] Documentation update

2018-04-09 Thread Niall O'Reilly
On 9 Apr 2018, at 11:02, R Smith wrote:

> Gentlemen - shall we call pistols at dawn to settle this?
> Or my favourite duel:  Face-pulling at midnight.  :)

8-)

/Niall


signature.asc
Description: OpenPGP digital signature
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Documentation update

2018-04-09 Thread R Smith


On 2018/04/09 10:51 AM, Niall O'Reilly wrote:

On 9 Apr 2018, at 2:08, Simon Slavin wrote:


"In unique indices, each NULL value is considered different to every other NULL 
value.  Thus each NULL value is unique."

For the sake of my late English teacher, I hope the revised document will read "... 
different __from__ ...".


Gentlemen - shall we call pistols at dawn to settle this?
Or my favourite duel:  Face-pulling at midnight.  :)

If you prefer "different from" to "different to", it is simply likely 
that you are American rather than English, in which language the 
preference (I should say "habit" really) is "different to" rather than 
"different from", but I gather from sources that "different from" is the 
preference/habit in American English, plus they have been using the 
newer variant: "different than" - which got criticized a lot by the old 
guard, but with no real grounds.


The word "to" is a natural juxtaposition relation indicator. "A is next 
to B", "I prefer coconut to mango" and "Apples are crunchy compared to 
oranges". The same goes for "different to".


All this said, I think the overall tone of the SQLite documentation is 
American (due the origin, no doubt), so I would vote to go with Niall's 
"different from" based on that.




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


Re: [sqlite] Documentation update

2018-04-09 Thread Niall O'Reilly
On 9 Apr 2018, at 2:08, Simon Slavin wrote:

> "In unique indices, each NULL value is considered different to every other 
> NULL value.  Thus each NULL value is unique."

For the sake of my late English teacher, I hope the revised document will read 
"... different __from__ ...".

Best regards,
Niall O'Reilly


signature.asc
Description: OpenPGP digital signature
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Documentation update

2018-04-08 Thread Simon Slavin
On 9 Apr 2018, at 1:08am, Don V Nielsen  wrote:

> "For the purposes of unique indices, all NULL values are considered [to]
> different from all other NULL values and are thus unique."
> 
> I think it should read "...NULL value are considered different..."
> 
> https://www.sqlite.org/lang_createindex.html

I agree with Mister Nielsen that the original can be better phrased, but  my 
English teacher would not forgive me if I did not suggest an even bigger change:

"For the purposes of unique indices, all NULL values are considered to 
different from all other NULL values and are thus unique."

should be

"In unique indices, each NULL value is considered different to every other NULL 
value.  Thus each NULL value is unique."

Now my teacher is at peace, you may do what what you want.  Since some edits 
are already being made to the page, one might as well suggest ...

-

"Or if no collating sequence is otherwise defined, the built-in BINARY 
collating sequence is used."

Should be

"If no collating sequence is defined for a text column, the built-in BINARY 
collating sequence is used."

-

"There are no arbitrary limits"

should be more like

"There is no arbitrary limit"

though perhaps you might want to leave out the word 'arbitrary'.  Or perhaps 
even leave out the entire sentence, since the spirit of SQLite is that limits 
to all entities are caused only by namespace exhaustion or memory/storage 
limits.

-

"If the optional IF NOT EXISTS clause is present and another index with the 
same name already exists"

Remove the word "optional" since the "if" makes it clear that the clause is 
optional.  Replace "another" with "an".

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


Re: [sqlite] Documentation update

2018-04-08 Thread Don V Nielsen
"to be", or not "to be"  :)

On Sun, Apr 8, 2018 at 7:08 PM, Don V Nielsen  wrote:

> "For the purposes of unique indices, all NULL values are considered [to]
> different from all other NULL values and are thus unique."
>
> I think it should read "...NULL value are considered different..."
>
> https://www.sqlite.org/lang_createindex.html
>
> dvn
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Documentation Query/Correction

2018-04-06 Thread John McMahon

David

My point point was that in one section of the documentation 'Type 
Affinity' was changed from 'NONE' to 'BLOB' with an explanatory note as 
to why and in another section it was unchanged. AFAIK type affinity of 
'NONE' is the same as 'BLOB' as per the explanatory note. I was just 
bringing to attention what I thought was an inconsistency in the 
documentation.


John


On 05/04/2018 06:25, David Raymond wrote:

Looks like when it goes and makes the table it doesn't give it an explicit "blob" type, 
as you would think from the phrase "When an expression is a simple reference to a column of a 
real table (not a VIEW or subquery) then the expression has the same affinity as the table 
column." It gives it no explicit type at all. However, according to...

http://www.sqlite.org/datatype3.html#determination_of_column_affinity
"3. If the declared type for a column contains the string "BLOB" or if no type is 
specified then the column has affinity BLOB."

...that lack of any explicit column type will results in an implicit blob 
affinity. So I guess it still winds up as blob in the end, but in a roundabout 
way. Though it doesn't show up in things like pragma table_info.



SQLite version 3.23.0 2018-04-02 11:04:16
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.

sqlite> create table foo (i int, nu numeric, r real, t text, b blob, n);

sqlite> create table bar as select i, nu, r, t, b, n from foo;

sqlite> select * from sqlite_master;
type|name|tbl_name|rootpage|sql
table|foo|foo|2|CREATE TABLE foo (i int, nu numeric, r real, t text, b blob, n)
table|bar|bar|3|CREATE TABLE bar(
   i INT,
   nu NUM,
   r REAL,
   t TEXT,
   b,
   n
)

sqlite> pragma table_info(foo);
cid|name|type|notnull|dflt_value|pk
0|i|int|0||0
1|nu|numeric|0||0
2|r|real|0||0
3|t|text|0||0
4|b|blob|0||0
5|n||0||0

sqlite> pragma table_info(bar);
cid|name|type|notnull|dflt_value|pk
0|i|INT|0||0
1|nu|NUM|0||0
2|r|REAL|0||0
3|t|TEXT|0||0
4|b||0||0
5|n||0||0


-Original Message-
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On 
Behalf Of John McMahon
Sent: Wednesday, April 04, 2018 3:54 PM
To: SQLite Users
Subject: [sqlite] Documentation Query/Correction


In documentation for version 3.21.0:

in datatypes3.html
...
3. Type Affinity
...
Each column in an SQLite 3 database is assigned one of the following
type affinities:

  TEXT
  NUMERIC
  INTEGER
  REAL
  BLOB

(Historical note: The "BLOB" type affinity used to be called "NONE". But
that term was easy to confuse with "no affinity" and so it was renamed.)

and in lang_createtable.html
...
CREATE TABLE ... AS SELECT Statements
...
   The declared type of each column is determined by the expression
affinity of the corresponding expression in the result set of the SELECT
statement, as follows:

Expression Affinity Column Declared Type
TEXT"TEXT"
NUMERIC "NUM"
INTEGER "INT"
REAL"REAL"
NONE"" (empty string)

In the Expression Affinity table above, should the Expression Affinity
'NONE' be updated to 'BLOB' possibly with the explanatory 'Historical
note:' as per section '3. Type Affinity' in datatypes.html above.

NOTE: I have checked the current on line documents and they match the above.

For consideration.

Regards,
John




--
Regards
   John McMahon
j...@jspect.fastmail.com.au
04 2933 4203

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


Re: [sqlite] Documentation Query/Correction

2018-04-04 Thread David Raymond
Looks like when it goes and makes the table it doesn't give it an explicit 
"blob" type, as you would think from the phrase "When an expression is a simple 
reference to a column of a real table (not a VIEW or subquery) then the 
expression has the same affinity as the table column." It gives it no explicit 
type at all. However, according to...

http://www.sqlite.org/datatype3.html#determination_of_column_affinity
"3. If the declared type for a column contains the string "BLOB" or if no type 
is specified then the column has affinity BLOB."

...that lack of any explicit column type will results in an implicit blob 
affinity. So I guess it still winds up as blob in the end, but in a roundabout 
way. Though it doesn't show up in things like pragma table_info.



SQLite version 3.23.0 2018-04-02 11:04:16
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.

sqlite> create table foo (i int, nu numeric, r real, t text, b blob, n);

sqlite> create table bar as select i, nu, r, t, b, n from foo;

sqlite> select * from sqlite_master;
type|name|tbl_name|rootpage|sql
table|foo|foo|2|CREATE TABLE foo (i int, nu numeric, r real, t text, b blob, n)
table|bar|bar|3|CREATE TABLE bar(
  i INT,
  nu NUM,
  r REAL,
  t TEXT,
  b,
  n
)

sqlite> pragma table_info(foo);
cid|name|type|notnull|dflt_value|pk
0|i|int|0||0
1|nu|numeric|0||0
2|r|real|0||0
3|t|text|0||0
4|b|blob|0||0
5|n||0||0

sqlite> pragma table_info(bar);
cid|name|type|notnull|dflt_value|pk
0|i|INT|0||0
1|nu|NUM|0||0
2|r|REAL|0||0
3|t|TEXT|0||0
4|b||0||0
5|n||0||0


-Original Message-
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On 
Behalf Of John McMahon
Sent: Wednesday, April 04, 2018 3:54 PM
To: SQLite Users
Subject: [sqlite] Documentation Query/Correction


In documentation for version 3.21.0:

in datatypes3.html
...
3. Type Affinity
...
Each column in an SQLite 3 database is assigned one of the following 
type affinities:

 TEXT
 NUMERIC
 INTEGER
 REAL
 BLOB

(Historical note: The "BLOB" type affinity used to be called "NONE". But 
that term was easy to confuse with "no affinity" and so it was renamed.)

and in lang_createtable.html
...
CREATE TABLE ... AS SELECT Statements
...
  The declared type of each column is determined by the expression 
affinity of the corresponding expression in the result set of the SELECT 
statement, as follows:

Expression Affinity Column Declared Type
TEXT"TEXT"
NUMERIC "NUM"
INTEGER "INT"
REAL"REAL"
NONE"" (empty string)

In the Expression Affinity table above, should the Expression Affinity 
'NONE' be updated to 'BLOB' possibly with the explanatory 'Historical 
note:' as per section '3. Type Affinity' in datatypes.html above.

NOTE: I have checked the current on line documents and they match the above.

For consideration.

Regards,
John


-- 
Regards
John McMahon
   li...@jspect.fastmail.fm


___
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] Documentation update 2

2018-01-31 Thread William Entriken
Thank YOU.

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


Re: [sqlite] Documentation update

2018-01-31 Thread R Smith

On 2018/01/31 3:13 PM, Simon Slavin wrote:

I see. It has already been fixed. Sorry for the niggle.
Simon.


It's hard to stay on top of an error in the SQLite universe
They disappear so darn quick.

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


Re: [sqlite] Documentation update

2018-01-31 Thread Simon Slavin
On 31 Jan 2018, at 1:11pm, Kees Nuyt  wrote:

> On Wed, 31 Jan 2018 13:07:17 +, Simon Slavin
>  wrote:
>> 
>> Can you clarify your correction ?  I don't see a difference.
> 
> It used to be:
> 8.3. I/O while obtaining a lock leads to corruption
> 
> (the word error is missing)

I see.  It has already been fixed.  Sorry for the niggle.

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


Re: [sqlite] Documentation update

2018-01-31 Thread Kees Nuyt
On Wed, 31 Jan 2018 13:07:17 +, Simon Slavin
 wrote:

>
>
>On 30 Jan 2018, at 6:51pm, William Entriken  wrote:
>
>> Hello. Regarding https://www.sqlite.org/howtocorrupt.html, item 8.3.
>> Perhaps this should be
>> 
>>> 8.3. I/O error while obtaining a lock leads to corruption
>
> Can you clarify your correction ?  I don't see a difference.

It used to be:
8.3. I/O while obtaining a lock leads to corruption

(the word error is missing)

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


Re: [sqlite] Documentation update

2018-01-31 Thread Simon Slavin


On 30 Jan 2018, at 6:51pm, William Entriken  wrote:

> Hello. Regarding https://www.sqlite.org/howtocorrupt.html, item 8.3.
> Perhaps this should be
> 
>> 8.3. I/O error while obtaining a lock leads to corruption

Can you clarify your correction ?  I don't see a difference.

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


Re: [sqlite] Documentation update 2

2018-01-30 Thread Richard Hipp
Fixed now (I think).  Thanks for the bug reports

On 1/30/18, William Entriken  wrote:
> Hello again. Regarding https://www.sqlite.org/howtocorrupt.html, item 8.6.
> Currently:
>
>> This race condition had apparently existing in all prior versions of
> SQLite...
>
> Should be:
>
>> This race condition had apparently existed in all prior versions of
> SQLite...
>
> Regards,
> William Entriken
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
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] Documentation Error

2017-08-23 Thread J Decker
https://www.sqlite.org/c3ref/open.html

On Wed, Aug 23, 2017 at 10:29 PM, J Decker  wrote:

>
>
> If URI filename  interpretation is
> enabled, and the filename argument begins with "file:", then the filename
> is interpreted as a URI. URI filename interpretation is enabled if the
> SQLITE_OPEN_URI  flag
> is set in the fourth argument to sqlite3_open_v2(),
>
> The fourth parameter is a pointer, the third is the flags.
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Documentation improvement recommendations

2017-07-10 Thread jungle Boogie
Here's a couple more.

On this page: https://www.sqlite.org/src/doc/trunk/README.md

describes the LALR(1) grammer
should be:
describes the LALR(1) grammar

Each has a suscinct
should be:
Each has a succinct

-

On this page: https://www.sqlite.org/dbstat.html

The the DBSTAT virtual
should be:
The DBSTAT virtual
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Documentation bug: lang_insert.html needs examples

2017-07-01 Thread Keith Medcalf

Actually there would be six since you can either specify or omit the columns 
list for each ...

-- 
˙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 Simon Slavin
> Sent: Saturday, 1 July, 2017 17:14
> To: SQLite mailing list
> Subject: Re: [sqlite] Documentation bug: lang_insert.html needs examples
> 
> 
> 
> On 2 Jul 2017, at 12:08am, 積丹尼 Dan Jacobson 
> wrote:
> 
> > So near the top of the article add this synopsis of the three basic
> forms,
> > INSERT INTO moz_cookies VALUES(1,'Bart',12);
> > INSERT INTO moz_cookies SELECT . 
> > INSERT INTO moz_cookies DEFAUT_VALUES ???
> 
> If those are "the" three forms, there are actually four and there needs to
> be one for
> 
> INSERT INTO moz_cookies (id_number, name, age) VALUES(1,'Bart',12);
> 
> or whatever the columns are actually called.
> 
> Simon.
> ___
> 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] Documentation bug: lang_insert.html needs examples

2017-07-01 Thread Simon Slavin


On 2 Jul 2017, at 12:08am, 積丹尼 Dan Jacobson  wrote:

> So near the top of the article add this synopsis of the three basic forms,
> INSERT INTO moz_cookies VALUES(1,'Bart',12);
> INSERT INTO moz_cookies SELECT . 
> INSERT INTO moz_cookies DEFAUT_VALUES ???

If those are "the" three forms, there are actually four and there needs to be 
one for

INSERT INTO moz_cookies (id_number, name, age) VALUES(1,'Bart',12);

or whatever the columns are actually called.

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


Re: [sqlite] Documentation bug: remove gmane address on Bug Report page

2017-07-01 Thread 積丹尼 Dan Jacobson
By the way, you might want to unlock
http://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-users/
as one can read it on Nabble anyway.
Then you could just tell users to see the Archives.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Documentation bug. Detecting NULL extension arguments.

2017-06-30 Thread Richard Hipp
On 6/30/17, petern  wrote:
> sqlite3_value_type() definitely deserves at least one document sentence

The change at https://www.sqlite.org/src/info/0db20efe201736b3 will
appear in 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] Documentation bug. Detecting NULL extension arguments.

2017-06-30 Thread petern
Thank you for the quick reply.

After reading your reply and grepping around for more examples containing
sqlite3_type_value I see now the documentation gives the impression that
return types only apply to  sqlite3_value_numeric_type().   Had I clicked
randomly on the link to https://sqlite.org/c3ref/c_blob.html in that
unrelated paragraph I would have seen this wonderful exhibit:

#define SQLITE_INTEGER  1
#define SQLITE_FLOAT2
#define SQLITE_BLOB 4
#define SQLITE_NULL 5
#ifdef SQLITE_TEXT
# undef SQLITE_TEXT
#else
# define SQLITE_TEXT 3
#endif
#define SQLITE3_TEXT 3


sqlite3_value_type() definitely deserves at least one document sentence
within https://sqlite.org/c3ref/value_blob.html containing the link to
https://sqlite.org/c3ref/c_blob.html



On Fri, Jun 30, 2017 at 10:26 AM, Richard Hipp  wrote:

> On 6/30/17, petern  wrote:
> > Is this the recommended way for any argument type?
> >
> >   zCol = (const char*)sqlite3_value_text(argv[i]);
> >   if( 0==zCol ) return;
>
> No.  What you have above detects out-of-memory errors when trying to
> convert an argument in some non-TEXT type in to TEXT, or when
> converting a UTF-16 text string into the requested UTF-8.
>
> To get the argument type, use:
>
>sqlite3_value_type(argv[i])
>
>
> >
> > Docs say protected_sqlite3_value can represent NULL but how is not
> > explained anywhere.
> >
> > https://www.sqlite.org/c3ref/value_blob.html
> > https://www.sqlite.org/c3ref/value.html
> >
> > To detect NULL arguments is it normal to test with sqlite3_value_text on
> > every type of argument including BLOB, double, int,..?   Or, are there
> some
> > special sentinel values {MAX_INT,DBL_MAX,...} for those other types?
> >
> > I'd be happily corrected if wrong, but it seems C API NULL value
> > representation is not explained anywhere in the SQLite docs. The short
> > answer to this question would make a well needed addition to one of those
> > doc pages.
> > ___
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
>
>
> --
> 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
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Documentation bug. Detecting NULL extension arguments.

2017-06-30 Thread Richard Hipp
On 6/30/17, petern  wrote:
> Is this the recommended way for any argument type?
>
>   zCol = (const char*)sqlite3_value_text(argv[i]);
>   if( 0==zCol ) return;

No.  What you have above detects out-of-memory errors when trying to
convert an argument in some non-TEXT type in to TEXT, or when
converting a UTF-16 text string into the requested UTF-8.

To get the argument type, use:

   sqlite3_value_type(argv[i])


>
> Docs say protected_sqlite3_value can represent NULL but how is not
> explained anywhere.
>
> https://www.sqlite.org/c3ref/value_blob.html
> https://www.sqlite.org/c3ref/value.html
>
> To detect NULL arguments is it normal to test with sqlite3_value_text on
> every type of argument including BLOB, double, int,..?   Or, are there some
> special sentinel values {MAX_INT,DBL_MAX,...} for those other types?
>
> I'd be happily corrected if wrong, but it seems C API NULL value
> representation is not explained anywhere in the SQLite docs. The short
> answer to this question would make a well needed addition to one of those
> doc pages.
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
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] documentation flaws

2017-06-02 Thread Richard Hipp
On 6/2/17, Rob Golsteijn  wrote:
>
> I found 2 flaws in the online documentation:
>

Should be fixed now.  Thanks for the report.
-- 
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] Documentation of valid ORDER BY terms after UNION?

2017-05-15 Thread David Raymond
The order by terms can still be complex expressions, they just have to match 
exactly (to all sub-queries in the join I believe)

create table table1 (field1, field2);
select field1 > 0 as foo, field2 + 42 as bar from table1
union all 
select field1 > 0 as foo, field2 - 42 as bar from table1...

order by foo; -> OK as simple column name.
order by foo > 0; -> Not OK as an expression on a column name.
order by field1 > 0; -> OK as it exactly matches a term in all of the sub 
queries, (so basically the same as ordering by a column name)


Ok, hmm, apparently it still works if it's only used in 1 of the unions.

SQLite version 3.18.0 2017-03-28 18:48:43
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.

sqlite> create table table1 (field1 int, field2 int);
Run Time: real 0.000 user 0.00 sys 0.00

sqlite> insert into table1 values (1, 1), (2, 2), (-1, -1), (7, 7);
Run Time: real 0.000 user 0.00 sys 0.00

sqlite> select field1 > 0, field2, 1 as term from table1 union all select 
field1 > 1, field2, 2 as term from table1 order by field1 > 1, term, field2;
--EQP-- 1,0,0,SCAN TABLE table1
--EQP-- 1,0,0,USE TEMP B-TREE FOR ORDER BY
--EQP-- 2,0,0,SCAN TABLE table1
--EQP-- 2,0,0,USE TEMP B-TREE FOR ORDER BY
--EQP-- 0,0,0,COMPOUND SUBQUERIES 1 AND 2 (UNION ALL)
field1 > 0|field2|term
0|-1|1
0|-1|2
0|1|2
1|1|1
1|2|1
1|7|1
1|2|2
1|7|2
Run Time: real 0.016 user 0.00 sys 0.00

So it named the final result column based on the name given in the first 
subquery,
let us put an expression from the second sub query into the order by term,
and used it simply as "order by the first column" when it unioned everything.

So yes, it looks like you can *only* order by straight up columns any not any 
expression of their values.

However... you can put "an expression" in there, but rather than being an 
actual expression, it serves only to identify which final result column you 
want to order by. To do so it goes through the various sub queries in order, 
trying to match the text of your order term to a result field name, then to a 
result field expression, and if finds it, it translates that to a final result 
column of the union for the ordering. And if it doesn't find a match it gives 
the error you received.

(Brain is melted at end of the day, so hopefully that all made a little sense. 
I'm sure someone can re-word that better than I just did.)


-Original Message-
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On 
Behalf Of no...@null.net
Sent: Monday, May 15, 2017 4:31 PM
To: SQLite mailing list
Subject: [sqlite] Documentation of valid ORDER BY terms after UNION?

I've read "The ORDER BY clause" of [1] and I *think* that the following
is what I am running into:

"However, if the SELECT is a compound SELECT, then ORDER BY
expressions that are not aliases to output columns must be exactly
the same as an expression used as an output column. "

If so, that paragraph could perhaps be written differently, more
clearly indicating that ORDER BY terms can *only* be raw column names
with no complex expressions.


[1] https://www.sqlite.org/lang_select.html

-- 
Mark Lawrence
___
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] Documentation of valid ORDER BY terms after UNION?

2017-05-15 Thread nomad
On Mon May 15, 2017 at 09:58:31PM +0100, Simon Slavin wrote:
> 
> On 15 May 2017, at 9:30pm, no...@null.net wrote:
> 
> >SELECT
> >1 AS col
> >UNION ALL
> >SELECT
> >0 AS col
> >ORDER BY
> >col > 0 DESC;
> 
> Out of interest, intuitively rather than reading documentation, which
> do you think should be done first ?  Should SQL do both SELECTs and
> the UNION ALL, then ORDER the result ?  Or should SQL apply the ORDER
> BY to the second SELECT only ?

Intuitively (or according the union knowledge I can usually hold in my
brain) I think of the above as follows, purely because I know there can
only be one ORDER by statement:

(
SELECT
1 AS col
UNION ALL
SELECT
0 AS col
)
ORDER BY
col > 0 DESC;

> > I've read "The ORDER BY clause" of [1] and I *think* that the following
> > is what I am running into:
> > 
> >"However, if the SELECT is a compound SELECT, then ORDER BY
> >expressions that are not aliases to output columns must be exactly
> >the same as an expression used as an output column. "
> 
> Right.  So the problem is that the "AS col" clauses apply to the
> individual SELECT queries, not to the results of the UNION.  The
> UNION command unites the two individual queries but SQL doesn’t
> provide any way to name the resulting column(s).

Except that you *can* use the first SELECT aliases on their own...
which shouldn't be possible at all if SQL doesn't provide a way to name
the resulting columns.

> Here’s another question about intuition, rather than reading
> documentation.  How many columns should this query return ?  Or
> should it result in an error ?
> 
> >SELECT
> >1 AS betty
> >UNION ALL
> >SELECT
> >0 AS carlos;

Ideally this would be an error, but I already know that it isn't so I
can't really say what my intuition thinks :-)

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


Re: [sqlite] Documentation of valid ORDER BY terms after UNION?

2017-05-15 Thread Simon Slavin

On 15 May 2017, at 9:30pm, no...@null.net wrote:

>SELECT
>1 AS col
>UNION ALL
>SELECT
>0 AS col
>ORDER BY
>col > 0 DESC;

Out of interest, intuitively rather than reading documentation, which do you 
think should be done first ?  Should SQL do both SELECTs and the UNION ALL, 
then ORDER the result ?  Or should SQL apply the ORDER BY to the second SELECT 
only ?

> I've read "The ORDER BY clause" of [1] and I *think* that the following
> is what I am running into:
> 
>"However, if the SELECT is a compound SELECT, then ORDER BY
>expressions that are not aliases to output columns must be exactly
>the same as an expression used as an output column. "

Right.  So the problem is that the "AS col" clauses apply to the individual 
SELECT queries, not to the results of the UNION.  The UNION command unites the 
two individual queries but SQL doesn’t provide any way to name the resulting 
column(s).

Here’s another question about intuition, rather than reading documentation.  
How many columns should this query return ?  Or should it result in an error ?

>SELECT
>1 AS betty
>UNION ALL
>SELECT
>0 AS carlos;


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


Re: [sqlite] Documentation error

2017-02-15 Thread Richard Hipp
On 2/15/17, Paul Sanderson  wrote:
> The process for calculating a checksum text on the SQLite file format page
> contains two errors.
>

Thanks for spotting this.  Should be fixed now.
-- 
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] Documentation clarification request... (re: Triggers)

2017-02-02 Thread Simon Slavin

On 2 Feb 2017, at 2:38pm, Michael Tiernan  wrote:

> So that makes sense (I think) and isn't causing a problem for me but then, a 
> little further on it says:
> 
>   If a WHEN clause is supplied, the SQL statements specified are only
>   executed for rows for which the WHEN clause is true. If no WHEN
>   clause is supplied, the SQL statements are executed for all rows.
> 
> My quandary comes from the last part of that statement "executed for all 
> rows". Does that mean "for all rows in the table" or does it mean "for all 
> rows /modified/ in the table" or "all rows previously mentioned as being 
> inserted, updated, or deleted by the statement causing the trigger to fire"?

(Slight handwaving, because this probably isn’t the way things work internally.)

The check is done for each row modified.
The trigger is triggered each time the WHERE clause is satisfied.
When a trigger is triggered it is applied to one row of the table.

Each time you modify any row of any table, SQLite checks the 'WHERE' clause  
each TRIGGER on that table to see whether it needs to bring that TRIGGER into 
play.  If that modification of that row doesn’t satisfy the WHERE clause, 
nothing else about the TRIGGER is processed.  If that modification does satisfy 
the WHERE clause then the trigger is performed on that modification.

If you issued an UPDATE command which modified six rows of the table, you 
should imagine the check being done six times, but the trigger would be 
performed any number from 0 to 6 times.

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


Re: [sqlite] Documentation bug

2016-07-28 Thread Richard Hipp
On 7/28/16, Java4Life  wrote:
> Hi All,
>
> I think there is a comma missing here:
>
> Here: https://www.sqlite.org/fts3.html#section_4_2

Please confirm that the draft document for the next release
(http://sqlite.org/draft/fts3.html#section_4_2) fixes the problem you
see.  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] Documentation bug: it's ESCAPE not EXCEPT that limit LIKE optimisation

2015-01-07 Thread Richard Hipp
On 1/7/15, Dima Tisnek  wrote:
> Documentation states:
>
> The LIKE optimization is not attempted if there is an EXCEPT phrase on
> the LIKE operator.
>
> However you can't really slap EXCEPT (a kind of set difference join)
> on top of LIKE.
>

Thanks for bring that to my attention.  Now fixed.  See
https://www.sqlite.org/docsrc/info/1e0e7c930074 for the check-in.
This change will appear in the next release.

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


Re: [sqlite] documentation bugs

2014-07-09 Thread Dan Kennedy

On 07/09/2014 01:45 PM, Laurent Dami wrote:
* In http://www.sqlite.org/src/wiki?name=Bug+Reports , the href to the 
bug list is http://www.sqlite.org/src/report; should be 
http://www.sqlite.org/src/reportlist


*  In vtab.hml: the description of sqlite3_index_info is not up to 
date (missing estimatedRows)


* In compile.html : the compile option SQLITE_ENABLE_FTS4_UNICODE61 is 
missing


Thanks for these. And for pointing out the lack of documentation for the 
FTS4 "^" operator earlier.


New versions of vtab.html and fts3.html are now at:

  http://www.sqlite.org/draft/vtab.html
  http://www.sqlite.org/draft/fts3.html

FTS4 has been updated to match the documentation. So that "unicode61" is 
now enabled by default or disabled by SQLITE_DISABLE_FTS3_UNICODE. As of 
3.8.6, SQLITE_ENABLE_FTS4_UNICODE61 will no longer exist.


  http://www.sqlite.org/src/info/0cc0230ae9cf

Regards,
Dan.

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


Re: [sqlite] Documentation typo

2014-04-25 Thread Dominique Pellé
Drago, William  wrote:

> In section 2 of http://sqlite.org/foreignkeys.html the word
> "separately" appears twice in the following sentence:
>
> Foreign key constraints are disabled by default (for backwards
> compatibility), so must be enabled separately for each
> database connection separately.

Other sentences in the same page, where words "can" and
"not" appear incorrectly twice:

- The application *can can* also use a PRAGMA foreign_keys

- The PRAGMA recursive_triggers setting does *not not* affect
  the operation of foreign key actions

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


Re: [sqlite] documentation for datetime functions

2014-02-12 Thread Richard Hipp
On Wed, Feb 12, 2014 at 2:56 PM, Igor Tandetnik  wrote:

> On 2/12/2014 2:31 PM, Bernd wrote:
>
>> but I think that 2013-10-07 08:23:19.120-04:00 ought to be
>> 2013-10-07 04:23:19.120-04:00
>>
>
> That's what I see right now. Perhaps the page has already been corrected.
>

http://www.sqlite.org/docsrc/info/5cb71ea877

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


Re: [sqlite] documentation for datetime functions

2014-02-12 Thread Igor Tandetnik

On 2/12/2014 2:31 PM, Bernd wrote:

but I think that 2013-10-07 08:23:19.120-04:00 ought to be
2013-10-07 04:23:19.120-04:00


That's what I see right now. Perhaps the page has already been corrected.
--
Igor Tandetnik

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


Re: [sqlite] Documentation addition request

2013-11-13 Thread Richard Hipp
On Wed, Nov 13, 2013 at 10:41 AM, Simon Slavin  wrote:

> Can the text on these pages
>
> 
> 
>
> have added a brief description of what differences are between all the
> alternatives
>
> OR ROLLBACK/ABORT/REPLACE/FAIL/IGNORE
>
> are, including which one is the default ?  Thanks.
>

http://www.sqlite.org/lang_conflict.html

ABORT is always the default.


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


Re: [sqlite] Documentation update request

2013-09-05 Thread Markus Schaber
Hi, Simon,

von Simon Slavin
> On 4 Sep 2013, at 3:05pm, Markus Schaber 
> wrote:
> 
> > Afaics, this applies to partial indices for similar reasons.
> 
> I did not even know partial indices was implemented.  Thank you.

It's new in 3.8.0 :-)


Best regards

Markus Schaber

CODESYS(r) a trademark of 3S-Smart Software Solutions GmbH

Inspiring Automation Solutions

3S-Smart Software Solutions GmbH
Dipl.-Inf. Markus Schaber | Product Development Core Technology
Memminger Str. 151 | 87439 Kempten | Germany
Tel. +49-831-54031-979 | Fax +49-831-54031-50

E-Mail: m.scha...@codesys.com | Web: http://www.codesys.com | CODESYS store: 
http://store.codesys.com
CODESYS forum: http://forum.codesys.com

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade 
register: Kempten HRB 6186 | Tax ID No.: DE 167014915

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


Re: [sqlite] Documentation update request

2013-09-04 Thread Simon Slavin

On 4 Sep 2013, at 3:05pm, Markus Schaber  wrote:

> Afaics, this applies to partial indices for similar reasons.

I did not even know partial indices was implemented.  Thank you.

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


Re: [sqlite] Documentation update request

2013-09-04 Thread Markus Schaber
Hi,

von Simon Slavin
> Could the page
> 
> 
> 
> please be updated to reflect the introduction of WAL mode ?  I know this
> doesn't change the format of the database file itself, but it does change the
> format of files on disk, and it does mean that earlier and later versions of
> SQLite won't play nice under some circumstances.

Afaics, this applies to partial indices for similar reasons.


Best regards

Markus Schaber

CODESYS(r) a trademark of 3S-Smart Software Solutions GmbH

Inspiring Automation Solutions

3S-Smart Software Solutions GmbH
Dipl.-Inf. Markus Schaber | Product Development Core Technology
Memminger Str. 151 | 87439 Kempten | Germany
Tel. +49-831-54031-979 | Fax +49-831-54031-50

E-Mail: m.scha...@codesys.com | Web: http://www.codesys.com | CODESYS store: 
http://store.codesys.com
CODESYS forum: http://forum.codesys.com

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade 
register: Kempten HRB 6186 | Tax ID No.: DE 167014915
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Documentation license

2013-05-28 Thread Jan Staněk

Dne 28.5.2013 15:25, Richard Hipp napsal(a):

On Tue, May 28, 2013 at 9:04 AM, Jan Staněk  wrote:


. May I suggest update of the webpage http://www.sqlite.org/copyright.htmlto reflect 
current state? It would help preventing similar "bug reports".



Is the revised language on http://www.sqlite.org/copyright.html adequate?


I'm no lawyer, but I believe it is. Thank you very much for cooperation.

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


Re: [sqlite] Documentation license

2013-05-28 Thread Richard Hipp
On Tue, May 28, 2013 at 9:04 AM, Jan Staněk  wrote:

> . May I suggest update of the webpage http://www.sqlite.org/copyright.htmlto 
> reflect current state? It would help preventing similar "bug reports".
>

Is the revised language on http://www.sqlite.org/copyright.html adequate?

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


Re: [sqlite] Documentation license

2013-05-28 Thread Jan Staněk

Dne 28.5.2013 14:53, Richard Hipp napsal(a):

On Tue, May 28, 2013 at 8:37 AM, Jan Staněk  wrote:


Hello,
as a maintainer of sqlite in Fedora, I recently found out that the license
of the sqlite documentation is not specified - the web page only states
that documentation or its parts may be licensed under various licenses, and
that the details are unclear.

Recently a bug was opened (see [1]), claiming that in reporter's opinion
the sqlite documentation is non-free and not distributable, thus unsuitable
for packaging in Fedora.

Could someone please clarify this issue?



Many years ago, there were pieces of documentation of unknown provenance.
But all of that has been removed now.  The SQLite documentation, as with
the SQLite source code, is public domain.  We have in our firesafe signed
affidavits from all documentation authors releasing their work into the
public domain.




Thank you very much for clarifying. May I suggest update of the webpage 
http://www.sqlite.org/copyright.html to reflect current state? It would 
help preventing similar "bug reports".


In any case, thanks for fast reply.

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


Re: [sqlite] Documentation license

2013-05-28 Thread Richard Hipp
On Tue, May 28, 2013 at 8:37 AM, Jan Staněk  wrote:

> Hello,
> as a maintainer of sqlite in Fedora, I recently found out that the license
> of the sqlite documentation is not specified - the web page only states
> that documentation or its parts may be licensed under various licenses, and
> that the details are unclear.
>
> Recently a bug was opened (see [1]), claiming that in reporter's opinion
> the sqlite documentation is non-free and not distributable, thus unsuitable
> for packaging in Fedora.
>
> Could someone please clarify this issue?
>

Many years ago, there were pieces of documentation of unknown provenance.
But all of that has been removed now.  The SQLite documentation, as with
the SQLite source code, is public domain.  We have in our firesafe signed
affidavits from all documentation authors releasing their work into the
public domain.


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


Re: [sqlite] Documentation SQLException

2013-05-03 Thread Simon Slavin

On 3 May 2013, at 1:52pm, Douglas Agenor  wrote:

> hello, I'm programming a connection class with BD and need to know where I 
> can get a list of error SQLException class, because I am looking for 2 days 
> and can not find.

The SQLite result code list is here:



I do not know whether these are the codes returned by SQLException.

Simon.
-- 
  http://www.bigfraud.org | I'd expect if a computer was involved
  | it all would have been much worse.
  No Buffy for you.   |-- John "West" McKenna
  Leave quickly now. -- Anya  |  THE FRENCH WAS THERE

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


Re: [sqlite] documentation inconsistency

2012-11-25 Thread Richard Hipp
On Sun, Nov 25, 2012 at 4:12 AM, Martin Velek wrote:

> Hello,
>
> I am trying to port the Sqlite to a FreeRTOS and I am little bit
> confused about mutex implementation, especially order of calling init
> functions.
> On the Custom Builds documentation page
> http://www.sqlite.org/custombuild.html is stated:
>
>  "The auxiliary C code file can contain an implementation of
> sqlite3_initialize() that registers an appropriate VFS and also
> perhaps initializes an alternative mutex system (if mutexes are
> required) or does any memory allocation subsystem initialization that
> is required. ..."
>
> but the Mutex documentationpage
> http://www.sqlite.org/c3ref/mutex_alloc.html tells:
>  " a custom mutex implementation using the SQLITE_CONFIG_MUTEX option
> of the sqlite3_config() function before calling sqlite3_initialize()
> or any other public sqlite3_ function that calls
> sqlite3_initialize()..."
>
> If I undestand correctly I need to call sqlite3_config() before
> sqlite3_initialize(). Thus the mutex system cannot be registered
> inside sqlite3_initialize() as stated on the  Custom Builds
> documentation page.
>

The sqlite3_config(SQLITE_CONFIG_MUTEX,...) call tells SQLite what the
mutex functions are, but does not activate the mutex module.  The mutex
module is activated by sqlite3_initialize().  Perhaps we should change the
documentation to say "activate" instead of "initialize"


>
> Thank you for explanation
>
> Best
> Martin Velek
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



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


Re: [sqlite] Documentation bug in result_blob.html

2012-08-01 Thread Joe Mistachkin

Jesse Weinstein wrote:
> 
> These are not the actual names of the functions. The real names (as
> listed at the top of that page) have _error_ in the middle, i.e.
> sqlite3_result_error_toobig() and sqlite3_result_error_nomem().
> 

Thanks.  This is now fixed:

https://www.sqlite.org/src/info/bec97c9813 

--
Joe Mistachkin

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


Re: [sqlite] Documentation in PDF

2011-11-10 Thread Luuk

On 09-11-2011 12:29, Luuk wrote:

On 08-11-2011 14:04, Arbol One wrote:

Any one knows where I can get the documentation in
http://www.sqlite.org/download.html, but in PDF format?



TIA




The main problem with this is that PDF is so much baes on a page layout,
and HTML is not

I tried to 'convert' the website into one large HTML
(it a simple attempt, ;)
see: http://q.x4all.nl/sqlite.html (1.5 Mb)

and converted that HTML to PDF
see: http://q.xs4all.nl/sqlite.pdf (2.6 Mb)
(i used LibreOffice to convert it)



Because some images where missing, and some links where broken i created 
a new PDF:

http://q.xs4all.nl/SQlite


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


Re: [sqlite] Documentation in PDF

2011-11-09 Thread Konrad J Hambrick

Luuk wrote, On 11/09/2011 05:29 AM:

On 08-11-2011 14:04, Arbol One wrote:

Any one knows where I can get the documentation in
http://www.sqlite.org/download.html, but in PDF format?


The main problem with this is that PDF is so much baes on a page layout,
and HTML is not

I tried to 'convert' the website into one large HTML
(it a simple attempt, ;)
see: http://q.x4all.nl/sqlite.html (1.5 Mb)

and converted that HTML to PDF
see: http://q.xs4all.nl/sqlite.pdf (2.6 Mb)
(i used LibreOffice to convert it)


Very nice.pdf, Luuk !

One note, the html format is at:  http://q.xs4all.nl/sqlite.html

Thank you.

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


Re: [sqlite] Documentation in PDF

2011-11-09 Thread Luuk
On 08-11-2011 14:04, Arbol One wrote:
> Any one knows where I can get the documentation in
> http://www.sqlite.org/download.html, but in PDF format?
> 
>  
> 
> TIA 
> 


The main problem with this is that PDF is so much baes on a page layout,
and HTML is not

I tried to 'convert' the website into one large HTML
(it a simple attempt, ;)
see: http://q.x4all.nl/sqlite.html (1.5 Mb)

and converted that HTML to PDF
see: http://q.xs4all.nl/sqlite.pdf (2.6 Mb)
(i used LibreOffice to convert it)

-- 
Luuk
P.S. It was a 1-time-event...
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Documentation for when/what exceptions are thrown?

2011-06-29 Thread Down, Jason
Well I checked the source code and there is no xml comments for any of the 
exceptions. This explains why they don't show up in the chm help file or in 
Intellisense. I've requested that the documentation be added (or offered to do 
it for them). We'll see what happens. 


-Jay-

-Original Message-
From: Down, Jason [mailto:jason.d...@homehardware.ca] 
Sent: Tuesday, June 28, 2011 1:24 PM
To: 'sqlite-users@sqlite.org'
Subject: [sqlite] Documentation for when/what exceptions are thrown?

Wow, not sure how I missed that. Seems obvious now thanks.

I do have one more question though. While this does show great documentation, 
it still does not tell me what methods throw certain exceptions. For example, 
if I look at SqliteCommand.ExecuteNonQuery, it does not list that it can throw 
an exception (neither with Intellisense or in the actual help documentation). 
However, I do see that it implements IDbCommand.ExcecuteNonQuery. If I look up 
that method on MSDN, I see that it throws an InvalidOperationException if the 
connection is not open or does not exist.

So does this mean the only way I am going to know if a method throws an 
exception is to look up the base classes or interfaces on MSDN? What about 
SqliteException objects themselves? I see the object in the documentation, but 
I have no way of knowing which methods throw this type of exception.

-Jason-



This e-mail may contain privileged, private, proprietary or confidential 
information which is intended only for the intended recipient.  If you are not 
the intended recipient, or the person responsible for delivering this message 
to the intended recipient, you are notified that any dissemination, 
distribution or copying of this communication is strictly prohibited.  If you 
have received this communication in error, please reply with the notation 
"Received in Error" in the subject line and delete the e-mail from your 
computer.  

Ce courriel renferme des renseignements privilégiés, privés, exclusifs ou 
confidentiels et est destiné uniquement à l'usage de la personne à laquelle il 
est adressé. S'il ne vous est pas destiné ou si vous n'avez pas la 
responsabilité de le remettre à son destinataire, sachez que toute diffusion, 
distribution ou reproduction en est strictement interdite. Si vous avez reçu ce 
courriel par erreur, veuillez en informer l'auteur, en indiquant dans le champ 
«Objet :» la mention «Courriel reçu par erreur», et le supprimer immédiatement.


This e-mail may contain privileged, private, proprietary or confidential 
information which is intended only for the intended recipient.  If you are not 
the intended recipient, or the person responsible for delivering this message 
to the intended recipient, you are notified that any dissemination, 
distribution or copying of this communication is strictly prohibited.  If you 
have received this communication in error, please reply with the notation 
"Received in Error" in the subject line and delete the e-mail from your 
computer.  

Ce courriel renferme des renseignements privilégiés, privés, exclusifs ou 
confidentiels et est destiné uniquement à l’usage de la personne à laquelle il 
est adressé. S’il ne vous est pas destiné ou si vous n’avez pas la 
responsabilité de le remettre à son destinataire, sachez que toute diffusion, 
distribution ou reproduction en est strictement interdite. Si vous avez reçu ce 
courriel par erreur, veuillez en informer l’auteur, en indiquant dans le champ 
«Objet :» la mention «Courriel reçu par erreur», et le supprimer immédiatement.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Documentation for when/what exceptions are thrown?

2011-06-28 Thread Alessandro Caliaro
you should find in "C:\Program Files\SQLite.NET\Doc\"

-Messaggio originale- 
From: Down, Jason
Sent: Tuesday, June 28, 2011 6:01 PM
To: 'sqlite-users@sqlite.org'
Subject: [sqlite] Documentation for when/what exceptions are thrown?

I'm having trouble finding documentation for the Sqlite.Net data provider 
(System.Data.Sqlite.dll - http://sqlite.phxsoftware.com/) (new development 
has forked here - 
http://system.data.sqlite.org/index.html/doc/trunk/www/index.wiki) that 
lists what exceptions are thrown by the various classes and their methods. I 
know there are SqliteExceptions that can be thrown, but when?

I have ensured I have the accompanying System.Data.Sqlite.xml documentation 
file, but it doesn't appear to list what exceptions are thrown by each 
method.

I don't want to wrap unnecessary code into try/catch blocks (or blindly 
catch a generic Exception object everywhere).

Does anyone know where I may find such documentation? I know that 
SqliteConnection is derived from DbConnection 
(http://msdn.microsoft.com/en-us/library/system.data.common.dbconnection%28v=VS.90%29.aspx),
 
and SqliteCommand is derived from DbCommand 
(http://msdn.microsoft.com/en-us/library/system.data.common.dbcommand%28v=VS.90%29.aspx),
 
so if necessary I guess I can look at the documentation there. However, none 
of the base classes will list SqliteException, so when will those type of 
exceptions be thrown?

PS - I'm using version 1.0.64 (from 2009... can't upgrade at this time, but 
it's not outside the realm of possibility if necessary).

Thanks

Jason Down
HomeInfo/HAMR Development - Senior Programmer/Analyst
Home Hardware Stores Limited - Retail Applications
Phone: 519.664.4670
Fax: 519.664.3718
34 Henry St W
St. Jacobs, Ontario
N0B 2N0
jason.d...@homehardware.ca


*  Please consider the environment before printing this e-mail.




This e-mail may contain privileged, private, proprietary or confidential 
information which is intended only for the intended recipient.  If you are 
not the intended recipient, or the person responsible for delivering this 
message to the intended recipient, you are notified that any dissemination, 
distribution or copying of this communication is strictly prohibited.  If 
you have received this communication in error, please reply with the 
notation "Received in Error" in the subject line and delete the e-mail from 
your computer.

Ce courriel renferme des renseignements privilégiés, privés, exclusifs ou 
confidentiels et est destiné uniquement à l’usage de la personne à laquelle 
il est adressé. S’il ne vous est pas destiné ou si vous n’avez pas la 
responsabilité de le remettre à son destinataire, sachez que toute 
diffusion, distribution ou reproduction en est strictement interdite. Si 
vous avez reçu ce courriel par erreur, veuillez en informer l’auteur, en 
indiquant dans le champ «Objet :» la mention «Courriel reçu par erreur», et 
le supprimer immédiatement.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users 

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


Re: [sqlite] Documentation clarification

2011-04-20 Thread Richard Hipp
On Tue, Apr 19, 2011 at 6:46 PM, Dennis Cote  wrote:

> Hi,
>
> On the page http://www.sqlite.org/lang_createtable.html
>
> The following text appears:
>
>* If the default value of a column is CURRENT_TIME, CURRENT_DATE or
> CURRENT_DATETIME, then the value used in the new row is a text
> representation of the current UTC date and/or time. For CURRENT_TIME,
> the format of the value is "HH:MM:SS". For CURRENT_DATE, "-MM-DD".
> The format for CURRENT_TIMESTAMP is "-MM-DD HH:MM:SS".
>
> The first sentence uses the name CURRENT_DATETIME (hooray), the fourth
> uses the name CURRENT_TIMESTAMP (booo) for what I believe are supposed
> to be the same thing.
>
> Which of these is the correct name, or are they equivalent?
>

CURRENT_TIMESTAMP is correct.  The documentation has been updated.


>
> --
> Dennis Cote
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



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


Re: [sqlite] Documentation seams to be wrong.

2011-02-24 Thread Richard Hipp
On Thu, Feb 24, 2011 at 4:44 AM, Matthew Baynham
wrote:

> On this page http://www.sqlite.org/c3ref/c_stmtstatus_autoindex.html there
> are three Constants, however only 2 exist.
>
> SQLITE_STMTSTATUS_AUTOINDEX Doesn't seam to exist.
>

Added in version 3.7.0.  You must be using an older version.



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



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


Re: [sqlite] Documentation typos - part no.3

2011-01-20 Thread Richard Hipp
On Thu, Jan 20, 2011 at 4:16 AM, Marian Cascaval
wrote:

> Hi!
>
> Again, some more Documentation typos
> with some fun while we're at it:
>

Thanks for sending these in.  I have implemented fixes which have been
uploaded to the "draft" website at http://www.sqlite.org/draft/index.html or
which can be seen at the documentation source repository
http://www.sqlite.org/docsrc/ci/9101dd1c25

Please let me know if you find any other problems.
-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Documentation typos - part no.2

2011-01-13 Thread Puneet Kishor


Marian Cascaval wrote:
> Hi!
>
> Some more Documentation typos:
>
> 1.
> http://www.sqlite.org/pragma.html#pragma_synchronous
> "... will not corrupt the _dartbase_."
>   It should be either _dartboard_ or _database_ but I'd stick with the 
> latter
> ;).
>
> 2.
> http://www.sqlite.org/c3ref/open.html
> "... and _is creates it_ if it does not already exist."
>   It should be either _is created_ or _creates it_.
>  It's clear the author had these two ideas in mind and amalgamated them 
> ;).
>
>
>
> I can drop the jokes next time if solemnity is required here.
>


Good heavens no. Lord knows we need some levity. SQL is not a very 
scintillating topic by itself. That said, making jokes does open you up 
for being judged on your sensayuma, so better make them top-notch.

Anyway, thanks for the contribs. This is the kind of stuff that benefits 
everyone.

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


Re: [sqlite] Documentation does not tell when database will be in UTF-8 versus UTF-16.

2010-12-31 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/30/2010 02:36 PM, Gary Carter wrote:
> A hex dump of database files shows for some files all the strings (including
> schemas)
> are in UTF-8, and sometimes all the strings are in UTF-16.
>  
> How do I control this?

Note that you do not need to "control" it.  The SQLite APIs behave exactly
the same no matter what the actual database encoding is.  In general you
never need to know or care.  This means you can call the UTF16 or UTF8
SQLite APIs at the same time in the same program and you will get the same
answers no matter what encoding the database file uses.  ie the SQLite API
works on Unicode strings always.

Because the database file encoding controls which bytes are used to
represent Unicode strings, you can set it as others have answered as an
optimization.  For example if most of your text has codepoints above U+07FF
then it will take fewer bytes to use UTF16.  If you mostly use the UTF16
SQLite apis then using the same for the file encoding will result in fewer
internal conversions.

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0esXgACgkQmOOfHg372QRZjwCdHOECh+V2JbQCTJTu/9zo/Ka8
j9MAniisu14AjmcDWnTi5OxfZo1cNEEq
=gcam
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Documentation does not tell when database will be in UTF-8 versus UTF-16.

2010-12-31 Thread Igor Tandetnik
Richard Hipp  wrote:
> On Thu, Dec 30, 2010 at 5:36 PM, Gary Carter  wrote:
> 
>> A hex dump of database files shows for some files all the strings
>> (including
>> schemas)
>> are in UTF-8, and sometimes all the strings are in UTF-16.
>> 
>> How do I control this?  Documentation is silent on this matter.
>> 
> 
> http://www.sqlite.org/pragma.html#pragma_encoding

Also http://www.sqlite.org/c3ref/open.html
-- 
Igor Tandetnik

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


Re: [sqlite] Documentation does not tell when database will be in UTF-8 versus UTF-16.

2010-12-31 Thread Richard Hipp
On Thu, Dec 30, 2010 at 5:36 PM, Gary Carter  wrote:

> A hex dump of database files shows for some files all the strings
> (including
> schemas)
> are in UTF-8, and sometimes all the strings are in UTF-16.
>
> How do I control this?  Documentation is silent on this matter.
>

http://www.sqlite.org/pragma.html#pragma_encoding

>
> Thanks,
>
> Gary Carter
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



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


Re: [sqlite] Documentation for Prev. Versions

2010-08-13 Thread Jon Polfer
DRH - Thanks for the docs; you are very kind.

-Jon

On Thu, Aug 12, 2010 at 11:59 AM, Jon Polfer
wrote:

> Is there a way to get at the documentation for previous versions of 
> SQLite?
>
> I'm running 3.5.9, and don't have much of an opportunity to upgrade.  
> Is there a way that I can get a snapshot of what the wiki / website 
> documentation looked like for 3.5.9?
>

http://www.sqlite.org/sqlite_docs_3_5_9.zip


>
> Thanks,
> Jon
> __
> Jon Polfer
> Project Engineer - High Level Software
>
> Engineering Office Phone: 262-832-0049  (Ext. 5 for Jon Polfer)
> Fax:
> E-mail: jpol...@forceamerica.com
>
> FORCE America Inc.
> W229 N1433 Westwood Drive, Suite 200
> Waukesha, WI 53186
> www.forceamerica.com
>
> The Leading Innovator in Mobile Hydraulic Solutions
>
>
>
>
> The information contained in this message and any attachment may be 
> proprietary, confidential, and privileged or subject to the work 
> product doctrine and thus protected from disclosure.  If the reader of

> this message is not the intended recipient, or an employee or agent 
> responsible for delivering this message to the intended recipient, you

> are hereby notified that any dissemination, distribution or copying of

> this communication is strictly prohibited.
> If you have received this communication in error, please notify me 
> immediately by replying to this message and deleting it and all copies

> and backups thereof.  Thank you.
>
>
> Disclaimer added by CodeTwo Exchange Rules http://www.codetwo.com 
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



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


__ 
Jon Polfer
Project Engineer - High Level Software

Engineering Office Phone: 262-832-0049  (Ext. 5 for Jon Polfer)
Fax: 
E-mail: jpol...@forceamerica.com

FORCE America Inc. 
W229 N1433 Westwood Drive, Suite 200 
Waukesha, WI 53186
www.forceamerica.com

The Leading Innovator in Mobile Hydraulic Solutions



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


Re: [sqlite] Documentation for Prev. Versions

2010-08-12 Thread Richard Hipp
On Thu, Aug 12, 2010 at 11:59 AM, Jon Polfer wrote:

> Is there a way to get at the documentation for previous versions of
> SQLite?
>
> I'm running 3.5.9, and don't have much of an opportunity to upgrade.  Is
> there a way that I can get a snapshot of what the wiki / website
> documentation looked like for 3.5.9?
>

http://www.sqlite.org/sqlite_docs_3_5_9.zip


>
> Thanks,
> Jon
> __
> Jon Polfer
> Project Engineer - High Level Software
>
> Engineering Office Phone: 262-832-0049  (Ext. 5 for Jon Polfer)
> Fax:
> E-mail: jpol...@forceamerica.com
>
> FORCE America Inc.
> W229 N1433 Westwood Drive, Suite 200
> Waukesha, WI 53186
> www.forceamerica.com
>
> The Leading Innovator in Mobile Hydraulic Solutions
>
>
>
>
> The information contained in this message and any attachment may be
> proprietary, confidential, and privileged or subject to the work
> product doctrine and thus protected from disclosure.  If the reader
> of this message is not the intended recipient, or an employee or
> agent responsible for delivering this message to the intended
> recipient, you are hereby notified that any dissemination,
> distribution or copying of this communication is strictly prohibited.
> If you have received this communication in error, please notify me
> immediately by replying to this message and deleting it and all
> copies and backups thereof.  Thank you.
>
>
> Disclaimer added by CodeTwo Exchange Rules
> http://www.codetwo.com
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



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


Re: [sqlite] Documentation for Prev. Versions

2010-08-12 Thread Kees Nuyt
On Thu, 12 Aug 2010 10:59:46 -0500, "Jon Polfer"
 wrote:

>Is there a way to get at the documentation for previous versions of
>SQLite?
>
>I'm running 3.5.9, and don't have much of an opportunity to upgrade.  Is
>there a way that I can get a snapshot of what the wiki / website
>documentation looked like for 3.5.9?

The source of the documentation site, and the utilities to
generate the documentation site from it is kept in a
separate fossil repository. There are hyperlinks to it on
the bottom of the download page
http://www.sqlite.org/download.html.

You can clone the repository to your environment and
checkout any version, then generate the website of that
point in time.

The fossil version control system is available here:
http://www.fossil-scm.org/index.html/doc/tip/www/index.wiki
-- 
  (  Kees Nuyt
  )
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Documentation error in explanation of "IN subquery" (lang_expr.html)

2010-07-14 Thread Simon Slavin

On 14 Jul 2010, at 7:22pm, Richard Hipp wrote:

> On Wed, Jul 14, 2010 at 1:25 PM, Simon Slavin  wrote:
> 
>> By the way, can someone explain why this rule, equivalent to line 4 of the
>> table, is there:
>> 
>> elseif the right op contains NULL, then IN = NULL
> 
> NULL should be interpreted as "unknown".  Hence in:
> 
>  5 IN (1,2,3,4,NULL,6,7)
> 
> we do *not* definitely know that 5 is not in the RHS.

Wow.  I'd never have guessed that.  Thanks to both Dan and Richard for fast 
answers.  That makes both the table and the test-set I suggested far more easy 
to understand.  Perhaps that explanation could be included in the explanation 
of 'IN'.

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


Re: [sqlite] Documentation error in explanation of "IN subquery" (lang_expr.html)

2010-07-14 Thread Richard Hipp
On Wed, Jul 14, 2010 at 1:25 PM, Simon Slavin  wrote:

> By the way, can someone explain why this rule, equivalent to line 4 of the
> table, is there:
>
> elseif the right op contains NULL, then IN = NULL
>
> By the time we've got there we already know that the left op is not NULL.
>  Why does the handling of a NULL right op require a special case like that ?
>  We definitely know that the left op is not IN it.
>

NULL should be interpreted as "unknown".  Hence in:

  5 IN (1,2,3,4,NULL,6,7)

we do *not* definitely know that 5 is not in the RHS.  5 may or may not be
in the RHS depending on what the value of the NULL is.  Since we don't know
if 5 is in the RHS, the result of the expression is also unknown, or in
SQL-speak: NULL.




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



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


Re: [sqlite] Documentation error in explanation of "IN subquery" (lang_expr.html)

2010-07-14 Thread Dan Kennedy

On Jul 15, 2010, at 12:25 AM, Simon Slavin wrote:

>
> On 14 Jul 2010, at 5:13pm, Richard Hipp wrote:
>
>> Improvements to the IN operator documentation can be found here:
>>
>>http://www.sqlite.org/draft/lang_expr.html#in_op
>
> I find that table difficult to understand: you have some mutually  
> exclusive columns.  Could it be replaced by this sequence of four  
> tests and an 'otherwise' ?
>
>   If the right op is the empty list, then IN = false
> else  if the left op is NULL, thenIN = NULL
> else  if the right op contains left op, then  IN = true
> else  if the right op contains NULL, then IN = NULL
> otherwise IN = false
>
> Also NOT true = false, NOT false = true, NOT NULL = NULL.
>   
> That should match the source code, so it should be better  
> documentation.
>
> By the way, can someone explain why this rule, equivalent to line 4  
> of the table, is there:
>
> else  if the right op contains NULL, then IN = NULL
>
> By the time we've got there we already know that the left op is not  
> NULL.  Why does the handling of a NULL right op require a special  
> case like that ?  We definitely know that the left op is not IN it.

Thread here:

   http://www.mail-archive.com/sqlite-users@sqlite.org/msg34989.html

He can be a tricky guy, NULL.


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


Re: [sqlite] Documentation error in explanation of "IN subquery" (lang_expr.html)

2010-07-14 Thread Simon Slavin

On 14 Jul 2010, at 5:13pm, Richard Hipp wrote:

> Improvements to the IN operator documentation can be found here:
> 
> http://www.sqlite.org/draft/lang_expr.html#in_op

I find that table difficult to understand: you have some mutually exclusive 
columns.  Could it be replaced by this sequence of four tests and an 
'otherwise' ?

If the right op is the empty list, then IN = false
elseif the left op is NULL, thenIN = NULL
elseif the right op contains left op, then  IN = true
elseif the right op contains NULL, then IN = NULL
otherwise   IN = false

Also NOT true = false, NOT false = true, NOT NULL = NULL.

That should match the source code, so it should be better documentation.

By the way, can someone explain why this rule, equivalent to line 4 of the 
table, is there:

elseif the right op contains NULL, then IN = NULL

By the time we've got there we already know that the left op is not NULL.  Why 
does the handling of a NULL right op require a special case like that ?  We 
definitely know that the left op is not IN it.

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


Re: [sqlite] Documentation error in explanation of "IN subquery" (lang_expr.html)

2010-07-14 Thread Richard Hipp
On Wed, Jul 14, 2010 at 8:17 AM, Igor Sereda  wrote:

>
> On page http://www.sqlite.org/lang_expr.html :
>
> "When a SELECT is the right operand of the IN operator, the IN operator
> returns TRUE if the SELECT result contains no NULLs and if the left operand
> matches any of the values in the SELECT result."
>
> The part "SELECT result contains no NULLs" does not seem to hold true (and
> for the better!):
>

Improvements to the IN operator documentation can be found here:

 http://www.sqlite.org/draft/lang_expr.html#in_op

Note that in the process of making these documentation improvements, we
discovered a bug in the NULL handling of the IN operator:


http://www.sqlite.org/src/tktview/80e031a00f45dca877ed92b225209cfa09280f4f

We are working to fix this bug prior to the 3.7.0 release.



>
> sqlite> SELECT 'selected' WHERE 1 IN (SELECT null UNION SELECT 1);
> selected
>
> Cheers,
> Igor
> --
> View this message in context:
> http://old.nabble.com/Documentation-error-in-explanation-of-%22IN-subquery%22-%28lang_expr.html%29-tp29161289p29161289.html
> Sent from the SQLite mailing list archive at Nabble.com.
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



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


Re: [sqlite] Documentation typo

2010-05-11 Thread Richard Hipp
2010/5/10 "Carlos Andrés Ramírez C." 

>
> Hello guys,
> I was breaking my head trying to figure out how to obtain the last
> inserted row's ID --- using SQLite from Ruby.
>
> I found 'last_insert_rowid()' in your documentation at
> http://www.sqlite.org/lang_corefunc.html   and still did not do it.
>
> After spending a lot of time searching, I found that it was not
> 'last_insert_rowid()' as documented, but instead 'last_insert_row_id()'
>  with an extra underscore character before the 'id'.
>

SQLite uses last_insert_rowid() (with no _ between row and id) is correct,
as the documentation states.  Perhaps Ruby has an equivalent method named
last_insert_row_id().  Or perhaps the version of SQLite built into Ruby has
a modified version of SQLite that adds the extra _ in the name.



>
> is this a Typo? --- I almost went crazy
> It was like that also in the downloadable documentation, so you wanna
> check that out,
>
> Best wishes,
>
> Carlos Ramirez,
> www.antai-group.com
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



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


Re: [sqlite] Documentation typo

2010-05-11 Thread P Kishor
2010/5/10 "Carlos Andrés Ramírez C." :
>
> Hello guys,
> I was breaking my head trying to figure out how to obtain the last
> inserted row's ID --- using SQLite from Ruby.
>
> I found 'last_insert_rowid()' in your documentation at
> http://www.sqlite.org/lang_corefunc.html   and still did not do it.
>
> After spending a lot of time searching, I found that it was not
> 'last_insert_rowid()' as documented, but instead 'last_insert_row_id()'
>  with an extra underscore character before the 'id'.
>

Nope. last_insert_rowid() is correct. Note that just doing a 'SELECT
row_id FROM table' will croak with an error, while 'SELECT rowid FROM
table' works fine. There is no underscore. I have
$dbh->sqlite_last_insert_rowid() in Perl.

Perhaps your Ruby SQLite package has changed the syntax and introduced
the underscore. Get it corrected there.


> is this a Typo? --- I almost went crazy
> It was like that also in the downloadable documentation, so you wanna
> check that out,
>
> Best wishes,
>
> Carlos Ramirez,
> www.antai-group.com
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
---
Assertions are politics; backing up assertions with evidence is science
===
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Documentation typo

2010-05-11 Thread Simon Slavin

On 10 May 2010, at 4:11pm, Carlos Andrés Ramírez C. wrote:

> I was breaking my head trying to figure out how to obtain the last 
> inserted row's ID --- using SQLite from Ruby.
> 
> I found 'last_insert_rowid()' in your documentation at   
> http://www.sqlite.org/lang_corefunc.html   and still did not do it.
> 
> After spending a lot of time searching, I found that it was not 
> 'last_insert_rowid()' as documented, but instead 'last_insert_row_id()' 
>  with an extra underscore character before the 'id'.

The amalgamation source for 3.6.23 has

SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);

and

static void last_insert_rowid

I don't know where you got your function from, but I don't think it's SQLite.  
It might be a Ruby library that /calls/ SQLite, in which case the error is with 
whoever wrote the Ruby library.

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


Re: [sqlite] Documentation for bubble-generator.tcl

2009-10-01 Thread Keith Roberts
On Thu, 1 Oct 2009, D. Richard Hipp wrote:

> To: General Discussion of SQLite Database 
> From: D. Richard Hipp 
> Subject: Re: [sqlite] Documentation for bubble-generator.tcl
> 
>
> On Oct 1, 2009, at 2:28 PM, Keith Roberts wrote:
>>
>> I have downloaded and run bubble-generator.tcl.
>>
>> It works OK. I'm not a TCL/TK person, and would like to
>> modify the bubble-generator.tcl code.
>>
>> Is there any documentation on how the script works please?
>
> The only documentation is comments in the code.
>
> D. Richard Hipp
> d...@hwaci.com

OK. Thanks for pointing that out Richard,

Kind Regards,

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


Re: [sqlite] Documentation for bubble-generator.tcl

2009-10-01 Thread D. Richard Hipp

On Oct 1, 2009, at 2:28 PM, Keith Roberts wrote:
>
> I have downloaded and run bubble-generator.tcl.
>
> It works OK. I'm not a TCL/TK person, and would like to
> modify the bubble-generator.tcl code.
>
> Is there any documentation on how the script works please?

The only documentation is comments in the code.

D. Richard Hipp
d...@hwaci.com



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


Re: [sqlite] Documentation on ~/.sqliterc

2009-09-23 Thread Jay A. Kreibich
On Wed, Sep 23, 2009 at 08:27:34AM -0400, Pavel Ivanov scratched on the wall:
> What does ~/.sqliterc do, I wonder? And what "startup information are
> you talking about?
> 
> This page http://www.sqlite.org/different.html says specifically:
> "SQLite uses no configuration files".

  SQLite, the library, does not.

  sqlite3, the command-line utility, does.



  IIRC, if you have a .sqliterc file, the sqlite3 shell will
  automatically do the equivalent of a .read on it every time
  you start the program.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Our opponent is an alien starship packed with atomic bombs.  We have
 a protractor."   "I'll go home and see if I can scrounge up a ruler
 and a piece of string."  --from Anathem by Neal Stephenson
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Documentation on ~/.sqliterc

2009-09-23 Thread Pavel Ivanov
What does ~/.sqliterc do, I wonder? And what "startup information are
you talking about?

This page http://www.sqlite.org/different.html says specifically:
"SQLite uses no configuration files".

Pavel

On Wed, Sep 23, 2009 at 7:19 AM, Raphael J. Schmid
 wrote:
> Hello list,
>
> after some (fruitless) googling for where to put SQLite startup
> information and browsing around http://www.sqlite.org/docs.html
> I finally decided to join the IRC channel and ask there.
>
> It was suggested that it might be a good idea to suggest to this
> mailinglist that it might be a good idea to put easily discoverable
> information on the existence of ~/.sqliterc somewhere under
> http://www.sqlite.org/docs.html :-)
>
> Have a nice day everybody!
>
> Cheers,
>    Raphael
>
>
>
> --
> Raphael J. Schmid
> Ritterstraße 3
> 70199 Stuttgart
>
> Mobil: 0173/87 57 046
> Web: http://2laborate.com
>
> ²laborate
>  lässt: Menschen. Zusammen. Arbeiten.
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Documentation on SQLite indirectBLOB?

2009-03-25 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

MBR wrote:
> The Open Source project BitPim uses SQLite. 

I wrote that code.  The rationale is at
http://bitpim.svn.sourceforge.net/viewvc/bitpim/trunk/bitpim/dev-doc/database.html

> In the output
> I found numerous references to columns of type indirectBLOB.  

Generally the "indirect" is because the value is stored in another
table.  The BLOB bit is so that SQLite doesn't attempt to make any
affinity conversions (it generally prefers to mangle things into
integers which is fatal for phone numbers) .

This is only deep and meaningful to BitPim itself.  It has import and
export functionality if you want the actual data.  The SQLite database
is structured so that Python dictionaries are can be used in the rest of
the code.  Each entry has arbitrary fields each of which can have any
number of ordered values.  Any entry can be looked up for any point in
the past.

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknK1rcACgkQmOOfHg372QRZXgCglblMxRPuS4vxa+OCecDUV2mI
3UEAoIgP0TTe0TWSURFrYCTekOGi1h9x
=Q1JI
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Documentation on SQLite indirectBLOB?

2009-03-25 Thread MBR
I just read through http://www.sqlite.org/datatype3.html, and it's now 
starting to make sense to me.  Wow!   My mental model of what's going on 
under the covers just underwent a major readjustment.  Thanks for 
pointing me at that page.

Mark

Griggs, Donald wrote:
> Hi Mark,
>
> There's a good reason for your difficulty -- Sqlite uses dynamic typing:
> http://www.sqlite.org/datatype3.html
>
> As far as I know, the term "IndirectBlob" is not defined within sqlite
> and is likely a term from the BitPim developers.
>
> Sqlite allows one to use most anything as a type -- "BlobThatAteNewYork"
> would work quite nicely.
>
> >From sqlite's point-of-view, if a BLOB contains structure, it's
> structure known only to the calling application.
>
> Hope this helps,
>   Donald
>
> -Original Message-
> From: sqlite-users-boun...@sqlite.org
> [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of MBR
> Sent: Wednesday, March 25, 2009 6:09 PM
> To: sqlite-users@sqlite.org
> Subject: [sqlite] Documentation on SQLite indirectBLOB?
>
> The Open Source project BitPim uses SQLite.  I'm trying to examine the
> database BitPim creates.  At http://www.sqlite.org/download.html I found
> sqlite-3_6_11.zip, which is a pre-compiled Windows command-line SQL
> interface.
>
> I ran:
>
> sqlite3 bitpim.db
>
> then typed:
>
> .dump
>
> and saved the output to see what's in the database.  The result is a set
> of SQL queries that can be used to recreate the database.  In the output
> I found numerous references to columns of type indirectBLOB.  When I
> look at the data that gets inserted into those columns, it's pretty
> clear that the value in those columns is of the form:
>
> /tableName/,/recordId/,/recordId/,...
>
> But I've been unable to find documentation on the keyword 'indirect' or
> 'indirectBLOB' anywhere on the web, including
> http://www.sqlite.org/docs.html.  Can anyone here tell me where to find
> that documentation?
>
> Mark Rosenthal
> m...@arlsoft.com 
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>   
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


  1   2   >