Changeset 21479 for branches/version-2_12-dev/data/class/db
- Timestamp:
- 2012/02/11 04:20:07 (15 years ago)
- Location:
- branches/version-2_12-dev/data/class/db/dbfactory
- Files:
-
- 2 edited
-
SC_DB_DBFactory_MYSQL.php (modified) (5 diffs)
-
SC_DB_DBFactory_PGSQL.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/db/dbfactory/SC_DB_DBFactory_MYSQL.php
r21448 r21479 60 60 * @return string MySQL 用に置換した SQL 文 61 61 */ 62 function sfChangeMySQL($sql) {62 function sfChangeMySQL($sql) { 63 63 // 改行、タブを1スペースに変換 64 64 $sql = preg_replace("/[\r\n\t]/"," ",$sql); … … 236 236 * @return string 変換後の SQL 文 237 237 */ 238 function sfChangeILIKE($sql) {238 function sfChangeILIKE($sql) { 239 239 $changesql = preg_replace('/(^|[^\w])ILIKE([^\w]|$)/i', '$1LIKE$2', $sql); 240 240 return $changesql; … … 248 248 * @return string 変換後の SQL 文 249 249 */ 250 function sfChangeRANDOM($sql) {250 function sfChangeRANDOM($sql) { 251 251 $changesql = preg_replace('/(^|[^\w])RANDOM\(/i', '$1RAND(', $sql); 252 252 return $changesql; … … 260 260 * @return string 変換後の SQL 文 261 261 */ 262 function sfChangeTrunc($sql) {262 function sfChangeTrunc($sql) { 263 263 $changesql = preg_replace('/(^|[^\w])TRUNC([^\w]|$)/i', '$1TRUNCATE$2', $sql); 264 264 return $changesql; … … 272 272 * @return string 変換後の SQL 文 273 273 */ 274 function sfChangeArrayToString($sql) {274 function sfChangeArrayToString($sql) { 275 275 if (strpos(strtoupper($sql), 'ARRAY_TO_STRING') !== FALSE) { 276 276 preg_match_all('/ARRAY_TO_STRING.*?\(.*?ARRAY\(.*?SELECT (.+?) FROM (.+?) WHERE (.+?)\).*?\,.*?\'(.+?)\'.*?\)/is', $sql, $match, PREG_SET_ORDER); -
branches/version-2_12-dev/data/class/db/dbfactory/SC_DB_DBFactory_PGSQL.php
r21441 r21479 60 60 * @return string MySQL 用に置換した SQL 文 61 61 */ 62 function sfChangeMySQL($sql) {62 function sfChangeMySQL($sql) { 63 63 return $sql; 64 64 }
Note: See TracChangeset
for help on using the changeset viewer.
