How do I get or print the raw sql query from a model query

I have a sample model query to read all the posts from the table as shown below

$posts = Posts::find('all');

Any function/method available in li3, that could print the above query into a plain sql query as shown below

select * from Posts;