red-soft-ru / shardingsphere

Distributed SQL transaction & query engine for data sharding, scaling, encryption, and more - on any database.
Apache License 2.0
0 stars 1 forks source link

T141 SIMILAR predicate support #137

Closed makssent closed 2 weeks ago

makssent commented 3 weeks ago

Fixes #41.

req: CREATE TABLE T141 (ROW_NUM NUMERIC(3) NOT NULL, ROW_NAME VARCHAR(25) NOT NULL, ROW_PHONE VARCHAR(14) CHECK (ROW_PHONE SIMILAR TO '([0-9]{3}) [0-9]{3}-[0-9]{4}' escape '\'))

err: You have an error in your SQL syntax: CREATE TABLE T141 (ROW_NUM NUMERIC(3) NOT NULL ROW_NAME VARCHAR(25) NOT NULL ROW_PHONE VARCHAR(14) CHECK (ROW_PHONE SIMILAR TO '(0-9{3}) 0-9{3}-0-9{4}' escape '')) no viable alternative at input '(ROW_PHONESIMILAR' at line 1 position 119 near @28119:125='SIMILAR'<340>1:119

new err: You have an error in your SQL syntax: no viable alternative at input '''

Error with part: " escape '\' "