I am trying to get the existence of a row using Oracle and Petapoco. So far I have the following code.
var sql =new Sql("select COUNT(*) FROM myTable where field = 'value'");
var exists = myDB.Query<int>(sql) > 0;
This feels kinda dirty as I'm splitting the work between the database and my application. Is there a way I could do something like the following?
var exists = myDB.Query<bool>(someNewSqlThatReturnsBool);