querybuilder
querybuilder copied to clipboard
Option to convert object names to uppercase for OracleCompiler
Basically all Oracle databases I have seen automatically convert object names to uppercase, which makes us have to write ugly c# code like
public class Foo
{
public string BAR{ get; set;}
}
or
public class Foo
{
[Column("BAR")]
public string Bar{ get; set;}
}
I think this option is necessary.
Could you please point to some official docs for this?
Could you please point to some official docs for this?
Please read this Database Object Names and Qualifiers
This is the issue about quoted identifier and nonquoted identifier.
When we are using a GUI tool to create a table, such as PL/SQL Developer, it generates SQL like this:
create table BOOKS
(
id raw(16) default sys_guid(),
name varchar2(128)
)
In this case we can write SQL like
SELECT id, name FROM books;
-- or
SELECT iD,nAme from bOokS;
-- or
SELECT "ID","NAME" FROM "BOOKS";
and this is not worked
SELECT "Id", "Name" from "Books"
I found that DataGrip does better,it will automatic add quotes if your input is case sensitive.
create table "Books"
(
"Id" raw(16) default sys_guid(),
"Name" varchar2(128)
)
But we can not write SQL like this any more
SELECT id,name FROM books
So for all the Oracle users who is using nonquoted identifier, we have to override the Compiler to make the column names uppercase or remove the quotes.