Re: [sqlite] SQLite3 Tutorial error

2017-01-07 Thread dandl
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Simon Slavin > How about adding the above to the permanent docs? >>>SQLite docs do not usually include examples or tutorial information. It >>>would be more consistent just to take the text which is currently

Re: [sqlite] SQLite3 Tutorial error

2017-01-07 Thread James K. Lowden
On Fri, 06 Jan 2017 13:48:26 -0700 "Keith Medcalf" wrote: > Both "glob" and "like" call the same function, likeFunc with > different sets of user_data. likeFunc does a bunch of validation > then calls patternCompare which actually implements the like and glob > functionality. How like and glob

Re: [sqlite] SQLite3 Tutorial error

2017-01-07 Thread Richard Hipp
On 1/7/17, Simon Slavin wrote: > > > > I have a question to add. How unicode-compliant are these functions ? There is the usual ASCIi-only case-folding for LIKE. But otherwise, the function should work with unicode. -- D. Richa

Re: [sqlite] SQLite3 Tutorial error

2017-01-07 Thread Simon Slavin
On 7 Jan 2017, at 6:27am, dandl wrote: > How about adding the above to the permanent docs? SQLite docs do not usually include examples or tutorial information. It would be more consistent just to take the text which is currently comments in the source code file and include it in the docs. Y

Re: [sqlite] SQLite3 Tutorial error

2017-01-06 Thread dandl
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Keith Medcalf >>>SQLite does not use the glob function from the standard library -- the >>>function is defined in func.c >>> >>>Both "glob" and "like" call the same function, likeFunc with different sets >>>of

Re: [sqlite] SQLite3 Tutorial error

2017-01-06 Thread Keith Medcalf
On Friday, 6 January, 2017 12:49, James K. Lowden wrote: > On Fri, 6 Jan 2017 10:23:06 +1100 > "dandl" wrote: > > > Unix globbing for Linux is defined here: > > http://man7.org/linux/man-pages/man7/glob.7.html. AFAICT Sqlite does > > not implement this behaviour. > > A quick scan of SQLite s

Re: [sqlite] SQLite3 Tutorial error

2017-01-06 Thread Richard Hipp
On 1/6/17, James K. Lowden wrote: > > A quick scan of SQLite sources shows only references to the glob > function, no implementation. The implementation is built-in here: https://www.sqlite.org/src/artifact/d8582ee919759756?ln=610-770 For portability reasons, SQLite avoids using routines from th

Re: [sqlite] SQLite3 Tutorial error

2017-01-06 Thread James K. Lowden
On Fri, 6 Jan 2017 10:23:06 +1100 "dandl" wrote: > Unix globbing for Linux is defined here: > http://man7.org/linux/man-pages/man7/glob.7.html. AFAICT Sqlite does > not implement this behaviour. A quick scan of SQLite sources shows only references to the glob function, no implementation. In fun

Re: [sqlite] SQLite3 Tutorial error

2017-01-05 Thread Ken Wagner
David, Yes. That would be a big assist. I am new to using SQLite3 and found the GLOB function erratic in practice -- not on SQLite3 but on other web sites using SQLite. They yielded completely opposite results. Second the motion. Ken On 01/05/2017 05:23 PM, dandl wrote: From: sqlite-users

Re: [sqlite] SQLite3 Tutorial error

2017-01-05 Thread Ken Wagner
: [sqlite] SQLite3 Tutorial error Yes, I am beginning to understand that. SQLite3 is its own GLOB standard. I will abide by that. It is just very confusing when 5 other apps using SQLite as their DB engine all report the opposite. The SQLite versions they use are 3.9.2, 3.10.1, 3.11.0 and 3.13.0

Re: [sqlite] SQLite3 Tutorial error

2017-01-05 Thread Jens Alfke
> On Jan 5, 2017, at 3:23 PM, dandl wrote: > > Perhaps some accurate documentation for GLOB in Sqlite would help to clarify > things? +1. I for one was unaware that glob understands the “[…]” syntax for character classes (both in SQLite and in the Unix glob(3) function), despite having used

Re: [sqlite] SQLite3 Tutorial error

2017-01-05 Thread dandl
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Simon Slavin >>>They’re probably using the external function interface to override the >>>internal globbing function. And by the look of the results at least one of >>>the programmers involved thinks that GLO

