Closed ChinaXing closed 7 years ago
Because, the column names usually are case insensitive in the database, and in most cases is the database that returns the column names normalized to lowe case.
Let see a little example using postgresql:
test=# create table test (aA int);
CREATE TABLE
test=# insert into test (aa) values (1);
INSERT 0 1
test=# insert into test (aa) values (2), (3), (4);
INSERT 0 3
test=# select * from test;
aa
----
1
2
3
4
(4 rows)
test=# select aa,AA,aA from test;
aa | aa | aa
----+----+----
1 | 1 | 1
2 | 2 | 2
3 | 3 | 3
4 | 4 | 4
This is not what MySQL presents. Maybe keep what database returned is a better way?
You can provide your own behavior, providing the {:identifiers identity}
option
rds-test> (jdbc.core/fetch conn ["select haNetworkTimeout from InstanceGroup"])
[{:hanetworktimeout 5}]
the column name is : "haNetworkTimeout", but result key is : "hanetworktimeout"
why do this conversion ?