o1lab / xmysql

xmysql is now https://github.com/nocodb/nocodb
https://github.com/nocodb/nocodb
MIT License
174 stars 55 forks source link

Problem with table name containing punctuation mark #25

Open neilxp opened 5 years ago

neilxp commented 5 years ago

I have many tables with punctuation marks in their name, which is legal in MySQL. Including ()_~* But xmysql doesn't work with these tables.

oqc@OmegaStation3:~$ curl 'http://127.0.0.1:3000/api/DK_(IC1909*2~IF1909*3)~(sh000905*2~sh000300*3)/describe' <!DOCTYPE html>

Error
Cannot GET /api/DK_(IC1909*2~IF1909*3)~(sh000905*2~sh000300*3)/describe

Other tables without these punctuations in names are OK.

oqc@OmegaStation3:~$ curl 'http://127.0.0.1:3000/api/DK_sh000300/describe' [{"Field":"id","Type":"bigint(20)","Null":"NO","Key":"PRI","Default":null,"Extra":"auto_increment"},{"Field":"instrumentId","Type":"varchar(30)","Null":"YES","Key":"","Default":null,"Extra":""},{"Field":"day","Type":"date","Null":"YES","Key":"UNI","Default":null,"Extra":""},{"Field":"open","Type":"double","Null":"YES","Key":"","Default":null,"Extra":""},{"Field":"close","Type":"double","Null":"YES","Key":"","Default":null,"Extra":""},{"Field":"high","Type":"double","Null":"YES","Key":"","Default":null,"Extra":""},{"Field":"low","Type":"double","Null":"YES","Key":"","Default":null,"Extra":""},{"Field":"preClose","Type":"double","Null":"YES","Key":"","Default":null,"Extra":""}]

Please provide dev environment versions of your system

oqc@OmegaStation3:~$ node -v v10.16.0 oqc@OmegaStation3:~$ npm -v 6.9.0 oqc@OmegaStation3:~$ mysql --version mysql Ver 14.14 Distrib 5.7.19, for Linux (x86_64) using EditLine wrapper oqc@OmegaStation3:~$ xmysql --version xmysql@0.5.0

Mark issue with suitable label if it is clear what this issue is.