You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're having some weird way of specifying strings with dates. Usually, a string with a date should be something like "2013-12-31". However, in some cases, we have to use "'2013-12-31'" (note the backslash-quote as a part of the string).
An example is the argument startdate (and enddate) for GetSCMEvolutionaryData.
This seems to be due to some lower functions needing the quotes in the string to compose queries for the database. I've traced this to at least two functions: GetSQLPeriod and GetSQLGlobal in Auxiliary.R. Instead of adding the quotes themselves (they are needed to compose the SQL queries), they relay on the parameters already having the quotes.
My proposal is that we should avoid all of this, since it is weird, difficult to explain, error-prone and probably has only historical reasons. Dates should always be strings, with no need for extra quotes.
However, this could break scripts calling all these functions, so the change should be done with care. As soon as I have some time, I could produce a patch for this. But meanwhile, opinions are welcome.
The text was updated successfully, but these errors were encountered:
We're having some weird way of specifying strings with dates. Usually, a string with a date should be something like "2013-12-31". However, in some cases, we have to use "'2013-12-31'" (note the backslash-quote as a part of the string).
An example is the argument startdate (and enddate) for GetSCMEvolutionaryData.
This seems to be due to some lower functions needing the quotes in the string to compose queries for the database. I've traced this to at least two functions: GetSQLPeriod and GetSQLGlobal in Auxiliary.R. Instead of adding the quotes themselves (they are needed to compose the SQL queries), they relay on the parameters already having the quotes.
My proposal is that we should avoid all of this, since it is weird, difficult to explain, error-prone and probably has only historical reasons. Dates should always be strings, with no need for extra quotes.
However, this could break scripts calling all these functions, so the change should be done with care. As soon as I have some time, I could produce a patch for this. But meanwhile, opinions are welcome.
The text was updated successfully, but these errors were encountered: