class DropPlugin extends AdminStatement {

    private String pluginName;
    private boolean ifExists;

    public DropPlugin(ServerSession session) {
        super(session);
    }

    @Override
    public int getType() {
        return SQLStatement.DROP_PLUGIN;
    }

    public void setPluginName(String name) {
        this.pluginName = name;
    }

    public void setIfExists(boolean ifExists) {
        this.ifExists = ifExists;
    }

    @Override
    public int update() {<FILL_FUNCTION_BODY>}
}

        LealoneDatabase.checkAdminRight(session, "drop plugin");
        LealoneDatabase lealoneDB = LealoneDatabase.getInstance();
        DbObjectLock lock = lealoneDB.tryExclusivePluginLock(session);
        if (lock == null)
            return -1;
        PluginObject pluginObject = lealoneDB.findPluginObject(session, pluginName);
        if (pluginObject == null) {
            if (!ifExists)
                throw DbException.get(ErrorCode.PLUGIN_NOT_FOUND_1, pluginName);
        } else {
            pluginObject.close();
            lealoneDB.removeDatabaseObject(session, pluginObject, lock);
            // 将缓存过期掉
            lealoneDB.getNextModificationMetaId();
        }
        return 0;
    
<methods>public void <init>(com.lealone.db.session.ServerSession) ,public boolean needRecompile() <variables>