Allow to lock the table with ModelSQL.lock
Sometimes we need to lock the all table. For now we need to call directly the lock method on database
which requires some low level knowledge.
Instead we could reuse the ModelSQL.lock
method to lock the all table if no records is passed.