View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002361 | Composr | core_database_drivers | public | 2016-03-30 14:07 | 2017-05-16 13:49 |
Reporter | Chris Graham | Assigned To | Chris Graham | ||
Severity | Feature-request | ||||
Status | resolved | Resolution | fixed | ||
Product Version | |||||
Fixed in Version | |||||
Summary | 0002361: Add support for abstracting some basic SQL functions | ||||
Description | SQL functions are ill-defined or not defined at all in SQL standards. Currently we sometimes add in a little extra functionality/performance for mysql-only, by using some functions behind guards. Here are the ones we may use... CONCAT REPLACE REVERSE SUBSTR LENGTH UNIX_TIMESTAMP RAND IFNULL GREATEST MOD Allow us to do like... $GLOBALS['SITE_DB']->query('SELECT * FROM foo WHERE ' . $GLOBALS['SITE_DB']->sql_cleanup('SUBSTR(bar,0,1)=\'something\'')); It's a bit ugly, but at least it then allows database drivers to override sql_cleanup and fix SQL that won't work on that driver. An alternative would be to implement a full SQL parser, but that's a performance issue and a lot of overhead in the code. | ||||
Tags | No tags attached. | ||||
Time estimation (hours) | 3 | ||||
Sponsorship open | |||||
Date Modified | Username | Field | Change |
---|---|---|---|
2016-03-30 14:07 | Chris Graham | New Issue | |
2017-05-15 00:01 | Chris Graham | Description Updated | View Revisions |
2017-05-16 13:49 | Chris Graham | Status | non-assigned => resolved |
2017-05-16 13:49 | Chris Graham | Resolution | open => fixed |
2017-05-16 13:49 | Chris Graham | Assigned To | => Chris Graham |