panates / postgrejs

Professional PostgreSQL client for NodeJS
https://postgrejs.panates.com
MIT License
50 stars 12 forks source link

Column names converted to a lower case #25

Closed I-K-devit closed 1 year ago

I-K-devit commented 1 year ago

Describe the bug When preparing a statement with a column name which has an upper case letter ("tradeId"):

const createIntervalStatement = await connection.prepare(
  `insert into intervals(tradeId) values (123)`,
  {}
);

I got an error that implies that I've passing a lower-cased column name

DatabaseError: column "tradeid" of relation "intervals" does not exist

Expected behavior I assume that it must have the same column name that I'm passing in the prepare connection method

Desktop:

Additional context This "tradeId" field is being generated by TypeORM so I'm not responsible for a column naming. Is this some kind of expected behavior? Is there some ways to prevent a string to being converted?

erayhanoglu commented 1 year ago

This is a PostgreSQL issue. It is not related to the driver itself.

I-K-devit commented 1 year ago

Got it, thank you for a quick response!

erayhanoglu commented 1 year ago

You are welcome :thumbsup: