p5-Teng icon indicating copy to clipboard operation
p5-Teng copied to clipboard

Append warning to search_by_sql/search_named.

Open cho45 opened this issue 11 years ago • 0 comments

Currently Teng allows following with no warnings:

my $row = $teng->search_by_sql('SELECT * FROM entry WHERE id = ?', [1], 'user');
$row->delete; # user with id = 1 will be deleted.

This patch appends warning when the table name is not exists in the sql.

Or more solution with consideration:

  • No warning option?
  • Just die in these cases?

cho45 avatar Jul 09 '13 09:07 cho45