record-macros was attempting to use the MySQL CONCAT function for string concatenation, which is not supported in SQLite, resulting in sql errors.
This change switches to using the slightly more standard string concat pipe operator (||) which is supported on both platforms. However, in order to use this feature in MySQL the PIPES_AS_CONCAT sql_mode must be enabled, thus this is done automatically in sys.db.Manager.set_cnx upon MySQL assignment.
This does mean we're altering the sys.db.Connection upon assignment. Alternatively we could just use differing syntax depending on connection type, but I'm not sure the best way of performing this check within RecordMacros, as we're in compiletime land, there.
fixes #28
record-macros was attempting to use the MySQL
CONCAT
function for string concatenation, which is not supported in SQLite, resulting in sql errors.This change switches to using the slightly more standard string concat pipe operator (||) which is supported on both platforms. However, in order to use this feature in MySQL the
PIPES_AS_CONCAT
sql_mode must be enabled, thus this is done automatically insys.db.Manager.set_cnx
upon MySQL assignment.This does mean we're altering the sys.db.Connection upon assignment. Alternatively we could just use differing syntax depending on connection type, but I'm not sure the best way of performing this check within RecordMacros, as we're in compiletime land, there.