go-xorm / xorm

Simple and Powerful ORM for Go, support mysql,postgres,tidb,sqlite3,mssql,oracle, Moved to https://gitea.com/xorm/xorm
BSD 3-Clause "New" or "Revised" License
6.67k stars 754 forks source link

Oracle Dialect Quote Brackets #1434

Open sumiet opened 5 years ago

sumiet commented 5 years ago

I am using this library to generate queries for Oracle (Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production) and it generates table and column names with square brackets around them. For example:

Actual: Select [column_name] from [table_name]; Expected: Select column_name from table_name;

I did some analysis and found that the brackets are coming from the Quote method in oracl_dialect file. Is there a way to disable the quote application? or to go back to "\"" quote format?

If not please consider fixing it. Thanks in advance.

sumiet commented 5 years ago

The reference git commit in which this change was brought in: https://github.com/go-xorm/xorm/commit/b757473de7f547d767fc5425c060026d5c89af5c?diff=split