예제 #1
0
 def _execute_raise_permission_denied(self,
                                      cursor,
                                      parameters,
                                      keepdb=False):
     error = DatabaseError("permission denied to create database")
     error.pgcode = errorcodes.INSUFFICIENT_PRIVILEGE
     raise DatabaseError() from error
예제 #2
0
 def _execute_raise_database_already_exists(self,
                                            cursor,
                                            parameters,
                                            keepdb=False):
     error = DatabaseError("database %s already exists" %
                           parameters["dbname"])
     error.pgcode = errorcodes.DUPLICATE_DATABASE
     raise DatabaseError() from error