I can\'t use grants for this functionality, since I\'m going to give the database source code to the user and not just allow his access to a data base.
Is there a way