Re: [sqlite] SQLite3 Tutorial error

2017-01-05 Thread Simon Slavin
On 5 Jan 2017, at 7:30pm, dmp wrote: > I don't know what those other apps may be doing, but they should > just pass the query created by the user "DIRECTLY" to the SQLite DB > engine without any modification. Likewise the result should also > not be mucked with before presentation. They’re prob

Re: [sqlite] SQLite3 Tutorial error

2017-01-05 Thread dmp
> Message: 21 > Date: Wed, 4 Jan 2017 22:10:59 -0600 > From: Ken Wagner > To: SQLite mailing list > Subject: Re: [sqlite] SQLite3 Tutorial error > Yes, I am beginning to understand that. SQLite3 is its own GLOB standard. > I will abide by that. > It is just very con

Re: [sqlite] SQLite3 Tutorial error

2017-01-05 Thread Ken Wagner
Ryan, Thanks. I have saved the Unix GLOB reference. When I inferred that other versions of SQLite gave the other results, it was thru the other SQLite GUI tools and the version of SQLite that they used. Thanks for helping to make clear what was going on. Ken On 01/05/2017 02:53 AM, R Smi

Re: [sqlite] SQLite3 Tutorial error

2017-01-05 Thread R Smith
On 2017/01/05 9:04 AM, Ken Wagner wrote: Keith, It appears that the folks at SQLiteTutorial.net have a coding anomaly. They are not following the UNIX / SQLite3 GLOB patterns. And so, too, do the other guys. I am adjusting my usage accordingly. I will advise users of the other products to

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
%', '_', and esc, match exactly c. ** ** The comments within this routine usually assume glob matching. ** ** This routine is usually quick, but can be N**2 in the worst case. */ -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Beh

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
ias ll='ls -l') Are you ABSOLUTELY SURE that the authors of the third-party tools have not provided their own GLOB function that works differently, perhaps in accordance with their Dim Sum because their little hearts did not desire the built in one? -Original Message- From: sqli

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Keith Medcalf
gt; -Original Message- > From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] > On Behalf Of dandl > Sent: Wednesday, 4 January, 2017 23:18 > To: 'SQLite mailing list' > Subject: Re: [sqlite] SQLite3 Tutorial error > > A question: this a

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Keith Medcalf
u select sqlite_version() and sqlite_source_id() to see what version of sqlite was being used? In the Python above it is currently: >>> for row in cr.cursor().execute("select sqlite_version(), >>> sqlite_source_id();"): ... print row ... Row(sqlite_version=u'3.17.

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread dandl
A question: this appears to be the Posix standard for globbing ie Patterns Used for Filename Expansion: http://pubs.opengroup.org/onlinepubs/007908799/xcu/chap2.html#tag_001_013_003 And this is Linux: https://linux.die.net/man/7/glob Is this what Sqlite intends to conform to? Because the convent

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Michael Falconer
cause their little hearts did not desire >> the built in one? >> >> -Original Message- >>> From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] >>> On Behalf Of Ken Wagner >>> Sent: Wednesday, 4 January, 2017 21:24 >>> To: SQ

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
om: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Ken Wagner Sent: Wednesday, 4 January, 2017 21:24 To: SQLite mailing list Subject: Re: [sqlite] SQLite3 Tutorial error Aha! GLOB is an implementation of the UNIX Glob function. It just borrows the regex character n

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread dandl
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Keith Medcalf >>>Yes. The GLOB was invented on Unix. I posted an example of the Unix >>>filename globbing (which has not changed, to my knowledge, since the 60's), >>>which works exactly the same as the GLOB

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Keith Medcalf
ists.sqlite.org] > On Behalf Of Ken Wagner > Sent: Wednesday, 4 January, 2017 21:24 > To: SQLite mailing list > Subject: Re: [sqlite] SQLite3 Tutorial error > > Aha! GLOB is an implementation of the UNIX Glob function. It just > borrows the regex character notation of [^1-9]

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
Aha! GLOB is an implementation of the UNIX Glob function. It just borrows the regex character notation of [^1-9]. I have 3.15 and 3.16 CLIs installed. Trying any other CLI versions at this point won't help for the customer. They will be using a SQLite3 GUI. I will explain the difference betwee

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
Yes, I am beginning to understand that. SQLite3 is its own GLOB standard. I will abide by that. It is just very confusing when 5 other apps using SQLite as their DB engine all report the opposite. The SQLite versions they use are 3.9.2, 3.10.1, 3.11.0 and 3.13.0. Example: the SQLite Manag

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread R Smith
On 2017/01/04 9:14 PM, Keith Medcalf wrote: ~/test# uname -a Linux raspberrypi 4.9.0-v7+ #939 SMP Thu Dec 15 18:07:48 GMT 2016 armv7l GNU/Linux ~/test# echo . > 5AB ~/test# echo . > A5B ~/test# echo . > AB5 ~/test# echo . > 5 ~/test# echo . > ABC ~/test# ll *[1-9]* -rw-r--r-- 1 root root 2 Jan

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Keith Medcalf
> -Original Message- > From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] > On Behalf Of R Smith > Sent: Wednesday, 4 January, 2017 10:52 > To: sqlite-users@mailinglists.sqlite.org > Subject: Re: [sqlite] SQLite3 Tutorial error > > > > On

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread R Smith
Apologies Jens, the final paragraphs in this reply where I used "you" were intended to the OP (Ken Wagner) and not yourself, of course. On 2017/01/04 7:51 PM, R Smith wrote: On 2017/01/04 7:01 PM, Jens Alfke wrote: On Jan 4, 2017, at 5:57 AM, R Smith wrote: As I have it (and as is impleme

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread R Smith
On 2017/01/04 7:01 PM, Jens Alfke wrote: On Jan 4, 2017, at 5:57 AM, R Smith wrote: As I have it (and as is implemented by SQLite) the GLOB operator implements a REGEXP that matches against a regexp pattern No, these are NOT regular expressions in the usual sense of the word. GLOB's syntax

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Jens Alfke
> On Jan 4, 2017, at 5:57 AM, R Smith wrote: > > As I have it (and as is implemented by SQLite) the GLOB operator implements a > REGEXP that matches against a regexp pattern No, these are NOT regular expressions in the usual sense of the word. GLOB's syntax is incompatible with what are commo

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread R Smith
On 2017/01/04 4:11 PM, Ken Wagner wrote: Simon, Yes, I am using the SQLite3 CLI. That's how I discovered the different GLOB outcomes. I now understand that the SQLite3 GLOB function is not fully documented so it's best to just experiment with the GLOB function at the CLI for SQLite3. And

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
Richard, Why, thank you, for your very prompt reply and resolution for this 'nit'. If I can be of any assistance in testing (or taxing) the system, please do inform me. You have a jewel of a product and I enjoy using it immensely. Thanks for all the perseverance and patience. You must have

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Richard Hipp
On 1/4/17, Simon Slavin wrote: > > On 4 Jan 2017, at 1:43pm, Ken Wagner wrote: > >> There is yet another product "DB Browser for SQLite" using SQLite v 3.9.2. >> It, too, omits any row where name contains any char 1 thru 9. It appears >> SQLite at one point did this as 'GLOB '*[^1-9]*'. >> >> But

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
Ryan, Both 'AB6' or '5AB' fail the '[^1-9]' test. So, too do 'New Vol 4' and '#1'. Ken On 01/04/2017 07:57 AM, R Smith wrote: On 2017/01/04 3:43 PM, Ken Wagner wrote: Yes, I changed the query to NOT GLOB '*[1-9]*' and then it omitted the 1-9 char-containing entries. However the logic o

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
Ryan, The Regex description of '[^0-9]' states NOT any 0 thru 9 char in any SINGLE char position. It can be amended to 1-9 or 3-7 or 1-4 as the user sees fit. Tested it using Ruby and Rubular, a Regex Tester. HTH, Ken On 01/04/2017 07:57 AM, R Smith wrote: On 2017/01/04 3:43 PM, Ken Wa

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
Ryan, I will use the SQLite3 CLI as the acid test. But I still don't grasp why v 3.11.0 honors the GLOB by omitting any row where name contains a 1 thru 9 char but 3.15.0 and 3.16.0 do not. I expect I have missed a deprecation. It's just confusing and extra nit-picking and testing. Thanks

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
Simon, Yes, I am using the SQLite3 CLI. That's how I discovered the different GLOB outcomes. I now understand that the SQLite3 GLOB function is not fully documented so it's best to just experiment with the GLOB function at the CLI for SQLite3. And avoid using SQLite3 versions prior to 3.15.

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
Ryan, FWIW -- I upgraded the DB Browser from v. 3.9 to v 3.11.0. This too honors the GLOB '*[^1-9]*' by omitting any entry with a 1 thru 9 in it in any char position. This sqlitebrower is on git hub. It's a nice SQLite tool. (So far...) Ken On 01/04/2017 07:13 AM, R Smith wrote: Just one

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread R Smith
On 2017/01/04 3:43 PM, Ken Wagner wrote: Yes, I changed the query to NOT GLOB '*[1-9]*' and then it omitted the 1-9 char-containing entries. However the logic of 'zero or any chars, then any single char NOT 1 thru 9, then zero or any chars' should OMIT any name with a 1 thru 9 in it regardl

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Simon Slavin
On 4 Jan 2017, at 1:43pm, Ken Wagner wrote: > There is yet another product "DB Browser for SQLite" using SQLite v 3.9.2. > It, too, omits any row where name contains any char 1 thru 9. It appears > SQLite at one point did this as 'GLOB '*[^1-9]*'. > > But it does not do so now. Does SQLite3 p

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
Yes, I changed the query to NOT GLOB '*[1-9]*' and then it omitted the 1-9 char-containing entries. However the logic of 'zero or any chars, then any single char NOT 1 thru 9, then zero or any chars' should OMIT any name with a 1 thru 9 in it regardless if it is 'Vol. 3', for example, or 'Vol.

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread Ken Wagner
The "select trackid, name from tracks where name GLOB '*[^1-9]*';" query works as expected and does NOT include names with 1 thru 9 in them in SQLiteMan, a Linux/Ubuntu SQL manager. It uses SQLite as the DB backend. The logic of any # chars but NOT 1 thru 9 plus any # chars means NOT 1,2,3,4,5

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread R Smith
Just one more point of clarity, in case my previous explanation did not high-light this: The query: select trackid, name from tracks where name GLOB '*[^1-9]*'; is completely different to the query: select trackid, name from tracks where name NOT GLOB '*[1-9]*'; The prior excludes only names w

Re: [sqlite] SQLite3 Tutorial error

2017-01-04 Thread R Smith
On 2017/01/04 7:17 AM, Ken Wagner wrote: About 2/3 the way down the page at: http://www.sqlitetutorial.net/sqlite-glob/ Get names without [1-9]. select trackid, name from tracks where name GLOB '*[^1-9]*'; Works properly in SQLiteMan and the SQLite Tutorial. ( Two different produc

Re: [sqlite] SQLite3 Tutorial error

2017-01-03 Thread Ken Wagner
Thanks, Jens. I will do that. - Ken On 01/04/2017 12:29 AM, Jens Alfke wrote: On Jan 3, 2017, at 9:17 PM, Ken Wagner wrote: About 2/3 the way down the page at: http://www.sqlitetutorial.net/sqlite-glob/ Get names without [1-9]. You shoul

Re: [sqlite] SQLite3 Tutorial error

2017-01-03 Thread Jens Alfke
> On Jan 3, 2017, at 9:17 PM, Ken Wagner wrote: > > About 2/3 the way down the page at: > > http://www.sqlitetutorial.net/sqlite-glob/ > Get names without [1-9]. You should probably report this to the people who run that website. It’s not as

Re: [sqlite] SQLite3 Tutorial error

2017-01-03 Thread Ken Wagner
About 2/3 the way down the page at: http://www.sqlitetutorial.net/sqlite-glob/ Get names without [1-9]. select trackid, name from tracks where name GLOB '*[^1-9]*'; Works properly in SQLiteMan and the SQLite Tutorial. ( Two different products, not officially part of sqlite.org, I thi

Re: [sqlite] SQLite3 Tutorial error

2017-01-03 Thread Richard Hipp
On 1/3/17, Ken Wagner wrote: > Hi SQLite, > > In the SQLite3 Tutorial What tutorial are you referring to? -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailm

[sqlite] SQLite3 Tutorial error

2017-01-03 Thread Ken Wagner
Hi SQLite, In the SQLite3 Tutorial the following query is said to find all names WITHOUT numbers in them. But it fails to do so. select trackid, name from tracks where name GLOB '*[^1-9]*'; per the tutorial fails to list names WITHOUT numbers in them. However, this DOES work: select trac