All LIKE and GLOB operators to use function notation. "A LIKE B" can be

expressed as "LIKE(B,A)". (CVS 1108)

FossilOrigin-Name: 95b27ebd1322a877112dee514dffddb0937e45fa
This commit is contained in:
drh 2003-09-30 01:54:13 +00:00
parent 4f88c849f3
commit 319e4e7484
4 changed files with 19 additions and 12 deletions

View File

@ -1,5 +1,5 @@
C Patch\sthe\sspec.template\sfile\s(for\sgenerating\sRPMs)\sas\ssuggested\sby\nJeremy\sHinegardner.\s\sUntested.\s(CVS\s1107)
D 2003-09-29T12:20:51
C All\sLIKE\sand\sGLOB\soperators\sto\suse\sfunction\snotation.\s\s"A\sLIKE\sB"\scan\sbe\nexpressed\sas\s"LIKE(B,A)".\s(CVS\s1108)
D 2003-09-30T01:54:14
F Makefile.in ab585a91e34bc33928a1b6181fa2f6ebd4fb17e1
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
@ -41,7 +41,7 @@ F src/os.c 97df440bc71f65e22df5d3d920ce39551c0a5f5a
F src/os.h 729395fefcca4b81ae056aa9ff67b72bb40dd9e0
F src/pager.c 62702dff51d50694d039bc210f31990d1fbba2dd
F src/pager.h 5da62c83443f26b1792cfd72c96c422f91aadd31
F src/parse.y 8ef7f4e09bfa28d9b545ae9c3f2338532264d4cd
F src/parse.y ec5d0d0a59b4ce508ab6b980cc4a19a47dd363ef
F src/pragma.c cee60f17679210e8acd30d5bdee855716d0c898c
F src/printf.c 12e45d482ac8abcc6f786fc99e5bed7dd9a51af0
F src/random.c 19e8e00fe0df32a742f115773f57651be327cabe
@ -83,7 +83,7 @@ F test/capi2.test ec96e0e235d87b53cbaef3d8e3e0f8ccf32c71ca
F test/conflict.test 0911bb2f079046914a6e9c3341b36658c4e2103e
F test/copy.test 88dabd4e811b17644b726aa81d404e73b7635c84
F test/delete.test 92256384f1801760180ded129f7427884cf28886
F test/expr.test 48bc6400627532ec97e233809e33d336468bc84c
F test/expr.test c4cc292d601019c2f2ce95093caaa5d10284b105
F test/fkey1.test d65c824459916249bee501532d6154ddab0b5db7
F test/format3.test b05cb2968841553698290f2833f72894f156024e
F test/func.test 000515779001ac6899eec4b54e65c6e2501279d4
@ -173,7 +173,7 @@ F www/speed.tcl 2f6b1155b99d39adb185f900456d1d592c4832b3
F www/sqlite.tcl 3c83b08cf9f18aa2d69453ff441a36c40e431604
F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da
F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1
P 824430b3ce435386b83ceb882f1510ac9f27d8fa
R 8879c51efefc0175c7467026fd168f33
P 703741ca1e2b0bf79a4e3cda3cf3c6862d7263eb
R 1866bbb11afee0781d80fc94f74943f5
U drh
Z bc4e8a4b0a7e8a516ebe61ed14fd268a
Z cd7d1e8e63d30fe7cb84ae2ae0a6e46c

View File

@ -1 +1 @@
703741ca1e2b0bf79a4e3cda3cf3c6862d7263eb
95b27ebd1322a877112dee514dffddb0937e45fa

View File

@ -14,7 +14,7 @@
** the parser. Lemon will also generate a header file containing
** numeric codes for all of the tokens.
**
** @(#) $Id: parse.y,v 1.102 2003/09/27 13:39:39 drh Exp $
** @(#) $Id: parse.y,v 1.103 2003/09/30 01:54:14 drh Exp $
*/
%token_prefix TK_
%token_type {Token}
@ -125,10 +125,10 @@ id(A) ::= ID(X). {A = X;}
// fallback to ID if they will not parse as their original value.
// This obviates the need for the "id" nonterminal.
//
%fallback ID
%fallback ID
ABORT AFTER ASC ATTACH BEFORE BEGIN CASCADE CLUSTER CONFLICT
COPY DATABASE DEFERRED DELIMITERS DESC DETACH EACH END EXPLAIN FAIL FOR
IGNORE IMMEDIATE INITIALLY INSTEAD MATCH KEY
GLOB IGNORE IMMEDIATE INITIALLY INSTEAD LIKE MATCH KEY
OF OFFSET PRAGMA RAISE REPLACE RESTRICT ROW STATEMENT
TEMP TRIGGER VACUUM VIEW.

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is testing expressions.
#
# $Id: expr.test,v 1.29 2003/04/16 02:17:36 drh Exp $
# $Id: expr.test,v 1.30 2003/09/30 01:54:15 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -507,4 +507,11 @@ test_expr2 expr-7.57 {((a>0 IS NULL OR 0) AND 1) OR 0} {{}}
test_expr2 expr-7.58 {(a||'')<='1'} {1}
test_expr2 expr-7.59 {LIKE('10%',b)} {10 20}
test_expr2 expr-7.60 {LIKE('_4',b)} {6}
test_expr2 expr-7.61 {GLOB('1?',a)} {10 11 12 13 14 15 16 17 18 19}
test_expr2 expr-7.62 {GLOB('1*4',b)} {10 14}
test_expr2 expr-7.63 {GLOB('*1[456]',b)} {4}
finish_test