empire-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alberto Osvaldo Gonzalez <aogonza...@sofrecom.com.ar>
Subject RE: Fix on PostgreSQLDriver
Date Fri, 28 Oct 2016 18:26:53 GMT

De: Alberto Osvaldo Gonzalez
Enviado el: viernes, 28 de octubre de 2016 15:23
Para: 'user@empire-db.apache.org' <user@empire-db.apache.org>
Asunto: Fix on PostgreSQLDriver

Hi, this is Alberto from Argentina. I'm using empire-db and found an issue using postgresqldriver.
The problem appears when using the "year" function to extract the year from a date.

This is the original source code:

(line 347)

case SQL_FUNC_DAY:                return "day(?)";
case SQL_FUNC_MONTH:              return "month(?)";
case SQL_FUNC_YEAR:               return "year(?)";

And this is what i modified:

(line 347)
case SQL_FUNC_DAY:                return "extract(day from ?)";
case SQL_FUNC_MONTH:              return "extract(month from ?)";
case SQL_FUNC_YEAR:               return "extract(year from ?)";

I do not know if there's a way I can fix the code on a branch or sth. If there is way just
tell me and i'll do it. I'm not very familiar with git but i think i can manage.

Thanks in advance.

Alberto

Mime
View raw message