Skip to content

Commit 94f050f

Browse files
committed
add ci4 builder class support
1 parent 76acea0 commit 94f050f

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/DB/Codeigniter4Adapter.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,17 @@ public function escape($string, Query $query)
6666

6767
return '?';
6868
}
69-
}
69+
70+
/**
71+
* @param $query
72+
* @return string
73+
*/
74+
public function getQueryString($query)
75+
{
76+
if ($query instanceof \CodeIgniter\Database\BaseBuilder) {
77+
return $query->getCompiledSelect();
78+
}
79+
80+
return $query;
81+
}
82+
}

0 commit comments

Comments
 (0)