comparison DBD/monetdb.pm @ 17:8a0be77580c3

Use raw strings for string parameters to prepared SQL queries. As part of this, the string prefix is changed to r' instead of plain '.
author Sjoerd Mullender <sjoerd@acm.org>
date Thu, 09 Apr 2020 16:11:32 +0200 (2020-04-09)
parents 8c8bd15f7a0b
children 1bdbb3ca1ae0
comparison
equal deleted inserted replaced
16:64888d282f47 17:8a0be77580c3
100 unless defined $value; 100 unless defined $value;
101 101
102 $value = Encode::encode_utf8($value); 102 $value = Encode::encode_utf8($value);
103 103
104 for ($value) { 104 for ($value) {
105 s/\\/\\\\/g;
106 s/\n/\\n/g;
107 s/"/\\"/g;
108 s/'/''/g; 105 s/'/''/g;
109 } 106 }
110 107
111 $type ||= DBI::SQL_VARCHAR(); 108 $type ||= DBI::SQL_VARCHAR();
112 109